From 1b1e327cb73491c17972a33a07c3c9beafe7f938 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 18 Sep 2022 09:57:29 +0300 Subject: Add Navigation and Tab toolbars --- src/urlbar/urlbar.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/urlbar/urlbar.cpp') diff --git a/src/urlbar/urlbar.cpp b/src/urlbar/urlbar.cpp index 18067f09..6c726d5a 100644 --- a/src/urlbar/urlbar.cpp +++ b/src/urlbar/urlbar.cpp @@ -80,8 +80,13 @@ UrlBar::UrlBar(QWidget *parent) // connect(_suggestionTimer, SIGNAL(timeout()), this, SLOT(suggest())); } +// ----------------------------------------------------------------------------------------------------------- +// slots + void UrlBar::setUrl(const QUrl &url) { + Q_ASSERT(sender() == m_currentView); + if (url.scheme() == QL1S("rekonq")) return; // we don't set empty url @@ -100,9 +105,6 @@ void UrlBar::setUrl(const QUrl &url) setCursorPosition(0); } -// ----------------------------------------------------------------------------------------------------------- -// slots - void UrlBar::loadRequestedUrl(const QUrl &url, rekonq::OpenType type) { clearFocus(); @@ -114,7 +116,7 @@ void UrlBar::loadRequestedUrl(const QUrl &url, rekonq::OpenType type) void UrlBar::loadStarted() { - if (sender() != m_currentView) return; + Q_ASSERT(sender() == m_currentView); m_currentView_progress = 1; _icon->setIcon(QIcon::fromTheme("text-html")); // clearRightIcons(); @@ -124,14 +126,14 @@ void UrlBar::loadStarted() void UrlBar::loadProgress(int progress) { - if (sender() != m_currentView) return; + Q_ASSERT(sender() == m_currentView); m_currentView_progress = progress; repaint(); } void UrlBar::loadFinished() { - if (sender() != m_currentView) return; + Q_ASSERT(sender() == m_currentView); m_currentView_progress = 100; // refreshFavicon(); // updateRightIcons(); -- cgit v1.2.1