Qmake: Proliferate FilePath use

Change-Id: Id9bdaf127b9b45ec01a12c21dccd8955e5fd2846
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-08-12 15:04:18 +02:00
parent a09bedf1cb
commit 4ec490e77e
7 changed files with 63 additions and 66 deletions

View File

@@ -127,19 +127,18 @@ QList<void *> QmakeProjectImporter::examineDirectory(const FilePath &importPath,
qCDebug(logs) << " Parsing makefile" << file;
// find interesting makefiles
QString makefile = importPath.toString() + QLatin1Char('/') + file;
const FilePath makefile = importPath / file;
MakeFileParse parse(makefile, MakeFileParse::Mode::FilterKnownConfigValues);
if (parse.makeFileState() != MakeFileParse::Okay) {
qCDebug(logs) << " Parsing the makefile failed" << makefile;
continue;
}
if (parse.srcProFile() != projectFilePath().toString()) {
if (parse.srcProFile() != projectFilePath()) {
qCDebug(logs) << " pro files doesn't match" << parse.srcProFile() << projectFilePath();
continue;
}
QFileInfo qmakeFi = parse.qmakePath().toFileInfo();
data->canonicalQmakeBinary = FilePath::fromString(qmakeFi.canonicalFilePath());
data->canonicalQmakeBinary = parse.qmakePath().canonicalPath();
if (data->canonicalQmakeBinary.isEmpty()) {
qCDebug(logs) << " " << parse.qmakePath() << "doesn't exist anymore";
continue;
@@ -184,7 +183,7 @@ QList<void *> QmakeProjectImporter::examineDirectory(const FilePath &importPath,
data->additionalArguments = parse.unparsedArguments();
qCDebug(logs) << " Unparsed arguments:" << data->additionalArguments;
data->parsedSpec =
QmakeBuildConfiguration::extractSpecFromArguments(&(data->additionalArguments), importPath.toString(), version);
QmakeBuildConfiguration::extractSpecFromArguments(&(data->additionalArguments), importPath, version);
qCDebug(logs) << " Extracted spec:" << data->parsedSpec;
qCDebug(logs) << " Arguments now:" << data->additionalArguments;