Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D27029731 for ; Fri, 24 Feb 2012 20:52:57 +0000 (UTC) Received: (qmail 15467 invoked by uid 500); 24 Feb 2012 20:52:57 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 15440 invoked by uid 500); 24 Feb 2012 20:52:57 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 15433 invoked by uid 99); 24 Feb 2012 20:52:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:52:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.114] (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Feb 2012 20:52:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7B0A8812D96; Fri, 24 Feb 2012 20:52:11 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [12/26] qt commit: Application made boostable under harmattan. Running from harmattan launcher bug fixed Message-Id: <20120224205211.7B0A8812D96@tyr.zones.apache.org> Date: Fri, 24 Feb 2012 20:52:11 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org 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 Authored: Mon Feb 20 15:28:04 2012 +0400 Committer: Denis Kormalev 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 #include +#ifdef MEEGO_EDITION_HARMATTAN +# include +#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 app(MDeclarativeCache::qApplication(argc, argv)); #else - view.setSource(QUrl(QString("%1/qml/main.qml").arg(Cordova::instance()->workingDir()))); - view.show(); + QScopedPointer app(new QApplication(argc, argv)); #endif -#else + +#if QT_VERSION < 0x050000 +# ifdef MEEGO_EDITION_HARMATTAN + QScopedPointer view(MDeclarativeCache::qDeclarativeView()); +# else + QScopedPointer 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(); }