summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2023-01-25 22:29:33 +0400
committerEdward Welbourne <edward.welbourne@qt.io>2023-02-06 11:14:13 +0100
commit8d58c7d7ae1c75073b853a8281d53037946a154b (patch)
tree304642d4766e4dd14f6d494627ed8acf4ac969db /tests
parenta1ceee2507c022b037bb55f4955fb562698a6016 (diff)
Pass short time format to GetTimeFormat from GetLocaleInfo
TIME_NOSECONDS doesn't really switch to short time format, just removes the seconds from long time format. In picking to 6.2, rename a local variable to avoid shadowing the new format (and incidentally reduce scope for conflict on any later picks back from dev). Fixes: QTBUG-110627 Change-Id: Ie799958f3942c657f00bc8196588258661ddc1d9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 763884cfb7be0cadd353cfa3b9b760d521851718) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> Reviewed-by: Mate Barany <mate.barany@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/text/qlocale/tst_qlocale.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
index 7e2bd40628..010dfddd01 100644
--- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp
@@ -2211,7 +2211,7 @@ void tst_QLocale::windowsDefaultLocale()
locale.toString(QDate(1974, 12, 1), QLocale::ShortFormat));
QCOMPARE(locale.toString(QDate(1974, 12, 1), QLocale::LongFormat),
QStringView(u"\u3021@\u3021\u3022@\u3021\u3029\u3027\u3024"));
- const QString expectedFormattedShortTime = QStringView(u"\u3021^\u3022").toString();
+ const QString expectedFormattedShortTime = QStringView(u"\u3021^\u3022^\u3023").toString();
QCOMPARE(locale.toString(QTime(1,2,3), QLocale::ShortFormat), expectedFormattedShortTime);
QCOMPARE(locale.toString(QTime(1,2,3), QLocale::NarrowFormat),
locale.toString(QTime(1,2,3), QLocale::ShortFormat));