diff options
author | Christian Kandeler <[email protected]> | 2024-02-15 15:01:16 +0100 |
---|---|---|
committer | Christian Kandeler <[email protected]> | 2024-02-27 17:13:15 +0000 |
commit | 6e5c72824af64fbcd133b28b9a76a7eaee4e3468 (patch) | |
tree | caa2d02cba22906a0dff7f21d0e745eb361ed5a0 /src/plugins/qmakeprojectmanager/makefileparse.cpp | |
parent | 903d01b93459d0f1ee70e6ca74a8c01af5e0981b (diff) |
QmakeProjectManager: Fix Makefile compatibility checkv13.0.0-beta2
E.g. qmake "binaries" for Android are actually shell scripts that call a
Desktop qmake in a different location, which lead Qt Creator to conclude
that the directory contains an incompatible build.
Fix this by checking that the -qtconf argument passed to qmake points
into the real qmake's parent directory, as is the case in the
abovementioned scenario.
Fixes: QTCREATORBUG-30354
Change-Id: Id6e878fab3379a3a8893389447514a1b7226784c
Reviewed-by: <[email protected]>
Reviewed-by: Alessandro Portale <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'src/plugins/qmakeprojectmanager/makefileparse.cpp')
-rw-r--r-- | src/plugins/qmakeprojectmanager/makefileparse.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/qmakeprojectmanager/makefileparse.cpp b/src/plugins/qmakeprojectmanager/makefileparse.cpp index 60a04cee0a8..9d2bda465f7 100644 --- a/src/plugins/qmakeprojectmanager/makefileparse.cpp +++ b/src/plugins/qmakeprojectmanager/makefileparse.cpp @@ -56,6 +56,7 @@ void MakeFileParse::parseArgs(const QString &args, const QString &project, static const QRegularExpression regExp(QLatin1String("^([^\\s\\+-]*)\\s*(\\+=|=|-=|~=)(.*)$")); bool after = false; bool ignoreNext = false; + bool nextIsQtConfArg = false; m_unparsedArguments = args; ProcessArgs::ArgIterator ait(&m_unparsedArguments); while (ait.next()) { @@ -63,11 +64,18 @@ void MakeFileParse::parseArgs(const QString &args, const QString &project, // Ignoring ignoreNext = false; ait.deleteArg(); + } else if (nextIsQtConfArg) { + nextIsQtConfArg = false; + m_qtConfFile = FilePath::fromUserInput(ait.value()); + ait.deleteArg(); } else if (ait.value() == project) { ait.deleteArg(); } else if (ait.value() == QLatin1String("-after")) { after = true; ait.deleteArg(); + } else if (ait.value() == "-qtconf") { + nextIsQtConfArg = true; + ait.deleteArg(); } else if (ait.value().contains(QLatin1Char('='))) { const QRegularExpressionMatch match = regExp.match(ait.value()); if (match.hasMatch()) { |