Fix infinite loop in qmake option parsing

If calling 'qmake -qtconf file' an infinite loop occurs.

Bug introduced in 661b586a69740bd9a1791622f8b238d290ebe00d

Change-Id: I3ccc067570308227b605d700b41b299800aa872a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 6b1a7341fed4b9456ea6bfa2de7412d45ef56c65)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Jonas Karlsson 2021-04-22 14:47:10 +02:00 committed by Qt Cherry-pick Bot
parent 898af48159
commit fd01a9fb75

View File

@ -421,10 +421,11 @@ Option::init(int argc, char **argv)
} else if (opt == "-makefile") {
Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE;
} else if (opt == "-qtconf") {
// Move the argument following "-qtconf <file>" in front and check again.
if (args.length() >= 3)
if (args.length() >= 3) {
// Move the argument following "-qtconf <file>" in front and check again.
args.prepend(args.takeAt(2));
continue;
continue;
}
} else {
break;
}