forked from qt-creator/qt-creator
Help: Fix build
QWebEngineUrlScheme was introduced in Qt 5.12.
This amends commit 8d3e4c03f0
.
Change-Id: Ibd22d97f582a31ad31f12ae37a028c5058a6dd3b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
e24ef9ca08
commit
064e71afbd
@@ -33,8 +33,10 @@
|
||||
|
||||
#ifdef QTC_WEBENGINE_HELPVIEWER
|
||||
#include "webenginehelpviewer.h"
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
|
||||
#include <QWebEngineUrlScheme>
|
||||
#endif
|
||||
#endif
|
||||
#ifdef QTC_LITEHTML_HELPVIEWER
|
||||
#include "litehtmlhelpviewer.h"
|
||||
#endif
|
||||
@@ -324,6 +326,7 @@ QVector<HelpViewerFactory> LocalHelpManager::viewerBackends()
|
||||
{
|
||||
QVector<HelpViewerFactory> result;
|
||||
#ifdef QTC_WEBENGINE_HELPVIEWER
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
|
||||
static bool schemeRegistered = false;
|
||||
if (!schemeRegistered) {
|
||||
schemeRegistered = true;
|
||||
@@ -331,6 +334,7 @@ QVector<HelpViewerFactory> LocalHelpManager::viewerBackends()
|
||||
scheme.setFlags(QWebEngineUrlScheme::LocalScheme | QWebEngineUrlScheme::LocalAccessAllowed);
|
||||
QWebEngineUrlScheme::registerScheme(scheme);
|
||||
}
|
||||
#endif
|
||||
result.append(
|
||||
{kQtWebEngineBackend, tr("QtWebEngine"), []() { return new WebEngineHelpViewer; }});
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user