summaryrefslogtreecommitdiff
path: root/tools/configure
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-07-15 15:43:40 +0200
committerJason Barron <jbarron@trolltech.com>2009-07-15 15:43:40 +0200
commit5a8e35c51c6837aaa61714693b37d4d6b199da84 (patch)
tree9c1cb2729dad90913cc21077ce797dd68b47015a /tools/configure
parentcd4c5a65b9d91fd84408205c3d20554122037730 (diff)
downloadqt4-tools-5a8e35c51c6837aaa61714693b37d4d6b199da84.tar.gz
Fix configure.exe when more than 256(!) else-ifs are required.
The introduction of the additional 'continuousElse' statement was flawed because once the variable is toggled to true by the first else block, it remains true for the second block even if the option was found so these options will eventually hit the "Unknown option" error in the final else case. The workaround is not to re-use the variable for each block, but instead use an array of bools. One element of the array per 'continuousElse' check. This should probably be refactored soon-ish :)
Diffstat (limited to 'tools/configure')
-rw-r--r--tools/configure/configureapp.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 204171585d..a50019f36c 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -439,7 +439,7 @@ void Configure::parseCmdLine()
}
for( ; i<configCmdLine.size(); ++i ) {
- bool continueElse = false;
+ bool continueElse[] = {false, false};
if( configCmdLine.at(i) == "-help"
|| configCmdLine.at(i) == "-h"
|| configCmdLine.at(i) == "-?" )
@@ -687,8 +687,8 @@ void Configure::parseCmdLine()
// Work around compiler nesting limitation
else
- continueElse = true;
- if (!continueElse) {
+ continueElse[1] = true;
+ if (!continueElse[1]) {
}
// OpenGL Support -------------------------------------------
@@ -907,8 +907,8 @@ void Configure::parseCmdLine()
// Work around compiler nesting limitation
else
- continueElse = true;
- if (!continueElse) {
+ continueElse[0] = true;
+ if (!continueElse[0]) {
}
else if( configCmdLine.at(i) == "-internal" )