diff options
author | Andreas Eliasson <andreas.eliasson@qt.io> | 2023-03-07 13:47:06 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-09 10:17:14 +0000 |
commit | 2828b3fdca316aed449cdce8af3545c018d9444a (patch) | |
tree | 4bdc8c25bd7c2b9145789315f9f2a4fe2a1b30c3 | |
parent | ec3aac74a4812b18e483f524e991e9e0bbcd0bdb (diff) | |
download | qtbase-2828b3fdca316aed449cdce8af3545c018d9444a.tar.gz |
Doc: Update docs to reflect method being renamed
The new method has been renamed from markDirty to notify.
Fixes: QTBUG-111267
Change-Id: Ib7926a315cfd11ca6930c785290089b7031d34ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 12c62dd243dd139023fa1fc5c3a7c0fd8e3ee0ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qproperty.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp index f4cc826e6f..c2b55c9684 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qproperty.cpp @@ -144,7 +144,7 @@ public: Q_D(MyClass); d->clients.push_back(c); // notify that the value could have changed - d->hasClientsData.markDirty(); + d->hasClientsData.notify(); } private: Q_DECLARE_PRIVATE(MyClass) diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index a2ac69ec30..c657a17eae 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -1659,13 +1659,13 @@ QString QPropertyBindingError::description() const have changed. Whenever a bindable property used in the callback changes, this happens automatically. If the result of the callback might change because of a change in a value which is not a bindable property, - it is the developer's responsibility to call markDirty + it is the developer's responsibility to call \c notify on the QObjectComputedProperty object. This will inform dependent properties about the potential change. - Note that calling markDirty might trigger change handlers in dependent + Note that calling \c notify might trigger change handlers in dependent properties, which might in turn use the object the QObjectComputedProperty - is a member of. So markDirty must not be called when in a transitional + is a member of. So \c notify must not be called when in a transitional or invalid state. QObjectComputedProperty is not suitable for use with a computation that depends |