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/protocolhandler.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/protocolhandler.cpp')
-rw-r--r-- | src/protocolhandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/protocolhandler.cpp b/src/protocolhandler.cpp index 6dfc33a1..fa93f074 100644 --- a/src/protocolhandler.cpp +++ b/src/protocolhandler.cpp @@ -200,12 +200,12 @@ bool ProtocolHandler::preHandling(const QNetworkRequest &request, QWebFrame *fra // If rekonq cannot handle a protocol by itself, it will hand it over to KDE via KRun if(KProtocolInfo::isKnownProtocol(_url)) { - new KRun(_url, Application::instance()->mainWindow()); // No need to delete KRun, it autodeletes itself + new KRun(_url, rApp->mainWindow()); // No need to delete KRun, it autodeletes itself return true; } // Error Message, for those protocols even KDE cannot handle - KMessageBox::error(Application::instance()->mainWindow(), i18nc("@info", + KMessageBox::error(rApp->mainWindow(), i18nc("@info", "rekonq cannot handle this URL. \ Please use an appropriate application to open it.")); return false; @@ -275,9 +275,9 @@ void ProtocolHandler::showResults(const KFileItemList &list) _frame->setHtml(html); qobject_cast<WebPage *>(_frame->page())->setIsOnRekonqPage(true); - Application::instance()->mainWindow()->mainView()->currentUrlBar()->setQUrl(_url); - Application::instance()->mainWindow()->currentTab()->setFocus(); - Application::historyManager()->addHistoryEntry(_url.prettyUrl()); + rApp->mainWindow()->mainView()->currentUrlBar()->setQUrl(_url); + rApp->mainWindow()->currentTab()->setFocus(); + rApp->historyManager()->addHistoryEntry(_url.prettyUrl()); } } @@ -419,9 +419,9 @@ void ProtocolHandler::abpHandling() { if (!requireslocation.isEmpty() && !requirestitle.isEmpty()) { - Application::adblockManager()->addSubscription(requirestitle, requireslocation); + rApp->adblockManager()->addSubscription(requirestitle, requireslocation); } - Application::adblockManager()->addSubscription(title, location); - Application::adblockManager()->loadSettings(false); + rApp->adblockManager()->addSubscription(title, location); + rApp->adblockManager()->loadSettings(false); } } |