diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2013-09-27 18:09:03 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-16 22:26:37 +0100 |
commit | 68ff352906645a7a1beb0fa7e1ce34fff167c762 (patch) | |
tree | ba7e0e6b8bb5ce07d7da51c0b1fffc82a3f54e87 /tests/auto/corelib/tools/qtime | |
parent | e6abf372c6c2514ec8d53fae13cc676d3b55dd00 (diff) |
Use the short time format of the current locale on Windows
Windows 7 and later have LOCALE_SSHORTTIME, which is what we need.
Task-number: QTBUG-33718
Change-Id: I4c3f113d17102a37fb752de56f06b312f27c7887
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'tests/auto/corelib/tools/qtime')
-rw-r--r-- | tests/auto/corelib/tools/qtime/tst_qtime.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp index 0563111abb..4bd29da056 100644 --- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp +++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp @@ -723,15 +723,23 @@ void tst_QTime::toStringFormat() void tst_QTime::toStringLocale() { QTime time(18, 30); - QCOMPARE(time.toString(Qt::SystemLocaleDate), + QCOMPARE(time.toString(Qt::SystemLocaleShortDate), QLocale::system().toString(time, QLocale::ShortFormat)); - QCOMPARE(time.toString(Qt::LocaleDate), + QCOMPARE(time.toString(Qt::DefaultLocaleShortDate), QLocale().toString(time, QLocale::ShortFormat)); + QCOMPARE(time.toString(Qt::SystemLocaleLongDate), + QLocale::system().toString(time, QLocale::LongFormat)); + QCOMPARE(time.toString(Qt::DefaultLocaleLongDate), + QLocale().toString(time, QLocale::LongFormat)); QLocale::setDefault(QLocale::German); - QCOMPARE(time.toString(Qt::SystemLocaleDate), + QCOMPARE(time.toString(Qt::SystemLocaleShortDate), QLocale::system().toString(time, QLocale::ShortFormat)); - QCOMPARE(time.toString(Qt::LocaleDate), + QCOMPARE(time.toString(Qt::DefaultLocaleShortDate), QLocale().toString(time, QLocale::ShortFormat)); + QCOMPARE(time.toString(Qt::SystemLocaleLongDate), + QLocale::system().toString(time, QLocale::LongFormat)); + QCOMPARE(time.toString(Qt::DefaultLocaleLongDate), + QLocale().toString(time, QLocale::LongFormat)); } void tst_QTime::msecsSinceStartOfDay_data() |