]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix Dolphin session management regression
authorFrank Reininghaus <frank78ac@googlemail.com>
Sun, 17 Jul 2011 17:25:49 +0000 (19:25 +0200)
committerFrank Reininghaus <frank78ac@googlemail.com>
Sun, 17 Jul 2011 17:31:30 +0000 (19:31 +0200)
The commit fff7573ebb910712ad97951bf1762e6a7bb0bdc7 introduced a
regression concerning restoration of saved Dolphin sessions. The
main window numbers which can be passed to KMainWindow::restore()
start with 1, and not with 0.

CCBUG:275649
(cherry picked from commit b4091809beedf0e373ac2f497634cc0bedf77a8f)

src/dolphinapplication.cpp

index 9dc0cf0f7ff5a904bd4b50faa76543392a344b5d..0dc9c96024894fa61fe57c19a22e3dc6436b3731 100644 (file)
@@ -83,9 +83,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!";
     }