summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qobject.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-01-16 11:33:41 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-02-07 21:23:55 +0100
commitf64694647a9a3d54fa5ecdaf2570e8c7404271a6 (patch)
tree18a98362d72b210c7672084687b052888faeb053 /src/corelib/kernel/qobject.cpp
parent0eb922a4e99da83f5600d36510668dfa002a17aa (diff)
moc: Extend revision markers to allow for major and minor version
As we want Qt's own revisions to follow the Qt versioning scheme, we need to allow for the minor version to reset to 0 now. In order to facilitate this, we interpret the argument passed the current Q_REVISION macro as major version and allow for an optional minor version. Both are encoded it into the resulting revision number. Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qobject.cpp')
-rw-r--r--src/corelib/kernel/qobject.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index c72383ff4a..d452b43ff6 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -4674,10 +4674,15 @@ QDebug operator<<(QDebug dbg, const QObject *o)
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.
+ \c{2.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.
+ Since all methods are considered to be in revision \c{0} if untagged, a tag
+ of \c{Q_REVISION(0)}, or \c{Q_REVISION(0, 0)} is invalid and ignored.
+
+ You can pass one or two integer parameters to \c{Q_REVISION}. If you pass
+ one, the parameter denotes the minor version and major version is
+ unspecified. If you pass two, the first parameter is the major version and
+ the second parameter is the minor version.
This tag is not used by the meta-object system itself. Currently this is only
used by the QtQml module.