diff options
author | Milian Wolff <milian.wolff@kdab.com> | 2014-04-17 14:42:15 +0200 |
---|---|---|
committer | Milian Wolff <milian.wolff@kdab.com> | 2014-07-03 15:28:27 +0200 |
commit | 9f78e0985d2f4fdc2588be57c5f25afdd59c6365 (patch) | |
tree | 4a413002cab91b7d10057d1430a506c47b891bb0 /tests | |
parent | 5418f5795e2fd657efa3ceede749228c1e10d25c (diff) | |
download | qtwebchannel-9f78e0985d2f4fdc2588be57c5f25afdd59c6365.tar.gz |
Do not return a function for property getters on the HTML side.
This simplifies the usage and lets properties be used just like normal
JavaScript properties. This is possible since the properties are cached
on the HTML side.
Change-Id: Ic60076f4596cd8df063567dfbd630e5bd6403119
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/data/grouping.html | 2 | ||||
-rw-r--r-- | tests/auto/qml/data/property.html | 4 | ||||
-rw-r--r-- | tests/auto/qml/data/wrapper.html | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/data/grouping.html b/tests/auto/qml/data/grouping.html index f2d7aec..f6bc33c 100644 --- a/tests/auto/qml/data/grouping.html +++ b/tests/auto/qml/data/grouping.html @@ -6,7 +6,7 @@ //BEGIN SETUP window.channel = createWebChannel(function(channel) { channel.subscribe(QWebChannelMessageTypes.propertyUpdate, function() { - channel.exec({label: "gotPropertyUpdate", values: [myObj.myProperty(), myOtherObj.foo(), myOtherObj.bar()]}); + channel.exec({label: "gotPropertyUpdate", values: [myObj.myProperty, myOtherObj.foo, myOtherObj.bar]}); }); }); //END SETUP diff --git a/tests/auto/qml/data/property.html b/tests/auto/qml/data/property.html index 9565aaa..49b3811 100644 --- a/tests/auto/qml/data/property.html +++ b/tests/auto/qml/data/property.html @@ -5,9 +5,9 @@ <script type="text/javascript"> //BEGIN SETUP createWebChannel(function(channel) { - channel.exec({label: "init", value: myObj.myProperty()}); + channel.exec({label: "init", value: myObj.myProperty}); myObj.myPropertyChanged.connect(function() { - channel.exec({label: "changed", value: myObj.myProperty()}); + channel.exec({label: "changed", value: myObj.myProperty}); }); channel.subscribe("setProperty", function(newValue) { myObj.myProperty = newValue; diff --git a/tests/auto/qml/data/wrapper.html b/tests/auto/qml/data/wrapper.html index a556486..df368ee 100644 --- a/tests/auto/qml/data/wrapper.html +++ b/tests/auto/qml/data/wrapper.html @@ -6,7 +6,7 @@ //BEGIN SETUP createWebChannel(function(channel) { myFactory.create("testObj", function(obj) { - window[obj.objectName()] = obj; + window[obj.objectName] = obj; obj.mySignal.connect(function(arg1, arg2) { channel.exec({label: "signalReceived", args: [arg1, arg2]}); }); |