summaryrefslogtreecommitdiff
path: root/src/sessionmanager.cpp
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@gmail.com>2011-02-24 18:35:20 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-24 18:38:45 +0100
commit23b44d0344304499ba8e1f199720202381920827 (patch)
treeedd144e38d6dc3619b8b889f3a80a69a8dc52180 /src/sessionmanager.cpp
parentSave one updateRightIcons call from the bookmark icon. (diff)
downloadrekonq-23b44d0344304499ba8e1f199720202381920827.tar.xz
No more static members in the Application class,
an rApp shortcut for Application::instance, clean up code switching to use the new shortcut Reviewed by: adjam
Diffstat (limited to 'src/sessionmanager.cpp')
-rw-r--r--src/sessionmanager.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/sessionmanager.cpp b/src/sessionmanager.cpp
index 87f25f43..f6f499d3 100644
--- a/src/sessionmanager.cpp
+++ b/src/sessionmanager.cpp
@@ -71,7 +71,7 @@ void SessionManager::saveSession()
return;
}
QTextStream out(&sessionFile);
- MainWindowList wl = Application::instance()->mainWindowList();
+ MainWindowList wl = rApp->mainWindowList();
Q_FOREACH(const QWeakPointer<MainWindow> &w, wl)
{
out << "window\n";
@@ -104,7 +104,7 @@ bool SessionManager::restoreSession()
QTextStream in(&sessionFile);
QString line;
- bool windowAlreadyOpen = Application::instance()->mainWindowList().count();
+ bool windowAlreadyOpen = rApp->mainWindowList().count();
do
{
line = in.readLine();
@@ -112,10 +112,10 @@ bool SessionManager::restoreSession()
{
line = in.readLine();
if (windowAlreadyOpen) {
- Application::instance()->loadUrl( KUrl(line), Rekonq::CurrentTab);
+ rApp->loadUrl( KUrl(line), Rekonq::CurrentTab);
windowAlreadyOpen = false;
} else {
- Application::instance()->loadUrl( KUrl(line), Rekonq::NewWindow);
+ rApp->loadUrl( KUrl(line), Rekonq::NewWindow);
}
}
else
@@ -128,7 +128,7 @@ bool SessionManager::restoreSession()
if (ok)
{
// Get last mainwindow created which will be first one in mainwindow list
- MainWindowList wl = Application::instance()->mainWindowList();
+ MainWindowList wl = rApp->mainWindowList();
if (wl.count() > 0)
{
MainView *mv = wl[0].data()->mainView();
@@ -138,7 +138,7 @@ bool SessionManager::restoreSession()
}
else
{
- Application::instance()->loadUrl( KUrl(line), Rekonq::NewFocusedTab);
+ rApp->loadUrl( KUrl(line), Rekonq::NewFocusedTab);
}
}
}