KAboutData::setApplicationData(aboutData);
- KDBusService dolphinDBusService;
- DBusInterface interface;
-
QCommandLineParser parser;
aboutData.setupCommandLine(&parser);
QList<QUrl> urls = Dolphin::validateUris(args);
if (parser.isSet(QStringLiteral("daemon"))) {
+ KDBusService dolphinDBusService;
+ DBusInterface interface;
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) {
}
}
+ KDBusService dolphinDBusService;
+ DBusInterface interface;
+
return app.exec(); // krazy:exclude=crash;
}