summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/qmetaobject-revision
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/doc/snippets/qmetaobject-revision
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/doc/snippets/qmetaobject-revision')
-rw-r--r--src/corelib/doc/snippets/qmetaobject-revision/window.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/doc/snippets/qmetaobject-revision/window.h b/src/corelib/doc/snippets/qmetaobject-revision/window.h
index f93d253b6b..f519a6f2dc 100644
--- a/src/corelib/doc/snippets/qmetaobject-revision/window.h
+++ b/src/corelib/doc/snippets/qmetaobject-revision/window.h
@@ -58,7 +58,7 @@ class Window : public QWidget
{
Q_OBJECT
Q_PROPERTY(int normalProperty READ normalProperty)
- Q_PROPERTY(int newProperty READ newProperty REVISION 1)
+ Q_PROPERTY(int newProperty READ newProperty REVISION(2, 1))
public:
Window();
@@ -66,7 +66,7 @@ public:
int newProperty();
public slots:
void normalMethod();
- Q_REVISION(1) void newMethod();
+ Q_REVISION(2, 1) void newMethod();
};
//! [Window class with revision]