Skip to content
Snippets Groups Projects
Commit 678634df authored by Sergey Linev's avatar Sergey Linev Committed by Axel Naumann
Browse files

webgui: support Qt 5.6 for QWebEngine

parent aa99f3f2
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,11 @@
#include <QThread>
#include <QWebEngineSettings>
#include <QWebEngineProfile>
#include <QtGlobal>
#if QT_VERSION >= 0x051200
#include <QWebEngineUrlScheme>
#endif
#include "TROOT.h"
#include "TApplication.h"
......@@ -86,14 +90,17 @@ protected:
return nullptr;
}
#if QT_VERSION >= 0x051200
QWebEngineUrlScheme scheme("rootscheme");
scheme.setSyntax(QWebEngineUrlScheme::Syntax::HostAndPort);
scheme.setDefaultPort(2345);
scheme.setFlags(QWebEngineUrlScheme::SecureScheme);
QWebEngineUrlScheme::registerScheme(scheme);
#endif
qargv[0] = gApplication->Argv(0);
qargv[1] = nullptr;
qapp = new QApplication(qargc, qargv);
}
......@@ -128,8 +135,10 @@ protected:
if (args.IsHeadless()) {
RootWebPage *page = new RootWebPage();
#if QT_VERSION >= 0x050700
page->settings()->resetAttribute(QWebEngineSettings::WebGLEnabled);
page->settings()->resetAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled);
#endif
page->settings()->resetAttribute(QWebEngineSettings::PluginsEnabled);
page->load(QUrl(fullurl));
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment