summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/sql/tst_sql.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/sql/tst_sql.cpp')
-rw-r--r--tests/auto/declarative/sql/tst_sql.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/declarative/sql/tst_sql.cpp b/tests/auto/declarative/sql/tst_sql.cpp
index e8a5e0c..1bab2d2 100644
--- a/tests/auto/declarative/sql/tst_sql.cpp
+++ b/tests/auto/declarative/sql/tst_sql.cpp
@@ -197,11 +197,13 @@ void tst_sql::testQml()
QString qml=
"import Qt 4.6\n"
- "Text { Script { source: \""+jsfile+"\" } text: test() }";
+ "import \""+jsfile+"\" as JS\n"
+ "Text { text: JS.test() }";
engine->setOfflineStoragePath(dbDir());
QDeclarativeComponent component(engine);
component.setData(qml.toUtf8(), QUrl::fromLocalFile(SRCDIR "/empty.qml")); // just a file for relative local imports
+ QVERIFY(!component.isError());
QDeclarativeText *text = qobject_cast<QDeclarativeText*>(component.create());
QVERIFY(text != 0);
QCOMPARE(text->text(),QString("passed"));