summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-04-05 06:55:18 (GMT)
committerBea Lam <bea.lam@nokia.com>2011-04-12 01:07:49 (GMT)
commitf2219ce983098fc14655d8f3bb8a7fee2c9abe4d (patch)
treef8efd2e3eab7ff4ee868985fa7cdeb3fad0f0f1e /doc/src/snippets
parent6ec7695eaa02c923b90d72e3918b9ab50da63e41 (diff)
downloadQt-f2219ce983098fc14655d8f3bb8a7fee2c9abe4d.zip
Qt-f2219ce983098fc14655d8f3bb8a7fee2c9abe4d.tar.gz
Qt-f2219ce983098fc14655d8f3bb8a7fee2c9abe4d.tar.bz2
Allow enum values to be used as signal parameters
The fix does not work for enums declared outside of the class that emits the signal, since in this case it is not possible to access the metaobject of the class that declared the enum. However the fix makes a special case for the Qt namespace to allow enums in this namespace to be used. Task-number: QTBUG-15983 Change-Id: I6f72255b07010311a20fe068bd97c7db7b294d9b Reviewed-by: Aaron Kennedy
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/declarative/qtbinding/enums/standalone.qml15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml b/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
index 5721870..74e2c9c 100644
--- a/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
+++ b/doc/src/snippets/declarative/qtbinding/enums/standalone.qml
@@ -38,6 +38,9 @@
**
****************************************************************************/
import MyLibrary 1.0
+import QtQuick 1.0
+
+Item {
//![0]
ImageViewer {
@@ -47,3 +50,15 @@ ImageViewer {
}
}
//![0]
+
+//![1]
+ImageViewer {
+ signal someOtherSignal(int statusValue)
+
+ Component.onCompleted: {
+ someOtherSignal(ImageViewer.Loading)
+ }
+}
+//![1]
+
+}