Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qqmldomformatdirectivescanner_p.h
Go to the documentation of this file.
1
// Copyright (C) 2025 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
QMLDOMFORMATSCANNER_P_H
5
#
define
QMLDOMFORMATSCANNER_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
<
QtQml
/
private
/
qqmljssourcelocation_p
.
h
>
19
20
#
include
<
QtCore
/
QMap
>
21
22
QT_BEGIN_NAMESPACE
23
24
namespace
QmlFormat
{
25
26
using
DisabledRegions
=
QMap
<
quint32
,
QQmlJS
::
SourceLocation
>;
27
enum
class
Directive
{
On
,
Off
};
28
29
[[
nodiscard
]]
std
::
optional
<
Directive
>
directiveFromComment
(QStringView commentLine);
30
[[
nodiscard
]]
DisabledRegions
identifyDisabledRegions
(QStringView code,
const
QList<QQmlJS::SourceLocation> &comments);
31
32
}
// end namespace QmlFormat
33
34
QT_END_NAMESPACE
35
#
endif
// QMLDOMFORMATSCANNER_P_H
QPlatformGraphicsBufferHelper
\inmodule QtGui
QmlFormat
Definition
qqmldomformatdirectivescanner.cpp:9
QmlFormat::directive
static constexpr auto directive
Definition
qqmldomformatdirectivescanner.cpp:11
QmlFormat::commentLineFromLoc
static QStringView commentLineFromLoc(QStringView code, const QQmlJS::SourceLocation &loc, QLatin1StringView newline)
Definition
qqmldomformatdirectivescanner.cpp:59
QmlFormat::onCmd
static constexpr auto onCmd
Definition
qqmldomformatdirectivescanner.cpp:12
QmlFormat::identifyDisabledRegions
DisabledRegions identifyDisabledRegions(QStringView code, const QList< QQmlJS::SourceLocation > &comments)
Definition
qqmldomformatdirectivescanner.cpp:65
QmlFormat::Directive
Directive
Definition
qqmldomformatdirectivescanner_p.h:27
QmlFormat::Directive::On
@ On
Definition
qqmldomformatdirectivescanner_p.h:27
QmlFormat::Directive::Off
@ Off
Definition
qqmldomformatdirectivescanner_p.h:27
QmlFormat::offCmd
static constexpr auto offCmd
Definition
qqmldomformatdirectivescanner.cpp:13
QmlFormat::directiveFromComment
std::optional< Directive > directiveFromComment(QStringView commentLine)
Definition
qqmldomformatdirectivescanner.cpp:112
QmlFormat::formRegion
static QQmlJS::SourceLocation formRegion(QStringView code, const QQmlJS::SourceLocation &off, const QQmlJS::SourceLocation &on, QLatin1StringView newline)
Definition
qqmldomformatdirectivescanner.cpp:51
QmlFormat::commentStartString
static constexpr auto commentStartString
Definition
qqmldomformatdirectivescanner.cpp:14
QmlFormat::findDirectiveEndOffset
static quint32 findDirectiveEndOffset(QStringView m_code, qsizetype offset, QLatin1StringView newLine)
Definition
qqmldomformatdirectivescanner.cpp:35
QmlFormat::findLineStartOffset
static quint32 findLineStartOffset(QStringView m_code, qsizetype pos, QLatin1StringView newLine)
Definition
qqmldomformatdirectivescanner.cpp:26
QmlFormat::detectNewLine
static QLatin1StringView detectNewLine(QStringView code)
Definition
qqmldomformatdirectivescanner.cpp:17
qtdeclarative
src
qmldom
qqmldomformatdirectivescanner_p.h
Generated on
for Qt by
1.14.0