From 9baa491a068d6cc3a0276949b538ae8f415ae1ad Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 3 Aug 2016 20:01:58 +0200 Subject: autotests: fix finding data files when not in CWD These tests now can find their data files even when running from a different directory than the source directory, and they no longer misuse QUrl::fromLocalFile for a relative URL (resolved with QUrl::resolved). Change-Id: If18afd2e29571cca2a4c820eda6b9f6713e08a92 Reviewed-by: Simon Hausmann --- .../quick/qquickframebufferobject/tst_qquickframebufferobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/auto/quick/qquickframebufferobject') diff --git a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp index ada372cfdd..a3be728f5e 100644 --- a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp +++ b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp @@ -185,7 +185,7 @@ void tst_QQuickFramebufferObject::testThatStuffWorks() qmlRegisterType("FBOItem", 1, 0, "FBOItem"); QQuickView view; - view.setSource(QUrl::fromLocalFile("data/testStuff.qml")); + view.setSource(testFileUrl("testStuff.qml")); FBOItem *item = view.rootObject()->findChild("fbo"); @@ -229,7 +229,7 @@ void tst_QQuickFramebufferObject::testInvalidate() qmlRegisterType("FBOItem", 1, 0, "FBOItem"); QQuickView view; - view.setSource(QUrl::fromLocalFile("data/testStuff.qml")); + view.setSource(testFileUrl("testStuff.qml")); FBOItem *item = view.rootObject()->findChild("fbo"); item->setTextureFollowsItemSize(false); -- cgit v1.2.3