forked from qt-creator/qt-creator
QmakePM: Improve performance of import
Shuffle order of parse and add short cuts in case we can stop parsing early. Change-Id: If03a5cbc0e51dc77f4b03b1cf1d07243f5b2a70b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -97,7 +97,7 @@ QList<void *> QmakeProjectImporter::examineDirectory(const FilePath &importPath,
|
||||
qCDebug(logs) << " Parsing makefile" << file;
|
||||
// find interesting makefiles
|
||||
const FilePath makefile = importPath / file;
|
||||
MakeFileParse parse(makefile, MakeFileParse::Mode::FilterKnownConfigValues);
|
||||
MakeFileParse parse(makefile, MakeFileParse::Mode::FilterKnownConfigValues, projectFilePath());
|
||||
if (parse.makeFileState() != MakeFileParse::Okay) {
|
||||
qCDebug(logs) << " Parsing the makefile failed" << makefile;
|
||||
continue;
|
||||
@@ -108,7 +108,7 @@ QList<void *> QmakeProjectImporter::examineDirectory(const FilePath &importPath,
|
||||
}
|
||||
|
||||
data->canonicalQmakeBinary = parse.qmakePath().canonicalPath();
|
||||
if (data->canonicalQmakeBinary.isEmpty()) {
|
||||
if (!data->canonicalQmakeBinary.exists()) {
|
||||
qCDebug(logs) << " " << parse.qmakePath() << "doesn't exist anymore";
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user