diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-08 11:30:35 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-09 10:57:49 +0100 |
commit | bcc8cf5e3b7c139c762d957b02ddfcf75707bde0 (patch) | |
tree | 613d54d404fdd7b36c10f1568f49f994799ad69d /tests/auto | |
parent | 6f1ae59ee6b82123f073fc8fd0ed6d010818041e (diff) |
Fix encoding inconsistency between tst_QNoDebug and QTestLog
Fix tst_QNoDebug::streaming() to use toLocal8Bit(), to match
QTestLog::ignoreMessage(), which uses fromLocal8Bit().
Change-Id: I65f7b995a582aeab7b7ba61781a229fecd1ed3c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp index b05c89a8bb..cf2079a407 100644 --- a/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp +++ b/tests/auto/corelib/io/qnodebug/tst_qnodebug.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -65,7 +65,7 @@ void tst_QNoDebug::noDebugOutput() const void tst_QNoDebug::streaming() const { QDateTime dt(QDate(1,2,3),QTime(4,5,6)); - const QByteArray debugString = dt.toString(u"yyyy-MM-dd HH:mm:ss.zzz t").toLatin1(); + const QByteArray debugString = dt.toString(u"yyyy-MM-dd HH:mm:ss.zzz t").toLocal8Bit(); const QByteArray message = "QDateTime(" + debugString + " Qt::LocalTime)"; QTest::ignoreMessage(QtWarningMsg, message.constData()); qWarning() << dt; |