Commit 0f7e5314 authored by Caroline Chao's avatar Caroline Chao Committed by The Qt Project
Browse files

TestBench: Small fix


Check if the "on" signal ends with "Changed" to make
sure we are dealing with a property.

I.e. onClicked should be skipped. Also in that case
it caused the substr to be empty and the call
item[substr] to create an assert in V8.

Change-Id: Ib04aa1773ef13a005e998659c7c903d3118bfc62
Reviewed-by: default avatarJens Bache-Wiig <jens.bache-wiig@digia.com>
parent 014e00eb
No related merge requests found
Showing with 3 additions and 0 deletions
...@@ -123,7 +123,10 @@ ApplicationWindow { ...@@ -123,7 +123,10 @@ ApplicationWindow {
propertyModel.clear() propertyModel.clear()
for (var prop in item) { for (var prop in item) {
if (!prop.indexOf("on")) { // look only for properties if (!prop.indexOf("on")) { // look only for properties
if (prop.indexOf("Changed") !== (prop.length - 7))
continue
var substr = prop.slice(2, prop.length - 7) var substr = prop.slice(2, prop.length - 7)
if (!substr.indexOf("__")) // filter private if (!substr.indexOf("__")) // filter private
continue; continue;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment