Skip to content
Snippets Groups Projects
Commit 53fb29bd authored by Tobias Nätterlund's avatar Tobias Nätterlund Committed by Tobias Nätterlund
Browse files

QtQuick2ApplicationViewer: properly resolve install paths


This is a port of commit 2982545d to also apply it to
the qtquick2applicationviewer.cpp template.

Change-Id: Ia9d964d9fc98ea957c52aea783c6148449552755
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent fd9d39c1
No related branches found
No related tags found
No related merge requests found
...@@ -29,11 +29,15 @@ QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path) ...@@ -29,11 +29,15 @@ QString QtQuick2ApplicationViewerPrivate::adjustPath(const QString &path)
#elif defined(Q_OS_QNX) #elif defined(Q_OS_QNX)
if (!QDir::isAbsolutePath(path)) if (!QDir::isAbsolutePath(path))
return QString::fromLatin1("app/native/%1").arg(path); return QString::fromLatin1("app/native/%1").arg(path);
#elif defined(Q_OS_UNIX) && !defined(Q_OS_ANDROID) #elif !defined(Q_OS_ANDROID)
const QString pathInInstallDir = QString pathInInstallDir =
QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path); QString::fromLatin1("%1/../%2").arg(QCoreApplication::applicationDirPath(), path);
if (QFileInfo(pathInInstallDir).exists()) if (QFileInfo(pathInInstallDir).exists())
return pathInInstallDir; return pathInInstallDir;
pathInInstallDir =
QString::fromLatin1("%1/%2").arg(QCoreApplication::applicationDirPath(), path);
if (QFileInfo(pathInInstallDir).exists())
return pathInInstallDir;
#endif #endif
return path; return path;
} }
......
...@@ -227,7 +227,7 @@ QByteArray QtQuickApp::generateFileExtended(int fileType, ...@@ -227,7 +227,7 @@ QByteArray QtQuickApp::generateFileExtended(int fileType,
int QtQuickApp::stubVersionMinor() const int QtQuickApp::stubVersionMinor() const
{ {
return m_componentSet == QtQuick20Components ? 3 : 23; return m_componentSet == QtQuick20Components ? 4 : 23;
} }
QList<AbstractGeneratedFileInfo> QtQuickApp::updateableFiles(const QString &mainProFile) const QList<AbstractGeneratedFileInfo> QtQuickApp::updateableFiles(const QString &mainProFile) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment