summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qdatetime.cpp
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2009-07-01 09:49:48 (GMT)
committerMarius Storm-Olsen <marius@trolltech.com>2009-07-01 09:51:12 (GMT)
commit5ae330b6546dabada53c394b53ce9513f552a8a5 (patch)
treeed214404285312e69489cc576eccf3ebd5a28316 /src/corelib/tools/qdatetime.cpp
parentadc1c08ed9a5de2263564ba654a8ef7fed54af82 (diff)
downloadQt-5ae330b6546dabada53c394b53ce9513f552a8a5.zip
Qt-5ae330b6546dabada53c394b53ce9513f552a8a5.tar.gz
Qt-5ae330b6546dabada53c394b53ce9513f552a8a5.tar.bz2
src/corelib: Remove QT_WA and non-Unicode code paths, dropping Win9x and NT support
Also: QString::fromUtf16() -> QString::fromWCharArray() WCHAR & TCHAR -> wchar_t LPTSTR/LPCTSTR -> LPWSTR/LPCWSTR Documentation update Merge-request: 604 Reviewed-by: Marius Storm-Olsen <marius@trolltech.com>
Diffstat (limited to 'src/corelib/tools/qdatetime.cpp')
-rw-r--r--src/corelib/tools/qdatetime.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp
index 6674717..42f4304 100644
--- a/src/corelib/tools/qdatetime.cpp
+++ b/src/corelib/tools/qdatetime.cpp
@@ -2503,16 +2503,9 @@ QString QDateTime::toString(Qt::DateFormat f) const
buf += QLatin1Char(' ');
buf += QString::number(d->date.day());
#else
- QString winstr;
- QT_WA({
- TCHAR out[255];
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ILDATE, out, 255);
- winstr = QString::fromUtf16((ushort*)out);
- } , {
- char out[255];
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ILDATE, (char*)&out, 255);
- winstr = QString::fromLocal8Bit(out);
- });
+ wchar_t out[255];
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ILDATE, out, 255);
+ QString winstr = QString::fromWCharArray(out);
switch (winstr.toInt()) {
case 1:
buf = d->date.shortDayName(d->date.dayOfWeek());