From 0b594c27b946eb8c2356f1400e3dfb72be824588 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Mon, 21 Nov 2011 13:24:20 +0100 Subject: Fix use of qmlapplicationviewer. - Two separate copies for demos and example - Fix deployment (don't install to opt in desktop case) Reviewed-by: Casper van Donderen --- demos/declarative/calculator/calculator.pro | 3 +- demos/declarative/flickr/flickr.pro | 3 +- demos/declarative/minehunt/minehunt.pro | 3 +- demos/declarative/photoviewer/photoviewer.pro | 3 +- demos/declarative/rssnews/rssnews.pro | 3 +- demos/declarative/samegame/samegame.pro | 3 +- demos/declarative/snake/snake.pro | 3 +- demos/declarative/twitter/twitter.pro | 3 +- demos/declarative/webbrowser/webbrowser.pro | 3 +- .../qmlapplicationviewer/qmlapplicationviewer.cpp | 197 +++++++++++++++++++++ .../qmlapplicationviewer/qmlapplicationviewer.h | 46 +++++ .../qmlapplicationviewer/qmlapplicationviewer.pri | 150 ++++++++++++++++ .../basics/color-animation/coloranimation.pro | 3 +- .../property-animation/propertyanimation.pro | 3 +- .../behaviors/behavior-example/behaviorexample.pro | 3 +- examples/declarative/animation/easing/easing.pro | 3 +- examples/declarative/animation/states/states.pro | 3 +- .../networkaccessmanagerfactory.pro | 3 +- .../qgraphicsgridlayout/qgraphicsgridlayout.pro | 3 +- .../qgraphicslinearlayout.pro | 3 +- examples/declarative/i18n/i18n.pro | 3 +- .../imageelements/borderimage/borderimage.pro | 3 +- examples/declarative/imageelements/image/image.pro | 3 +- .../declarative/imageelements/shadows/shadows.pro | 3 +- .../declarative/keyinteraction/focus/focus.pro | 3 +- .../declarative/modelviews/Delegate/Delegate.pro | 3 +- .../abstractitemmodel/abstractitemmodel.pro | 3 +- .../gridview-example/gridviewexample.pro | 3 +- .../listview/dynamiclist/dynamiclist.pro | 3 +- .../expandingdelegates/expandingdelegates.pro | 3 +- .../modelviews/listview/highlight/highlight.pro | 3 +- .../listview/highlightranges/highlightranges.pro | 3 +- .../modelviews/listview/sections/sections.pro | 3 +- .../modelviews/objectlistmodel/objectlistmodel.pro | 3 +- .../declarative/modelviews/package/Delegate.pro | 3 +- .../declarative/modelviews/parallax/parallax.pro | 3 +- .../pathview-example/pathviewexample.pro | 3 +- .../modelviews/stringlistmodel/stringlistmodel.pro | 3 +- .../modelviews/visualitemmodel/visualitemmodel.pro | 3 +- .../modelviews/webview/alerts/alerts.pro | 3 +- .../modelviews/webview/autosize/autosize.pro | 3 +- .../modelviews/webview/googlemaps/googlemaps.pro | 3 +- .../modelviews/webview/inlinehtml/inlinehtml.pro | 3 +- .../modelviews/webview/newwindows/newwindows.pro | 3 +- examples/declarative/positioners/positioners.pro | 3 +- .../layoutdirection/layoutdirection.pro | 3 +- .../layoutmirroring/layoutmirroring.pro | 3 +- .../righttoleft/textalignment/textalignment.pro | 3 +- .../declarative/shadereffects/shadereffects.pro | 3 +- .../sqllocalstorage/sqllocalstorage.pro | 3 +- .../text/fonts/availableFonts/availableFonts.pro | 3 +- examples/declarative/text/fonts/banner/banner.pro | 3 +- examples/declarative/text/fonts/fonts/fonts.pro | 3 +- examples/declarative/text/fonts/hello/hello.pro | 3 +- .../text/textselection/textselection.pro | 3 +- .../threadedlistmodel/threadedlistmodel.pro | 3 +- .../threading/workerscript/workerscript.pro | 3 +- .../experimental-gestures/experimentalgestures.pro | 3 +- .../mousearea-example/mouseareaexample.pro | 3 +- .../touchinteraction/pincharea/pincharea.pro | 3 +- examples/declarative/toys/clocks/clocks.pro | 3 +- .../declarative/toys/corkboards/corkboards.pro | 3 +- .../declarative/toys/dynamicscene/dynamicscene.pro | 3 +- .../declarative/toys/tic-tac-toe/tictactoe.pro | 3 +- examples/declarative/toys/tvtennis/tvtennis.pro | 3 +- .../ui-components/dialcontrol/dialcontrol.pro | 3 +- .../ui-components/flipable/flipable.pro | 3 +- examples/declarative/ui-components/main/main.pro | 3 +- .../ui-components/progressbar/progressbar.pro | 3 +- .../ui-components/scrollbar/scrollbar.pro | 3 +- .../ui-components/searchbox/searchbox.pro | 3 +- .../ui-components/slideswitch/slideswitch.pro | 3 +- .../declarative/ui-components/spinner/spinner.pro | 3 +- .../ui-components/tabwidget/tabwidget.pro | 3 +- .../xmlhttprequestexample.pro | 3 +- .../qmlapplicationviewer/qmlapplicationviewer.cpp | 197 +++++++++++++++++++++ .../qmlapplicationviewer/qmlapplicationviewer.h | 46 +++++ .../qmlapplicationviewer/qmlapplicationviewer.pri | 152 ++++++++++++++++ .../qmlapplicationviewer.pri.autosave | 150 ++++++++++++++++ .../qmlapplicationviewer/qmlapplicationviewer.cpp | 197 --------------------- .../qmlapplicationviewer/qmlapplicationviewer.h | 46 ----- .../qmlapplicationviewer/qmlapplicationviewer.pri | 147 --------------- .../qmlapplicationviewer/qmlapplicationviewer.pri | 166 +++++++++-------- 83 files changed, 1163 insertions(+), 547 deletions(-) create mode 100644 demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp create mode 100644 demos/helper/qmlapplicationviewer/qmlapplicationviewer.h create mode 100644 demos/helper/qmlapplicationviewer/qmlapplicationviewer.pri create mode 100644 examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp create mode 100644 examples/helper/qmlapplicationviewer/qmlapplicationviewer.h create mode 100644 examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri create mode 100644 examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri.autosave delete mode 100644 examples/tools/qmlapplicationviewer/qmlapplicationviewer.cpp delete mode 100644 examples/tools/qmlapplicationviewer/qmlapplicationviewer.h delete mode 100644 examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri diff --git a/demos/declarative/calculator/calculator.pro b/demos/declarative/calculator/calculator.pro index 697a0d8..9c91bcc 100644 --- a/demos/declarative/calculator/calculator.pro +++ b/demos/declarative/calculator/calculator.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/calculator +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/flickr/flickr.pro b/demos/declarative/flickr/flickr.pro index 30206f8..1b45eee 100644 --- a/demos/declarative/flickr/flickr.pro +++ b/demos/declarative/flickr/flickr.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/flickr +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 4eed9c1..17786f6 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -44,5 +44,6 @@ SOURCES += main.cpp minehunt.cpp RESOURCES = minehunt.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/minehunt +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/photoviewer/photoviewer.pro b/demos/declarative/photoviewer/photoviewer.pro index cdfab1e..c44ba24 100644 --- a/demos/declarative/photoviewer/photoviewer.pro +++ b/demos/declarative/photoviewer/photoviewer.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/photoviewer +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/rssnews/rssnews.pro b/demos/declarative/rssnews/rssnews.pro index 30dd524..e152311 100644 --- a/demos/declarative/rssnews/rssnews.pro +++ b/demos/declarative/rssnews/rssnews.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/rssnews +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/samegame/samegame.pro b/demos/declarative/samegame/samegame.pro index 1a2455b..13a9f76 100644 --- a/demos/declarative/samegame/samegame.pro +++ b/demos/declarative/samegame/samegame.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/samegame +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/snake/snake.pro b/demos/declarative/snake/snake.pro index 81b2dfc..4f562ab 100644 --- a/demos/declarative/snake/snake.pro +++ b/demos/declarative/snake/snake.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/snake +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/twitter/twitter.pro b/demos/declarative/twitter/twitter.pro index a45f338..c8485bf 100644 --- a/demos/declarative/twitter/twitter.pro +++ b/demos/declarative/twitter/twitter.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/twitter +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/declarative/webbrowser/webbrowser.pro b/demos/declarative/webbrowser/webbrowser.pro index 2a7bdbd..d368832 100644 --- a/demos/declarative/webbrowser/webbrowser.pro +++ b/demos/declarative/webbrowser/webbrowser.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_DEMOS]/declarative/webbrowser +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..1bba248 --- /dev/null +++ b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,197 @@ +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#include // MEEGO_EDITION_HARMATTAN + +#ifdef HARMATTAN_BOOSTER +#include +#endif + +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 + +#include + +#if !defined(NO_JSDEBUGGER) +#include +#endif +#if !defined(NO_QMLOBSERVER) +#include +#endif + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QmlApplicationViewerPrivate(QDeclarativeView *view_) : view(view_) {} + + QString mainQmlFile; + QDeclarativeView *view; + friend class QmlApplicationViewer; + QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_UNIX +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/../Resources/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#else + const QString pathInInstallDir = + QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); + if (QFileInfo(pathInInstallDir).exists()) + return pathInInstallDir; +#endif +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(this)) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::QmlApplicationViewer(QDeclarativeView *view, QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(view)) +{ + connect(view->engine(), SIGNAL(quit()), view, SLOT(close())); + view->setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete d; +} + +QmlApplicationViewer *QmlApplicationViewer::create() +{ +#ifdef HARMATTAN_BOOSTER + return new QmlApplicationViewer(MDeclarativeCache::qDeclarativeView(), 0); +#else + return new QmlApplicationViewer(); +#endif +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + d->mainQmlFile = d->adjustPath(file); + d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + d->view->engine()->addImportPath(d->adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work + if (orientation != ScreenOrientationAuto) { + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } + } +#endif // Q_OS_SYMBIAN + + Qt::WidgetAttribute attribute; + switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes + case ScreenOrientationLockPortrait: + attribute = static_cast(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(130); + break; +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; + setAttribute(attribute, true); +} + +void QmlApplicationViewer::showExpanded() +{ +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) + d->view->showFullScreen(); +#elif defined(Q_WS_MAEMO_5) + d->view->showMaximized(); +#else + d->view->show(); +#endif +} + +QApplication *createApplication(int &argc, char **argv) +{ +#ifdef HARMATTAN_BOOSTER + return MDeclarativeCache::qApplication(argc, argv); +#else + return new QApplication(argc, argv); +#endif +} diff --git a/demos/helper/qmlapplicationviewer/qmlapplicationviewer.h b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000..d6cb43e --- /dev/null +++ b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,46 @@ +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Symbian and Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent); + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/demos/helper/qmlapplicationviewer/qmlapplicationviewer.pri b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000..8a51c9b --- /dev/null +++ b/demos/helper/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,150 @@ +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$_PRO_FILE_PWD_ + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + isEmpty(desktopInstallPrefix):installPrefix = $$[QT_INSTALL_DEMOS]/$${TARGET} + else:installPrefix = $$desktopInstallPrefix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + target.path = $${installPrefix}/bin + export(target.path) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/examples/declarative/animation/basics/color-animation/coloranimation.pro b/examples/declarative/animation/basics/color-animation/coloranimation.pro index a6ce3f6..0a34190 100644 --- a/examples/declarative/animation/basics/color-animation/coloranimation.pro +++ b/examples/declarative/animation/basics/color-animation/coloranimation.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE959F610 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/basics/color-animation +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/basics/property-animation/propertyanimation.pro b/examples/declarative/animation/basics/property-animation/propertyanimation.pro index e4e9471..f79f1cb 100644 --- a/examples/declarative/animation/basics/property-animation/propertyanimation.pro +++ b/examples/declarative/animation/basics/property-animation/propertyanimation.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE4032BC6 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/basics/property-animation +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/behaviors/behavior-example/behaviorexample.pro b/examples/declarative/animation/behaviors/behavior-example/behaviorexample.pro index f1dc1aa..91b021f 100644 --- a/examples/declarative/animation/behaviors/behavior-example/behaviorexample.pro +++ b/examples/declarative/animation/behaviors/behavior-example/behaviorexample.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEB6022A4 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/behaviors/behavior-example +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/easing/easing.pro b/examples/declarative/animation/easing/easing.pro index 1f003b1..b3d1821 100644 --- a/examples/declarative/animation/easing/easing.pro +++ b/examples/declarative/animation/easing/easing.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEAA54148 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/easing +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/animation/states/states.pro b/examples/declarative/animation/states/states.pro index 8239977..1f06e4b 100644 --- a/examples/declarative/animation/states/states.pro +++ b/examples/declarative/animation/states/states.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE9200E0A SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/animation/states +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro index 66ce4b1..5cc3660 100644 --- a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro +++ b/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro @@ -35,5 +35,6 @@ SOURCES += main.cpp RESOURCES += networkaccessmanagerfactory.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/networkaccessmanagerfactory +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro index 9dbca8f..0822a1d 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout/qgraphicsgridlayout.pro @@ -42,6 +42,7 @@ RESOURCES += \ gridlayout.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro index ca4232c..f8a4c97 100644 --- a/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro +++ b/examples/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout/qgraphicslinearlayout.pro @@ -41,5 +41,6 @@ RESOURCES += \ linearlayout.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/i18n/i18n.pro b/examples/declarative/i18n/i18n.pro index d7cb3a8..af9b65c 100644 --- a/examples/declarative/i18n/i18n.pro +++ b/examples/declarative/i18n/i18n.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE069582C SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/i18n +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/borderimage/borderimage.pro b/examples/declarative/imageelements/borderimage/borderimage.pro index 64eaf4a..20528cc 100644 --- a/examples/declarative/imageelements/borderimage/borderimage.pro +++ b/examples/declarative/imageelements/borderimage/borderimage.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEBB4D123 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/borderimage +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/image/image.pro b/examples/declarative/imageelements/image/image.pro index 28c978c..5e7b905 100644 --- a/examples/declarative/imageelements/image/image.pro +++ b/examples/declarative/imageelements/image/image.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE5D64785 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/image +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/imageelements/shadows/shadows.pro b/examples/declarative/imageelements/shadows/shadows.pro index 20d8a3d..a760dd8 100644 --- a/examples/declarative/imageelements/shadows/shadows.pro +++ b/examples/declarative/imageelements/shadows/shadows.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE2C00C58 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/imageelements/shadows +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/keyinteraction/focus/focus.pro b/examples/declarative/keyinteraction/focus/focus.pro index e51cd0f..4129206 100644 --- a/examples/declarative/keyinteraction/focus/focus.pro +++ b/examples/declarative/keyinteraction/focus/focus.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEC9F742D SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/keyinteraction/focus +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/Delegate/Delegate.pro b/examples/declarative/modelviews/Delegate/Delegate.pro index 86901d3..785d4a7 100644 --- a/examples/declarative/modelviews/Delegate/Delegate.pro +++ b/examples/declarative/modelviews/Delegate/Delegate.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE5FF52C0 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/Delegate +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro b/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro index 98490b2..18fef97 100644 --- a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro +++ b/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro @@ -35,5 +35,6 @@ HEADERS = model.h RESOURCES += abstractitemmodel.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/abstractitemmodel +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/gridview-example/gridviewexample.pro b/examples/declarative/modelviews/gridview-example/gridviewexample.pro index 15a7d53..a768342 100644 --- a/examples/declarative/modelviews/gridview-example/gridviewexample.pro +++ b/examples/declarative/modelviews/gridview-example/gridviewexample.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE53E8FDC SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/gridview-example +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro index 9d8a3fe..0c1dfd5 100644 --- a/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro +++ b/examples/declarative/modelviews/listview/dynamiclist/dynamiclist.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE49D962F SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/dynamiclist +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro index e9bbc65..38394f9 100644 --- a/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro +++ b/examples/declarative/modelviews/listview/expandingdelegates/expandingdelegates.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEEA16F93 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/expandingdelegates +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlight/highlight.pro b/examples/declarative/modelviews/listview/highlight/highlight.pro index a0a5c01..944cc6a 100644 --- a/examples/declarative/modelviews/listview/highlight/highlight.pro +++ b/examples/declarative/modelviews/listview/highlight/highlight.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE9439941 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/highlight +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro index f86e6c7..637b463 100644 --- a/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro +++ b/examples/declarative/modelviews/listview/highlightranges/highlightranges.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE7A0AE23 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/highlightranges +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/listview/sections/sections.pro b/examples/declarative/modelviews/listview/sections/sections.pro index 0d9151b..e78143f 100644 --- a/examples/declarative/modelviews/listview/sections/sections.pro +++ b/examples/declarative/modelviews/listview/sections/sections.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEA0874F7 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/listview/sections +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro index 08ac231..76ebf4f 100644 --- a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro +++ b/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro @@ -36,5 +36,6 @@ HEADERS += dataobject.h RESOURCES += objectlistmodel.qrc # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/objectlistmodel +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/package/Delegate.pro b/examples/declarative/modelviews/package/Delegate.pro index d1b7c82..8326457 100644 --- a/examples/declarative/modelviews/package/Delegate.pro +++ b/examples/declarative/modelviews/package/Delegate.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/package +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/parallax/parallax.pro b/examples/declarative/modelviews/parallax/parallax.pro index 42272b6..f01fdda 100644 --- a/examples/declarative/modelviews/parallax/parallax.pro +++ b/examples/declarative/modelviews/parallax/parallax.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/parallax +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/pathview-example/pathviewexample.pro b/examples/declarative/modelviews/pathview-example/pathviewexample.pro index 9b1d360..ec56848 100644 --- a/examples/declarative/modelviews/pathview-example/pathviewexample.pro +++ b/examples/declarative/modelviews/pathview-example/pathviewexample.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE51EA833 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/pathview-example +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro index 463e870..5642b8e 100644 --- a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro +++ b/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/stringlistmodel +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro index 8a75ca0..88d7f1b 100644 --- a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro +++ b/examples/declarative/modelviews/visualitemmodel/visualitemmodel.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE722A922 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/visualitemmodel +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/webview/alerts/alerts.pro b/examples/declarative/modelviews/webview/alerts/alerts.pro index 1de3858..31a9b6c 100644 --- a/examples/declarative/modelviews/webview/alerts/alerts.pro +++ b/examples/declarative/modelviews/webview/alerts/alerts.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE14997C0 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/webview/alerts +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/webview/autosize/autosize.pro b/examples/declarative/modelviews/webview/autosize/autosize.pro index 13913c6..595ab2e 100644 --- a/examples/declarative/modelviews/webview/autosize/autosize.pro +++ b/examples/declarative/modelviews/webview/autosize/autosize.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEE6AB317 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/webview/autosize +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro b/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro index 2bbfbf5..6b03c2d 100644 --- a/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro +++ b/examples/declarative/modelviews/webview/googlemaps/googlemaps.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEF02570C SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/webview/googlemaps +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro index 7accabe..d779351 100644 --- a/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro +++ b/examples/declarative/modelviews/webview/inlinehtml/inlinehtml.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEF18EEF4 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/webview/inlinehtml +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/modelviews/webview/newwindows/newwindows.pro b/examples/declarative/modelviews/webview/newwindows/newwindows.pro index d153561..52324dd 100644 --- a/examples/declarative/modelviews/webview/newwindows/newwindows.pro +++ b/examples/declarative/modelviews/webview/newwindows/newwindows.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEE16E439 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/modelviews/webview/newwindows +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/positioners/positioners.pro b/examples/declarative/positioners/positioners.pro index 3bf888f..9aa4693 100644 --- a/examples/declarative/positioners/positioners.pro +++ b/examples/declarative/positioners/positioners.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE6D726D3 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/positioners +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro b/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro index a7f11d8..ba634f5 100644 --- a/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro +++ b/examples/declarative/righttoleft/layoutdirection/layoutdirection.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/layoutdirection +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro b/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro index ab52726..55b46fd 100644 --- a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro +++ b/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/layoutmirroring +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/righttoleft/textalignment/textalignment.pro b/examples/declarative/righttoleft/textalignment/textalignment.pro index 2db41ec..366f793 100644 --- a/examples/declarative/righttoleft/textalignment/textalignment.pro +++ b/examples/declarative/righttoleft/textalignment/textalignment.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/righttoleft/textalignment +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/shadereffects/shadereffects.pro b/examples/declarative/shadereffects/shadereffects.pro index 23a951c..13f345c 100755 --- a/examples/declarative/shadereffects/shadereffects.pro +++ b/examples/declarative/shadereffects/shadereffects.pro @@ -39,5 +39,6 @@ symbian { } # Please do not modify the following two lines. Required for deployment. -include(../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/shadereffects +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/sqllocalstorage/sqllocalstorage.pro b/examples/declarative/sqllocalstorage/sqllocalstorage.pro index de4a4e0..9a88b49 100644 --- a/examples/declarative/sqllocalstorage/sqllocalstorage.pro +++ b/examples/declarative/sqllocalstorage/sqllocalstorage.pro @@ -34,5 +34,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/sqllocalstorage +include(../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/availableFonts/availableFonts.pro b/examples/declarative/text/fonts/availableFonts/availableFonts.pro index 38548af..50fbfc4 100644 --- a/examples/declarative/text/fonts/availableFonts/availableFonts.pro +++ b/examples/declarative/text/fonts/availableFonts/availableFonts.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE696D9F7 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/availableFonts +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/banner/banner.pro b/examples/declarative/text/fonts/banner/banner.pro index 71e4ab9..aaada0d 100644 --- a/examples/declarative/text/fonts/banner/banner.pro +++ b/examples/declarative/text/fonts/banner/banner.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEBAA8CBE SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/banner +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/fonts/fonts.pro b/examples/declarative/text/fonts/fonts/fonts.pro index 5d7c691..67e1646 100644 --- a/examples/declarative/text/fonts/fonts/fonts.pro +++ b/examples/declarative/text/fonts/fonts/fonts.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE4CA52B6 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/fonts +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/fonts/hello/hello.pro b/examples/declarative/text/fonts/hello/hello.pro index 8ba73be..194dcd8 100644 --- a/examples/declarative/text/fonts/hello/hello.pro +++ b/examples/declarative/text/fonts/hello/hello.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE4A6D856 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/fonts/hello +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/text/textselection/textselection.pro b/examples/declarative/text/textselection/textselection.pro index 205bd18..fbf4a95 100644 --- a/examples/declarative/text/textselection/textselection.pro +++ b/examples/declarative/text/textselection/textselection.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEFBED80D SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/text/textselection +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro index d81bf62..7545a06 100644 --- a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro +++ b/examples/declarative/threading/threadedlistmodel/threadedlistmodel.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/threading/threadedlistmodel +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/threading/workerscript/workerscript.pro b/examples/declarative/threading/workerscript/workerscript.pro index fa60c1b..ce1c67e 100644 --- a/examples/declarative/threading/workerscript/workerscript.pro +++ b/examples/declarative/threading/workerscript/workerscript.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/threading/workerscript +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro b/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro index 729eaec..00de964 100644 --- a/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro +++ b/examples/declarative/touchinteraction/gestures/experimental-gestures/experimentalgestures.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE3FF6816 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/gestures/experimental-gestures +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro b/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro index 0311371..7bf1883 100644 --- a/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro +++ b/examples/declarative/touchinteraction/mousearea/mousearea-example/mouseareaexample.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xECA7EEBE SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/mousearea/mousearea-example +include(../../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/touchinteraction/pincharea/pincharea.pro b/examples/declarative/touchinteraction/pincharea/pincharea.pro index dc2e4c6..5c515f7 100644 --- a/examples/declarative/touchinteraction/pincharea/pincharea.pro +++ b/examples/declarative/touchinteraction/pincharea/pincharea.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/touchinteraction/pincharea +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/clocks/clocks.pro b/examples/declarative/toys/clocks/clocks.pro index db03bfb..6c9639b 100644 --- a/examples/declarative/toys/clocks/clocks.pro +++ b/examples/declarative/toys/clocks/clocks.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE96223F9 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/clocks +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/corkboards/corkboards.pro b/examples/declarative/toys/corkboards/corkboards.pro index 5ad2e5b..caf1fb9 100644 --- a/examples/declarative/toys/corkboards/corkboards.pro +++ b/examples/declarative/toys/corkboards/corkboards.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEAF97D84 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/corkboards +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.pro b/examples/declarative/toys/dynamicscene/dynamicscene.pro index 60b4daf..49b8716 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.pro +++ b/examples/declarative/toys/dynamicscene/dynamicscene.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEE509F2D SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/dynamicscene +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/tic-tac-toe/tictactoe.pro b/examples/declarative/toys/tic-tac-toe/tictactoe.pro index deb9ba3..70cc858 100644 --- a/examples/declarative/toys/tic-tac-toe/tictactoe.pro +++ b/examples/declarative/toys/tic-tac-toe/tictactoe.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEFDDF868 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/tic-tac-toe +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/toys/tvtennis/tvtennis.pro b/examples/declarative/toys/tvtennis/tvtennis.pro index 3ae795e..d09f1c6 100644 --- a/examples/declarative/toys/tvtennis/tvtennis.pro +++ b/examples/declarative/toys/tvtennis/tvtennis.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE6511DAE SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/toys/tvtennis +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.pro b/examples/declarative/ui-components/dialcontrol/dialcontrol.pro index fb784f7..0d43b16 100644 --- a/examples/declarative/ui-components/dialcontrol/dialcontrol.pro +++ b/examples/declarative/ui-components/dialcontrol/dialcontrol.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEB1C54E8 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/dialcontrol +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/flipable/flipable.pro b/examples/declarative/ui-components/flipable/flipable.pro index f1ee5ae..f35d336 100644 --- a/examples/declarative/ui-components/flipable/flipable.pro +++ b/examples/declarative/ui-components/flipable/flipable.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE31D80B6 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/flipable +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/main/main.pro b/examples/declarative/ui-components/main/main.pro index 60b0ed5..c362497 100644 --- a/examples/declarative/ui-components/main/main.pro +++ b/examples/declarative/ui-components/main/main.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE647B679 SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/main +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/progressbar/progressbar.pro b/examples/declarative/ui-components/progressbar/progressbar.pro index 38eef3c..84307bd 100644 --- a/examples/declarative/ui-components/progressbar/progressbar.pro +++ b/examples/declarative/ui-components/progressbar/progressbar.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEAA2206D SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/progressbar +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/scrollbar/scrollbar.pro b/examples/declarative/ui-components/scrollbar/scrollbar.pro index b0cdaca..ddede4a 100644 --- a/examples/declarative/ui-components/scrollbar/scrollbar.pro +++ b/examples/declarative/ui-components/scrollbar/scrollbar.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/scrollbar +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/searchbox/searchbox.pro b/examples/declarative/ui-components/searchbox/searchbox.pro index f64718a..028998a 100644 --- a/examples/declarative/ui-components/searchbox/searchbox.pro +++ b/examples/declarative/ui-components/searchbox/searchbox.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/searchbox +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.pro b/examples/declarative/ui-components/slideswitch/slideswitch.pro index c4dbec1..ed78217 100644 --- a/examples/declarative/ui-components/slideswitch/slideswitch.pro +++ b/examples/declarative/ui-components/slideswitch/slideswitch.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xEAB2005A SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/slideswitch +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/spinner/spinner.pro b/examples/declarative/ui-components/spinner/spinner.pro index ffb0f76..fb08dd8 100644 --- a/examples/declarative/ui-components/spinner/spinner.pro +++ b/examples/declarative/ui-components/spinner/spinner.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/spinner +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/ui-components/tabwidget/tabwidget.pro b/examples/declarative/ui-components/tabwidget/tabwidget.pro index 04d1027..11db318 100644 --- a/examples/declarative/ui-components/tabwidget/tabwidget.pro +++ b/examples/declarative/ui-components/tabwidget/tabwidget.pro @@ -33,5 +33,6 @@ symbian:TARGET.CAPABILITY += NetworkServices SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/ui-components/tabwidget +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro b/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro index c953e33..01c0bda 100644 --- a/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro +++ b/examples/declarative/xml/xmlhttprequest-example/xmlhttprequestexample.pro @@ -35,5 +35,6 @@ symbian:TARGET.UID3 = 0xE83495FC SOURCES += main.cpp # Please do not modify the following two lines. Required for deployment. -include(../../../tools/qmlapplicationviewer/qmlapplicationviewer.pri) +desktopInstallPrefix=$$[QT_INSTALL_EXAMPLES]/declarative/xml/xmlhttprequest-example +include(../../../helper/qmlapplicationviewer/qmlapplicationviewer.pri) qtcAddDeployment() diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp new file mode 100644 index 0000000..1bba248 --- /dev/null +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.cpp @@ -0,0 +1,197 @@ +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#include "qmlapplicationviewer.h" + +#include +#include +#include +#include +#include +#include + +#include // MEEGO_EDITION_HARMATTAN + +#ifdef HARMATTAN_BOOSTER +#include +#endif + +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 + +#include + +#if !defined(NO_JSDEBUGGER) +#include +#endif +#if !defined(NO_QMLOBSERVER) +#include +#endif + +// Enable debugging before any QDeclarativeEngine is created +struct QmlJsDebuggingEnabler +{ + QmlJsDebuggingEnabler() + { + QDeclarativeDebugHelper::enableDebugging(); + } +}; + +// Execute code in constructor before first QDeclarativeEngine is instantiated +static QmlJsDebuggingEnabler enableDebuggingHelper; + +#endif // QMLJSDEBUGGER + +class QmlApplicationViewerPrivate +{ + QmlApplicationViewerPrivate(QDeclarativeView *view_) : view(view_) {} + + QString mainQmlFile; + QDeclarativeView *view; + friend class QmlApplicationViewer; + QString adjustPath(const QString &path); +}; + +QString QmlApplicationViewerPrivate::adjustPath(const QString &path) +{ +#ifdef Q_OS_UNIX +#ifdef Q_OS_MAC + if (!QDir::isAbsolutePath(path)) + return QString::fromLatin1("%1/../Resources/%2") + .arg(QCoreApplication::applicationDirPath(), path); +#else + const QString pathInInstallDir = + QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); + if (QFileInfo(pathInInstallDir).exists()) + return pathInInstallDir; +#endif +#endif + return path; +} + +QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(this)) +{ + connect(engine(), SIGNAL(quit()), SLOT(close())); + setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::QmlApplicationViewer(QDeclarativeView *view, QWidget *parent) + : QDeclarativeView(parent) + , d(new QmlApplicationViewerPrivate(view)) +{ + connect(view->engine(), SIGNAL(quit()), view, SLOT(close())); + view->setResizeMode(QDeclarativeView::SizeRootObjectToView); + // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in +#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 +#if !defined(NO_JSDEBUGGER) + new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); +#endif +#if !defined(NO_QMLOBSERVER) + new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); +#endif +#endif +} + +QmlApplicationViewer::~QmlApplicationViewer() +{ + delete d; +} + +QmlApplicationViewer *QmlApplicationViewer::create() +{ +#ifdef HARMATTAN_BOOSTER + return new QmlApplicationViewer(MDeclarativeCache::qDeclarativeView(), 0); +#else + return new QmlApplicationViewer(); +#endif +} + +void QmlApplicationViewer::setMainQmlFile(const QString &file) +{ + d->mainQmlFile = d->adjustPath(file); + d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); +} + +void QmlApplicationViewer::addImportPath(const QString &path) +{ + d->view->engine()->addImportPath(d->adjustPath(path)); +} + +void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) +{ +#if defined(Q_OS_SYMBIAN) + // If the version of Qt on the device is < 4.7.2, that attribute won't work + if (orientation != ScreenOrientationAuto) { + const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); + if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { + qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); + return; + } + } +#endif // Q_OS_SYMBIAN + + Qt::WidgetAttribute attribute; + switch (orientation) { +#if QT_VERSION < 0x040702 + // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes + case ScreenOrientationLockPortrait: + attribute = static_cast(128); + break; + case ScreenOrientationLockLandscape: + attribute = static_cast(129); + break; + default: + case ScreenOrientationAuto: + attribute = static_cast(130); + break; +#else // QT_VERSION < 0x040702 + case ScreenOrientationLockPortrait: + attribute = Qt::WA_LockPortraitOrientation; + break; + case ScreenOrientationLockLandscape: + attribute = Qt::WA_LockLandscapeOrientation; + break; + default: + case ScreenOrientationAuto: + attribute = Qt::WA_AutoOrientation; + break; +#endif // QT_VERSION < 0x040702 + }; + setAttribute(attribute, true); +} + +void QmlApplicationViewer::showExpanded() +{ +#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) + d->view->showFullScreen(); +#elif defined(Q_WS_MAEMO_5) + d->view->showMaximized(); +#else + d->view->show(); +#endif +} + +QApplication *createApplication(int &argc, char **argv) +{ +#ifdef HARMATTAN_BOOSTER + return MDeclarativeCache::qApplication(argc, argv); +#else + return new QApplication(argc, argv); +#endif +} diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h new file mode 100644 index 0000000..d6cb43e --- /dev/null +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.h @@ -0,0 +1,46 @@ +/* + This file was generated by the Qt Quick Application wizard of Qt Creator. + QmlApplicationViewer is a convenience class containing mobile device specific + code such as screen orientation handling. Also QML paths and debugging are + handled here. + It is recommended not to modify this file, since newer versions of Qt Creator + may offer an updated version of it. +*/ + +#ifndef QMLAPPLICATIONVIEWER_H +#define QMLAPPLICATIONVIEWER_H + +#include + +class QmlApplicationViewer : public QDeclarativeView +{ + Q_OBJECT + +public: + enum ScreenOrientation { + ScreenOrientationLockPortrait, + ScreenOrientationLockLandscape, + ScreenOrientationAuto + }; + + explicit QmlApplicationViewer(QWidget *parent = 0); + virtual ~QmlApplicationViewer(); + + static QmlApplicationViewer *create(); + + void setMainQmlFile(const QString &file); + void addImportPath(const QString &path); + + // Note that this will only have an effect on Symbian and Fremantle. + void setOrientation(ScreenOrientation orientation); + + void showExpanded(); + +private: + explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent); + class QmlApplicationViewerPrivate *d; +}; + +QApplication *createApplication(int &argc, char **argv); + +#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri new file mode 100644 index 0000000..de03b4c --- /dev/null +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri @@ -0,0 +1,152 @@ +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$_PRO_FILE_PWD_ + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + isEmpty(desktopInstallPrefix):installPrefix = $$[QT_INSTALL_DEMOS]/$${TARGET} + else:installPrefix = $$desktopInstallPrefix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + target.path = $${installPrefix}/bin + export(target.path) + message($$target) + message($$installPrefix) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri.autosave b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri.autosave new file mode 100644 index 0000000..d280874 --- /dev/null +++ b/examples/helper/qmlapplicationviewer/qmlapplicationviewer.pri.autosave @@ -0,0 +1,150 @@ +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +QT += declarative + +SOURCES += $$PWD/qmlapplicationviewer.cpp +HEADERS += $$PWD/qmlapplicationviewer.h +INCLUDEPATH += $$PWD + +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER +} + +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER +} +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. + +defineTest(qtcAddDeployment) { +for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemsources = $${item}.sources + $$itemsources = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath= $$eval($${deploymentfolder}.target) + export($$itemsources) + export($$itempath) + DEPLOYMENT += $$item +} + +MAINPROFILEPWD = $$_PRO_FILE_PWD_ + +symbian { + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 +} else:win32 { + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } +} else:unix { + maemo5 { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}.desktop + desktopfile.path = /usr/share/applications/hildon + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + installPrefix = /opt/$${TARGET} + desktopfile.files = $${TARGET}_harmattan.desktop + desktopfile.path = /usr/share/applications + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + isEmpty(desktopInstallPrefix):installPrefix = /$${TARGET} + else:installPrefix = $$desktopInstallPrefix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand + copydeploymentfolders.commands = $$copyCommand + first.depends = $(first) copydeploymentfolders + export(first.depends) + export(copydeploymentfolders.commands) + QMAKE_EXTRA_TARGETS += first copydeploymentfolders + } + } + for(deploymentfolder, DEPLOYMENTFOLDERS) { + item = item$${deploymentfolder} + itemfiles = $${item}.files + $$itemfiles = $$eval($${deploymentfolder}.source) + itempath = $${item}.path + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) + export($$itemfiles) + export($$itempath) + INSTALLS += $$item + } + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + + target.path = $${installPrefix}/bin + export(target.path) + INSTALLS += target +} + +export (ICON) +export (INSTALLS) +export (DEPLOYMENT) +export (TARGET.EPOCHEAPSIZE) +export (TARGET.CAPABILITY) +export (LIBS) +export (QMAKE_EXTRA_TARGETS) +} diff --git a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/tools/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 1bba248..0000000 --- a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#include "qmlapplicationviewer.h" - -#include -#include -#include -#include -#include -#include - -#include // MEEGO_EDITION_HARMATTAN - -#ifdef HARMATTAN_BOOSTER -#include -#endif - -#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 - -#include - -#if !defined(NO_JSDEBUGGER) -#include -#endif -#if !defined(NO_QMLOBSERVER) -#include -#endif - -// Enable debugging before any QDeclarativeEngine is created -struct QmlJsDebuggingEnabler -{ - QmlJsDebuggingEnabler() - { - QDeclarativeDebugHelper::enableDebugging(); - } -}; - -// Execute code in constructor before first QDeclarativeEngine is instantiated -static QmlJsDebuggingEnabler enableDebuggingHelper; - -#endif // QMLJSDEBUGGER - -class QmlApplicationViewerPrivate -{ - QmlApplicationViewerPrivate(QDeclarativeView *view_) : view(view_) {} - - QString mainQmlFile; - QDeclarativeView *view; - friend class QmlApplicationViewer; - QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QString::fromLatin1("%1/../Resources/%2") - .arg(QCoreApplication::applicationDirPath(), path); -#else - const QString pathInInstallDir = - QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); - if (QFileInfo(pathInInstallDir).exists()) - return pathInInstallDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) - : QDeclarativeView(parent) - , d(new QmlApplicationViewerPrivate(this)) -{ - connect(engine(), SIGNAL(quit()), SLOT(close())); - setResizeMode(QDeclarativeView::SizeRootObjectToView); - // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in -#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 -#if !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); -#endif -#if !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); -#endif -#endif -} - -QmlApplicationViewer::QmlApplicationViewer(QDeclarativeView *view, QWidget *parent) - : QDeclarativeView(parent) - , d(new QmlApplicationViewerPrivate(view)) -{ - connect(view->engine(), SIGNAL(quit()), view, SLOT(close())); - view->setResizeMode(QDeclarativeView::SizeRootObjectToView); - // Qt versions prior to 4.8.0 don't have QML/JS debugging services built in -#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800 -#if !defined(NO_JSDEBUGGER) - new QmlJSDebugger::JSDebuggerAgent(d->view->engine()); -#endif -#if !defined(NO_QMLOBSERVER) - new QmlJSDebugger::QDeclarativeViewObserver(d->view, d->view); -#endif -#endif -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete d; -} - -QmlApplicationViewer *QmlApplicationViewer::create() -{ -#ifdef HARMATTAN_BOOSTER - return new QmlApplicationViewer(MDeclarativeCache::qDeclarativeView(), 0); -#else - return new QmlApplicationViewer(); -#endif -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - d->mainQmlFile = d->adjustPath(file); - d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - d->view->engine()->addImportPath(d->adjustPath(path)); -} - -void QmlApplicationViewer::setOrientation(ScreenOrientation orientation) -{ -#if defined(Q_OS_SYMBIAN) - // If the version of Qt on the device is < 4.7.2, that attribute won't work - if (orientation != ScreenOrientationAuto) { - const QStringList v = QString::fromAscii(qVersion()).split(QLatin1Char('.')); - if (v.count() == 3 && (v.at(0).toInt() << 16 | v.at(1).toInt() << 8 | v.at(2).toInt()) < 0x040702) { - qWarning("Screen orientation locking only supported with Qt 4.7.2 and above"); - return; - } - } -#endif // Q_OS_SYMBIAN - - Qt::WidgetAttribute attribute; - switch (orientation) { -#if QT_VERSION < 0x040702 - // Qt < 4.7.2 does not yet have the Qt::WA_*Orientation attributes - case ScreenOrientationLockPortrait: - attribute = static_cast(128); - break; - case ScreenOrientationLockLandscape: - attribute = static_cast(129); - break; - default: - case ScreenOrientationAuto: - attribute = static_cast(130); - break; -#else // QT_VERSION < 0x040702 - case ScreenOrientationLockPortrait: - attribute = Qt::WA_LockPortraitOrientation; - break; - case ScreenOrientationLockLandscape: - attribute = Qt::WA_LockLandscapeOrientation; - break; - default: - case ScreenOrientationAuto: - attribute = Qt::WA_AutoOrientation; - break; -#endif // QT_VERSION < 0x040702 - }; - setAttribute(attribute, true); -} - -void QmlApplicationViewer::showExpanded() -{ -#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR) - d->view->showFullScreen(); -#elif defined(Q_WS_MAEMO_5) - d->view->showMaximized(); -#else - d->view->show(); -#endif -} - -QApplication *createApplication(int &argc, char **argv) -{ -#ifdef HARMATTAN_BOOSTER - return MDeclarativeCache::qApplication(argc, argv); -#else - return new QApplication(argc, argv); -#endif -} diff --git a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.h b/examples/tools/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index d6cb43e..0000000 --- a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - This file was generated by the Qt Quick Application wizard of Qt Creator. - QmlApplicationViewer is a convenience class containing mobile device specific - code such as screen orientation handling. Also QML paths and debugging are - handled here. - It is recommended not to modify this file, since newer versions of Qt Creator - may offer an updated version of it. -*/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include - -class QmlApplicationViewer : public QDeclarativeView -{ - Q_OBJECT - -public: - enum ScreenOrientation { - ScreenOrientationLockPortrait, - ScreenOrientationLockLandscape, - ScreenOrientationAuto - }; - - explicit QmlApplicationViewer(QWidget *parent = 0); - virtual ~QmlApplicationViewer(); - - static QmlApplicationViewer *create(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - - // Note that this will only have an effect on Symbian and Fremantle. - void setOrientation(ScreenOrientation orientation); - - void showExpanded(); - -private: - explicit QmlApplicationViewer(QDeclarativeView *view, QWidget *parent); - class QmlApplicationViewerPrivate *d; -}; - -QApplication *createApplication(int &argc, char **argv); - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index c8bec69..0000000 --- a/examples/tools/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,147 +0,0 @@ -# This file was generated by the Qt Quick Application wizard of Qt Creator. -# The code below adds the QmlApplicationViewer to the project and handles the -# activation of QML debugging. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -QT += declarative - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - -# Include JS debugger library if QMLJSDEBUGGER_PATH is set -!isEmpty(QMLJSDEBUGGER_PATH) { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) -} else { - DEFINES -= QMLJSDEBUGGER -} - -contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { - DEFINES += HARMATTAN_BOOSTER -} -# This file was generated by an application wizard of Qt Creator. -# The code below handles deployment to Symbian and Maemo, aswell as copying -# of the application data to shadow build directories on desktop. -# It is recommended not to modify this file, since newer versions of Qt Creator -# may offer an updated version of it. - -defineTest(qtcAddDeployment) { -for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemsources = $${item}.sources - $$itemsources = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath= $$eval($${deploymentfolder}.target) - export($$itemsources) - export($$itempath) - DEPLOYMENT += $$item -} - -MAINPROFILEPWD = $$_PRO_FILE_PWD_ - -symbian { - isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg - isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 -} else:win32 { - copyCommand = - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) - source = $$replace(source, /, \\) - sourcePathSegments = $$split(source, \\) - target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) - target = $$replace(target, /, \\) - target ~= s,\\\\\\.?\\\\,\\, - !isEqual(source,$$target) { - !isEmpty(copyCommand):copyCommand += && - isEqual(QMAKE_DIR_SEP, \\) { - copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" - } else { - source = $$replace(source, \\\\, /) - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - target = $$replace(target, \\\\, /) - copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" - } - } - } - !isEmpty(copyCommand) { - copyCommand = @echo Copying application data... && $$copyCommand - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } -} else:unix { - maemo5 { - desktopfile.files = $${TARGET}.desktop - desktopfile.path = /usr/share/applications/hildon - icon.files = $${TARGET}64.png - icon.path = /usr/share/icons/hicolor/64x64/apps - } else:!isEmpty(MEEGO_VERSION_MAJOR) { - desktopfile.files = $${TARGET}_harmattan.desktop - desktopfile.path = /usr/share/applications - icon.files = $${TARGET}80.png - icon.path = /usr/share/icons/hicolor/80x80/apps - } else { # Assumed to be a Desktop Unix - copyCommand = - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) - source = $$replace(source, \\\\, /) - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - target = $$replace(target, \\\\, /) - sourcePathSegments = $$split(source, /) - targetFullPath = $$target/$$last(sourcePathSegments) - targetFullPath ~= s,/\\.?/,/, - !isEqual(source,$$targetFullPath) { - !isEmpty(copyCommand):copyCommand += && - copyCommand += $(MKDIR) \"$$target\" - copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" - } - } - !isEmpty(copyCommand) { - copyCommand = @echo Copying application data... && $$copyCommand - copydeploymentfolders.commands = $$copyCommand - first.depends = $(first) copydeploymentfolders - export(first.depends) - export(copydeploymentfolders.commands) - QMAKE_EXTRA_TARGETS += first copydeploymentfolders - } - } - installPrefix = /opt/$${TARGET} - for(deploymentfolder, DEPLOYMENTFOLDERS) { - item = item$${deploymentfolder} - itemfiles = $${item}.files - $$itemfiles = $$eval($${deploymentfolder}.source) - itempath = $${item}.path - $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) - export($$itemfiles) - export($$itempath) - INSTALLS += $$item - } - - !isEmpty(desktopfile.path) { - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) - INSTALLS += icon desktopfile - } - - target.path = $${installPrefix}/bin - export(target.path) - INSTALLS += target -} - -export (ICON) -export (INSTALLS) -export (DEPLOYMENT) -export (TARGET.EPOCHEAPSIZE) -export (TARGET.CAPABILITY) -export (LIBS) -export (QMAKE_EXTRA_TARGETS) -} diff --git a/tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.pri b/tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.pri index 79e6a9f..524d7c3 100644 --- a/tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.pri +++ b/tests/manual/declarative/qmlshadersplugin/qmlapplicationviewer/qmlapplicationviewer.pri @@ -1,6 +1,9 @@ -# checksum 0xc123 version 0x10008 -# This file should not be edited. -# Future versions of Qt Creator might offer updated versions of this file. +# checksum 0x5b42 version 0x70012 +# This file was generated by the Qt Quick Application wizard of Qt Creator. +# The code below adds the QmlApplicationViewer to the project and handles the +# activation of QML debugging. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. QT += declarative @@ -8,58 +11,21 @@ SOURCES += $$PWD/qmlapplicationviewer.cpp HEADERS += $$PWD/qmlapplicationviewer.h INCLUDEPATH += $$PWD -contains(DEFINES, QMLOBSERVER) { - DEFINES *= QMLJSDEBUGGER +# Include JS debugger library if QMLJSDEBUGGER_PATH is set +!isEmpty(QMLJSDEBUGGER_PATH) { + include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) +} else { + DEFINES -= QMLJSDEBUGGER } -defineTest(minQtVersion) { - maj = $$1 - min = $$2 - patch = $$3 - isEqual(QT_MAJOR_VERSION, $$maj) { - isEqual(QT_MINOR_VERSION, $$min) { - isEqual(QT_PATCH_VERSION, $$patch) { - return(true) - } - greaterThan(QT_PATCH_VERSION, $$patch) { - return(true) - } - } - greaterThan(QT_MINOR_VERSION, $$min) { - return(true) - } - } - return(false) -} - -contains(DEFINES, QMLJSDEBUGGER) { - CONFIG(debug, debug|release) { - !minQtVersion(4, 7, 1) { - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("This library requires Qt 4.7.1 or newer.") - warning() - - error("Qt version $$QT_VERSION too old for QmlJS Debugging. Aborting.") - } - isEmpty(QMLJSDEBUGGER_PATH) { - warning() - warning("Debugging QML requires the qmljsdebugger library that ships with Qt Creator.") - warning("Please specify its location on the qmake command line, eg") - warning(" qmake -r QMLJSDEBUGGER_PATH=$CREATORDIR/share/qtcreator/qmljsdebugger") - warning() - - error("QMLJSDEBUGGER defined, but no QMLJSDEBUGGER_PATH set on command line. Aborting.") - DEFINES -= QMLJSDEBUGGER - } else { - include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri) - } - } else { - DEFINES -= QMLJSDEBUGGER - } +contains(CONFIG,qdeclarative-boostable):contains(MEEGO_EDITION,harmattan) { + DEFINES += HARMATTAN_BOOSTER } -# This file should not be edited. -# Future versions of Qt Creator might offer updated versions of this file. +# This file was generated by an application wizard of Qt Creator. +# The code below handles deployment to Symbian and Maemo, aswell as copying +# of the application data to shadow build directories on desktop. +# It is recommended not to modify this file, since newer versions of Qt Creator +# may offer an updated version of it. defineTest(qtcAddDeployment) { for(deploymentfolder, DEPLOYMENTFOLDERS) { @@ -76,19 +42,31 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) { MAINPROFILEPWD = $$PWD symbian { - ICON = $${TARGET}.svg - TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 - contains(DEFINES, ORIENTATIONLOCK):LIBS += -lavkon -leikcore -leiksrv -lcone - contains(DEFINES, NETWORKACCESS):TARGET.CAPABILITY += NetworkServices + isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg + isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 } else:win32 { - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - source = $$eval($${deploymentfolder}.source) - pathSegments = $$split(source, /) - sourceAndTarget = $$MAINPROFILEPWD/$$source $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(pathSegments) - copyCommand += && $(COPY_DIR) $$replace(sourceAndTarget, /, \\) + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, /, \\) + sourcePathSegments = $$split(source, \\) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target)/$$last(sourcePathSegments) + target = $$replace(target, /, \\) + target ~= s,\\\\\\.?\\\\,\\, + !isEqual(source,$$target) { + !isEmpty(copyCommand):copyCommand += && + isEqual(QMAKE_DIR_SEP, \\) { + copyCommand += $(COPY_DIR) \"$$source\" \"$$target\" + } else { + source = $$replace(source, \\\\, /) + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) + target = $$replace(target, \\\\, /) + copyCommand += test -d \"$$target\" || mkdir -p \"$$target\" && cp -r \"$$source\" \"$$target\" + } } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand copydeploymentfolders.commands = $$copyCommand first.depends = $(first) copydeploymentfolders export(first.depends) @@ -97,22 +75,37 @@ symbian { } } else:unix { maemo5 { - installPrefix = /opt/usr + desktopfile.files = $${TARGET}.desktop desktopfile.path = /usr/share/applications/hildon - } else { - installPrefix = /usr/local + icon.files = $${TARGET}64.png + icon.path = /usr/share/icons/hicolor/64x64/apps + } else:!isEmpty(MEEGO_VERSION_MAJOR) { + desktopfile.files = $${TARGET}_harmattan.desktop desktopfile.path = /usr/share/applications - !isEqual(PWD,$$OUT_PWD) { - copyCommand = @echo Copying application data... - for(deploymentfolder, DEPLOYMENTFOLDERS) { - macx { - target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) - } else { - target = $$OUT_PWD/$$eval($${deploymentfolder}.target) - } - copyCommand += && $(MKDIR) $$target - copyCommand += && $(COPY_DIR) $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) $$target + icon.files = $${TARGET}80.png + icon.path = /usr/share/icons/hicolor/80x80/apps + } else { # Assumed to be a Desktop Unix + copyCommand = + for(deploymentfolder, DEPLOYMENTFOLDERS) { + source = $$MAINPROFILEPWD/$$eval($${deploymentfolder}.source) + source = $$replace(source, \\\\, /) + macx { + target = $$OUT_PWD/$${TARGET}.app/Contents/Resources/$$eval($${deploymentfolder}.target) + } else { + target = $$OUT_PWD/$$eval($${deploymentfolder}.target) } + target = $$replace(target, \\\\, /) + sourcePathSegments = $$split(source, /) + targetFullPath = $$target/$$last(sourcePathSegments) + targetFullPath ~= s,/\\.?/,/, + !isEqual(source,$$targetFullPath) { + !isEmpty(copyCommand):copyCommand += && + copyCommand += $(MKDIR) \"$$target\" + copyCommand += && $(COPY_DIR) \"$$source\" \"$$target\" + } + } + !isEmpty(copyCommand) { + copyCommand = @echo Copying application data... && $$copyCommand copydeploymentfolders.commands = $$copyCommand first.depends = $(first) copydeploymentfolders export(first.depends) @@ -120,26 +113,29 @@ symbian { QMAKE_EXTRA_TARGETS += first copydeploymentfolders } } + installPrefix = /opt/$${TARGET} for(deploymentfolder, DEPLOYMENTFOLDERS) { item = item$${deploymentfolder} itemfiles = $${item}.files $$itemfiles = $$eval($${deploymentfolder}.source) itempath = $${item}.path - $$itempath = $${installPrefix}/share/$${TARGET}/$$eval($${deploymentfolder}.target) + $$itempath = $${installPrefix}/$$eval($${deploymentfolder}.target) export($$itemfiles) export($$itempath) INSTALLS += $$item } - icon.files = $${TARGET}.png - icon.path = /usr/share/icons/hicolor/64x64/apps - desktopfile.files = $${TARGET}.desktop + + !isEmpty(desktopfile.path) { + export(icon.files) + export(icon.path) + export(desktopfile.files) + export(desktopfile.path) + INSTALLS += icon desktopfile + } + target.path = $${installPrefix}/bin - export(icon.files) - export(icon.path) - export(desktopfile.files) - export(desktopfile.path) export(target.path) - INSTALLS += desktopfile icon target + INSTALLS += target } export (ICON) -- cgit v0.12