7#include "QtQml/private/qqmltranslation_p.h"
23 if (std::holds_alternative<Content::BoolLiteral>(m_bindingContent))
25 else if (std::holds_alternative<Content::NumberLiteral>(m_bindingContent))
27 else if (std::holds_alternative<Content::StringLiteral>(m_bindingContent))
29 else if (std::holds_alternative<Content::RegexpLiteral>(m_bindingContent))
31 else if (std::holds_alternative<Content::Null>(m_bindingContent))
38 if (
auto boolLit = std::get_if<Content::BoolLiteral>(&m_bindingContent))
39 return boolLit->value;
46 if (
auto numberLit = std::get_if<Content::NumberLiteral>(&m_bindingContent))
47 return numberLit->value;
54 if (
auto stringLiteral = std::get_if<Content::StringLiteral>(&m_bindingContent))
55 return stringLiteral->value;
62 if (
auto regexpLiteral = std::get_if<Content::RegexpLiteral>(&m_bindingContent))
63 return regexpLiteral->value;
78 if (
auto translation = std::get_if<Content::TranslationById>(&m_bindingContent)) {
80 }
else if (
auto translation = std::get_if<Content::TranslationString>(&m_bindingContent)) {
83 : translation->context;
99 case BindingType::BoolLiteral:
101 case BindingType::NumberLiteral:
103 case BindingType::Translation:
104 case BindingType::TranslationById:
105 case BindingType::StringLiteral:
107 case BindingType::RegExpLiteral:
109 case BindingType::Null:
111 case BindingType::Invalid:
112 case BindingType::Script:
113 case BindingType::Object:
114 case BindingType::Interceptor:
115 case BindingType::ValueSource:
116 case BindingType::AttachedProperty:
117 case BindingType::GroupProperty:
120 Q_UNREACHABLE_RETURN({});
QQmlJSScope::ConstPtr stringType() const
QQmlJSScope::ConstPtr nullType() const
QQmlJSScope::ConstPtr boolType() const
QQmlJSScope::ConstPtr typeForName(const QString &name) const
static QString contextFromQmlFilename(const QString &qmlFilename)
std::variant< std::nullptr_t, QsTrData, QsTrIdData > Data
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
QLatin1StringView QLatin1String