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
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
7
9
10using namespace Qt::StringLiterals;
11
13 const QString &value) const
14{
15 return QQuickValueTypeFromStringCheck::check(typeName, value);
16}
17
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
34QT_END_NAMESPACE
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.
QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const override