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
qqmljsvaluetypefromstringcheck_p.h
Go to the documentation of this file.
1
// Copyright (C) 2023 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
#
ifndef
QQMLJSVALUETYPEFROMSTRINGCHECK_H
6
#
define
QQMLJSVALUETYPEFROMSTRINGCHECK_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
/
qglobal
.
h
>
20
#
include
<
QtCore
/
qstring
.
h
>
21
22
QT_BEGIN_NAMESPACE
23
24
struct
QQmlJSStructuredTypeError
25
{
26
QString code;
27
bool
constructedFromInvalidString =
false
;
28
29
bool
isValid()
const
{
return
!code.isEmpty() || constructedFromInvalidString; }
30
static
QQmlJSStructuredTypeError withInvalidString() {
return
{ QString(),
true
}; }
31
static
QQmlJSStructuredTypeError withValidString() {
return
{ QString(),
false
}; }
32
static
QQmlJSStructuredTypeError fromSuggestedString(
const
QString &enhancedString)
33
{
34
return
{ enhancedString,
false
};
35
}
36
};
37
38
class
QQmlJSValueTypeFromStringCheck
39
{
40
public
:
41
static
QQmlJSStructuredTypeError
hasError
(
const
QString &typeName,
const
QString &value);
42
};
43
44
QT_END_NAMESPACE
45
46
#
endif
// QQMLJSVALUETYPEFROMSTRINGCHECK_H
LiteralBindingCheckBase
Definition
qqmljsliteralbindingcheck_p.h:29
LiteralBindingCheckBase::warnOnCheckedBinding
void warnOnCheckedBinding(const QQmlSA::Binding &binding, const QQmlSA::Element &propertyType)
Definition
qqmljsliteralbindingcheck.cpp:99
LiteralBindingCheckBase::getProperty
QQmlSA::Property getProperty(const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope) const
Definition
qqmljsliteralbindingcheck.cpp:83
LiteralBindingCheckBase::check
virtual QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const =0
QQmlJSLiteralBindingCheck
Definition
qqmljsliteralbindingcheck_p.h:43
QQmlJSLiteralBindingCheck::QQmlJSLiteralBindingCheck
QQmlJSLiteralBindingCheck(QQmlSA::PassManager *manager)
Definition
qqmljsliteralbindingcheck.cpp:52
QQmlJSLiteralBindingCheck::check
QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const override
Definition
qqmljsliteralbindingcheck.cpp:58
QQmlJSLiteralBindingCheck::onBinding
void onBinding(const QQmlSA::Element &element, const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope, const QQmlSA::Element &value) override
Executes whenever a property gets bound to a value.
Definition
qqmljsliteralbindingcheck.cpp:122
QQmlJSValueTypeFromStringCheck
Definition
qqmljsvaluetypefromstringcheck_p.h:39
QQmlJSValueTypeFromStringCheck::hasError
static QQmlJSStructuredTypeError hasError(const QString &typeName, const QString &value)
Definition
qqmljsvaluetypefromstringcheck.cpp:29
QQmlJSLinterPasses
Definition
qqmljslinterpasses.cpp:15
QQmlJSLinterPasses::registerDefaultPasses
void registerDefaultPasses(QQmlSA::PassManager *passMan)
Definition
qqmljslinterpasses.cpp:18
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
qmllint
qqmljsvaluetypefromstringcheck_p.h
Generated on
for Qt by
1.18.0