From d1635b36d00b7239cbebcf9f78e9c8615ac1d7d5 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 31 Jan 2018 12:30:51 +0100 Subject: Fixed bug where refresh button and loading bar would get stuck in loading state --- src/webengine/webview.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/webengine/webview.h') diff --git a/src/webengine/webview.h b/src/webengine/webview.h index 957d181..a274535 100644 --- a/src/webengine/webview.h +++ b/src/webengine/webview.h @@ -10,16 +10,16 @@ #define WEBVIEW_H #include "webpage.h" -#include #include +class QMenu; class MainWindow; class WebView : public QWebEngineView { Q_OBJECT public: explicit WebView(MainWindow *parentMainWindow, QWidget *parent = nullptr); - ~WebView(); + ~WebView() override; QMenu *pageMenu(); @@ -28,6 +28,10 @@ public: int loadProgress() const; signals: + // loadStarted is always emitted, be it page load or in-page request, + // but loadFinished is only emitted when it's a page load + // so emit loaded when a load is emitted (progress == 100) + void loaded(); void newBookmark(const QString &title, const QUrl &url); protected: -- cgit v1.2.1