aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
index d4e3df2ffb..8fdd810037 100644
--- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
+++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp
@@ -47,7 +47,7 @@
#include <qdeclarativeinfo.h>
#include "../../shared/util.h"
-class tst_qdeclarativeinfo : public QObject
+class tst_qdeclarativeinfo : public QDeclarativeDataTest
{
Q_OBJECT
public:
@@ -67,14 +67,9 @@ private:
QDeclarativeEngine engine;
};
-inline QUrl TEST_FILE(const QString &filename)
-{
- return QUrl::fromLocalFile(TESTDATA(filename));
-}
-
void tst_qdeclarativeinfo::qmlObject()
{
- QDeclarativeComponent component(&engine, TEST_FILE("qmlObject.qml"));
+ QDeclarativeComponent component(&engine, testFileUrl("qmlObject.qml"));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -93,7 +88,7 @@ void tst_qdeclarativeinfo::qmlObject()
void tst_qdeclarativeinfo::nestedQmlObject()
{
- QDeclarativeComponent component(&engine, TEST_FILE("nestedQmlObject.qml"));
+ QDeclarativeComponent component(&engine, testFileUrl("nestedQmlObject.qml"));
QObject *object = component.create();
QVERIFY(object != 0);
@@ -107,14 +102,14 @@ void tst_qdeclarativeinfo::nestedQmlObject()
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(nested) << "Outer Object";
- message = TEST_FILE("NestedObject.qml").toString() + ":6:14: QML QtObject: Inner Object";
+ message = testFileUrl("NestedObject.qml").toString() + ":6:14: QML QtObject: Inner Object";
QTest::ignoreMessage(QtWarningMsg, qPrintable(message));
qmlInfo(nested2) << "Inner Object";
}
void tst_qdeclarativeinfo::nestedComponent()
{
- QDeclarativeComponent component(&engine, TEST_FILE("NestedComponent.qml"));
+ QDeclarativeComponent component(&engine, testFileUrl("NestedComponent.qml"));
QObject *object = component.create();
QVERIFY(object != 0);