summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-03-08 10:51:53 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-01 19:30:28 +0200
commit22cd698e39970ded3fa4fd873195314015ce4b8c (patch)
treec7a0353f52389b97b85615b80da6d07963b737da /src/corelib/kernel/qobject.cpp
parent6845a4fb0147117e8517d66f18792ca7acdbe06e (diff)
Document Q_REVISION macro better
Previously it was only mentioned in properties.qdoc Task-number: QTBUG-18802 Change-Id: Iab23128c1567974154cdcce7412b2e1468bb846a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 583e580762..527a842d17 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4103,6 +4103,37 @@ QDebug operator<<(QDebug dbg, const QObject *o) {
*/
/*!
+ \macro Q_REVISION
+ \relates QObject
+
+ Apply this macro to definitions of member functions to tag them with a
+ revision number in the meta-object system. The macro is written before
+ the return type, as shown in the following example:
+
+ \snippet qmetaobject-revision/window.h Window class with revision
+
+ This is useful when using the meta-object system to dynamically expose
+ objects to another API, as you can match the version expected by multiple
+ versions of the other API. Consider the following simplified example:
+
+ \snippet qmetaobject-revision/main.cpp Window class using revision
+
+ Using the same Window class as the previous example, the newProperty and
+ newMethod would only be exposed in this code when the expected version is
+ 1 or greater.
+
+ Since all methods are considered to be in revision 0 if untagged, a tag
+ of Q_REVISION(0) is invalid and ignored.
+
+ This tag is not used by the meta-object system itself. Currently this is only
+ used by the QtQml module.
+
+ For a more generic string tag, see \l QMetaMethod::tag()
+
+ \sa QMetaMethod::revision()
+*/
+
+/*!
\macro Q_SET_OBJECT_NAME(Object)
\relates QObject
\since 5.0