##// END OF EJS Templates
Fix Creator generated files...
Titta Heikkala -
r2687:fd75a272a8eb
parent child
Show More
@@ -1,4 +1,4
1 // checksum 0x56a9 version 0x80001
1 // checksum 0xc01f version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
@@ -23,15 +23,28 class QtQuick2ApplicationViewerPrivate
23 23
24 24 QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
25 25 {
26 #if defined(Q_OS_MAC)
26 #if defined(Q_OS_IOS)
27 if (!QDir::isAbsolutePath(path))
28 return QString::fromLatin1("%1/%2")
29 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_MAC)
27 31 if (!QDir::isAbsolutePath(path))
28 32 return QString::fromLatin1("%1/../Resources/%2")
29 33 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_UNIX)
31 const QString pathInInstallDir =
34 #elif defined(Q_OS_BLACKBERRY)
35 if (!QDir::isAbsolutePath(path))
36 return QString::fromLatin1("app/native/%1").arg(path);
37 #elif !defined(Q_OS_ANDROID)
38 QString pathInInstallDir =
32 39 QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
33 40 if (QFileInfo(pathInInstallDir).exists())
34 41 return pathInInstallDir;
42 pathInInstallDir =
43 QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
44 if (QFileInfo(pathInInstallDir).exists())
45 return pathInInstallDir;
46 #elif defined(Q_OS_ANDROID_NO_SDK)
47 return QLatin1String("/data/user/qt/") + path;
35 48 #endif
36 49 return path;
37 50 }
@@ -52,7 +65,11 QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
52 65 void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
53 66 {
54 67 d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
68 #if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
69 setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
70 #else
55 71 setSource(QUrl::fromLocalFile(d->mainQmlFile));
72 #endif
56 73 }
57 74
58 75 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
@@ -62,7 +79,7 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
62 79
63 80 void QtQuick2ApplicationViewer::showExpanded()
64 81 {
65 #if defined(Q_WS_SIMULATOR)
82 #if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
66 83 showFullScreen();
67 84 #else
68 85 show();
@@ -1,4 +1,4
1 // checksum 0xfde6 version 0x80001
1 // checksum 0xfde6 version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
@@ -1,4 +1,4
1 // checksum 0x56a9 version 0x80001
1 // checksum 0xc01f version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
@@ -23,15 +23,28 class QtQuick2ApplicationViewerPrivate
23 23
24 24 QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
25 25 {
26 #if defined(Q_OS_MAC)
26 #if defined(Q_OS_IOS)
27 if (!QDir::isAbsolutePath(path))
28 return QString::fromLatin1("%1/%2")
29 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_MAC)
27 31 if (!QDir::isAbsolutePath(path))
28 32 return QString::fromLatin1("%1/../Resources/%2")
29 33 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_UNIX)
31 const QString pathInInstallDir =
34 #elif defined(Q_OS_BLACKBERRY)
35 if (!QDir::isAbsolutePath(path))
36 return QString::fromLatin1("app/native/%1").arg(path);
37 #elif !defined(Q_OS_ANDROID)
38 QString pathInInstallDir =
32 39 QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
33 40 if (QFileInfo(pathInInstallDir).exists())
34 41 return pathInInstallDir;
42 pathInInstallDir =
43 QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
44 if (QFileInfo(pathInInstallDir).exists())
45 return pathInInstallDir;
46 #elif defined(Q_OS_ANDROID_NO_SDK)
47 return QLatin1String("/data/user/qt/") + path;
35 48 #endif
36 49 return path;
37 50 }
@@ -52,7 +65,11 QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
52 65 void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
53 66 {
54 67 d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
68 #if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
69 setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
70 #else
55 71 setSource(QUrl::fromLocalFile(d->mainQmlFile));
72 #endif
56 73 }
57 74
58 75 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
@@ -62,7 +79,7 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
62 79
63 80 void QtQuick2ApplicationViewer::showExpanded()
64 81 {
65 #if defined(Q_WS_SIMULATOR)
82 #if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
66 83 showFullScreen();
67 84 #else
68 85 show();
@@ -1,4 +1,4
1 // checksum 0xfde6 version 0x80001
1 // checksum 0xfde6 version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
@@ -1,4 +1,4
1 // checksum 0x56a9 version 0x80001
1 // checksum 0xc01f version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
@@ -23,15 +23,28 class QtQuick2ApplicationViewerPrivate
23 23
24 24 QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
25 25 {
26 #if defined(Q_OS_MAC)
26 #if defined(Q_OS_IOS)
27 if (!QDir::isAbsolutePath(path))
28 return QString::fromLatin1("%1/%2")
29 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_MAC)
27 31 if (!QDir::isAbsolutePath(path))
28 32 return QString::fromLatin1("%1/../Resources/%2")
29 33 .arg(QCoreApplication::applicationDirPath(), path);
30 #elif defined(Q_OS_UNIX)
31 const QString pathInInstallDir =
34 #elif defined(Q_OS_BLACKBERRY)
35 if (!QDir::isAbsolutePath(path))
36 return QString::fromLatin1("app/native/%1").arg(path);
37 #elif !defined(Q_OS_ANDROID)
38 QString pathInInstallDir =
32 39 QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
33 40 if (QFileInfo(pathInInstallDir).exists())
34 41 return pathInInstallDir;
42 pathInInstallDir =
43 QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
44 if (QFileInfo(pathInInstallDir).exists())
45 return pathInInstallDir;
46 #elif defined(Q_OS_ANDROID_NO_SDK)
47 return QLatin1String("/data/user/qt/") + path;
35 48 #endif
36 49 return path;
37 50 }
@@ -52,7 +65,11 QtQuick2ApplicationViewer::~QtQuick2ApplicationViewer()
52 65 void QtQuick2ApplicationViewer::setMainQmlFile(const QString &file)
53 66 {
54 67 d->mainQmlFile = QtQuick2ApplicationViewerPrivate::adjustPath(file);
68 #if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
69 setSource(QUrl(QLatin1String("assets:/")+d->mainQmlFile));
70 #else
55 71 setSource(QUrl::fromLocalFile(d->mainQmlFile));
72 #endif
56 73 }
57 74
58 75 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
@@ -62,7 +79,7 void QtQuick2ApplicationViewer::addImportPath(const QString &path)
62 79
63 80 void QtQuick2ApplicationViewer::showExpanded()
64 81 {
65 #if defined(Q_WS_SIMULATOR)
82 #if defined(Q_WS_SIMULATOR) || defined(Q_OS_QNX)
66 83 showFullScreen();
67 84 #else
68 85 show();
@@ -1,4 +1,4
1 // checksum 0xfde6 version 0x80001
1 // checksum 0xfde6 version 0x90005
2 2 /*
3 3 This file was generated by the Qt Quick 2 Application wizard of Qt Creator.
4 4 QtQuick2ApplicationViewer is a convenience class containing mobile device specific
General Comments 0
You need to be logged in to leave comments. Login now