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
qqmljsannotation.cpp
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
// Qt-Security score:significant
4
5
#
include
"qqmljsannotation_p.h"
6
7
QT_BEGIN_NAMESPACE
8
9
bool
QQmlJSAnnotation
::
isDeprecation
()
const
{
return
name == QStringLiteral(
"Deprecated"
); }
10
11
QQQmlJSDeprecation
QQmlJSAnnotation
::
deprecation
()
const
{
12
Q_ASSERT(
isDeprecation
(
)
);
13
QQQmlJSDeprecation deprecation;
14
if
(bindings.contains(QStringLiteral(
"reason"
))) {
15
16
auto
reason = bindings[QStringLiteral(
"reason"
)];
17
18
if
(std::holds_alternative<QString>(reason)) {
19
deprecation.reason = std::get<QString>(reason);
20
}
21
}
22
23
return
deprecation;
24
}
25
26
QT_END_NAMESPACE
QPlatformGraphicsBufferHelper
\inmodule QtGui
QQmlJSAnnotation
Definition
qqmljsannotation_p.h:31
QQmlJSAnnotation::deprecation
QQQmlJSDeprecation deprecation() const
Definition
qqmljsannotation.cpp:11
QQmlJSAnnotation::isDeprecation
bool isDeprecation() const
Definition
qqmljsannotation.cpp:9
qtdeclarative
src
qmlcompiler
qqmljsannotation.cpp
Generated on
for Qt by
1.14.0