summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-02-23 00:34:00 +0100
committerAndrea Diamantini <adjam7@gmail.com>2011-02-23 00:34:00 +0100
commit1f3b6569ae2297db11cef6ce1a8c2efb8f4e5007 (patch)
treeaace2b63e78e334d05cfdc15902dee92fe6ffdca /src/urlbar
parentCleans up "tab switch" management and expecially the use of signals (diff)
downloadrekonq-1f3b6569ae2297db11cef6ce1a8c2efb8f4e5007.tar.xz
Save one updateRightIcons call from the bookmark icon.
Does this helps here? CCBUG:259328
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/bookmarkwidget.cpp2
-rw-r--r--src/urlbar/bookmarkwidget.h5
-rw-r--r--src/urlbar/urlbar.cpp8
3 files changed, 11 insertions, 4 deletions
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp
index 4569bc27..3252d9cc 100644
--- a/src/urlbar/bookmarkwidget.cpp
+++ b/src/urlbar/bookmarkwidget.cpp
@@ -133,4 +133,6 @@ void BookmarkWidget::removeBookmark()
{
Application::bookmarkProvider()->bookmarkOwner()->deleteBookmark(*m_bookmark);
close();
+
+ emit updateIcon();
}
diff --git a/src/urlbar/bookmarkwidget.h b/src/urlbar/bookmarkwidget.h
index e07dac24..62d71afb 100644
--- a/src/urlbar/bookmarkwidget.h
+++ b/src/urlbar/bookmarkwidget.h
@@ -45,7 +45,10 @@ public:
void showAt(const QPoint &pos);
-private slots:
+Q_SIGNALS:
+ void updateIcon();
+
+private Q_SLOTS:
void accept();
void removeBookmark();
diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp
index c0edc9df..ceecf211 100644
--- a/src/urlbar/urlbar.cpp
+++ b/src/urlbar/urlbar.cpp
@@ -109,9 +109,6 @@ UrlBar::UrlBar(QWidget *parent)
connect(_tab->view(), SIGNAL(loadStarted()), this, SLOT(clearRightIcons()));
connect(_tab->view(), SIGNAL(iconChanged()), this, SLOT(refreshFavicon()));
- // bookmark icon
- connect(Application::bookmarkProvider()->bookmarkManager(), SIGNAL(changed(const QString &, const QString &)), this, SLOT(updateRightIcons()));
-
// search icon
connect(Application::opensearchManager(), SIGNAL(openSearchEngineAdded(const QString &, const QString &, const QString &)), this, SLOT(updateRightIcons()));
@@ -368,10 +365,15 @@ void UrlBar::showBookmarkInfo(const QPoint &pos)
if (bookmark.isNull())
{
bookmark = Application::bookmarkProvider()->bookmarkOwner()->bookmarkCurrentPage();
+
+ // set bk icon
+ bt->setIcon(KIcon("bookmarks"));
+ bt->setToolTip(i18n("Edit this bookmark"));
}
else
{
BookmarkWidget *widget = new BookmarkWidget(bookmark, window());
+ connect(widget, SIGNAL(updateIcon()), this, SLOT(updateRightIcons()));
widget->showAt(pos);
}
}