Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmllshelputils_p.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
4#ifndef QQMLLSHELPUTILS_P_H
5#define QQMLLSHELPUTILS_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQmlLS/private/qqmllshelpplugininterface_p.h>
19#include <QtQmlLS/private/qqmllsutils_p.h>
20#include <QtQmlDom/private/qqmldomtop_p.h>
21#include <QtQmlLS/private/qdochtmlparser_p.h>
22#include <QtLanguageServer/private/qlanguageserverspectypes_p.h>
23
24#include <vector>
25#include <string>
26
28
29class HelpManager final
30{
31public:
34 [[nodiscard]] QString documentationRootPath() const;
35 [[nodiscard]] std::optional<QByteArray> documentationForItem(
36 const QQmlJS::Dom::DomItem &file, QLspSpecification::Position position) const;
37
38private:
39 [[nodiscard]] std::optional<QByteArray> extractDocumentationForIdentifiers(
41 [[nodiscard]] std::optional<QByteArray> extractDocumentationForDomElements(
42 const QQmlJS::Dom::DomItem &item) const;
43 [[nodiscard]] std::optional<QByteArray> extractDocumentation(
44 const QQmlJS::Dom::DomItem &item) const;
45 [[nodiscard]] std::optional<QByteArray> tryExtract(ExtractDocumentation &extractor,
46 const std::vector<QQmlLSHelpProviderBase::DocumentLink> &links,
47 const QString &name) const;
48 [[nodiscard]] std::vector<QQmlLSHelpProviderBase::DocumentLink> collectDocumentationLinks(
49 const QQmlJSScope::ConstPtr &scope,
50 const std::shared_ptr<QQmlJSTypeResolver> &typeResolver,
51 const QString &name) const;
52 void registerDocumentations(const QStringList &docs) const;
53 std::unique_ptr<QQmlLSHelpProviderBase> m_helpPlugin;
54 QString m_docRootPath;
55};
56
58
59#endif // QQMLLSHELPUTILS_P_H
std::optional< QByteArray > documentationForItem(const QQmlJS::Dom::DomItem &file, QLspSpecification::Position position) const
QString documentationRootPath() const
void setDocumentationRootPath(const QString &path)
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLuint name
GLsizei const GLchar *const * path
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QFile file
[0]
QGraphicsItem * item