diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-31 12:30:51 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-01-31 12:30:51 +0100 |
commit | d1635b36d00b7239cbebcf9f78e9c8615ac1d7d5 (patch) | |
tree | 31525586e8e1fa89093b10b0d88924a27e1c2241 /src/webengine/webview.h | |
parent | Always connect to local socket (diff) | |
download | smolbote-d1635b36d00b7239cbebcf9f78e9c8615ac1d7d5.tar.xz |
Fixed bug where refresh button and loading bar would get stuck in loading state
Diffstat (limited to 'src/webengine/webview.h')
-rw-r--r-- | src/webengine/webview.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 <QMenu> #include <QWebEngineView> +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: |