aboutsummaryrefslogtreecommitdiff
path: root/src/webengine/webpage.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-22 10:53:47 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-22 10:53:47 +0200
commit2c9b2c35356caf4fd8213cff7e599a7c49346ac2 (patch)
tree2cc1f5cd5b115ff40af5ee48ab3cb785bacbbf2b /src/webengine/webpage.cpp
parentUpdate manpage (diff)
downloadsmolbote-2c9b2c35356caf4fd8213cff7e599a7c49346ac2.tar.xz
Fix various warnings
Diffstat (limited to 'src/webengine/webpage.cpp')
-rw-r--r--src/webengine/webpage.cpp7
1 files changed, 4 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)
{