Don't enable qmlscene compability mode for commented out imports.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Mon, 1 Aug 2011 06:27:01 +0000 (16:27 +1000)
committerQt by Nokia <qt-info@nokia.com>
Mon, 1 Aug 2011 23:47:33 +0000 (01:47 +0200)
Valid import statements should be at the start of a line, maybe
preceded by some white space.

Task-number: QTBUG-20649
Change-Id: I1944bce0d30e680ebdb0798f5ae4e8c91a057a13
Reviewed-on: http://codereview.qt.nokia.com/2423
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
tools/qmlscene/main.cpp

index 1d3641b..0d6f813 100644 (file)
@@ -358,8 +358,8 @@ static void checkAndAdaptVersion(const QUrl &url)
         return;
     }
 
-    QRegExp quick1("import +QtQuick +1\\.");
-    QRegExp qt47("import +Qt +4\\.7");
+    QRegExp quick1("^\\s*import +QtQuick +1\\.");
+    QRegExp qt47("^\\s*import +Qt +4\\.7");
 
     QString envToWrite;
     QString compat;