From 700e6341e51f5e6f45303fab3d0a84a3eb249eba Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 27 Jul 2020 17:34:10 +0200 Subject: Pass QMetaType by value Now that QMetaType is not refcounted anymore, we can and should pass it by value. Change-Id: I848db65070713762f548ca949097c27783aacad4 Reviewed-by: Thiago Macieira --- src/corelib/kernel/qpropertyprivate.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/kernel/qpropertyprivate.h') diff --git a/src/corelib/kernel/qpropertyprivate.h b/src/corelib/kernel/qpropertyprivate.h index e65ab324fa..ab8c96b17f 100644 --- a/src/corelib/kernel/qpropertyprivate.h +++ b/src/corelib/kernel/qpropertyprivate.h @@ -54,6 +54,7 @@ #include #include #include +#include #include @@ -63,14 +64,13 @@ class QUntypedPropertyBinding; class QPropertyBindingPrivate; using QPropertyBindingPrivatePtr = QExplicitlySharedDataPointer; struct QPropertyBasePointer; -class QMetaType; namespace QtPrivate { // writes binding result into dataPtr -using QPropertyBindingFunction = std::function; +using QPropertyBindingFunction = std::function; -using QPropertyGuardFunction = bool(*)(const QMetaType &, void *dataPtr, +using QPropertyGuardFunction = bool(*)(QMetaType, void *dataPtr, QPropertyBindingFunction, void *owner); using QPropertyObserverCallback = void (*)(void *, void *); @@ -242,7 +242,7 @@ struct QPropertyGuardFunctionHelper template struct QPropertyGuardFunctionHelper { - static auto guard(const QMetaType &metaType, void *dataPtr, + static auto guard(const QMetaType metaType, void *dataPtr, QPropertyBindingFunction eval, void *owner) -> bool { T t = T(); -- cgit v1.2.3