Small cleanup: remove braces from single line conditionals.
authorRobin Burchell <robin+qt@viroteck.net>
Mon, 18 Jun 2012 15:33:58 +0000 (17:33 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 19 Jun 2012 00:49:05 +0000 (02:49 +0200)
Change-Id: I20588ad0634aebec8374a570179ee43dd1b1dd3b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
tools/qmlscene/main.cpp

index 4e6dd92..06b3c37 100644 (file)
@@ -242,9 +242,8 @@ static int displayOptionsDialog(Options *options)
 
 static bool checkVersion(const QUrl &url)
 {
-    if (!qgetenv("QMLSCENE_IMPORT_NAME").isEmpty()) {
+    if (!qgetenv("QMLSCENE_IMPORT_NAME").isEmpty())
         qWarning("QMLSCENE_IMPORT_NAME is no longer supported.");
-    }
 
     QString fileName = url.toLocalFile();
     if (fileName.isEmpty()) {
@@ -270,11 +269,10 @@ static bool checkVersion(const QUrl &url)
             codeFound = true;
         } else {
             QString import;
-            if (quick1.indexIn(line) >= 0) {
+            if (quick1.indexIn(line) >= 0)
                 import = quick1.cap(0).trimmed();
-            } else if (qt47.indexIn(line) >= 0) {
+            else if (qt47.indexIn(line) >= 0)
                 import = qt47.cap(0).trimmed();
-            }
 
             if (!import.isNull()) {
                 qWarning("qmlscene: '%s' is no longer supported.\n"
@@ -318,9 +316,8 @@ static void loadDummyDataFiles(QQmlEngine &engine, const QString& directory)
 
         if(comp.isError()) {
             QList<QQmlError> errors = comp.errors();
-            foreach (const QQmlError &error, errors) {
+            foreach (const QQmlError &error, errors)
                 qWarning() << error;
-            }
         }
 
         if (dummyData) {
@@ -443,9 +440,8 @@ int main(int argc, char ** argv)
             else
                 window->show();
 
-            if (options.quitImmediately) {
+            if (options.quitImmediately)
                 QMetaObject::invokeMethod(QCoreApplication::instance(), "quit", Qt::QueuedConnection);
-            }
 
             exitCode = app.exec();