summaryrefslogtreecommitdiff
path: root/src/bookmarks/bookmarkstoolbar.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/bookmarks/bookmarkstoolbar.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/bookmarks/bookmarkstoolbar.cpp')
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index e239e235..12b1bc09 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -92,7 +92,7 @@ QAction * BookmarkMenu::actionForBookmark(const KBookmark &bookmark)
else
{
KBookmarkAction *action = new KBookmarkAction(bookmark, owner(), this);
- action->setIcon(Application::iconManager()->iconForUrl( KUrl(bookmark.url()) ));
+ action->setIcon(rApp->iconManager()->iconForUrl( KUrl(bookmark.url()) ));
connect(action, SIGNAL(hovered()), this, SLOT(actionHovered()));
return action;
}
@@ -139,7 +139,7 @@ void BookmarkMenu::addOpenFolderInTabs()
if (!bookmark.isNull())
{
- parentMenu()->addAction(Application::bookmarkProvider()->bookmarkOwner()->createAction(group, BookmarkOwner::OPEN_FOLDER));
+ parentMenu()->addAction(rApp->bookmarkProvider()->bookmarkOwner()->createAction(group, BookmarkOwner::OPEN_FOLDER));
}
}
}
@@ -149,7 +149,7 @@ void BookmarkMenu::actionHovered()
{
KBookmarkActionInterface* action = dynamic_cast<KBookmarkActionInterface *>(sender());
if (action)
- Application::instance()->mainWindow()->notifyMessage(action->bookmark().url().url());
+ rApp->mainWindow()->notifyMessage(action->bookmark().url().url());
}
@@ -166,14 +166,14 @@ BookmarkToolBar::BookmarkToolBar(KToolBar *toolBar, QObject *parent)
{
toolBar->setContextMenuPolicy(Qt::CustomContextMenu);
connect(toolBar, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(contextMenu(const QPoint &)));
- connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(QString, QString)), this, SLOT(hideMenu()));
+ connect(rApp->bookmarkProvider()->bookmarkManager(), SIGNAL(changed(QString, QString)), this, SLOT(hideMenu()));
toolBar->setAcceptDrops(true);
toolBar->installEventFilter(this);
toolBar->setShortcutEnabled(false);
if (toolBar->isVisible())
{
- Application::bookmarkProvider()->fillBookmarkBar(this);
+ rApp->bookmarkProvider()->fillBookmarkBar(this);
m_filled = true;
}
}
@@ -198,8 +198,8 @@ void BookmarkToolBar::contextMenu(const QPoint &point)
bookmark = action->bookmark();
BookmarksContextMenu menu(bookmark,
- Application::bookmarkProvider()->bookmarkManager(),
- Application::bookmarkProvider()->bookmarkOwner());
+ rApp->bookmarkProvider()->bookmarkManager(),
+ rApp->bookmarkProvider()->bookmarkOwner());
menu.exec(toolBar()->mapToGlobal(point));
}
@@ -244,7 +244,7 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
{
if (!m_filled)
{
- Application::bookmarkProvider()->fillBookmarkBar(this);
+ rApp->bookmarkProvider()->fillBookmarkBar(this);
m_filled = true;
}
}
@@ -328,12 +328,12 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
{
QDropEvent *dropEvent = static_cast<QDropEvent*>(event);
KBookmark bookmark;
- KBookmarkGroup root = Application::bookmarkProvider()->rootGroup();
+ KBookmarkGroup root = rApp->bookmarkProvider()->rootGroup();
if (dropEvent->mimeData()->hasFormat("application/rekonq-bookmark"))
{
QByteArray addresses = dropEvent->mimeData()->data("application/rekonq-bookmark");
- bookmark = Application::bookmarkProvider()->bookmarkManager()->findByAddress(QString::fromLatin1(addresses.data()));
+ bookmark = rApp->bookmarkProvider()->bookmarkManager()->findByAddress(QString::fromLatin1(addresses.data()));
if (bookmark.isNull())
return false;
}
@@ -380,7 +380,7 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
root.moveBookmark(bookmark, destBookmark.parentGroup().previous(destBookmark));
}
- Application::bookmarkProvider()->bookmarkManager()->emitChanged();
+ rApp->bookmarkProvider()->bookmarkManager()->emitChanged();
}
}
else
@@ -392,7 +392,7 @@ bool BookmarkToolBar::eventFilter(QObject *watched, QEvent *event)
root.moveBookmark(bookmark, KBookmark());
}
- Application::bookmarkProvider()->bookmarkManager()->emitChanged();
+ rApp->bookmarkProvider()->bookmarkManager()->emitChanged();
}
dropEvent->accept();
}
@@ -445,7 +445,7 @@ void BookmarkToolBar::actionHovered()
{
KBookmarkActionInterface* action = dynamic_cast<KBookmarkActionInterface *>(sender());
if (action)
- Application::instance()->mainWindow()->notifyMessage(action->bookmark().url().url());
+ rApp->mainWindow()->notifyMessage(action->bookmark().url().url());
}
@@ -470,7 +470,7 @@ void BookmarkToolBar::startDrag()
}
else
{
- drag->setPixmap(Application::iconManager()->iconForUrl(action->bookmark().url()).pixmap(24, 24));
+ drag->setPixmap(rApp->iconManager()->iconForUrl(action->bookmark().url()).pixmap(24, 24));
}
drag->start(Qt::MoveAction);