]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinapplication.cpp
Details view: Fix wrong expansion level
[dolphin.git] / src / dolphinapplication.cpp
index 9dc0cf0f7ff5a904bd4b50faa76543392a344b5d..1abe8aa6e27681b6ddf522ca7e1b78c1a9a595c5 100644 (file)
@@ -21,7 +21,6 @@
 #include "dolphinapplication.h"
 #include "dolphinmainwindow.h"
 #include "dolphin_generalsettings.h"
-#include "settings/dolphinsettings.h"
 
 #include <KCmdLineArgs>
 #include <KDebug>
@@ -38,12 +37,11 @@ DolphinApplication::DolphinApplication() :
     KCmdLineArgs* args = KCmdLineArgs::parsedArgs();
 
     bool resetSplitSettings = false;
-    GeneralSettings* generalSettings = DolphinSettings::instance().generalSettings();
-    if (args->isSet("split") && !generalSettings->splitView()) {
+    if (args->isSet("split") && !GeneralSettings::splitView()) {
         // Dolphin should be opened with a split view although this is not
         // set in the GeneralSettings. Temporary adjust the setting until
         // all passed URLs have been opened.
-        generalSettings->setSplitView(true);
+        GeneralSettings::setSplitView(true);
         resetSplitSettings = true;
     }
 
@@ -68,7 +66,7 @@ DolphinApplication::DolphinApplication() :
     args->clear();
 
     if (resetSplitSettings) {
-        generalSettings->setSplitView(false);
+        GeneralSettings::setSplitView(false);
     }
 }
 
@@ -83,9 +81,9 @@ DolphinApplication* DolphinApplication::app()
 
 void DolphinApplication::restoreSession()
 {
-    const QString className = KXmlGuiWindow::classNameOfToplevel(0);
+    const QString className = KXmlGuiWindow::classNameOfToplevel(1);
     if (className == QLatin1String("DolphinMainWindow")) {
-        m_mainWindow->restore(0);
+        m_mainWindow->restore(1);
     } else {
         kWarning() << "Unknown class " << className << " in session saved data!";
     }