summaryrefslogtreecommitdiffstats
path: root/qmake
diff options
context:
space:
mode:
authorJonas Karlsson <jonas.karlsson@qt.io>2021-04-22 14:47:10 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-22 20:03:19 +0000
commitda2a5fd136e858740a5db3982f1365c65eaea6b1 (patch)
tree754e9b6fe76ad9e28b61817d2aad4fc8aa95e53e /qmake
parentdc9b55d6b232868a86471a6c0fcc17a82b0c7609 (diff)
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>
Diffstat (limited to 'qmake')
-rw-r--r--qmake/option.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/qmake/option.cpp b/qmake/option.cpp
index 2a3fea8a89..062b519a71 100644
--- a/qmake/option.cpp
+++ b/qmake/option.cpp
@@ -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;
}