aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webpage.cpp27
-rw-r--r--src/webengine/webpage.h3
-rw-r--r--src/webengine/webview.cpp3
3 files changed, 2 insertions, 31 deletions
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp
index 1c5e659..0e1238a 100644
--- a/src/webengine/webpage.cpp
+++ b/src/webengine/webpage.cpp
@@ -91,33 +91,6 @@ 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
- */
-
- auto *layout = this->view()->layout();
- auto count = layout->count();
-
- if(count > 1) {
- for(int i = 0; i < count; ++i) {
- auto *item = layout->itemAt(i);
- if(item == nullptr)
- continue;
- auto *widget = item->widget();
- if(widget != this->view()->focusProxy()) {
- //qDebug("Removing widget");
- layout->removeWidget(widget);
- }
- }
- }
-
- return true;
-}
-#endif
-
void WebPage::featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage::Feature feature)
{
QMessageBox messageBox;
diff --git a/src/webengine/webpage.h b/src/webengine/webpage.h
index a24370e..48011cb 100644
--- a/src/webengine/webpage.h
+++ b/src/webengine/webpage.h
@@ -19,9 +19,6 @@ 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 59ad32a..671b32f 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -24,6 +24,7 @@
#include <web/webprofile.h>
#include "browser.h"
#include "wallet/wallet.h"
+#include "config.h"
inline QAction *historyAction(QWebEngineView *view, const QWebEngineHistoryItem &item)
{
@@ -56,7 +57,7 @@ WebView::WebView(WebProfile *profile, QWidget *parent)
m_loaded = true;
});
-#if defined(QTBUG_65223_WORKAROUND)
+#ifdef CONFIG_QTBUG_65223
connect(this, &QWebEngineView::loadProgress, this, [this](int progress) {
if(progress == 100) {
emit loadFinished(true);