summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qpropertyprivate.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-07-27 17:34:10 +0200
committerLars Knoll <lars.knoll@qt.io>2020-08-24 00:19:30 +0200
commit700e6341e51f5e6f45303fab3d0a84a3eb249eba (patch)
tree0d2d876937b99e3de9d92582dff5ba56ced9f8c4 /src/corelib/kernel/qpropertyprivate.h
parent369cb1470d06b01934e616757ad98db2bb9ebb20 (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qpropertyprivate.h')
-rw-r--r--src/corelib/kernel/qpropertyprivate.h8
1 files changed, 4 insertions, 4 deletions
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 <QtCore/qglobal.h>
#include <QtCore/QExplicitlySharedDataPointer>
#include <QtCore/qtaggedpointer.h>
+#include <QtCore/qmetatype.h>
#include <functional>
@@ -63,14 +64,13 @@ class QUntypedPropertyBinding;
class QPropertyBindingPrivate;
using QPropertyBindingPrivatePtr = QExplicitlySharedDataPointer<QPropertyBindingPrivate>;
struct QPropertyBasePointer;
-class QMetaType;
namespace QtPrivate {
// writes binding result into dataPtr
-using QPropertyBindingFunction = std::function<bool(const QMetaType &metaType, void *dataPtr)>;
+using QPropertyBindingFunction = std::function<bool(QMetaType metaType, void *dataPtr)>;
-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<typename T, typename Class, auto Guard>
struct QPropertyGuardFunctionHelper<T, Class, Guard, false>
{
- static auto guard(const QMetaType &metaType, void *dataPtr,
+ static auto guard(const QMetaType metaType, void *dataPtr,
QPropertyBindingFunction eval, void *owner) -> bool
{
T t = T();