Fixed an argument parsing bug in syncqt.
authoraxis <qt-info@nokia.com>
Fri, 13 May 2011 14:07:56 +0000 (16:07 +0200)
committerQt Continuous Integration System <qt-info@nokia.com>
Thu, 2 Jun 2011 20:54:08 +0000 (22:54 +0200)
We need to move the detection up above the general -no-* match,
otherwise it never hits.

Change-Id: I04ab5a1ed2c4a01219e7b9e10948b3fc4989f4b8
Task: QTBUG-19585
Reviewed-on: http://codereview.qt.nokia.com/228
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
bin/syncqt

index 69d50ec..7cf8b1b 100755 (executable)
@@ -590,6 +590,12 @@ while ( @ARGV ) {
             $arg eq "-relative" || $arg eq "-check-includes") {
         $var = substr($arg, 1);
         $val = "yes";
+    } elsif($arg eq "-no-module-fwd") {
+        $var = "no_module_fwd";
+        $val = "yes";
+    } elsif($arg eq "-no-module-version-header") {
+        $var = "no_module_version_header";
+        $val = "yes";
     } elsif($arg =~ /^-no-(.*)$/) {
         $var = $1;
         $val = "no";
@@ -619,12 +625,6 @@ while ( @ARGV ) {
         # skip, it's been dealt with at the top of the file
         shift @ARGV;
         next;
-    } elsif($arg eq "-no-module-fwd") {
-        $var = "no_module_fwd";
-        $val = "yes";
-    } elsif($arg eq "-no-module-version-header") {
-            $var = "no_module_version_header";
-            $val = "yes";
     } elsif($arg =~/^-/) {
         print "Unknown option: $arg\n\n" if(!$var);
         showUsage();