From 23b44d0344304499ba8e1f199720202381920827 Mon Sep 17 00:00:00 2001 From: Pierre Rossi Date: Thu, 24 Feb 2011 18:35:20 +0100 Subject: 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 --- src/protocolhandler.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/protocolhandler.cpp') 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(_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); } } -- cgit v1.2.1