From de077f8477c0b7077ed9239be8741fcb67658ffa Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 12 Apr 2011 20:01:31 +0200 Subject: Let each DolphinMainWindow run in a custom process A possible crash in one Dolphin window should not result in crashing other Dolphin windows. Beside this it also prevents issues with modal dialogs or notifications. BUG: 269950 BUG: 206053 BUG: 196034 FIXED-IN: 4.7.0 --- src/main.cpp | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 8997ee168..3f26bbb57 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,28 +72,15 @@ KDE_EXPORT int kdemain(int argc, char **argv) options.add("select", ki18nc("@info:shell", "The files and directories passed as arguments " "will be selected.")); + options.add("split", ki18nc("@info:shell", "Dolphin will get started with a split view.")); options.add("+[Url]", ki18nc("@info:shell", "Document to open")); KCmdLineArgs::addCmdLineOptions(options); - if (!DolphinApplication::start()) { - return 0; - } - DolphinApplication app; KGlobal::locale()->insertCatalog("libkonq"); // needed for applications using libkonq if (app.isSessionRestored()) { - int n = 1; - while (KMainWindow::canBeRestored(n)) { - const QString className = KXmlGuiWindow::classNameOfToplevel(n); - if (className == QLatin1String("DolphinMainWindow")) { - DolphinMainWindow* win = app.createMainWindow(); - win->restore(n); - } else { - kWarning() << "Unknown class " << className << " in session saved data!"; - } - ++n; - } + app.restoreSession(); } app.exec(); // krazy:exclude=crashy -- cgit v1.3