Add the Harmattan code path
authorLuciano Montanaro <mikelima@cirulla.net>
Mon, 11 Jul 2011 14:19:34 +0000 (16:19 +0200)
committerLuciano Montanaro <mikelima@cirulla.net>
Tue, 27 Dec 2011 22:16:43 +0000 (23:16 +0100)
Added code to main.cpp to start the QML view, disable most stuff,
adapted the .pro file

application/application.pro
application/main.cpp
qtc_packaging/debian_fremantle/changelog
qtc_packaging/debian_harmattan/changelog

index f17119b..054d918 100644 (file)
@@ -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
+}
index 9a8c17c..3b7a519 100644 (file)
@@ -20,6 +20,7 @@ Boston, MA 02110-1301, USA.
 */
 
 #include "app.h"
+#include "view.h"
 
 #include <QApplication>
 #include <QDir>
@@ -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();
 }
index e6ed5a2..63845f6 100644 (file)
@@ -1,10 +1,4 @@
-quandoparte (0.4.4) unstable; urgency=low
-  * Updated station list
-  * Udated icons
-
- -- Luciano Montanaro <mikelima@cirulla.net>  Sun, 18 Dec 2011 15:14:14 +0100
-
-quandoparte (0.4.3) unstable; urgency=low
+quandoparte (0.4.80) unstable; urgency=low
 
   * Initial Release.
 
index c6e7977..07c6016 100644 (file)
@@ -1,9 +1,4 @@
-quandoparte (0.4.4) unstable; urgency=low
-  * <Add change description here>
-
- -- Luciano Montanaro <mikelima@zaphod>  Sun, 18 Dec 2011 15:14:14 +0100
-
-quandoparte (0.4.3) unstable; urgency=low
+quandoparte (0.4.80) unstable; urgency=low
 
   * Initial Release.