diff options
| author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-13 03:57:58 +0200 | 
|---|---|---|
| committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-13 03:57:58 +0200 | 
| commit | 4757621b22d86b15d26983ff896ad21a0941c2d7 (patch) | |
| tree | 1aecfc7a35c4fbbb6c358bfdc0beb3bb62f1d9a2 /src | |
| parent | rekonq 0.2.57 with new "new tab" page. (diff) | |
| download | rekonq-4757621b22d86b15d26983ff896ad21a0941c2d7.tar.xz | |
Fixing session manager behaviour following a bit dolphin's code
Diffstat (limited to 'src')
| -rw-r--r-- | src/application.cpp | 14 | ||||
| -rw-r--r-- | src/main.cpp | 7 | ||||
| -rw-r--r-- | src/sessionmanager.cpp | 5 | 
3 files changed, 13 insertions, 13 deletions
diff --git a/src/application.cpp b/src/application.cpp index 1e30cfd0..88eb3c58 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -84,11 +84,6 @@ Application::~Application()  int Application::newInstance()  { -    if( isSessionRestored() && sessionManager()->restoreSession() ) -    { -            return 1; -    } -          KCmdLineArgs::setCwd(QDir::currentPath().toUtf8());      KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); @@ -120,9 +115,12 @@ int Application::newInstance()      }      else      { -        // creating new window -        MainWindow *w = newMainWindow(); -        w->slotHome(); +        if(!sessionRestored()) +        { +            // creating new window +            MainWindow *w = newMainWindow(); +            w->slotHome(); +        }      }      return 0; diff --git a/src/main.cpp b/src/main.cpp index fe8ce0eb..e97f2502 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -26,6 +26,7 @@  // Local Includes  #include "application.h" +#include "sessionmanager.h"  // KDE Includes  #include <KAboutData> @@ -127,5 +128,11 @@ int main(int argc, char **argv)      }      Application app; + +    if( app.isSessionRestored() ) +    { +        Application::sessionManager()->restoreSession(); +    } +          return app.exec();  } diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp index 34466e6e..c93a229d 100644 --- a/src/sessionmanager.cpp +++ b/src/sessionmanager.cpp @@ -53,9 +53,6 @@ SessionManager::SessionManager(QObject *parent)  SessionManager::~SessionManager()  { -    // rekonq is closing well. no need for session file -    QFile sessionFile(m_sessionFilePath); -    sessionFile.remove();  } @@ -110,7 +107,5 @@ bool SessionManager::restoreSession()          }      } -    // session is restored. remove session file. -    sessionFile.remove();      return true;  }  | 
