aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/testlib
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
committerLiang Qi <liang.qi@qt.io>2016-12-14 19:01:23 +0100
commit0e80d28aa5892d6bbb4d0017b1bc9a33489f4176 (patch)
tree0db2e10c8776d172bccaeaa7ee1fab3934b93073 /src/imports/testlib
parented32558d6280cae40578f735fd326327d571d993 (diff)
parent16c81bb0d493af00bc376784bcb7e03a4a037b04 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp src/qml/qml/qqmlimport.cpp src/quick/items/context2d/qquickcontext2dtexture_p.h tools/qmleasing/splineeditor.h Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
Diffstat (limited to 'src/imports/testlib')
-rw-r--r--src/imports/testlib/SignalSpy.qml10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/imports/testlib/SignalSpy.qml b/src/imports/testlib/SignalSpy.qml
index 200fc725f7..8a8e844a21 100644
--- a/src/imports/testlib/SignalSpy.qml
+++ b/src/imports/testlib/SignalSpy.qml
@@ -230,8 +230,14 @@ Item {
qtest_prevSignalName = ""
}
if (target != null && signalName != "") {
- var handlerName = qtest_signalHandlerName(signalName)
- var func = target[handlerName]
+ // Look for the signal name in the object
+ var func = target[signalName]
+ if (typeof func !== "function") {
+ // If it is not a function, try looking for signal handler
+ // i.e. (onSignal) this is needed for cases where there is a property
+ // and a signal with the same name, e.g. Mousearea.pressed
+ func = target[qtest_signalHandlerName(signalName)]
+ }
if (func === undefined) {
spy.qtest_valid = false
console.log("Signal '" + signalName + "' not found")