aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlpropertydata_p.h
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-06-21 16:25:45 +0200
committerUlf Hermann <ulf.hermann@qt.io>2022-06-24 14:47:46 +0200
commit1b6069798aa7088457eb5e033aa2fa1d809ec3e4 (patch)
tree6a84044bf7435f2f934c21d5db43239ba5528f73 /src/qml/qml/qqmlpropertydata_p.h
parent34e40275acd87e2d6cbcb28d5288074184cbe98f (diff)
Allow resetting value type properties
Fixes: QTBUG-60909 Change-Id: I589c0b30cead134f746def2ffc853ff43d2598e0 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sami Shalayel <sami.shalayel@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/qml/qqmlpropertydata_p.h')
-rw-r--r--src/qml/qml/qqmlpropertydata_p.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlpropertydata_p.h b/src/qml/qml/qqmlpropertydata_p.h
index 166863bece..a74c05f7d3 100644
--- a/src/qml/qml/qqmlpropertydata_p.h
+++ b/src/qml/qml/qqmlpropertydata_p.h
@@ -342,6 +342,15 @@ public:
return true;
}
+ bool resetProperty(QObject *target, WriteFlags flags) const
+ {
+ if (flags.testFlag(BypassInterceptor) && hasStaticMetaCallFunction())
+ staticMetaCallFunction()(target, QMetaObject::ResetProperty, relativePropertyIndex(), nullptr);
+ else
+ doMetacall<QMetaObject::ResetProperty>(target, coreIndex(), nullptr);
+ return true;
+ }
+
static Flags defaultSignalFlags()
{
Flags f;