]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/main.cpp
Merge branch 'Applications/19.08'
[dolphin.git] / src / main.cpp
index 639dc32efa6694a8fdf00142935552200c0512e5..8981b54bce36013e77ef5744e6c235f512f81f52 100644 (file)
@@ -142,23 +142,23 @@ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
         return app.exec();
     }
 
+    if (!parser.isSet(QStringLiteral("new-window"))) {
+        if (Dolphin::attachToExistingInstance(urls, openFiles, splitView)) {
+            // Successfully attached to existing instance of Dolphin
+            return 0;
+        }
+    }
+
     if (urls.isEmpty()) {
         // We need at least one URL to open Dolphin
         urls.append(Dolphin::homeUrl());
     }
-
+    
     if (splitView && urls.size() < 2) {
         // Split view does only make sense if we have at least 2 URLs
         urls.append(urls.last());
     }
-
-    if (!parser.isSet(QStringLiteral("new-window"))) {
-        if (Dolphin::attachToExistingInstance(urls, openFiles, splitView)) {
-            // Successfully attached to existing instance of Dolphin
-            return 0;
-        }
-    }
-
+    
     DolphinMainWindow* mainWindow = new DolphinMainWindow();
 
     if (openFiles) {