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
qquickliteralbindingcheck.cpp
Go to the documentation of this file.
1
// Copyright (C) 2024 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 reason:default
4
5
#
include
"qquickliteralbindingcheck_p.h"
6
#
include
"qquickvaluetypefromstringcheck_p.h"
7
8
QT_BEGIN_NAMESPACE
9
10
using
namespace
Qt::StringLiterals;
11
12
QQmlJSStructuredTypeError
QQuickLiteralBindingCheck
::
check
(
const
QString &typeName,
13
const
QString &value)
const
14
{
15
return
QQuickValueTypeFromStringCheck::check(typeName, value);
16
}
17
18
void
QQuickLiteralBindingCheck
::
onBinding
(
19
const
QQmlSA::Element &element,
const
QString &propertyName,
const
QQmlSA::Binding &binding,
20
const
QQmlSA::Element &bindingScope,
const
QQmlSA::Element &value)
21
{
22
Q_UNUSED(value);
23
Q_UNUSED(element);
24
25
const
auto
property = getProperty(propertyName, binding, bindingScope);
26
if
(!property.isValid())
27
return
;
28
29
if
(
const
auto
propertyType = property.type())
30
warnOnCheckedBinding(binding, propertyType);
31
}
32
33
34
QT_END_NAMESPACE
QQuickLiteralBindingCheck
Definition
qquickliteralbindingcheck_p.h:29
QQuickLiteralBindingCheck::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
qquickliteralbindingcheck.cpp:18
QQuickLiteralBindingCheck::check
QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const override
Definition
qquickliteralbindingcheck.cpp:12
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtdeclarative
src
plugins
qmllint
quick
qquickliteralbindingcheck.cpp
Generated on
for Qt by
1.18.0