diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp index 8765426..158ee51 100644 --- a/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp +++ b/tests/auto/declarative/qdeclarativefontloader/tst_qdeclarativefontloader.cpp @@ -87,7 +87,7 @@ tst_qdeclarativefontloader::tst_qdeclarativefontloader() : void tst_qdeclarativefontloader::noFont() { - QString componentStr = "import Qt 4.7\nFontLoader { }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create()); @@ -102,7 +102,7 @@ void tst_qdeclarativefontloader::noFont() void tst_qdeclarativefontloader::namedFont() { - QString componentStr = "import Qt 4.7\nFontLoader { name: \"Helvetica\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { name: \"Helvetica\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create()); @@ -115,7 +115,7 @@ void tst_qdeclarativefontloader::namedFont() void tst_qdeclarativefontloader::localFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"" SRCDIR "/data/tarzeau_ocr_a.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); QDeclarativeFontLoader *fontObject = qobject_cast<QDeclarativeFontLoader*>(component.create()); @@ -128,7 +128,7 @@ void tst_qdeclarativefontloader::localFont() void tst_qdeclarativefontloader::failLocalFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\" }"; QTest::ignoreMessage(QtWarningMsg, QString("file::2:1: QML FontLoader: Cannot load font: \"" + QUrl::fromLocalFile(SRCDIR "/data/dummy.ttf").toString() + "\"").toUtf8().constData()); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -142,7 +142,7 @@ void tst_qdeclarativefontloader::failLocalFont() void tst_qdeclarativefontloader::webFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/tarzeau_ocr_a.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -158,7 +158,7 @@ void tst_qdeclarativefontloader::redirWebFont() { server.addRedirect("olddir/oldname.ttf","../tarzeau_ocr_a.ttf"); - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/olddir/oldname.ttf\" }"; QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -172,7 +172,7 @@ void tst_qdeclarativefontloader::redirWebFont() void tst_qdeclarativefontloader::failWebFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: \"http://localhost:14448/nonexist.ttf\" }"; QTest::ignoreMessage(QtWarningMsg, "file::2:1: QML FontLoader: Cannot load font: \"http://localhost:14448/nonexist.ttf\""); QDeclarativeComponent component(&engine); component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); @@ -186,7 +186,7 @@ void tst_qdeclarativefontloader::failWebFont() void tst_qdeclarativefontloader::changeFont() { - QString componentStr = "import Qt 4.7\nFontLoader { source: font }"; + QString componentStr = "import QtQuick 1.0\nFontLoader { source: font }"; QDeclarativeContext *ctxt = engine.rootContext(); ctxt->setContextProperty("font", QUrl::fromLocalFile(SRCDIR "/data/tarzeau_ocr_a.ttf")); QDeclarativeComponent component(&engine); |