QProperty: avoid needless std::function copying
Change-Id: Iea6280b12e7146a9ac92f071a4c21b373e9d3ab0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>bb10
parent
f912ad0a4d
commit
901b2975dd
|
|
@ -334,7 +334,7 @@ class QObjectCompatProperty : public QPropertyData<T>
|
|||
char *that = const_cast<char *>(reinterpret_cast<const char *>(this));
|
||||
return reinterpret_cast<Class *>(that - QtPrivate::detail::getOffset(Offset));
|
||||
}
|
||||
static bool bindingWrapper(QMetaType type, QUntypedPropertyData *dataPtr, QtPrivate::QPropertyBindingFunction binding)
|
||||
static bool bindingWrapper(QMetaType type, QUntypedPropertyData *dataPtr, const QtPrivate::QPropertyBindingFunction &binding)
|
||||
{
|
||||
auto *thisData = static_cast<ThisType *>(dataPtr);
|
||||
QPropertyData<T> copy;
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ namespace QtPrivate {
|
|||
// writes binding result into dataPtr
|
||||
using QPropertyBindingFunction = std::function<bool(QMetaType metaType, QUntypedPropertyData *dataPtr)>;
|
||||
using QPropertyObserverCallback = void (*)(QUntypedPropertyData *);
|
||||
using QPropertyBindingWrapper = bool(*)(QMetaType, QUntypedPropertyData *dataPtr, QPropertyBindingFunction);
|
||||
using QPropertyBindingWrapper = bool(*)(QMetaType, QUntypedPropertyData *dataPtr, const QPropertyBindingFunction &);
|
||||
|
||||
class Q_CORE_EXPORT QPropertyBindingData
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue