diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-26 00:03:00 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-26 00:03:00 +0200 |
commit | 64475d706faf1620cec8899da7165f4bc369d8a2 (patch) | |
tree | b57275e990201b2d59422fa6d79d5528830fb8d3 /src/application.cpp | |
parent | Fixing a bit thumbs tableWidget (diff) | |
download | rekonq-64475d706faf1620cec8899da7165f4bc369d8a2.tar.xz |
Fixing sessionmanager (at least I hope so):
- moved from DataStream to TextStream (we use strings..)
- implemented a semaphore (m_safe)
- closing every time file
Diffstat (limited to 'src/application.cpp')
-rw-r--r-- | src/application.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/application.cpp b/src/application.cpp index ffde7203..683a405f 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -89,12 +89,16 @@ int Application::newInstance() KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); // is your app session restored? restore session... - if (isSessionRestored()) + // this mechanism also falls back to load usual plain rekonq + // if something goes wrong... + if (isSessionRestored() && sessionManager()->restoreSession()) { - sessionManager()->restoreSession(); + kDebug() << "session restored"; return 0; } - + +// -------------------------------------------------------------------------- + if (args->count() > 0) { // is there a window open on the current desktop ? use it! @@ -143,10 +147,6 @@ void Application::postLaunch() // set Icon Database Path to store "favicons" associated with web sites QString directory = KStandardDirs::locateLocal("cache" , "" , true); - if (directory.isEmpty()) - { - directory = QDir::homePath() + QLatin1String("/.") + QCoreApplication::applicationName(); - } QWebSettings::setIconDatabasePath(directory); Application::historyManager(); @@ -166,7 +166,6 @@ MainWindow *Application::mainWindow() { kDebug() << "No extant windows: creating one new..."; MainWindow *w = newMainWindow(); - QTimer::singleShot(0, this, SLOT(postLaunch())); return w; } @@ -401,7 +400,8 @@ MainWindow *Application::newMainWindow() m_mainWindows.prepend(w); w->show(); - + QTimer::singleShot(0, this, SLOT(postLaunch())); + return w; } |