mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
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:
parent
3c947819c1
commit
cea0d519a4
1 changed files with 7 additions and 1 deletions
|
@ -4,6 +4,9 @@
|
||||||
#include <QWebEngineProfile>
|
#include <QWebEngineProfile>
|
||||||
#include <QWebEngineUrlRequestInterceptor>
|
#include <QWebEngineUrlRequestInterceptor>
|
||||||
#include <QWebEngineUrlRequestJob>
|
#include <QWebEngineUrlRequestJob>
|
||||||
|
#if QT_VERSION >= 0x051200
|
||||||
|
#include <QWebEngineUrlScheme>
|
||||||
|
#endif
|
||||||
#include <QWebEngineUrlSchemeHandler>
|
#include <QWebEngineUrlSchemeHandler>
|
||||||
#include <QWebEngineView>
|
#include <QWebEngineView>
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
|
@ -65,7 +68,10 @@ WebView::WebView(QWidget *parent)
|
||||||
_ui()
|
_ui()
|
||||||
{
|
{
|
||||||
_ui.setupUi(this);
|
_ui.setupUi(this);
|
||||||
|
#if QT_VERSION >= 0x051200
|
||||||
|
QWebEngineUrlScheme _ncsheme("nc");
|
||||||
|
QWebEngineUrlScheme::registerScheme(_ncsheme);
|
||||||
|
#endif
|
||||||
_webview = new QWebEngineView(this);
|
_webview = new QWebEngineView(this);
|
||||||
_profile = new QWebEngineProfile(this);
|
_profile = new QWebEngineProfile(this);
|
||||||
_page = new WebEnginePage(_profile);
|
_page = new WebEnginePage(_profile);
|
||||||
|
|
Loading…
Reference in a new issue