forked from qt-creator/qt-creator
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: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
committed by
Tobias Nätterlund
parent
fd9d39c12a
commit
53fb29bdda
@@ -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,
|
|||||||
|
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user