diff options
author | Pierre Rossi <pierre.rossi@gmail.com> | 2011-02-24 18:35:20 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-02-24 18:38:45 +0100 |
commit | 23b44d0344304499ba8e1f199720202381920827 (patch) | |
tree | edd144e38d6dc3619b8b889f3a80a69a8dc52180 /src/mainview.cpp | |
parent | Save one updateRightIcons call from the bookmark icon. (diff) | |
download | rekonq-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/mainview.cpp')
-rw-r--r-- | src/mainview.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index dfa202dc..8907322e 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -98,7 +98,7 @@ MainView::MainView(MainWindow *parent) void MainView::postLaunch() { - QStringList list = Application::sessionManager()->closedSites(); + QStringList list = rApp->sessionManager()->closedSites(); Q_FOREACH(const QString &line, list) { if(line.startsWith( QL1S("about") )) @@ -111,7 +111,7 @@ void MainView::postLaunch() } // Session Manager - connect(this, SIGNAL(tabsChanged()), Application::sessionManager(), SLOT(saveSession())); + connect(this, SIGNAL(tabsChanged()), rApp->sessionManager(), SLOT(saveSession())); m_addTabButton->setDefaultAction(m_parentWindow->actionByName("new_tab")); @@ -411,7 +411,7 @@ void MainView::cloneTab(int index) KUrl url = webTab(index)->url(); - Application::instance()->loadUrl(url, Rekonq::NewTab); + rApp->loadUrl(url, Rekonq::NewTab); updateTabBar(); } @@ -555,7 +555,7 @@ void MainView::webViewIconChanged() if (-1 != index) { - KIcon icon = Application::iconManager()->iconForUrl(tab->url()); + KIcon icon = rApp->iconManager()->iconForUrl(tab->url()); QLabel *label = animatedLoading(index, false); QMovie *movie = label->movie(); delete movie; @@ -585,7 +585,7 @@ void MainView::webViewTitleChanged(const QString &title) { tabBar()->setTabHighlighted(index); } - Application::historyManager()->updateHistoryEntry(tab->url(), tabTitle); + rApp->historyManager()->updateHistoryEntry(tab->url(), tabTitle); if (ReKonfig::hoveringTabOption() == 1) tabBar()->setTabToolTip(index, tabTitle.remove('&')); } @@ -630,7 +630,7 @@ void MainView::openLastClosedTab() return; const HistoryItem item = m_recentlyClosedTabs.takeFirst(); - Application::instance()->loadUrl(KUrl(item.url), Rekonq::NewTab); + rApp->loadUrl(KUrl(item.url), Rekonq::NewTab); } @@ -639,7 +639,7 @@ void MainView::openClosedTab() KAction *action = qobject_cast<KAction *>(sender()); if (action) { - Application::instance()->loadUrl(action->data().toUrl(), Rekonq::NewTab); + rApp->loadUrl(action->data().toUrl(), Rekonq::NewTab); QString title = action->text(); title = title.remove('&'); @@ -704,7 +704,7 @@ void MainView::detachTab(int index, MainWindow *toWindow) if (u.scheme() == QL1S("about")) { closeTab(index); - Application::instance()->loadUrl(u, Rekonq::NewWindow); + rApp->loadUrl(u, Rekonq::NewWindow); } else { @@ -714,10 +714,10 @@ void MainView::detachTab(int index, MainWindow *toWindow) MainWindow *w; if( toWindow == NULL ) - w = Application::instance()->newMainWindow(false); + w = rApp->newMainWindow(false); else w = toWindow; - w->mainView()->addTab(tab, Application::iconManager()->iconForUrl(u), label); + w->mainView()->addTab(tab, rApp->iconManager()->iconForUrl(u), label); w->mainView()->widgetBar()->insertWidget(0, bar); w->mainView()->updateTabBar(); } |