summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/declarative/qml/qmlengine.cpp2
-rw-r--r--tests/auto/declarative/qmllanguage/data/i18nNameSpace.qml5
-rw-r--r--tests/auto/declarative/qmllanguage/tst_qmllanguage.cpp5
-rw-r--r--tests/auto/declarative/visual/qfxtext/elide/multilength.qml20
-rw-r--r--tests/auto/declarative/visual/tst_visual.cpp2
5 files changed, 30 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp
index f0ecf1d..528e8c9 100644
--- a/src/declarative/qml/qmlengine.cpp
+++ b/src/declarative/qml/qmlengine.cpp
@@ -1099,7 +1099,7 @@ public:
int slash = type.indexOf('/');
if (slash >= 0) {
while (!s) {
- s = set.value(QString::fromLatin1(type.left(slash)));
+ s = set.value(QString::fromUtf8(type.left(slash)));
int nslash = type.indexOf('/',slash+1);
if (nslash > 0)
slash = nslash;
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));