aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript/data
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2011-10-12 14:27:57 +0200
committerQt by Nokia <qt-info@nokia.com>2011-12-09 13:08:36 +0100
commitf6416183d36a260f3cbf6f89753f8a0ee27df7cc (patch)
treec0a8e60bfe2cf7dccba11f9518c7bac031b3796b /tests/auto/declarative/qdeclarativeecmascript/data
parent3cfee36b9910dafebd0846dd58115bf2f069ccba (diff)
Get rid of QDeclarativeMetaType::{canCopy,copy}
Now that we have QMetaType::construct() that does placement new construction, we can use that to copy the value. We need to destruct the (default-constructed) existing value first, but for primitive types that's a no-op, and for Qt's types it's cheap since they use lazy initialization or "shared null". Change-Id: Idadee04b1d5b590be7fec50fb0396fd277bee973 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript/data')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml b/tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml
new file mode 100644
index 0000000000..36f481d533
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/signalWithQJSValue.qml
@@ -0,0 +1,14 @@
+import Qt.test 1.0
+
+MyQmlObject {
+ property string expression
+ property string compare
+ property bool pass: false
+
+ onSignalWithQJSValue:
+ {
+ qjsvalueMethod(arg);
+ var expected = eval(expression);
+ pass = eval(compare)(arg, expected);
+ }
+}