From 294f32f41da900ad3ae70e1546ea0057f8864d95 Mon Sep 17 00:00:00 2001 From: Frans Englich Date: Fri, 24 Apr 2009 10:23:13 +0200 Subject: Alias for QUtf16Codec is wrong. Requested/spotted by Nokia i18n team/Darpan. Task-number: 252102 Reviewed-by: Denis AutoTest: In this submit. --- src/corelib/codecs/qutfcodec.cpp | 4 +--- tests/auto/qtextcodec/tst_qtextcodec.cpp | 6 ++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index 281bf75..1ac592e 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -413,9 +413,7 @@ QByteArray QUtf16Codec::name() const QList QUtf16Codec::aliases() const { - QList list; - list << "ISO-10646-UCS-2"; - return list; + return QList(); } int QUtf16BECodec::mibEnum() const diff --git a/tests/auto/qtextcodec/tst_qtextcodec.cpp b/tests/auto/qtextcodec/tst_qtextcodec.cpp index b1bfb86..536b695 100644 --- a/tests/auto/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/qtextcodec/tst_qtextcodec.cpp @@ -68,6 +68,7 @@ private slots: void flagEFBFBF() const; void decode0D() const; void codecForIndex() const; + void aliasForUTF16() const; void utf8Codec_data(); void utf8Codec(); @@ -453,6 +454,11 @@ void tst_QTextCodec::codecForIndex() const { } +void tst_QTextCodec::aliasForUTF16() const +{ + QVERIFY(QTextCodec::codecForName("UTF-16")->aliases().isEmpty()); +} + static QString fromInvalidUtf8Sequence(const QByteArray &ba) { return QString().fill(QChar::ReplacementCharacter, ba.size()); -- cgit v0.12