incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject [12/26] qt commit: Application made boostable under harmattan. Running from harmattan launcher bug fixed
Date Fri, 24 Feb 2012 20:52:11 GMT
Application made boostable under harmattan. Running from harmattan launcher bug fixed


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/commit/16852a95
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/tree/16852a95
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/diff/16852a95

Branch: refs/heads/master
Commit: 16852a95de10d53e7fccdd5312bad705a71dd58b
Parents: b5ec34a
Author: Denis Kormalev <dkormalev@ics.com>
Authored: Mon Feb 20 15:28:04 2012 +0400
Committer: Denis Kormalev <dkormalev@ics.com>
Committed: Mon Feb 20 15:28:04 2012 +0400

----------------------------------------------------------------------
 cordovaqt.pro               |    2 +-
 cordovaqt_harmattan.desktop |    4 +-
 main.cpp                    |   39 +++++++++++++++++++++++++++----------
 3 files changed, 31 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/16852a95/cordovaqt.pro
----------------------------------------------------------------------
diff --git a/cordovaqt.pro b/cordovaqt.pro
index 19d4e62..83ee97b 100644
--- a/cordovaqt.pro
+++ b/cordovaqt.pro
@@ -23,7 +23,7 @@ greaterThan(QT_MAJOR_VERSION, 4) {
         qml/cordova_wrapper.js
 
     QT += declarative
-    CONFIG += mobility
+    CONFIG += mobility qdeclarative-boostable
     MOBILITY += feedback location systeminfo sensors
 } else {
     OTHER_FILES += qml/main.qml \

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/16852a95/cordovaqt_harmattan.desktop
----------------------------------------------------------------------
diff --git a/cordovaqt_harmattan.desktop b/cordovaqt_harmattan.desktop
index 3baa3e0..3c89310 100644
--- a/cordovaqt_harmattan.desktop
+++ b/cordovaqt_harmattan.desktop
@@ -4,8 +4,8 @@ Version=1.0
 Type=Application
 Terminal=false
 Name=cordova-qt
-Exec=/usr/bin/single-instance /opt/cordova-qt/bin/cordova-qt
-Icon=/usr/share/icons/hicolor/80x80/apps/cordova-qt80.png
+Exec=/usr/bin/invoker --type=d -s /opt/cordovaqt/bin/cordovaqt
+Icon=/usr/share/icons/hicolor/80x80/apps/cordovaqt80.png
 X-Window-Icon=
 X-HildonDesk-ShowInToolbar=true
 X-Osso-Type=application/x-executable

http://git-wip-us.apache.org/repos/asf/incubator-cordova-qt/blob/16852a95/main.cpp
----------------------------------------------------------------------
diff --git a/main.cpp b/main.cpp
index a9d33ea..5d3b21b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -29,22 +29,39 @@
 #include <QDeclarativeEngine>
 #include <qplatformdefs.h>
 
+#ifdef MEEGO_EDITION_HARMATTAN
+# include <MDeclarativeCache>
+#endif
+
+#ifdef MEEGO_EDITION_HARMATTAN
+Q_DECL_EXPORT int main(int argc, char *argv[])
+#else
 int main(int argc, char *argv[])
+#endif
 {
-    QApplication app(argc, argv);
 
-#if QT_VERSION < 0x050000
-    QDeclarativeView view;
-    view.setResizeMode(QDeclarativeView::SizeRootObjectToView);
-    view.rootContext()->setContextProperty("cordova", Cordova::instance());
 #ifdef MEEGO_EDITION_HARMATTAN
-    view.setSource(QUrl(QString("%1/qml/main_harmattan.qml").arg(Cordova::instance()->workingDir())));
-    view.showFullScreen();
+    QScopedPointer<QApplication> app(MDeclarativeCache::qApplication(argc, argv));
 #else
-    view.setSource(QUrl(QString("%1/qml/main.qml").arg(Cordova::instance()->workingDir())));
-    view.show();
+    QScopedPointer<QApplication> app(new QApplication(argc, argv));
 #endif
-#else
+
+#if QT_VERSION < 0x050000
+# ifdef MEEGO_EDITION_HARMATTAN
+    QScopedPointer<QDeclarativeView> view(MDeclarativeCache::qDeclarativeView());
+# else
+    QScopedPointer<QDeclarativeView> view(new QDeclarativeView());
+# endif
+    view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+    view->rootContext()->setContextProperty("cordova", Cordova::instance());
+# ifdef MEEGO_EDITION_HARMATTAN
+    view->setSource(QUrl(QString("%1/qml/main_harmattan.qml").arg(Cordova::instance()->workingDir())));
+    view->showFullScreen();
+# else
+    view->setSource(QUrl(QString("%1/qml/main.qml").arg(Cordova::instance()->workingDir())));
+    view->show();
+# endif
+#else // QT_VERSION >= 0x050000
     QQuickView view;
     view.setResizeMode(QQuickView::SizeRootObjectToView);
     view.rootContext()->setContextProperty("cordova", Cordova::instance());
@@ -52,5 +69,5 @@ int main(int argc, char *argv[])
     view.show();
 #endif
 
-    return app.exec();
+    return app->exec();
 }


Mime
View raw message