summaryrefslogtreecommitdiffstats
path: root/src/qt3support/widgets/q3datetimeedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt3support/widgets/q3datetimeedit.cpp')
-rw-r--r--src/qt3support/widgets/q3datetimeedit.cpp75
1 files changed, 28 insertions, 47 deletions
diff --git a/src/qt3support/widgets/q3datetimeedit.cpp b/src/qt3support/widgets/q3datetimeedit.cpp
index b6e303c..71a8ffd 100644
--- a/src/qt3support/widgets/q3datetimeedit.cpp
+++ b/src/qt3support/widgets/q3datetimeedit.cpp
@@ -114,39 +114,21 @@ static void readLocaleSettings()
lTimeSep = new QString();
#if defined(Q_WS_WIN)
- QT_WA({
- TCHAR data[10];
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
- *lDateSep = QString::fromUtf16((ushort*)data);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
- *lTimeSep = QString::fromUtf16((ushort*)data);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
- lAMPM = QString::fromUtf16((ushort*)data).toInt()==0;
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
- QString am = QString::fromUtf16((ushort*)data);
- if (!am.isEmpty())
- lAM = new QString(am);
- GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
- QString pm = QString::fromUtf16((ushort*)data);
- if (!pm.isEmpty() )
- lPM = new QString(pm);
- } , {
- char data[10];
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDATE, (char*)&data, 10);
- *lDateSep = QString::fromLocal8Bit(data);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_STIME, (char*)&data, 10);
- *lTimeSep = QString::fromLocal8Bit(data);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ITIME, (char*)&data, 10);
- lAMPM = QString::fromLocal8Bit(data).toInt()==0;
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S1159, (char*)&data, 10);
- QString am = QString::fromLocal8Bit(data);
- if (!am.isEmpty())
- lAM = new QString(am);
- GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S2359, (char*)&data, 10);
- QString pm = QString::fromLocal8Bit(data);
- if (!pm.isEmpty())
- lPM = new QString(pm);
- });
+ wchar_t data[10];
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
+ *lDateSep = QString::fromWCharArray(data);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
+ *lTimeSep = QString::fromWCharArray(data);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
+ lAMPM = QString::fromWCharArray(data).toInt() == 0;
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
+ QString am = QString::fromWCharArray(data);
+ if (!am.isEmpty())
+ lAM = new QString(am);
+ GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
+ QString pm = QString::fromWCharArray(data);
+ if (!pm.isEmpty() )
+ lPM = new QString(pm);
#else
*lDateSep = QLatin1Char('-');
*lTimeSep = QLatin1Char(':');
@@ -1262,7 +1244,7 @@ Q3DateEdit::Order Q3DateEdit::order() const
}
-/*! \reimp
+/*! \internal
*/
void Q3DateEdit::stepUp()
@@ -1294,7 +1276,7 @@ void Q3DateEdit::stepUp()
-/*! \reimp
+/*! \internal
*/
@@ -1458,7 +1440,7 @@ bool Q3DateEdit::outOfRange(int y, int m, int d) const
return false; /* assume ok */
}
-/*! \reimp
+/*! \internal
*/
@@ -1552,7 +1534,7 @@ void Q3DateEdit::addNumber(int sec, int num)
}
-/*! \reimp
+/*! \internal
*/
@@ -1699,7 +1681,7 @@ void Q3DateEdit::removeFirstNumber(int sec)
d->ed->repaint(d->ed->rect());
}
-/*! \reimp
+/*! \internal
*/
@@ -2077,7 +2059,7 @@ void Q3TimeEdit::timerEvent(QTimerEvent *)
}
-/*! \reimp
+/*! \internal
*/
@@ -2123,7 +2105,7 @@ void Q3TimeEdit::stepUp()
}
-/*! \reimp
+/*! \internal
*/
@@ -2191,7 +2173,7 @@ QString Q3TimeEdit::sectionFormattedText(int sec)
}
-/*! \reimp
+/*! \internal
*/
@@ -2326,7 +2308,7 @@ bool Q3TimeEdit::outOfRange(int h, int m, int s) const
return true;
}
-/*! \reimp
+/*! \internal
*/
@@ -2495,7 +2477,7 @@ void Q3TimeEdit::removeFirstNumber(int sec)
d->ed->repaint(d->ed->rect());
}
-/*! \reimp
+/*! \internal
*/
void Q3TimeEdit::removeLastNumber(int sec)
@@ -2666,13 +2648,12 @@ Q3DateTimeEdit::~Q3DateTimeEdit()
}
-/*!
+/*! \fn void Q3DateTimeEdit::resizeEvent(QResizeEvent *event)
\reimp
- Intercepts and handles resize events which have special meaning
- for the Q3DateTimeEdit.
+ Intercepts and handles the resize \a event, which hase a
+ special meaning for the Q3DateTimeEdit.
*/
-
void Q3DateTimeEdit::resizeEvent(QResizeEvent *)
{
int dw = de->sizeHint().width();