qmltest: Fix SignalSpy to use TestUtil helper functions
Previously the callerFile() and callerLine() functions were exposed as properties of the QtTest module, but now they are available in the TestUtil component. TestCase was updated but SignalSpy wasn't. Change-Id: Ic3f35e6f096b28c443e8aadaa78732a8a15dc284 Reviewed-on: http://codereview.qt.nokia.com/2528 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
This commit is contained in:
parent
1f0c9055da
commit
73aa113181
|
@ -46,6 +46,10 @@ Item {
|
|||
id: spy
|
||||
visible: false
|
||||
|
||||
TestUtil {
|
||||
id: util
|
||||
}
|
||||
|
||||
// Public API.
|
||||
|
||||
property variant target: null
|
||||
|
@ -67,7 +71,7 @@ Item {
|
|||
i += 50
|
||||
}
|
||||
var success = (count >= expected)
|
||||
if (!qtest_results.verify(success, "wait for signal " + signalName, QtTest.qtest_caller_file(), QtTest.qtest_caller_line()))
|
||||
if (!qtest_results.verify(success, "wait for signal " + signalName, util.callerFile(), util.callerLine()))
|
||||
throw new Error("QtQuickTest::fail")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue