summaryrefslogtreecommitdiff
path: root/examples/hybridshell
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2013-01-18 14:45:20 +0100
committerPierre Rossi <pierre.rossi@gmail.com>2013-11-01 13:57:42 +0100
commitb23f72024c14153d233563f600a359456649aaaf (patch)
tree21acf35c77c5b6d99801986dfa29e13d752197dc /examples/hybridshell
parentde560d0acaa535b0b070b919bfc61010b4590efb (diff)
downloadqtwebchannel-b23f72024c14153d233563f600a359456649aaaf.tar.gz
Port hybridshell example to newer Qt5
Change-Id: Ifc6d4cbb647edacfebae83fa84be8f6021483fe7 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'examples/hybridshell')
-rw-r--r--examples/hybridshell/hybridshell.pro21
-rw-r--r--examples/hybridshell/main.cpp16
-rw-r--r--examples/hybridshell/qml/hybridshell/main.qml7
-rw-r--r--examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.cpp156
-rw-r--r--examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.h42
-rw-r--r--examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.cpp101
-rw-r--r--examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.h64
-rw-r--r--examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.pri (renamed from examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.pri)85
8 files changed, 238 insertions, 254 deletions
diff --git a/examples/hybridshell/hybridshell.pro b/examples/hybridshell/hybridshell.pro
index ab04b2a..1b92766 100644
--- a/examples/hybridshell/hybridshell.pro
+++ b/examples/hybridshell/hybridshell.pro
@@ -1,3 +1,4 @@
+
# Add more folders to ship with the application, here
folder_01.source = qml/hybridshell
folder_01.target = qml
@@ -6,18 +7,6 @@ DEPLOYMENTFOLDERS = folder_01
# Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
-symbian:TARGET.UID3 = 0xED61ECFA
-
-# Smart Installer package's UID
-# This UID is from the protected range and therefore the package will
-# fail to install if self-signed. By default qmake uses the unprotected
-# range value if unprotected UID is defined for the application and
-# 0x2002CCCF value if protected UID is given to the application
-#symbian:DEPLOYMENT.installer_header = 0x2002CCCF
-
-# Allow network access on Symbian
-symbian:TARGET.CAPABILITY += NetworkServices
-
# If your application uses the Qt Mobility libraries, uncomment the following
# lines and add the respective components to the MOBILITY variable.
# CONFIG += mobility
@@ -27,10 +16,6 @@ symbian:TARGET.CAPABILITY += NetworkServices
SOURCES += main.cpp \
shell.cpp
-# Please do not modify the following two lines. Required for deployment.
-include(qmlapplicationviewer/qmlapplicationviewer.pri)
-qtcAddDeployment()
-
OTHER_FILES += \
qtc_packaging/debian_harmattan/rules \
qtc_packaging/debian_harmattan/README \
@@ -41,3 +26,7 @@ OTHER_FILES += \
HEADERS += \
shell.h
+
+# Please do not modify the following two lines. Required for deployment.
+include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
+qtcAddDeployment()
diff --git a/examples/hybridshell/main.cpp b/examples/hybridshell/main.cpp
index 0d50e0a..ce7f463 100644
--- a/examples/hybridshell/main.cpp
+++ b/examples/hybridshell/main.cpp
@@ -1,16 +1,18 @@
-#include <QtGui/QApplication>
-#include "qmlapplicationviewer.h"
+#include <QtGui/QGuiApplication>
+
+#include <QtQml>
+
+#include "qtquick2applicationviewer.h"
+
#include "shell.h"
-#include <qdeclarative.h>
int main(int argc, char *argv[])
{
- QApplication app(argc, argv);
+ QGuiApplication app(argc, argv);
qmlRegisterType<Shell>("Qt.labs", 1, 0, "HybridShell");
- QmlApplicationViewer viewer;
- viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
- viewer.setMainQmlFile(QLatin1String("qml/hybridshell/main.qml"));
+ QtQuick2ApplicationViewer viewer;
+ viewer.setMainQmlFile(QStringLiteral("qml/hybridshell/main.qml"));
viewer.showExpanded();
return app.exec();
diff --git a/examples/hybridshell/qml/hybridshell/main.qml b/examples/hybridshell/qml/hybridshell/main.qml
index 859ab45..c46aaa2 100644
--- a/examples/hybridshell/qml/hybridshell/main.qml
+++ b/examples/hybridshell/qml/hybridshell/main.qml
@@ -39,10 +39,12 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 2.0
+
import Qt.labs 1.0
import Qt.labs.WebChannel 1.0
-import QtWebKit 1.0
+import QtWebKit 3.0
+import QtWebKit.experimental 1.0
Rectangle {
HybridShell {
@@ -71,6 +73,5 @@ Rectangle {
WebView {
anchors.fill: parent
url: "index.html?webChannelBaseUrl=" + webChannel.baseUrl
- onAlert: console.log(message)
}
}
diff --git a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index b3e862c..0000000
--- a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// checksum 0x7895 version 0x4000b
-/*
- 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 <QtCore/QCoreApplication>
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtDeclarative/QDeclarativeComponent>
-#include <QtDeclarative/QDeclarativeEngine>
-#include <QtDeclarative/QDeclarativeContext>
-
-#if defined(QMLJSDEBUGGER)
-#include <qt_private/qdeclarativedebughelper_p.h>
-#endif
-
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
-#include <jsdebuggeragent.h>
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
-#include <qdeclarativeviewobserver.h>
-#endif
-
-#if defined(QMLJSDEBUGGER)
-
-// 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
-{
- QString mainQmlFile;
- friend class QmlApplicationViewer;
- static QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- const QString pathInInstallDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../") + path;
- if (pathInInstallDir.contains(QLatin1String("opt"))
- && pathInInstallDir.contains(QLatin1String("bin"))
- && QFileInfo(pathInInstallDir).exists()) {
- return pathInInstallDir;
- }
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWidget *parent) :
- QDeclarativeView(parent),
- m_d(new QmlApplicationViewerPrivate)
-{
- connect(engine(), SIGNAL(quit()), SLOT(close()));
- setResizeMode(QDeclarativeView::SizeRootObjectToView);
-#if defined(QMLJSDEBUGGER) && !defined(NO_JSDEBUGGER)
- new QmlJSDebugger::JSDebuggerAgent(engine());
-#endif
-#if defined(QMLJSDEBUGGER) && !defined(NO_QMLOBSERVER)
- new QmlJSDebugger::QDeclarativeViewObserver(this, this);
-#endif
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete m_d;
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- engine()->addImportPath(QmlApplicationViewerPrivate::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<Qt::WidgetAttribute>(128);
- break;
- case ScreenOrientationLockLandscape:
- attribute = static_cast<Qt::WidgetAttribute>(129);
- break;
- default:
- case ScreenOrientationAuto:
- attribute = static_cast<Qt::WidgetAttribute>(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()
-{
-#ifdef Q_OS_SYMBIAN
- showFullScreen();
-#elif defined(Q_WS_MAEMO_5)
- showMaximized();
-#else
- show();
-#endif
-}
diff --git a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.h b/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index 19875a3..0000000
--- a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// checksum 0x382f version 0x4000b
-/*
- 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 <QtDeclarative/QDeclarativeView>
-
-class QmlApplicationViewer : public QDeclarativeView
-{
- Q_OBJECT
-
-public:
- enum ScreenOrientation {
- ScreenOrientationLockPortrait,
- ScreenOrientationLockLandscape,
- ScreenOrientationAuto
- };
-
- explicit QmlApplicationViewer(QWidget *parent = 0);
- virtual ~QmlApplicationViewer();
-
- 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:
- class QmlApplicationViewerPrivate *m_d;
-};
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.cpp b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.cpp
new file mode 100644
index 0000000..e03aa3c
--- /dev/null
+++ b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QWebChannel module on Qt labs.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qtquick2applicationviewer.h"
+
+#include <QtCore/QCoreApplication>
+#include <QtCore/QDir>
+#include <QtQml/QQmlEngine>
+
+class QtQuick2ApplicationViewerPrivate
+{
+ QString mainQmlFile;
+ friend class QtQuick2ApplicationViewer;
+ static QString adjustPath(const QString &path);
+};
+
+QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
+{
+#if defined(Q_OS_MAC)
+ if (!QDir::isAbsolutePath(path))
+ return QString::fromLatin1("%1/../Resources/%2")
+ .arg(QCoreApplication::applicationDirPath(), path);
+#elif defined(Q_OS_UNIX)
+ const QString pathInInstallDir =
+ QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
+ if (QFileInfo(pathInInstallDir).exists())
+ return pathInInstallDir;
+#endif
+ return path;
+}
+
+QtQuick2ApplicationViewer::QtQuick2ApplicationViewer(QWindow *parent)
+ : QQuickView(parent)
+ , d(new QtQuick2ApplicationViewerPrivate())
+{
+ connect(engine(), SIGNAL(quit()), SLOT(close()));
+ setResizeMode(QQuickView::SizeRootObjectToView);
+}
+
+QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
+{
+ delete d;
+}
+
+void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
+{
+ d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
+ setSource(QUrl::fromLocalFile(d->mainQmlFile));
+}
+
+void QtQuick2ApplicationViewer::addImportPath(const QString &path)
+{
+ engine()->addImportPath(QtQuick2ApplicationViewerPrivate::adjustPath(path));
+}
+
+void QtQuick2ApplicationViewer::showExpanded()
+{
+#if defined(Q_WS_SIMULATOR)
+ showFullScreen();
+#else
+ show();
+#endif
+}
diff --git a/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.h b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.h
new file mode 100644
index 0000000..907fffa
--- /dev/null
+++ b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2013 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Milian Wolff <milian.wolff@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the QWebChannel module on Qt labs.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QTQUICK2APPLICATIONVIEWER_H
+#define QTQUICK2APPLICATIONVIEWER_H
+
+#include <QtQuick/QQuickView>
+
+class QtQuick2ApplicationViewer : public QQuickView
+{
+ Q_OBJECT
+
+public:
+ explicit QtQuick2ApplicationViewer(QWindow *parent = 0);
+ virtual ~QtQuick2ApplicationViewer();
+
+ void setMainQmlFile(const QString &file);
+ void addImportPath(const QString &path);
+
+ void showExpanded();
+
+private:
+ class QtQuick2ApplicationViewerPrivate *d;
+};
+
+#endif // QTQUICK2APPLICATIONVIEWER_H
diff --git a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.pri
index b07f873..df939e4 100644
--- a/examples/hybridshell/qmlapplicationviewer/qmlapplicationviewer.pri
+++ b/examples/hybridshell/qtquick2applicationviewer/qtquick2applicationviewer.pri
@@ -1,24 +1,17 @@
-# checksum 0xcaf1 version 0x4000b
-# 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.
+# checksum 0xe811 version 0x80001
+# This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
+# The code below adds the QtQuick2ApplicationViewer 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
+QT += qml quick
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
+SOURCES += $$PWD/qtquick2applicationviewer.cpp
+HEADERS += $$PWD/qtquick2applicationviewer.h
INCLUDEPATH += $$PWD
-
-# Include JS debugger library if QMLJSDEBUGGER_PATH is set
-!isEmpty(QMLJSDEBUGGER_PATH) {
- include($$QMLJSDEBUGGER_PATH/qmljsdebugger-lib.pri)
-} else {
- DEFINES -= QMLJSDEBUGGER
-}
# This file was generated by an application wizard of Qt Creator.
-# The code below handles deployment to Symbian and Maemo, aswell as copying
+# The code below handles deployment to Android 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.
@@ -26,7 +19,11 @@ INCLUDEPATH += $$PWD
defineTest(qtcAddDeployment) {
for(deploymentfolder, DEPLOYMENTFOLDERS) {
item = item$${deploymentfolder}
- itemsources = $${item}.sources
+ greaterThan(QT_MAJOR_VERSION, 4) {
+ itemsources = $${item}.files
+ } else {
+ itemsources = $${item}.sources
+ }
$$itemsources = $$eval($${deploymentfolder}.source)
itempath = $${item}.path
$$itempath= $$eval($${deploymentfolder}.target)
@@ -37,9 +34,28 @@ for(deploymentfolder, DEPLOYMENTFOLDERS) {
MAINPROFILEPWD = $$PWD
-symbian {
- isEmpty(ICON):exists($${TARGET}.svg):ICON = $${TARGET}.svg
- isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x20000 0x2000000
+android {
+ for(deploymentfolder, DEPLOYMENTFOLDERS) {
+ item = item$${deploymentfolder}
+ itemfiles = $${item}.files
+ $$itemfiles = $$eval($${deploymentfolder}.source)
+ itempath = $${item}.path
+ $$itempath = /assets/$$eval($${deploymentfolder}.target)
+ export($$itemfiles)
+ export($$itempath)
+ INSTALLS += $$item
+ }
+
+ x86 {
+ target.path = /libs/x86
+ } else: armeabi-v7a {
+ target.path = /libs/armeabi-v7a
+ } else {
+ target.path = /libs/armeabi
+ }
+
+ export(target.path)
+ INSTALLS += target
} else:win32 {
copyCommand =
for(deploymentfolder, DEPLOYMENTFOLDERS) {
@@ -48,6 +64,7 @@ symbian {
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, \\) {
@@ -70,9 +87,16 @@ symbian {
}
} else:unix {
maemo5 {
+ desktopfile.files = $${TARGET}.desktop
desktopfile.path = /usr/share/applications/hildon
- } else {
+ 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)
@@ -85,6 +109,7 @@ symbian {
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
+ targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += $(MKDIR) \"$$target\"
@@ -111,23 +136,23 @@ symbian {
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)
export (INSTALLS)
export (DEPLOYMENT)
-export (TARGET.EPOCHEAPSIZE)
-export (TARGET.CAPABILITY)
export (LIBS)
export (QMAKE_EXTRA_TARGETS)
}