summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.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/qproperty.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/qproperty.h')
-rw-r--r--src/corelib/kernel/qproperty.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/kernel/qproperty.h b/src/corelib/kernel/qproperty.h
index ae7f3a5050..1064180c27 100644
--- a/src/corelib/kernel/qproperty.h
+++ b/src/corelib/kernel/qproperty.h
@@ -43,7 +43,6 @@
#include <QtCore/qglobal.h>
#include <QtCore/QSharedDataPointer>
#include <QtCore/QString>
-#include <QtCore/qmetatype.h>
#include <functional>
#include <type_traits>
#include <variant>
@@ -123,7 +122,7 @@ public:
using BindingEvaluationFunction = QtPrivate::QPropertyBindingFunction;
QUntypedPropertyBinding();
- QUntypedPropertyBinding(const QMetaType &metaType, BindingEvaluationFunction function, const QPropertyBindingSourceLocation &location);
+ QUntypedPropertyBinding(QMetaType metaType, BindingEvaluationFunction function, const QPropertyBindingSourceLocation &location);
QUntypedPropertyBinding(QUntypedPropertyBinding &&other);
QUntypedPropertyBinding(const QUntypedPropertyBinding &other);
QUntypedPropertyBinding &operator=(const QUntypedPropertyBinding &other);
@@ -151,7 +150,7 @@ class QPropertyBinding : public QUntypedPropertyBinding
struct BindingAdaptor
{
Functor impl;
- bool operator()(const QMetaType &/*metaType*/, void *dataPtr)
+ bool operator()(QMetaType /*metaType*/, void *dataPtr)
{
PropertyType *propertyPtr = static_cast<PropertyType *>(dataPtr);
PropertyType newValue = impl();