From 73aa113181fa2295729d24317c187661f740b898 Mon Sep 17 00:00:00 2001 From: Caio Marcelo de Oliveira Filho Date: Tue, 2 Aug 2011 20:31:19 -0300 Subject: 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 Reviewed-by: Charles Yin --- src/imports/testlib/SignalSpy.qml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/imports') diff --git a/src/imports/testlib/SignalSpy.qml b/src/imports/testlib/SignalSpy.qml index 59d44185a1..91b5f03522 100644 --- a/src/imports/testlib/SignalSpy.qml +++ b/src/imports/testlib/SignalSpy.qml @@ -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") } -- cgit v1.2.3