5#ifndef QQMLJSVALUETYPEFROMSTRINGCHECK_H
6#define QQMLJSVALUETYPEFROMSTRINGCHECK_H
19#include <QtCore/qglobal.h>
20#include <QtCore/qstring.h>
24struct QQmlJSStructuredTypeError
27 bool constructedFromInvalidString =
false;
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)
34 return { enhancedString,
false };
41 static QQmlJSStructuredTypeError
hasError(
const QString &typeName,
const QString &value);
void warnOnCheckedBinding(const QQmlSA::Binding &binding, const QQmlSA::Element &propertyType)
QQmlSA::Property getProperty(const QString &propertyName, const QQmlSA::Binding &binding, const QQmlSA::Element &bindingScope) const
virtual QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const =0
QQmlJSLiteralBindingCheck(QQmlSA::PassManager *manager)
QQmlJSStructuredTypeError check(const QString &typeName, const QString &value) const override
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.
static QQmlJSStructuredTypeError hasError(const QString &typeName, const QString &value)
Combined button and popup list for selecting options.
static bool canConvertForLiteralBinding(QQmlJSTypeResolver *resolver, const QQmlSA::Element &fromElement, const QQmlSA::Element &toElement)
static QString literalPrettyTypeName(QQmlSA::BindingType type)