diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 860d4685466..ef8e7f7009e 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -600,9 +600,13 @@ void Qt4PriFileNode::update(ProFile *includeFileExact, QtSupport::ProFileReader InternalNode contents; + ProjectExplorer::Target *t = m_project->activeTarget(); + ProjectExplorer::Kit *k = t ? t->kit() : ProjectExplorer::KitManager::instance()->defaultKit(); + QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k); + // Figure out DEPLOYMENT and INSTALL folders QStringList folders; - QStringList dynamicVariables = dynamicVarNames(readerExact, readerCumulative); + QStringList dynamicVariables = dynamicVarNames(readerExact, readerCumulative, qtVersion); if (includeFileExact) foreach (const QString &dynamicVar, dynamicVariables) { folders += readerExact->values(dynamicVar, includeFileExact); @@ -1253,12 +1257,14 @@ QStringList Qt4PriFileNode::varNames(ProjectExplorer::FileType type) } -QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative) +QStringList Qt4PriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, + QtSupport::BaseQtVersion *qtVersion) { QStringList result; + // Figure out DEPLOYMENT and INSTALLS const QString deployment = QLatin1String("DEPLOYMENT"); - const QString sources = QLatin1String(".sources"); + const QString sources = QLatin1String(qtVersion && qtVersion->qtVersion() < QtSupport::QtVersionNumber(5,0,0) ? ".sources" : ".files"); QStringList listOfVars = readerExact->values(deployment); foreach (const QString &var, listOfVars) { result << (var + sources); diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 81519232dff..fe1c1b0fadb 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -53,6 +53,7 @@ class ICore; } namespace QtSupport { +class BaseQtVersion; class ProFileReader; } @@ -169,7 +170,7 @@ public: protected: void setIncludedInExactParse(bool b); static QStringList varNames(FileType type); - static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative); + static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative, QtSupport::BaseQtVersion *qtVersion); static QSet filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet &files); static QSet filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet &files);