aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-21 14:32:19 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-03-21 13:38:07 +0000
commit37547a91b10da7559ee03f9fe2c23f8f22cc1c27 (patch)
tree9d05a958ce1f2f4a106e6fb53f9e6ee17dc5f9d1
parent2a37b8f2b1522558a6144b09db6f9487652a788c (diff)
SignalSpy: fix qtest_signalHandlerName()
Don't add second 'on' prefix if the user passed a signal handler name. Change-Id: I9ba3e61503ca3f9f0ac880dbbb83ca790b98eb47 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
-rw-r--r--src/imports/testlib/SignalSpy.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/imports/testlib/SignalSpy.qml b/src/imports/testlib/SignalSpy.qml
index 882e3d3578..200fc725f7 100644
--- a/src/imports/testlib/SignalSpy.qml
+++ b/src/imports/testlib/SignalSpy.qml
@@ -255,6 +255,8 @@ Item {
/*! \internal */
function qtest_signalHandlerName(sn) {
+ if (sn.substr(0, 2) === "on" && sn[2] === sn[2].toUpperCase())
+ return sn
return "on" + sn.substr(0, 1).toUpperCase() + sn.substr(1)
}
}