Commit 7754606b authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

don't collect dynamic variable names from cumulative reader

we actually use variable values only from the exact reader, based on the
idea that the cumulative parse is too dangerous, as using recursive
watches on inexact data may be a bit heavy. using additional variable
names from the cumulative reader sort of defeats the idea.

Change-Id: I8bf3e298bf89593dcc77548cc3d2cbf7881202dd
Reviewed-by: Tobias Hunger's avatarTobias Hunger <tobias.hunger@qt.io>
parent 65c32320
......@@ -646,17 +646,15 @@ PriFileEvalResult QmakePriFileNode::extractValues(const EvalInput &input,
{
PriFileEvalResult result;
// Figure out DEPLOYMENT and INSTALL folders
QStringList dynamicVariables = dynamicVarNames(input.readerExact, input.readerCumulative, input.isQt5);
// Figure out DEPLOYMENT and INSTALL folders.
// Ignore stuff from cumulative parse, as we are recursively enumerating
// 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);
foreach (ProFile *includeFileExact, includeFilesExact)
foreach (const QString &dynamicVar, dynamicVariables) {
foreach (const QString &dynamicVar, dynamicVariables)
result.folders += input.readerExact->values(dynamicVar, includeFileExact);
// Ignore stuff from cumulative parse
// we are recursively enumerating 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
}
for (int i=0; i < result.folders.size(); ++i) {
const QFileInfo fi(result.folders.at(i));
......@@ -1475,7 +1473,7 @@ QStringList QmakePriFileNode::varNamesForRemoving()
return vars;
}
QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact, QtSupport::ProFileReader *readerCumulative,
QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerExact,
bool isQt5)
{
QStringList result;
......@@ -1487,12 +1485,6 @@ QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerEx
foreach (const QString &var, listOfVars) {
result << (var + sources);
}
if (readerCumulative) {
QStringList listOfVars = readerCumulative->values(deployment);
foreach (const QString &var, listOfVars) {
result << (var + sources);
}
}
const QString installs = QLatin1String("INSTALLS");
const QString files = QLatin1String(".files");
......@@ -1500,12 +1492,6 @@ QStringList QmakePriFileNode::dynamicVarNames(QtSupport::ProFileReader *readerEx
foreach (const QString &var, listOfVars) {
result << (var + files);
}
if (readerCumulative) {
QStringList listOfVars = readerCumulative->values(installs);
foreach (const QString &var, listOfVars) {
result << (var + files);
}
}
result.removeDuplicates();
return result;
}
......
......@@ -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, QtSupport::ProFileReader *readerCumulative, bool isQt5);
static QStringList dynamicVarNames(QtSupport::ProFileReader *readerExact, bool isQt5);
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment