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/bookmarks/bookmarkowner.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/bookmarks/bookmarkowner.cpp')
-rw-r--r-- | src/bookmarks/bookmarkowner.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp index b7aa4a4e..219834f0 100644 --- a/src/bookmarks/bookmarkowner.cpp +++ b/src/bookmarks/bookmarkowner.cpp @@ -97,20 +97,20 @@ KAction* BookmarkOwner::createAction(const KBookmark &bookmark, const BookmarkAc QString BookmarkOwner::currentTitle() const { - return Application::instance()->mainWindow()->currentTab()->view()->title(); + return rApp->mainWindow()->currentTab()->view()->title(); } QString BookmarkOwner::currentUrl() const { - return Application::instance()->mainWindow()->currentTab()->url().url(); + return rApp->mainWindow()->currentTab()->url().url(); } QList< QPair<QString, QString> > BookmarkOwner::currentBookmarkList() const { QList< QPair<QString, QString> > bkList; - MainView *view = Application::instance()->mainWindow()->mainView(); + MainView *view = rApp->mainWindow()->mainView(); int tabNumber = view->count(); for (int i = 0; i < tabNumber; ++i) @@ -143,7 +143,7 @@ void BookmarkOwner::openFolderinTabs(const KBookmarkGroup &bkGoup) if (urlList.length() > 8) { if (KMessageBox::warningContinueCancel( - Application::instance()->mainWindow(), + rApp->mainWindow(), i18ncp("%1=Number of tabs. Value is always >=8", "You are about to open %1 tabs.\nAre you sure?", "You are about to open %1 tabs.\nAre you sure?", urlList.length())) @@ -197,7 +197,7 @@ KBookmark BookmarkOwner::bookmarkCurrentPage(const KBookmark &bookmark) } else { - parent = Application::bookmarkProvider()->rootGroup(); + parent = rApp->bookmarkProvider()->rootGroup(); } KBookmark newBk = parent.addBookmark(currentTitle(), KUrl(currentUrl())); @@ -260,7 +260,7 @@ KBookmark BookmarkOwner::newSeparator(const KBookmark &bookmark) } else { - newBk = Application::bookmarkProvider()->rootGroup().createNewSeparator(); + newBk = rApp->bookmarkProvider()->rootGroup().createNewSeparator(); } newBk.setIcon("edit-clear"); |