Merge pull request #1214 from Thaodan/fix_urlscheme_warning

fix qt warning about registering a URL sheme first.
This commit is contained in:
Dominique Fuchs 2019-09-15 19:31:20 +02:00 committed by GitHub
commit cdc939ae97
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);