From cea0d519a42bff0cf5b67ee070a7d2e1c26856dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B6rn=20Bidar?= Date: Mon, 22 Apr 2019 06:10:41 +0200 Subject: [PATCH] fix qt warning about registering a URL sheme first. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Qt recommends to register a URL scheme before installing it. I don't know the impact of the not registering before instaling but I think the change is pretty harmles. See: https://doc.qt.io/qt-5/qwebengineurlscheme.html#registerScheme Signed-off-by: Björn Bidar --- src/gui/wizard/webview.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/wizard/webview.cpp b/src/gui/wizard/webview.cpp index 08045b350..b9b76cc05 100644 --- a/src/gui/wizard/webview.cpp +++ b/src/gui/wizard/webview.cpp @@ -4,6 +4,9 @@ #include #include #include +#if QT_VERSION >= 0x051200 +#include +#endif #include #include #include @@ -65,7 +68,10 @@ WebView::WebView(QWidget *parent) _ui() { _ui.setupUi(this); - +#if QT_VERSION >= 0x051200 + QWebEngineUrlScheme _ncsheme("nc"); + QWebEngineUrlScheme::registerScheme(_ncsheme); +#endif _webview = new QWebEngineView(this); _profile = new QWebEngineProfile(this); _page = new WebEnginePage(_profile); -- 2.30.2