From 167c9c556147cc70ea0ccc8d1095903be52d4630 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Sun, 15 Jan 2012 11:07:18 +0100 Subject: Rework on load/stop/reload action Also clean up API, giving proper names to method updateActions --> updateHistoryActions browserTabLoading(bool) --> currentTabStateChanged() ... also workaround problem that m_progress is (yet) 0 or 100 when load started REVIEW:103651 --- src/webtab.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/webtab.cpp') diff --git a/src/webtab.cpp b/src/webtab.cpp index 9516f83c..27b0fe8a 100644 --- a/src/webtab.cpp +++ b/src/webtab.cpp @@ -86,6 +86,7 @@ WebTab::WebTab(QWidget *parent) } connect(m_webView, SIGNAL(loadProgress(int)), this, SLOT(updateProgress(int))); + connect(m_webView, SIGNAL(loadStarted()), this, SLOT(resetProgress())); connect(m_webView, SIGNAL(titleChanged(const QString &)), this, SIGNAL(titleChanged(const QString &))); // Session Manager @@ -120,6 +121,12 @@ void WebTab::updateProgress(int p) } +void WebTab::resetProgress() +{ + m_progress = 1; +} + + bool WebTab::isPageLoading() { return m_progress != 0 && m_progress != 100; -- cgit v1.2.1