summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qproperty.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-11-27 16:03:41 +0100
committerLars Knoll <lars.knoll@qt.io>2020-12-07 15:18:44 +0100
commitcb39ea05810bc207100018589da658a0cce98edb (patch)
tree339ef4be8bfbc6f80c88d2feac22ed66cb3a4997 /src/corelib/kernel/qproperty.cpp
parentcb064dee3a42463da5b61f91fa9e4cf00d6b3453 (diff)
Make the signal argument in Q_OBJECT_BINDABLE_PROPERTY optional
The intention was always that you can define properties that do not require a changed signal. But having to explicitly pass a nullptr as signal parameter into the macro is ugly, so use the cool QT_OVERLOADED_MACRO to make it optional. Pick-to: 6.0 Change-Id: I0ce366d043850f983c968d73c544d89933c48df9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel/qproperty.cpp')
-rw-r--r--src/corelib/kernel/qproperty.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp
index e9256c7b42..27e2de7c4f 100644
--- a/src/corelib/kernel/qproperty.cpp
+++ b/src/corelib/kernel/qproperty.cpp
@@ -952,6 +952,9 @@ QString QPropertyBindingError::description() const
Q_OBJECT_BINDABLE_PROPERTY(MyClass, int, xProp, &MyClass::xChanged)
};
\endcode
+
+ If the property does not need a changed notification, you can leave out the "NOFITY xChanged" in the Q_PROPERTY macro as well as the last argument
+ of the Q_OBJECT_BINDABLE_PROPERTY macro.
*/
/*!