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
qqmlcompletionsupport_p.h
Go to the documentation of this file.
1
// Copyright (C) 2018 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
QQMLCOMPLETIONSUPPORT_P_H
6
#
define
QQMLCOMPLETIONSUPPORT_P_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
<
private
/
qlanguageserver_p
.
h
>
20
#
include
<
private
/
qqmlbasemodule_p
.
h
>
21
22
#
include
<
QtCore
/
qmutex
.
h
>
23
#
include
<
QtCore
/
qhash
.
h
>
24
#
include
<
QtQmlLS
/
private
/
qqmllscompletion_p
.
h
>
25
26
QT_BEGIN_NAMESPACE
27
struct
CompletionRequest : BaseRequest<QLspSpecification::CompletionParams,
28
QLspSpecification::Responses::CompletionResponseType>
29
{
30
QString code;
31
32
bool
fillFrom(QmlLsp::OpenDocument doc,
const
Parameters ¶ms, Response &&response);
33
void
sendCompletions(
const
QList<QLspSpecification::CompletionItem> &completions);
34
QString urlAndPos()
const
;
35
QList<QLspSpecification::CompletionItem>
36
completions(QmlLsp::QQmlCodeModelManager *codeModelManager,
37
const
QQmlLSCompletion &completionEngine)
const
;
38
QQmlJS::Dom::DomItem
39
patchInvalidFileForParser(
const
QQmlJS::Dom::DomItem &file, qsizetype position,
40
QmlLsp::QQmlCodeModelManager *codeModelManager)
const
;
41
};
42
43
class
QmlCompletionSupport
:
public
QQmlBaseModule
<
CompletionRequest
>
44
{
45
Q_OBJECT
46
public
:
47
QmlCompletionSupport
(
QmlLsp
::
QQmlCodeModelManager
*
codeModel
);
48
void
registerHandlers
(QLanguageServer *server, QLanguageServerProtocol *protocol)
override
;
49
void
setupCapabilities
(QLspSpecification::ServerCapabilities &caps)
override
;
50
void
process
(RequestPointerArgument req)
override
;
51
52
QQmlLSCompletion
m_completionEngine
;
53
};
54
QT_END_NAMESPACE
55
56
#
endif
// QMLCOMPLETIONSUPPORT_P_H
QmlCompletionSupport
Definition
qqmlcompletionsupport_p.h:44
QmlCompletionSupport::registerHandlers
void registerHandlers(QLanguageServer *server, QLanguageServerProtocol *protocol) override
Definition
qqmlcompletionsupport.cpp:48
QmlCompletionSupport::m_completionEngine
QQmlLSCompletion m_completionEngine
Definition
qqmlcompletionsupport_p.h:52
QmlCompletionSupport::setupCapabilities
void setupCapabilities(QLspSpecification::ServerCapabilities &caps) override
Definition
qqmlcompletionsupport.cpp:56
QmlCompletionSupport::process
void process(RequestPointerArgument req) override
Definition
qqmlcompletionsupport.cpp:66
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
positionIsFollowedBySpaces
static bool positionIsFollowedBySpaces(qsizetype position, const QString &code)
Definition
qqmlcompletionsupport.cpp:83
qtdeclarative
src
qmlls
qqmlcompletionsupport_p.h
Generated on
for Qt by
1.18.0