From 3c43c35167cfcb807602442a76011f3737696e1e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Fri, 21 Oct 2016 18:59:36 +0200 Subject: [PATCH] remove pretenses of support for DEPLOYMENT with .sources since fa6d0f1231, DEPLOYMENT is aliased to INSTALLS, so we would have to actually look for .sources in entries listed in that variable, which we didn't. apparently, nobody noticed, among other things possibly because the qt4 variant already supports .files in later versions. also, our actual deployment code doesn't use .sources, either. Change-Id: I990240716817118047fc9aa97eff55305fcf7eca Reviewed-by: Tobias Hunger Reviewed-by: Christian Kandeler --- .../qmakeprojectmanager/qmakenodes.cpp | 23 ++++--------------- src/plugins/qmakeprojectmanager/qmakenodes.h | 2 +- 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.cpp b/src/plugins/qmakeprojectmanager/qmakenodes.cpp index 0f588c7a55c..3507ba80b85 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakenodes.cpp @@ -199,7 +199,6 @@ public: QtSupport::ProFileReader *readerCumulative; ProFileGlobals *qmakeGlobals; QMakeVfs *qmakeVfs; - bool isQt5; }; class PriFileEvalResult @@ -639,7 +638,7 @@ PriFileEvalResult QmakePriFileNode::extractValues(const EvalInput &input, // all the files from those folders and add watchers for them. That's too // dangerous if we get the folders wrong and enumerate the whole project // tree multiple times. - QStringList dynamicVariables = dynamicVarNames(input.readerExact, input.isQt5); + QStringList dynamicVariables = dynamicVarNames(input.readerExact); foreach (ProFile *includeFileExact, includeFilesExact) foreach (const QString &dynamicVar, dynamicVariables) result.folders += input.readerExact->values(dynamicVar, includeFileExact); @@ -1461,25 +1460,15 @@ QStringList QmakePriFileNode::varNamesForRemoving() return vars; } -QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, - bool isQt5) +QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *reader) { QStringList result; - // Figure out DEPLOYMENT and INSTALLS - const QString deployment = QLatin1String("DEPLOYMENT"); - const QString sources = QLatin1String(isQt5 ? ".files" : ".sources"); - QStringList listOfVars = readerExact->values(deployment); - foreach (const QString &var, listOfVars) { - result << (var + sources); - } - + // Figure out INSTALLS (and DEPLOYMENT, as it's aliased) const QString installs = QLatin1String("INSTALLS"); const QString files = QLatin1String(".files"); - listOfVars = readerExact->values(installs); - foreach (const QString &var, listOfVars) { + foreach (const QString &var, reader->values(installs)) result << (var + files); - } result.removeDuplicates(); return result; } @@ -1792,10 +1781,6 @@ EvalInput QmakeProFileNode::evalInput() const input.buildDirectory = buildDir(); input.readerExact = m_readerExact; input.readerCumulative = m_readerCumulative; - Target *t = m_project->activeTarget(); - Kit *k = t ? t->kit() : KitManager::defaultKit(); - QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(k); - input.isQt5 = !qtVersion || qtVersion->qtVersion() >= QtSupport::QtVersionNumber(5,0,0); input.qmakeGlobals = m_project->qmakeGlobals(); input.qmakeVfs = m_project->qmakeVfs(); return input; diff --git a/src/plugins/qmakeprojectmanager/qmakenodes.h b/src/plugins/qmakeprojectmanager/qmakenodes.h index 1bb881f482a..5a1568e0d8e 100644 --- a/src/plugins/qmakeprojectmanager/qmakenodes.h +++ b/src/plugins/qmakeprojectmanager/qmakenodes.h @@ -180,7 +180,7 @@ protected: static QStringList varNames(ProjectExplorer::FileType type, QtSupport::ProFileReader *readerExact); static QStringList varNamesForRemoving(); static QString varNameForAdding(const QString &mimeType); - static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, bool isQt5); + static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact); static QSet filterFilesProVariables(ProjectExplorer::FileType fileType, const QSet &files); static QSet filterFilesRecursiveEnumerata(ProjectExplorer::FileType fileType, const QSet &files);