diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-09 11:16:13 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2024-01-18 14:54:21 +0100 |
commit | ffc687dca3ce3c37db6f47523881b457ce6ff6b1 (patch) | |
tree | 84ca9fd1d8a105455f9e53fb42933890904ebf28 /src/qml/common | |
parent | a1dbd28e89f055c191ca5580cea6f840017e52f1 (diff) |
QtQml: Move getters for flags into base CU
Change-Id: I6bf0bd06e489d07517a9fba6f675c402e9beddbb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/common')
-rw-r--r-- | src/qml/common/qv4compileddata_p.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/qml/common/qv4compileddata_p.h b/src/qml/common/qv4compileddata_p.h index c03a504f0e..7e768cd589 100644 --- a/src/qml/common/qv4compileddata_p.h +++ b/src/qml/common/qv4compileddata_p.h @@ -1651,6 +1651,51 @@ public: bool verifyChecksum(const CompiledData::DependentTypesHasher &dependencyHasher) const; + enum class ListPropertyAssignBehavior { Append, Replace, ReplaceIfNotDefault }; + ListPropertyAssignBehavior listPropertyAssignBehavior() const + { + if (unitData()->flags & CompiledData::Unit::ListPropertyAssignReplace) + return ListPropertyAssignBehavior::Replace; + if (unitData()->flags & CompiledData::Unit::ListPropertyAssignReplaceIfNotDefault) + return ListPropertyAssignBehavior::ReplaceIfNotDefault; + return ListPropertyAssignBehavior::Append; + } + + bool ignoresFunctionSignature() const + { + return unitData()->flags & CompiledData::Unit::FunctionSignaturesIgnored; + } + + bool nativeMethodsAcceptThisObjects() const + { + return unitData()->flags & CompiledData::Unit::NativeMethodsAcceptThisObject; + } + + bool valueTypesAreCopied() const + { + return unitData()->flags & CompiledData::Unit::ValueTypesCopied; + } + + bool valueTypesAreAddressable() const + { + return unitData()->flags & CompiledData::Unit::ValueTypesAddressable; + } + + bool componentsAreBound() const + { + return unitData()->flags & CompiledData::Unit::ComponentsBound; + } + + bool isESModule() const + { + return unitData()->flags & CompiledData::Unit::IsESModule; + } + + bool isSharedLibrary() const + { + return unitData()->flags & CompiledData::Unit::IsSharedLibrary; + } + QQmlType qmlTypeForComponent(const QString &inlineComponentName = QString()) const; QMetaType metaType() const { return qmlType.typeId(); } |