-// checksum 0x5e4a version 0x5000d
+// checksum 0xee24 version 0x70013
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
#include "qmlapplicationviewer.h"
-#include <QtCore/QCoreApplication>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
+#include <QtGui/QApplication>
#include <QtDeclarative/QDeclarativeComponent>
#include <QtDeclarative/QDeclarativeEngine>
#include <QtDeclarative/QDeclarativeContext>
+#include <qplatformdefs.h> // MEEGO_EDITION_HARMATTAN
+
+#ifdef HARMATTAN_BOOSTER
+#include <MDeclarativeCache>
+#endif
+
#if defined(QMLJSDEBUGGER) && QT_VERSION < 0x040800
#include <qt_private/qdeclarativedebughelper_p.h>
#ifdef Q_OS_UNIX
#ifdef Q_OS_MAC
if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
+ return QString::fromLatin1("%1/../Resources/%2")
+ .arg(QCoreApplication::applicationDirPath(), path);
#else
- const QString pathInInstallDir = QCoreApplication::applicationDirPath()
- + QLatin1String("/../") + path;
- if (pathInInstallDir.contains(QLatin1String("opt"))
- && pathInInstallDir.contains(QLatin1String("bin"))
- && QFileInfo(pathInInstallDir).exists()) {
+ 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),
- m_d(new QmlApplicationViewerPrivate)
+QmlApplicationViewer::QmlApplicationViewer(QWidget *parent)
+ : QDeclarativeView(parent)
+ , d(new QmlApplicationViewerPrivate())
{
connect(engine(), SIGNAL(quit()), SLOT(close()));
setResizeMode(QDeclarativeView::SizeRootObjectToView);
QmlApplicationViewer::~QmlApplicationViewer()
{
- delete m_d;
+ delete d;
+}
+
+QmlApplicationViewer *QmlApplicationViewer::create()
+{
+ return new QmlApplicationViewer();
}
void QmlApplicationViewer::setMainQmlFile(const QString &file)
{
- m_d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
- setSource(QUrl::fromLocalFile(m_d->mainQmlFile));
+ d->mainQmlFile = QmlApplicationViewerPrivate::adjustPath(file);
+ setSource(QUrl::fromLocalFile(d->mainQmlFile));
}
void QmlApplicationViewer::addImportPath(const QString &path)
void QmlApplicationViewer::showExpanded()
{
-#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN)
+#if defined(Q_OS_SYMBIAN) || defined(MEEGO_EDITION_HARMATTAN) || defined(Q_WS_SIMULATOR)
showFullScreen();
#elif defined(Q_WS_MAEMO_5)
showMaximized();
show();
#endif
}
+
+QApplication *createApplication(int &argc, char **argv)
+{
+#ifdef HARMATTAN_BOOSTER
+ return MDeclarativeCache::qApplication(argc, argv);
+#else
+ return new QApplication(argc, argv);
+#endif
+}
-// checksum 0x382f version 0x5000d
+// checksum 0x898f version 0x70013
/*
This file was generated by the Qt Quick Application wizard of Qt Creator.
QmlApplicationViewer is a convenience class containing mobile device specific
explicit QmlApplicationViewer(QWidget *parent = 0);
virtual ~QmlApplicationViewer();
+ static QmlApplicationViewer *create();
+
void setMainQmlFile(const QString &file);
void addImportPath(const QString &path);
void showExpanded();
private:
- class QmlApplicationViewerPrivate *m_d;
+ class QmlApplicationViewerPrivate *d;
};
+QApplication *createApplication(int &argc, char **argv);
+
#endif // QMLAPPLICATIONVIEWER_H
-# checksum 0x83a9 version 0x5000d
+# checksum 0x5b42 version 0x70013
# 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.
# may offer an updated version of it.
QT += declarative
-CONFIG(debug, debug|release):CONFIG += declarative_debug
SOURCES += $$PWD/qmlapplicationviewer.cpp
HEADERS += $$PWD/qmlapplicationviewer.h
} 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.
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, \\) {
desktopfile.path = /usr/share/applications/hildon
icon.files = $${TARGET}64.png
icon.path = /usr/share/icons/hicolor/64x64/apps
- } else {
+ } 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)
target = $$replace(target, \\\\, /)
sourcePathSegments = $$split(source, /)
targetFullPath = $$target/$$last(sourcePathSegments)
+ targetFullPath ~= s,/\\.?/,/,
!isEqual(source,$$targetFullPath) {
!isEmpty(copyCommand):copyCommand += &&
copyCommand += $(MKDIR) \"$$target\"
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(icon.files)
- export(icon.path)
- export(desktopfile.files)
- export(desktopfile.path)
export(target.path)
- INSTALLS += desktopfile icon target
+ INSTALLS += target
}
export (ICON)