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:16 +0000
commitfd01a9fb7535dcf4025a379c24edabe4c35e6e71 (patch)
tree13468255eb04d80b23a9d1be38fb141620449903 /qmake
parent898af48159195adfb2d9158ba3999371f302ca82 (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 0d5746bb09..88b018eb97 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;
}