diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-18 16:55:48 +0200 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-06-25 14:11:56 +0200 |
commit | 6a24ac7c4e0a7737b0cd0738c4e6fe8b9ac589ca (patch) | |
tree | 52e1f7b48a57da297d5eef19396b5c30408a1062 /src/corelib/kernel/qproperty.cpp | |
parent | c2fb27f054b228311fdba71f2a49cb09ae2a8fc8 (diff) |
QNotifiedProperty: pass old value to callback if requested
Check at compile time whether the static callback takes an argument
(which has to be of the same time as the type of the property). If so,
retrieve the old value and pass it to the callback.
Change-Id: Ib1c4c9e05b826b6be492b03f66fa72ad015963ee
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index a1b1d7b127..7ee035030f 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -95,7 +95,7 @@ QPropertyBase::~QPropertyBase() QUntypedPropertyBinding QPropertyBase::setBinding(const QUntypedPropertyBinding &binding, void *propertyDataPtr, void *staticObserver, - void (*staticObserverCallback)(void*)) + void (*staticObserverCallback)(void*, void*)) { QPropertyBindingPrivatePtr oldBinding; QPropertyBindingPrivatePtr newBinding = binding.d; |