diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-22 10:53:47 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-22 10:53:47 +0200 |
commit | 2c9b2c35356caf4fd8213cff7e599a7c49346ac2 (patch) | |
tree | 2cc1f5cd5b115ff40af5ee48ab3cb785bacbbf2b /src/webengine | |
parent | Update manpage (diff) | |
download | smolbote-2c9b2c35356caf4fd8213cff7e599a7c49346ac2.tar.xz |
Fix various warnings
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/webpage.cpp | 7 | ||||
-rw-r--r-- | src/webengine/webpage.h | 2 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp index 6fba97c..7358223 100644 --- a/src/webengine/webpage.cpp +++ b/src/webengine/webpage.cpp @@ -32,6 +32,7 @@ QString feature_toString(QWebEnginePage::Feature feature) case QWebEnginePage::DesktopAudioVideoCapture: return QObject::tr("Desktop Audio and Video Capture"); } + return QString(); } WebPage::WebPage(QWebEngineProfile *profile, QObject *parent) @@ -72,13 +73,13 @@ bool WebPage::certificateError(const QWebEngineCertificateError &certificateErro return resp == QMessageBox::Ignore; } +#ifdef QTBUG_68224_WORKAROUND bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) { - /* Workaround for https://bugreports.qt.io/browse/QTBUG-68224 * Only affects 5.11.0; should be fixed in 5.11.1 */ -#ifdef QTBUG_68224_WORKAROUND + auto *layout = this->view()->layout(); auto count = layout->count(); @@ -94,10 +95,10 @@ bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool } } } -#endif return true; } +#endif void WebPage::featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage::Feature feature) { diff --git a/src/webengine/webpage.h b/src/webengine/webpage.h index 2232d26..3e5ce34 100644 --- a/src/webengine/webpage.h +++ b/src/webengine/webpage.h @@ -19,7 +19,9 @@ public: protected: bool certificateError(const QWebEngineCertificateError &certificateError) override; +#ifdef QTBUG_68224_WORKAROUND bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override; +#endif private slots: void featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage::Feature feature); diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index c6fd4a4..f1b52b7 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -106,6 +106,7 @@ void WebView::triggerViewAction(WebView::ViewAction action) switch(action) { case GoHome: load(m_profile->homepage()); + break; case BookmarkPage: emit newBookmark(this->title(), this->url()); break; |