From 5c7d93abed7ce374c32fbf73b5fe4ee3e00b972b Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Fri, 17 Dec 2010 15:30:18 -0200 Subject: Fix QML tests on Windows. --- tests/QtDeclarative/bug_451.py | 2 +- tests/QtDeclarative/bug_456.py | 2 +- tests/QtDeclarative/connect_python_qml.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/QtDeclarative/bug_451.py b/tests/QtDeclarative/bug_451.py index 60e8dcce5..c75eaa763 100644 --- a/tests/QtDeclarative/bug_451.py +++ b/tests/QtDeclarative/bug_451.py @@ -42,7 +42,7 @@ class TestBug(unittest.TestCase): obj = PythonObject() context = view.rootContext() context.setContextProperty("python", obj) - view.setSource(adjust_filename('bug_451.qml', __file__)) + view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_451.qml', __file__))) root = view.rootObject() root.simpleFunction() self.assertEqual(obj.called, "simpleFunction") diff --git a/tests/QtDeclarative/bug_456.py b/tests/QtDeclarative/bug_456.py index 178ea7d43..262b82e48 100644 --- a/tests/QtDeclarative/bug_456.py +++ b/tests/QtDeclarative/bug_456.py @@ -29,7 +29,7 @@ class TestConnectionWithInvalidSignature(TimedQApplication): context = view.rootContext() context.setContextProperty("rotatevalue", rotatevalue) - view.setSource(adjust_filename('bug_456.qml', __file__)) + view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('bug_456.qml', __file__))) root = view.rootObject() button = root.findChild(QtCore.QObject, "buttonMouseArea") view.show() diff --git a/tests/QtDeclarative/connect_python_qml.py b/tests/QtDeclarative/connect_python_qml.py index bb505156e..e8180f782 100644 --- a/tests/QtDeclarative/connect_python_qml.py +++ b/tests/QtDeclarative/connect_python_qml.py @@ -16,7 +16,7 @@ class TestConnectionWithInvalidSignature(TimedQApplication): self.buttonClicked = False self.buttonFailClicked = False view = QtDeclarative.QDeclarativeView() - view.setSource(QtCore.QUrl(adjust_filename('connect_python_qml.qml', __file__))) + view.setSource(QtCore.QUrl.fromLocalFile(adjust_filename('connect_python_qml.qml', __file__))) root = view.rootObject() button = root.findChild(QtCore.QObject, "buttonMouseArea") self.assertRaises(TypeError, QtCore.QObject.connect, [button,QtCore.SIGNAL('clicked()'), self.onButtonFailClicked]) -- cgit v1.2.3