From 2c9b2c35356caf4fd8213cff7e599a7c49346ac2 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Fri, 22 Jun 2018 10:53:47 +0200 Subject: Fix various warnings --- src/webengine/webpage.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/webengine/webpage.cpp') 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) { -- cgit v1.2.1