diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-12 13:46:17 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-05-16 13:50:52 +0200 |
commit | b3bc19772daae85fe46d875923d3db8a126809f2 (patch) | |
tree | a243afbcecd2906a71726e4114e1d28de518ad26 /src/qml/qml | |
parent | dfb11ea64ec71c6598c790861b3464fe4ae2db0c (diff) |
V4: Discern between named builtins and optimizations for common types
The named builtins include void and regexp. The optimizations for other
types are useful, but should be a separate enum.
Change-Id: I06220cf4a6d3449deca89a26c4f5db0e41d32765
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml')
-rw-r--r-- | src/qml/qml/ftw/qbipointer_p.h | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycachecreator.cpp | 72 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycachecreator_p.h | 31 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 93 | ||||
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject_p.h | 35 |
5 files changed, 146 insertions, 87 deletions
diff --git a/src/qml/qml/ftw/qbipointer_p.h b/src/qml/qml/ftw/qbipointer_p.h index 4039d6b60d..b06b5bbc01 100644 --- a/src/qml/qml/ftw/qbipointer_p.h +++ b/src/qml/qml/ftw/qbipointer_p.h @@ -17,6 +17,8 @@ #include <QtCore/private/qglobal_p.h> +#include <QtCore/qhashfunctions.h> + QT_BEGIN_NAMESPACE namespace QtPrivate { diff --git a/src/qml/qml/qqmlpropertycachecreator.cpp b/src/qml/qml/qqmlpropertycachecreator.cpp index 4bc903c22e..d71a2d0086 100644 --- a/src/qml/qml/qqmlpropertycachecreator.cpp +++ b/src/qml/qml/qqmlpropertycachecreator.cpp @@ -5,47 +5,63 @@ #include <private/qqmlengine_p.h> +#if QT_CONFIG(regularexpression) +#include <QtCore/qregularexpression.h> +#endif + QT_BEGIN_NAMESPACE QAtomicInt QQmlPropertyCacheCreatorBase::classIndexCounter(0); -QMetaType QQmlPropertyCacheCreatorBase::metaTypeForPropertyType(QV4::CompiledData::BuiltinType type) +QMetaType QQmlPropertyCacheCreatorBase::metaTypeForPropertyType(QV4::CompiledData::CommonType type) { switch (type) { - case QV4::CompiledData::BuiltinType::Var: return QMetaType::fromType<QVariant>(); - case QV4::CompiledData::BuiltinType::Int: return QMetaType::fromType<int>(); - case QV4::CompiledData::BuiltinType::Bool: return QMetaType::fromType<bool>(); - case QV4::CompiledData::BuiltinType::Real: return QMetaType::fromType<qreal>(); - case QV4::CompiledData::BuiltinType::String: return QMetaType::fromType<QString>(); - case QV4::CompiledData::BuiltinType::Url: return QMetaType::fromType<QUrl>(); - case QV4::CompiledData::BuiltinType::Time: return QMetaType::fromType<QTime>(); - case QV4::CompiledData::BuiltinType::Date: return QMetaType::fromType<QDate>(); - case QV4::CompiledData::BuiltinType::DateTime: return QMetaType::fromType<QDateTime>(); - case QV4::CompiledData::BuiltinType::Rect: return QMetaType::fromType<QRectF>(); - case QV4::CompiledData::BuiltinType::Point: return QMetaType::fromType<QPointF>(); - case QV4::CompiledData::BuiltinType::Size: return QMetaType::fromType<QSizeF>(); - case QV4::CompiledData::BuiltinType::InvalidBuiltin: break; + case QV4::CompiledData::CommonType::Void: return QMetaType(); + case QV4::CompiledData::CommonType::Var: return QMetaType::fromType<QVariant>(); + case QV4::CompiledData::CommonType::Int: return QMetaType::fromType<int>(); + case QV4::CompiledData::CommonType::Bool: return QMetaType::fromType<bool>(); + case QV4::CompiledData::CommonType::Real: return QMetaType::fromType<qreal>(); + case QV4::CompiledData::CommonType::String: return QMetaType::fromType<QString>(); + case QV4::CompiledData::CommonType::Url: return QMetaType::fromType<QUrl>(); + case QV4::CompiledData::CommonType::Time: return QMetaType::fromType<QTime>(); + case QV4::CompiledData::CommonType::Date: return QMetaType::fromType<QDate>(); + case QV4::CompiledData::CommonType::DateTime: return QMetaType::fromType<QDateTime>(); +#if QT_CONFIG(regularexpression) + case QV4::CompiledData::CommonType::RegExp: return QMetaType::fromType<QRegularExpression>(); +#else + case QV4::CompiledData::CommonType::RegExp: return QMetaType(); +#endif + case QV4::CompiledData::CommonType::Rect: return QMetaType::fromType<QRectF>(); + case QV4::CompiledData::CommonType::Point: return QMetaType::fromType<QPointF>(); + case QV4::CompiledData::CommonType::Size: return QMetaType::fromType<QSizeF>(); + case QV4::CompiledData::CommonType::Invalid: break; }; return QMetaType {}; } -QMetaType QQmlPropertyCacheCreatorBase::listTypeForPropertyType(QV4::CompiledData::BuiltinType type) +QMetaType QQmlPropertyCacheCreatorBase::listTypeForPropertyType(QV4::CompiledData::CommonType type) { switch (type) { - case QV4::CompiledData::BuiltinType::Var: return QMetaType::fromType<QList<QVariant>>(); - case QV4::CompiledData::BuiltinType::Int: return QMetaType::fromType<QList<int>>(); - case QV4::CompiledData::BuiltinType::Bool: return QMetaType::fromType<QList<bool>>(); - case QV4::CompiledData::BuiltinType::Real: return QMetaType::fromType<QList<qreal>>(); - case QV4::CompiledData::BuiltinType::String: return QMetaType::fromType<QList<QString>>(); - case QV4::CompiledData::BuiltinType::Url: return QMetaType::fromType<QList<QUrl>>(); - case QV4::CompiledData::BuiltinType::Time: return QMetaType::fromType<QList<QTime>>(); - case QV4::CompiledData::BuiltinType::Date: return QMetaType::fromType<QList<QDate>>(); - case QV4::CompiledData::BuiltinType::DateTime: return QMetaType::fromType<QList<QDateTime>>(); - case QV4::CompiledData::BuiltinType::Rect: return QMetaType::fromType<QList<QRectF>>(); - case QV4::CompiledData::BuiltinType::Point: return QMetaType::fromType<QList<QPointF>>(); - case QV4::CompiledData::BuiltinType::Size: return QMetaType::fromType<QList<QSizeF>>(); - case QV4::CompiledData::BuiltinType::InvalidBuiltin: break; + case QV4::CompiledData::CommonType::Void: return QMetaType(); + case QV4::CompiledData::CommonType::Var: return QMetaType::fromType<QList<QVariant>>(); + case QV4::CompiledData::CommonType::Int: return QMetaType::fromType<QList<int>>(); + case QV4::CompiledData::CommonType::Bool: return QMetaType::fromType<QList<bool>>(); + case QV4::CompiledData::CommonType::Real: return QMetaType::fromType<QList<qreal>>(); + case QV4::CompiledData::CommonType::String: return QMetaType::fromType<QList<QString>>(); + case QV4::CompiledData::CommonType::Url: return QMetaType::fromType<QList<QUrl>>(); + case QV4::CompiledData::CommonType::Time: return QMetaType::fromType<QList<QTime>>(); + case QV4::CompiledData::CommonType::Date: return QMetaType::fromType<QList<QDate>>(); + case QV4::CompiledData::CommonType::DateTime: return QMetaType::fromType<QList<QDateTime>>(); +#if QT_CONFIG(regularexpression) + case QV4::CompiledData::CommonType::RegExp: return QMetaType::fromType<QList<QRegularExpression>>(); +#else + case QV4::CompiledData::CommonType::RegExp: return QMetaType(); +#endif + case QV4::CompiledData::CommonType::Rect: return QMetaType::fromType<QList<QRectF>>(); + case QV4::CompiledData::CommonType::Point: return QMetaType::fromType<QList<QPointF>>(); + case QV4::CompiledData::CommonType::Size: return QMetaType::fromType<QList<QSizeF>>(); + case QV4::CompiledData::CommonType::Invalid: break; }; return QMetaType {}; } diff --git a/src/qml/qml/qqmlpropertycachecreator_p.h b/src/qml/qml/qqmlpropertycachecreator_p.h index 99a64802c1..1dcf169ecc 100644 --- a/src/qml/qml/qqmlpropertycachecreator_p.h +++ b/src/qml/qml/qqmlpropertycachecreator_p.h @@ -66,8 +66,8 @@ struct QQmlPropertyCacheCreatorBase public: static QAtomicInt Q_AUTOTEST_EXPORT classIndexCounter; - static QMetaType metaTypeForPropertyType(QV4::CompiledData::BuiltinType type); - static QMetaType listTypeForPropertyType(QV4::CompiledData::BuiltinType type); + static QMetaType metaTypeForPropertyType(QV4::CompiledData::CommonType type); + static QMetaType listTypeForPropertyType(QV4::CompiledData::CommonType type); static QByteArray createClassNameTypeByUrl(const QUrl &url); @@ -592,24 +592,25 @@ inline QQmlError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObject( QTypeRevision propertyTypeVersion = QTypeRevision::zero(); QQmlPropertyData::Flags propertyFlags; - const QV4::CompiledData::BuiltinType type = p->builtinType(); + const QV4::CompiledData::CommonType type = p->commonType(); if (p->isList()) propertyFlags.type = QQmlPropertyData::Flags::QListType; - else if (type == QV4::CompiledData::BuiltinType::Var) + else if (type == QV4::CompiledData::CommonType::Var) propertyFlags.type = QQmlPropertyData::Flags::VarPropertyType; - if (type != QV4::CompiledData::BuiltinType::InvalidBuiltin) { + if (type != QV4::CompiledData::CommonType::Invalid) { propertyType = p->isList() ? listTypeForPropertyType(type) : metaTypeForPropertyType(type); } else { - Q_ASSERT(!p->isBuiltinType()); + Q_ASSERT(!p->isCommonType()); QQmlType qmltype; bool selfReference = false; - if (!imports->resolveType(stringAt(p->builtinTypeOrTypeNameIndex()), &qmltype, nullptr, nullptr, - nullptr, QQmlType::AnyRegistrationType, &selfReference)) { + if (!imports->resolveType( + stringAt(p->commonTypeOrTypeNameIndex()), &qmltype, nullptr, nullptr, + nullptr, QQmlType::AnyRegistrationType, &selfReference)) { return qQmlCompileError(p->location, QQmlPropertyCacheCreatorBase::tr("Invalid property type")); } @@ -679,19 +680,19 @@ inline QQmlError QQmlPropertyCacheCreator<ObjectContainer>::createMetaObject( } template <typename ObjectContainer> -inline QMetaType QQmlPropertyCacheCreator<ObjectContainer>::metaTypeForParameter(const QV4::CompiledData::ParameterType ¶m, - QString *customTypeName) +inline QMetaType QQmlPropertyCacheCreator<ObjectContainer>::metaTypeForParameter( + const QV4::CompiledData::ParameterType ¶m, QString *customTypeName) { - const quint32 typeId = param.typeNameIndexOrBuiltinType(); - if (param.indexIsBuiltinType()) { + const quint32 typeId = param.typeNameIndexOrCommonType(); + if (param.indexIsCommonType()) { // built-in type if (param.isList()) - return listTypeForPropertyType(QV4::CompiledData::BuiltinType(typeId)); - return metaTypeForPropertyType(QV4::CompiledData::BuiltinType(typeId)); + return listTypeForPropertyType(QV4::CompiledData::CommonType(typeId)); + return metaTypeForPropertyType(QV4::CompiledData::CommonType(typeId)); } // lazily resolved type - const QString typeName = stringAt(param.typeNameIndexOrBuiltinType()); + const QString typeName = stringAt(param.typeNameIndexOrCommonType()); if (customTypeName) *customTypeName = typeName; QQmlType qmltype; diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index c625d2fa20..08e89f7e91 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -588,6 +588,22 @@ QDateTime QQmlVMEMetaObject::readPropertyAsDateTime(int id) const return v->d()->data().value<QDateTime>(); } +#if QT_CONFIG(regularexpression) +QRegularExpression QQmlVMEMetaObject::readPropertyAsRegularExpression(int id) const +{ + QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); + if (!md) + return QRegularExpression(); + + QV4::Scope scope(engine); + QV4::ScopedValue sv(scope, *(md->data() + id)); + const QV4::VariantObject *v = sv->as<QV4::VariantObject>(); + if (!v || v->d()->data().userType() != QMetaType::QRegularExpression) + return QRegularExpression(); + return v->d()->data().value<QRegularExpression>(); +} +#endif + QSizeF QQmlVMEMetaObject::readPropertyAsSizeF(int id) const { QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); @@ -683,7 +699,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * // if we reach this point, propertyCount must have been > 0, and thus compiledObject != nullptr Q_ASSERT(compiledObject); const QV4::CompiledData::Property &property = compiledObject->propertyTable()[id]; - const QV4::CompiledData::BuiltinType t = property.builtinType(); + const QV4::CompiledData::CommonType t = property.commonType(); // the context can be null if accessing var properties from cpp after re-parenting an item. QQmlEnginePrivate *ep = (ctxt.isNull() || ctxt->engine() == nullptr) @@ -744,40 +760,48 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } } else { switch (t) { - case QV4::CompiledData::BuiltinType::Int: + case QV4::CompiledData::CommonType::Void: + break; + case QV4::CompiledData::CommonType::Int: *reinterpret_cast<int *>(a[0]) = readPropertyAsInt(id); break; - case QV4::CompiledData::BuiltinType::Bool: + case QV4::CompiledData::CommonType::Bool: *reinterpret_cast<bool *>(a[0]) = readPropertyAsBool(id); break; - case QV4::CompiledData::BuiltinType::Real: + case QV4::CompiledData::CommonType::Real: *reinterpret_cast<double *>(a[0]) = readPropertyAsDouble(id); break; - case QV4::CompiledData::BuiltinType::String: + case QV4::CompiledData::CommonType::String: *reinterpret_cast<QString *>(a[0]) = readPropertyAsString(id); break; - case QV4::CompiledData::BuiltinType::Url: + case QV4::CompiledData::CommonType::Url: *reinterpret_cast<QUrl *>(a[0]) = readPropertyAsUrl(id); break; - case QV4::CompiledData::BuiltinType::Date: + case QV4::CompiledData::CommonType::Date: *reinterpret_cast<QDate *>(a[0]) = readPropertyAsDate(id); break; - case QV4::CompiledData::BuiltinType::DateTime: + case QV4::CompiledData::CommonType::DateTime: *reinterpret_cast<QDateTime *>(a[0]) = readPropertyAsDateTime(id); break; - case QV4::CompiledData::BuiltinType::Rect: + case QV4::CompiledData::CommonType::RegExp: +#if QT_CONFIG(regularexpression) + *reinterpret_cast<QRegularExpression *>(a[0]) + = readPropertyAsRegularExpression(id); +#endif + break; + case QV4::CompiledData::CommonType::Rect: *reinterpret_cast<QRectF *>(a[0]) = readPropertyAsRectF(id); break; - case QV4::CompiledData::BuiltinType::Size: + case QV4::CompiledData::CommonType::Size: *reinterpret_cast<QSizeF *>(a[0]) = readPropertyAsSizeF(id); break; - case QV4::CompiledData::BuiltinType::Point: + case QV4::CompiledData::CommonType::Point: *reinterpret_cast<QPointF *>(a[0]) = readPropertyAsPointF(id); break; - case QV4::CompiledData::BuiltinType::Time: + case QV4::CompiledData::CommonType::Time: *reinterpret_cast<QTime *>(a[0]) = readPropertyAsTime(id); break; - case QV4::CompiledData::BuiltinType::Var: + case QV4::CompiledData::CommonType::Var: if (ep) { *reinterpret_cast<QVariant *>(a[0]) = readPropertyAsVariant(id); } else { @@ -786,7 +810,7 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * *reinterpret_cast<QVariant *>(a[0]) = QVariant(); } break; - case QV4::CompiledData::BuiltinType::InvalidBuiltin: + case QV4::CompiledData::CommonType::Invalid: if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { QV4::Scope scope(engine); QV4::ScopedValue sv(scope, *(md->data() + id)); @@ -855,55 +879,64 @@ int QQmlVMEMetaObject::metaCall(QObject *o, QMetaObject::Call c, int _id, void * } } else { switch (t) { - case QV4::CompiledData::BuiltinType::Int: + case QV4::CompiledData::CommonType::Void: + break; + case QV4::CompiledData::CommonType::Int: needActivate = *reinterpret_cast<int *>(a[0]) != readPropertyAsInt(id); writeProperty(id, *reinterpret_cast<int *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Bool: + case QV4::CompiledData::CommonType::Bool: needActivate = *reinterpret_cast<bool *>(a[0]) != readPropertyAsBool(id); writeProperty(id, *reinterpret_cast<bool *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Real: + case QV4::CompiledData::CommonType::Real: needActivate = *reinterpret_cast<double *>(a[0]) != readPropertyAsDouble(id); writeProperty(id, *reinterpret_cast<double *>(a[0])); break; - case QV4::CompiledData::BuiltinType::String: + case QV4::CompiledData::CommonType::String: needActivate = *reinterpret_cast<QString *>(a[0]) != readPropertyAsString(id); writeProperty(id, *reinterpret_cast<QString *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Url: + case QV4::CompiledData::CommonType::Url: needActivate = *reinterpret_cast<QUrl *>(a[0]) != readPropertyAsUrl(id); writeProperty(id, *reinterpret_cast<QUrl *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Date: + case QV4::CompiledData::CommonType::Date: needActivate = *reinterpret_cast<QDate *>(a[0]) != readPropertyAsDate(id); writeProperty(id, *reinterpret_cast<QDate *>(a[0])); break; - case QV4::CompiledData::BuiltinType::DateTime: + case QV4::CompiledData::CommonType::DateTime: needActivate = *reinterpret_cast<QDateTime *>(a[0]) != readPropertyAsDateTime(id); writeProperty(id, *reinterpret_cast<QDateTime *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Rect: + case QV4::CompiledData::CommonType::RegExp: +#if QT_CONFIG(regularexpression) + needActivate = *reinterpret_cast<QRegularExpression *>(a[0]) + != readPropertyAsRegularExpression(id); + writeProperty(id, *reinterpret_cast<QRegularExpression *>(a[0])); +#endif + break; + case QV4::CompiledData::CommonType::Rect: needActivate = *reinterpret_cast<QRectF *>(a[0]) != readPropertyAsRectF(id); writeProperty(id, *reinterpret_cast<QRectF *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Size: + case QV4::CompiledData::CommonType::Size: needActivate = *reinterpret_cast<QSizeF *>(a[0]) != readPropertyAsSizeF(id); writeProperty(id, *reinterpret_cast<QSizeF *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Point: + case QV4::CompiledData::CommonType::Point: needActivate = *reinterpret_cast<QPointF *>(a[0]) != readPropertyAsPointF(id); writeProperty(id, *reinterpret_cast<QPointF *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Time: + case QV4::CompiledData::CommonType::Time: needActivate = *reinterpret_cast<QTime *>(a[0]) != readPropertyAsTime(id); writeProperty(id, *reinterpret_cast<QTime *>(a[0])); break; - case QV4::CompiledData::BuiltinType::Var: + case QV4::CompiledData::CommonType::Var: if (ep) writeProperty(id, *reinterpret_cast<QVariant *>(a[0])); break; - case QV4::CompiledData::BuiltinType::InvalidBuiltin: + case QV4::CompiledData::CommonType::Invalid: if (QV4::MemberData *md = propertyAndMethodStorageAsMemberData()) { QV4::Scope scope(engine); QV4::ScopedValue sv(scope, *(md->data() + id)); @@ -1118,7 +1151,7 @@ QV4::ReturnedValue QQmlVMEMetaObject::method(int index) const QV4::ReturnedValue QQmlVMEMetaObject::readVarProperty(int id) const { - Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var); + Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].commonType() == QV4::CompiledData::CommonType::Var); QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (md) @@ -1143,7 +1176,7 @@ QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id) const void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value) { - Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var); + Q_ASSERT(compiledObject && compiledObject->propertyTable()[id].commonType() == QV4::CompiledData::CommonType::Var); QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (!md) @@ -1204,7 +1237,7 @@ void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value) void QQmlVMEMetaObject::writeProperty(int id, const QVariant &value) { - if (compiledObject && compiledObject->propertyTable()[id].builtinType() == QV4::CompiledData::BuiltinType::Var) { + if (compiledObject && compiledObject->propertyTable()[id].commonType() == QV4::CompiledData::CommonType::Var) { QV4::MemberData *md = propertyAndMethodStorageAsMemberData(); if (!md) return; diff --git a/src/qml/qml/qqmlvmemetaobject_p.h b/src/qml/qml/qqmlvmemetaobject_p.h index f679a2483b..afbe77c4de 100644 --- a/src/qml/qml/qqmlvmemetaobject_p.h +++ b/src/qml/qml/qqmlvmemetaobject_p.h @@ -16,23 +16,25 @@ // We mean it. // -#include <QtCore/QMetaObject> -#include <QtCore/QBitArray> -#include <QtCore/QPair> -#include <QtCore/QDate> -#include <QtCore/qlist.h> -#include <QtCore/qdebug.h> - -#include <private/qobject_p.h> - -#include "qqmlguard_p.h" - -#include <private/qqmlguardedcontextdata_p.h> #include <private/qbipointer_p.h> - +#include <private/qqmlguard_p.h> +#include <private/qqmlguardedcontextdata_p.h> +#include <private/qqmlpropertyvalueinterceptor_p.h> #include <private/qv4object_p.h> #include <private/qv4value_p.h> -#include <private/qqmlpropertyvalueinterceptor_p.h> + +#include <QtCore/private/qobject_p.h> + +#if QT_CONFIG(regularexpression) +#include <QtCore/qregularexpression.h> +#endif + +#include <QtCore/qbitarray.h> +#include <QtCore/qdatetime.h> +#include <QtCore/qdebug.h> +#include <QtCore/qlist.h> +#include <QtCore/qmetaobject.h> +#include <QtCore/qpair.h> QT_BEGIN_NAMESPACE @@ -201,6 +203,11 @@ public: QDate readPropertyAsDate(int id) const; QTime readPropertyAsTime(int id) const; QDateTime readPropertyAsDateTime(int id) const; + +#if QT_CONFIG(regularexpression) + QRegularExpression readPropertyAsRegularExpression(int id) const; +#endif + QRectF readPropertyAsRectF(int id) const; QObject *readPropertyAsQObject(int id) const; QVector<QQmlGuard<QObject> > *readPropertyAsList(int id) const; |