diff options
author | Yoann Laissus <yoann.laissus@gmail.com> | 2010-10-20 09:29:14 +0200 |
---|---|---|
committer | Yoann Laissus <yoann.laissus@gmail.com> | 2010-10-20 09:32:23 +0200 |
commit | 7570ac569271753a5956b50de4fb3f950376eca2 (patch) | |
tree | 78f7a7214a0ba770802bfa66cdfab45f9df11d5c | |
parent | Merge branch 'master' of git.kde.org:rekonq (diff) | |
download | rekonq-7570ac569271753a5956b50de4fb3f950376eca2.tar.xz |
Fix icons duplication in the urlbar if a bookmark is added during a page loading
-rw-r--r-- | src/mainview.cpp | 6 | ||||
-rw-r--r-- | src/tabbar.cpp | 2 | ||||
-rw-r--r-- | src/urlbar/urlbar.cpp | 7 | ||||
-rw-r--r-- | src/webtab.cpp | 6 | ||||
-rw-r--r-- | src/webtab.h | 1 |
5 files changed, 14 insertions, 8 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp index d263111a..4ccbe937 100644 --- a/src/mainview.cpp +++ b/src/mainview.cpp @@ -284,11 +284,7 @@ void MainView::currentChanged(int index) emit showStatusBarMessage(QString()); // notify UI to eventually switch stop/reload button - int progr = tab->progress(); - if (progr == 0) - emit browserTabLoading(false); - else - emit browserTabLoading(true); + emit browserTabLoading(tab->isPageLoading()); // set focus to the current webview if (tab->url().scheme() == QL1S("about")) diff --git a/src/tabbar.cpp b/src/tabbar.cpp index 1756c20e..0866bfd8 100644 --- a/src/tabbar.cpp +++ b/src/tabbar.cpp @@ -166,7 +166,7 @@ void TabBar::showTabPreview() return; // no previews during load - if (indexedTab->progress() != 0) + if (indexedTab->isPageLoading()) return; int w = tabSizeHint(m_currentTabPreviewIndex).width(); diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 4039e8bf..3ec0b2fa 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -369,8 +369,11 @@ void UrlBar::showBookmarkInfo(const QPoint &pos) void UrlBar::onBookmarksChanged() { - clearRightIcons(); - loadFinished(); + if (!_tab->isPageLoading()) + { + clearRightIcons(); + loadFinished(); + } } diff --git a/src/webtab.cpp b/src/webtab.cpp index 3b97e2db..2289726c 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -123,6 +123,12 @@ void WebTab::loadFinished(bool) } +bool WebTab::isPageLoading() +{ + return _progress != 0; +} + + void WebTab::createWalletBar(const QString &key, const QUrl &url) { // check if the url is in the wallet blacklist diff --git a/src/webtab.h b/src/webtab.h index 66eec447..3fd4f793 100644 --- a/src/webtab.h +++ b/src/webtab.h @@ -63,6 +63,7 @@ public: void insertBar(NotificationBar* bar); bool hasRSSInfo(); + bool isPageLoading(); private slots: void updateProgress(int progress); |