From: Luciano Montanaro Date: Mon, 11 Jul 2011 14:19:34 +0000 (+0200) Subject: Add the Harmattan code path X-Git-Tag: tags/0.4.81~128 X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=cd7bdff6e3d6b46852a3d5d4bd830489b4ab0984;p=quandoparte Add the Harmattan code path Added code to main.cpp to start the QML view, disable most stuff, adapted the .pro file --- diff --git a/application/application.pro b/application/application.pro index f17119b..054d918 100644 --- a/application/application.pro +++ b/application/application.pro @@ -4,32 +4,61 @@ # #------------------------------------------------- -QT += webkit network +VERSION = 0.4.80 -maemo5 { - QT += maemo5 -} +QT += webkit network harmattan { + QT += declarative PLATFORM = harmattan + DEFINES += TARGET_PLATFORM_HARMATTAN + # enable booster + CONFIG += qdeclarative-boostable + QMAKE_CXXFLAGS += -fPIC -fvisibility=hidden -fvisibility-inlines-hidden + QMAKE_LFLAGS += -pie -rdynamic + PLATFORM_SOURCES = view.cpp + PLATFORM_HEADERS = view.h } maemo5 { + QT += maemo5 PLATFORM = fremantle + DEFINES += TARGET_PLATFORM_FREMANTLE + PLATFORM_SOURCES = \ + app.cpp \ + stationlistview.cpp \ + stationview.cpp \ + settingsdialog.cpp \ + keypressforwarder.cpp + PLATFORM_HEADERS= \ + app.h \ + stationlistview.h \ + keypressforwarder.h \ + settingsdialog.h \ + stationview.h } symbian { + QT += declarative + DEFINES += TARGET_PLATFORM_SYMBIAN PLATFORM = symbian + PLATFORM_SOURCES = view.cpp + PLATFORM_HEADERS = view.h } !harmattan:!maemo5:!symbian { PLATFORM = desktop + DEFINES += TARGET_PLATFORM_DESKTOP + PLATFORM_SOURCES = view.cpp } -message(Compiling for the $$PLATFORM platform) + +message(Compiling For: $$PLATFORM) +message(Platform Sources: $$PLATFORM_SOURCES) +message(Qt Modules Used: $$QT) +message(Building version: $$VERSION) CONFIG += qt webkit mobility MOBILITY = location TARGET = quandoparte TEMPLATE = app -VERSION = 0.4.4 VERSION_STRING = '\\"$${VERSION}\\"' DEFINES += QP_VERSION=\"$${VERSION_STRING}\" @@ -39,21 +68,14 @@ DEFINES += QP_VERSION=\"$${VERSION_STRING}\" TRANSLATIONS = resources/i18n/quandoparte_it.ts -SOURCES += main.cpp \ - settingsdialog.cpp \ - stationview.cpp \ - app.cpp \ - stationlistview.cpp \ - keypressforwarder.cpp \ +SOURCES += \ + $$PLATFORM_SOURCES \ + main.cpp \ stationlistmodel.cpp \ stationlistproxymodel.cpp HEADERS += \ - settingsdialog.h \ - stationview.h \ - app.h \ - stationlistview.h \ - keypressforwarder.h \ + $$PLATFORM_HEADERS \ stationlistmodel.h \ stationlistproxymodel.h @@ -81,7 +103,8 @@ OTHER_FILES += \ $$replace(TRANSLATIONS, .ts, .qm) \ resources/stations/stations.qpl \ resources/stations/generatelist.xq \ - resources/stations/generateunclassifiedlist.xq + resources/stations/generateunclassifiedlist.xq \ + resources/harmattan/qml/main.qml unix { isEmpty(PREFIX) { @@ -140,3 +163,9 @@ unix:!symbian { INSTALLS += i18n INSTALLS += stations } + +harmattan { + qml.files = resources/harmattan/qml/*.qml + qml.path = $$DATADIR/qml + INSTALLS += qml +} diff --git a/application/main.cpp b/application/main.cpp index 9a8c17c..3b7a519 100644 --- a/application/main.cpp +++ b/application/main.cpp @@ -20,6 +20,7 @@ Boston, MA 02110-1301, USA. */ #include "app.h" +#include "view.h" #include #include @@ -41,6 +42,7 @@ int main(int argc, char *argv[]) QDir::setSearchPaths("css", QStringList(DATADIR "/css")); QDir::setSearchPaths("stations", QStringList(DATADIR "/stations")); QDir::setSearchPaths("i18n", QStringList(DATADIR "/i18n")); + QDir::setSearchPaths("qml", QStringList(DATADIR "/qml")); #ifdef QT_KEYPAD_NAVIGATION QApplication::setNavigationMode(Qt::NavigationModeKeypadTabOrder); @@ -54,9 +56,12 @@ int main(int argc, char *argv[]) } else { qDebug() << "Translation for locale" << locale << "not found"; } +#ifdef TARGE_PLATFORM_FREMANTLE App theApp; +#else + View theView; + theView.show(); +#endif return a.exec(); - - theApp.saveSettings(); } diff --git a/qtc_packaging/debian_fremantle/changelog b/qtc_packaging/debian_fremantle/changelog index e6ed5a2..63845f6 100644 --- a/qtc_packaging/debian_fremantle/changelog +++ b/qtc_packaging/debian_fremantle/changelog @@ -1,10 +1,4 @@ -quandoparte (0.4.4) unstable; urgency=low - * Updated station list - * Udated icons - - -- Luciano Montanaro Sun, 18 Dec 2011 15:14:14 +0100 - -quandoparte (0.4.3) unstable; urgency=low +quandoparte (0.4.80) unstable; urgency=low * Initial Release. diff --git a/qtc_packaging/debian_harmattan/changelog b/qtc_packaging/debian_harmattan/changelog index c6e7977..07c6016 100644 --- a/qtc_packaging/debian_harmattan/changelog +++ b/qtc_packaging/debian_harmattan/changelog @@ -1,9 +1,4 @@ -quandoparte (0.4.4) unstable; urgency=low - * - - -- Luciano Montanaro Sun, 18 Dec 2011 15:14:14 +0100 - -quandoparte (0.4.3) unstable; urgency=low +quandoparte (0.4.80) unstable; urgency=low * Initial Release.