qmlplugindump: Dump revision property.
authorChristian Kamm <christian.d.kamm@nokia.com>
Mon, 30 May 2011 07:24:20 +0000 (09:24 +0200)
committerChristian Kamm <christian.d.kamm@nokia.com>
Mon, 30 May 2011 09:25:51 +0000 (11:25 +0200)
Mirrors a change to qmldump in
qt-creator/6e3274240077fc356a37d3de735b3b2da9654d2e

Reviewed-by: Roberto Raggi
(cherry picked from commit b0392d398e2f28682cdce6e85546d38a838440f7)

tools/qmlplugindump/main.cpp

index c2d2681..e6bf24c 100644 (file)
@@ -336,6 +336,10 @@ private:
         qml->writeStartObject("Property");
 
         qml->writeScriptBinding(QLatin1String("name"), enquote(QString::fromUtf8(prop.name())));
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 4))
+        if (int revision = prop.revision())
+            qml->writeScriptBinding(QLatin1String("revision"), QString::number(revision));
+#endif
         writeTypeProperties(prop.typeName(), prop.isWritable());
 
         qml->writeEndObject();
@@ -364,6 +368,11 @@ private:
 
         qml->writeScriptBinding(QLatin1String("name"), enquote(name));
 
+#if (QT_VERSION >= QT_VERSION_CHECK(4, 7, 4))
+        if (int revision = meth.revision())
+            qml->writeScriptBinding(QLatin1String("revision"), QString::number(revision));
+#endif
+
         const QString typeName = convertToId(meth.typeName());
         if (! typeName.isEmpty())
             qml->writeScriptBinding(QLatin1String("type"), enquote(typeName));