qt5base-lts/qmake/library
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
..
ioutils.cpp Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00
ioutils.h Improve QMakeLibraryInfo encapsulation 2021-03-01 17:37:03 +01:00
proitems.cpp Use (new) erase()/erase_if() algorithms 2020-12-05 00:47:44 +01:00
proitems.h Fix undefined behavior in ProString/ProKey::appendTo 2020-12-02 10:21:45 +01:00
qmake_global.h Updated license headers 2016-01-21 18:55:18 +00:00
qmakebuiltins.cpp Replace some more erase/remove patterns with removeIf 2021-01-10 15:02:47 +01:00
qmakeevaluator_p.h Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE 2020-11-30 17:16:21 +01:00
qmakeevaluator.cpp qmake: Sync back changes from qttools 2020-11-26 20:05:41 +01:00
qmakeevaluator.h Port qmake from QStringRef to QStringView 2020-06-05 09:07:14 +02:00
qmakeglobals.cpp Fix "qmake -spec foo" call for cross builds 2021-04-26 10:59:32 +02:00
qmakeglobals.h qmake: Sync back changes from qttools 2020-11-26 20:05:41 +01:00
qmakeparser.cpp qmake: Fix qHash-related integer conversion warnings 2020-10-17 11:56:59 +02:00
qmakeparser.h Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE 2020-11-30 17:16:21 +01:00
qmakevfs.cpp Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00
qmakevfs.h Remove textcodec codepaths in qmake 2020-05-01 18:50:02 +02:00
registry_p.h qmake: add $$read_registry() function 2019-01-05 20:33:07 +00:00
registry.cpp Add ; to Q_UNUSED 2020-07-07 11:51:48 +02:00