Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qhelpengineplugin.h
Go to the documentation of this file.
1
// Copyright (C) 2024 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QHELPENGINEPLUGIN_H
6
#
define
QHELPENGINEPLUGIN_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qobject
.
h
>
20
#
include
<
QtCore
/
qplugin
.
h
>
21
#
include
<
QtHelp
/
qhelpenginecore
.
h
>
22
#
include
<
QtHelp
/
qhelplink
.
h
>
23
24
#
include
<
QtQmlLS
/
private
/
qqmllshelpplugininterface_p
.
h
>
25
26
#
include
<
optional
>
27
#
include
<
vector
>
28
29
QT_BEGIN_NAMESPACE
30
31
// TODO (Qt 7.0)
32
// Remove this plugin from QtTools when the QtHelp lib is split into
33
// QtHelpCore and QtHelp. Then QmlLS can depend only on QtHelpCore.
34
class
QQmlLSHelpProvider :
public
QQmlLSHelpProviderBase
35
{
36
public
:
37
QQmlLSHelpProvider(
const
QString &qhcFile, QObject *parent =
nullptr
);
38
bool
registerDocumentation(
const
QString &documentationFileName) override;
39
[[nodiscard]] QByteArray fileData(
const
QUrl &url)
const
override;
40
[[nodiscard]] std::vector<DocumentLink> documentsForIdentifier(
const
QString &id)
const
override;
41
[[nodiscard]] std::vector<DocumentLink> documentsForIdentifier(
const
QString &id,
const
QString &filterName)
const
override;
42
[[nodiscard]] std::vector<DocumentLink> documentsForKeyword(
const
QString &keyword)
const
override;
43
[[nodiscard]] std::vector<DocumentLink> documentsForKeyword(
const
QString &keyword,
const
QString &filterName)
const
override;
44
[[nodiscard]] QStringList registeredNamespaces()
const
override;
45
[[nodiscard]] QString error()
const
override;
46
47
private
:
48
std::optional<QHelpEngineCore> m_helpEngine;
49
};
50
51
class
QHelpEnginePlugin
:
public
QObject
,
public
QQmlLSHelpPluginInterface
52
{
53
Q_OBJECT
54
Q_PLUGIN_METADATA(IID QQmlLSHelpPluginInterface_iid)
55
Q_INTERFACES
(
QQmlLSHelpPluginInterface
)
56
public
:
57
QHelpEnginePlugin
(
QObject
*
parent
=
nullptr
);
58
Q_DISABLE_COPY_MOVE
(
QHelpEnginePlugin
)
59
60
std
::
unique_ptr
<
QQmlLSHelpProviderBase
>
initialize
(
const
QString
&
collectionFile
,
61
QObject
*
parent
)
override
;
62
};
63
64
QT_END_NAMESPACE
65
66
#
endif
// QHELPENGINEPLUGIN_H
QHelpEnginePlugin
Definition
qhelpengineplugin.h:52
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
qttools
src
assistant
plugins
help
qhelpengineplugin.h
Generated on
for Qt by
1.18.0