diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2009-10-15 07:26:28 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2009-10-15 07:26:28 (GMT) |
commit | 9182a60aabaedf7d0b7278544920c546cb89e461 (patch) | |
tree | 2bd0626f3fe804cc37778808aab7027a2f0fc58b /tests/auto/declarative | |
parent | 0f97a4fbcab5972f47a8a6cc3b501446df94bedb (diff) | |
parent | f9a0533d2711d3efca48a80f6ff65098039d7b33 (diff) | |
download | Qt-9182a60aabaedf7d0b7278544920c546cb89e461.zip Qt-9182a60aabaedf7d0b7278544920c546cb89e461.tar.gz Qt-9182a60aabaedf7d0b7278544920c546cb89e461.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative')
4 files changed, 29 insertions, 3 deletions
diff --git a/tests/auto/declarative/qmllanguage/data/i18nNameSpace.qml b/tests/auto/declarative/qmllanguage/data/i18nNameSpace.qml new file mode 100644 index 0000000..c0b2f94 --- /dev/null +++ b/tests/auto/declarative/qmllanguage/data/i18nNameSpace.qml @@ -0,0 +1,5 @@ +import Test 1.0 as Áâãäå + +Áâãäå.MyTypeObject { + stringProperty: "Test áâãäå: 40" +} diff --git a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp index b68d9bf..8d4ae65 100644 --- a/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp +++ b/tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp @@ -126,14 +126,14 @@ void tst_qmllanguage::initTestCase() // For utf-8 locale, this will be data/I18nType??????????.qml where ?????????? is 5 8-bit characters, UTF-8 encoded QFile in(TEST_FILE(QLatin1String("I18nType30.qml")).toLocalFile()); QVERIFY(in.open(QIODevice::ReadOnly)); - QFile out(TEST_FILE(QString::fromUtf8("I18nType\303\241\303\242\303\243\303\244\303\245.qml")).toLocalFile()); + QFile out(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile()); QVERIFY(out.open(QIODevice::WriteOnly)); out.write(in.readAll()); } void tst_qmllanguage::cleanupTestCase() { - QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\241\303\242\303\243\303\244\303\245.qml")).toLocalFile())); + QVERIFY(QFile::remove(TEST_FILE(QString::fromUtf8("I18nType\303\201\303\242\303\243\303\244\303\245.qml")).toLocalFile())); } void tst_qmllanguage::errors_data() @@ -711,6 +711,7 @@ void tst_qmllanguage::i18n_data() QTest::newRow("i18nDeclaredPropertyUse") << "i18nDeclaredPropertyUse.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 15"); QTest::newRow("i18nScript") << "i18nScript.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 20"); QTest::newRow("i18nType") << "i18nType.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 30"); + QTest::newRow("i18nNameSpace") << "i18nNameSpace.qml" << QString::fromUtf8("Test \303\241\303\242\303\243\303\244\303\245: 40"); } void tst_qmllanguage::i18n() diff --git a/tests/auto/declarative/visual/qfxtext/elide/multilength.qml b/tests/auto/declarative/visual/qfxtext/elide/multilength.qml new file mode 100644 index 0000000..6cd37b4 --- /dev/null +++ b/tests/auto/declarative/visual/qfxtext/elide/multilength.qml @@ -0,0 +1,20 @@ +import Qt 4.6 + +Rectangle { + width: 500 + height: 50 + color: "lightBlue" + Rectangle { + width: MyText.width + height: MyText.height + color: "white" + anchors.centerIn: parent + Text { + id: MyText + width: NumberAnimation { from: 500; to: 0; running: true; repeat: true; duration: 1000 } + elide: "ElideRight" + text: "aaaaaaa bbbbbbb ccccccc\x9Caaaaa bbbbb ccccc\x9Caaa bbb ccc\x9Ca b c" + text: "Brevity is the soul of wit, and tediousness the limbs and outward flourishes.\x9CBrevity is a great charm of eloquence.\x9CBe concise!\x9CSHHHHHHHHHHHHHHHHHHHHHHHHHHHH" + } + } +} diff --git a/tests/auto/declarative/visual/tst_visual.cpp b/tests/auto/declarative/visual/tst_visual.cpp index 367166d..cb32085 100644 --- a/tests/auto/declarative/visual/tst_visual.cpp +++ b/tests/auto/declarative/visual/tst_visual.cpp @@ -112,7 +112,7 @@ QString tst_visual::toTestScript(const QString &file, Mode mode) QString("data"); QString testname = file.mid(index + 1, file.length() - index - 5); - if (platformsuffix && (mode == UpdatePlatformVisuals || QDir(testdata+QLatin1String(platformsuffix)).exists())) { + if (platformsuffix && (mode == UpdatePlatformVisuals || QFile::exists(testdata+QLatin1String(platformsuffix)+QDir::separator()+testname))) { QString platformdir = testdata + QLatin1String(platformsuffix); if (mode == UpdatePlatformVisuals) { Q_ASSERT(QDir().mkpath(platformdir)); |