summaryrefslogtreecommitdiff
path: root/src/urlbar
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2022-09-18 09:57:29 +0300
committeraqua <aqua@iserlohn-fortress.net>2022-09-18 09:57:29 +0300
commit1b1e327cb73491c17972a33a07c3c9beafe7f938 (patch)
tree57fa4bc121fc2e172db42288fec7cdd7ff95399c /src/urlbar
parentAdd Bookmarks toolbar (diff)
downloadrekonq-1b1e327cb73491c17972a33a07c3c9beafe7f938.tar.xz
Add Navigation and Tab toolbars
Diffstat (limited to 'src/urlbar')
-rw-r--r--src/urlbar/urlbar.cpp14
-rw-r--r--src/urlbar/urlbar.hpp7
2 files changed, 13 insertions, 8 deletions
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();
diff --git a/src/urlbar/urlbar.hpp b/src/urlbar/urlbar.hpp
index 8be97838..3e3b9059 100644
--- a/src/urlbar/urlbar.hpp
+++ b/src/urlbar/urlbar.hpp
@@ -42,8 +42,11 @@ public slots:
void setCurrentView(RekonqView *view)
{
m_currentView = view;
- loadProgress(view->progress());
- setUrl(view->url());
+ m_currentView_progress = view->progress();
+
+ emit view->urlChanged(view->url());
+ // setUrl(view->url());
+ repaint();
}
void setUrl(const QUrl &url);