summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-09-07 12:35:18 +0200
committerJoerg Bornemann <joerg.bornemann@nokia.com>2012-09-07 14:23:38 +0200
commit95824dc29859724f902a7af64cde7efab2b1b5e3 (patch)
tree9dd54624bc22d451efc300bada4d0e00a69a13c1
parente77bb8af0489688ec06f2f74a9f963f076c36584 (diff)
downloadqt-creator-95824dc29859724f902a7af64cde7efab2b1b5e3.tar.gz
fix usage of removed DEPLOYMENT property in Qt 5
For DEPLOYMENT, foo.sources has been superseded by foo.files in Qt 5. Change-Id: I8a357aca0969b7caa94b9e9ed63613064ba86299 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp12
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.h3
2 files changed, 11 insertions, 4 deletions
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 860d468546..ef8e7f7009 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 81519232df..fe1c1b0fad 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<Utils::FileName> filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);
static QSet<Utils::FileName> filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet<Utils::FileName> &files);