qt5base-lts/qmake
Joerg Bornemann 63a812b851 Fix "qmake -spec foo" call for cross builds
In a cross built Qt, for example Qt for Android, calling "qmake -spec
android-clang" led to an error message:
    "Could not find qmake spec '-qtconf'."

This happened, because:
- the qmake in Qt for Android is a wrapper script that calls
  "qmake -qtconf qt_target.conf -spec android-clang"
- the first stage of command line argument handling in qmake garbled the
  call to "qmake -spec -qtconf qt_target.conf android-clang"

We do not modify the order of arguments anymore.

Instead, we skip the "-qtconf <file>" arguments in the first argument
handling stage that is supposed to determine qmake's modus
operandi (like -project or -query).

In addition, we need to fix the assignment of
QLibraryInfoPrivate::qtconfManualPath which was only done if
QMakeGlobals::addCommandLineArguments returned ArgumentsOk. However,
this function returns ArgumentUnknown, if it encounters an argument it
cannot handle - like the project name.
Now, we assign QLibraryInfoPrivate::qtconfManualPath if there was no
error detected.

Document the return values of addCommandLineArguments.

This amends commit 661b586a69.

Pick-to: 6.1 6.0
Fixes: QTBUG-93079
Task-number: QTBUG-85136
Change-Id: I12ec25b17d64c00be2a3904b7c4a975b781500a0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-26 10:59:32 +02:00
..
doc qdoc: Name section 'Getting started with qmake' 2021-04-22 14:48:46 +00:00
generators Explicitly set input files for qtpreprocess 2021-04-12 11:36:32 +02:00
library Fix "qmake -spec foo" call for cross builds 2021-04-26 10:59:32 +02:00
cachekeys.h qmake: Fix qHash-related integer conversion warnings 2020-10-17 11:56:59 +02:00
CMakeLists.txt Add a way to install versioned hard-links for tools 2021-03-25 16:31:39 +01:00
configure.cmake Add the 'FEATURE_qmake' feature 2021-03-04 09:49:44 +01:00
main.cpp Unify QLibraryInfo settings 2021-03-17 11:57:11 +01:00
meta.cpp qmake: Remove dead code 2019-04-05 07:48:34 +00:00
meta.h qmake: Remove dead code 2019-04-05 07:48:34 +00:00
option.cpp Fix "qmake -spec foo" call for cross builds 2021-04-26 10:59:32 +02:00
option.h Move the common qmake sources into a object library 2021-03-11 15:46:34 +01:00
project.cpp Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
project.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
property.cpp Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
property.h Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
propertyprinter.cpp Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
propertyprinter.h Add support for various output formats for QMakeProperty 2021-03-12 13:20:00 +01:00
qmake_pch.h Move QRegExp and its remaining mentions out of QtCore 2020-07-13 10:53:23 +02:00
qmakelibraryinfo.cpp Fix warning when building qmake with MSVC 2021-03-22 22:32:56 +01:00
qmakelibraryinfo.h Unify QLibraryInfo settings 2021-03-17 11:57:11 +01:00