fix qt warning about registering a URL sheme first.

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 <theodorstormgrade@gmail.com>
This commit is contained in:
Björn Bidar 2019-04-22 06:10:41 +02:00
parent 3c947819c1
commit cea0d519a4

View file

@ -4,6 +4,9 @@
#include <QWebEngineProfile>
#include <QWebEngineUrlRequestInterceptor>
#include <QWebEngineUrlRequestJob>
#if QT_VERSION >= 0x051200
#include <QWebEngineUrlScheme>
#endif
#include <QWebEngineUrlSchemeHandler>
#include <QWebEngineView>
#include <QDesktopServices>
@ -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);