Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmljsliteralbindingcheck_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#ifndef QQMLJSLITERALBINDINGCHECK_P_H
5#define QQMLJSLITERALBINDINGCHECK_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#include <QtCore/qglobal.h>
18#include <QtQmlCompiler/qqmlsa.h>
19
20#include <qtqmlcompilerexports.h>
22
24
27
28class Q_QMLCOMPILER_EXPORT LiteralBindingCheckBase : public QQmlSA::PropertyPass
29{
30public:
32
33 void onBinding(const QQmlSA::Element &element, const QString &propertyName,
34 const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope,
35 const QQmlSA::Element &value) override;
36
37protected:
38 virtual QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const = 0;
39
40 QQmlSA::Property getProperty(const QString &propertyName, const QQmlSA::Binding &binding,
41 const QQmlSA::Element &bindingScope) const;
42};
43
44class Q_QMLCOMPILER_EXPORT QQmlJSLiteralBindingCheck: public LiteralBindingCheckBase
45{
46public:
48
49 void onBinding(const QQmlSA::Element &element, const QString &propertyName,
50 const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope,
51 const QQmlSA::Element &value) override;
52
53private:
54 QQmlJSTypeResolver *m_resolver;
55
56protected:
57 QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const override;
58};
59
61
62#endif // QQMLJSLITERALBINDINGCHECK_P_H
virtual QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const =0
\inmodule QtQmlCompiler
Definition qqmlsa.h:52
\inmodule QtQmlCompiler
Definition qqmlsa.h:193
\inmodule QtQmlCompiler
Definition qqmlsa.h:303
\inmodule QtQmlCompiler
Definition qqmlsa.h:342
PropertyPass(PassManager *manager)
Definition qqmlsa.cpp:1435
\inmodule QtQmlCompiler
Definition qqmlsa.h:160
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const char * typeName
QNetworkAccessManager manager