┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-04-12 20:01:31 +0200
committerPeter Penz <[email protected]>2011-04-12 20:08:08 +0200
commitde077f8477c0b7077ed9239be8741fcb67658ffa (patch)
tree2057f6b2e6aa34d20b997cebb7a60ce6a0dff334 /src/main.cpp
parenta19e78d75b0bc451685d2248be0ec474b3c18966 (diff)
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
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp17
1 files changed, 2 insertions, 15 deletions
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