Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/qt3support/widgets/q3datetimeedit.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the Qt3Support module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    115115
    116116#if defined(Q_WS_WIN)
    117     QT_WA({
    118         TCHAR data[10];
    119         GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
    120         *lDateSep = QString::fromUtf16((ushort*)data);
    121         GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
    122         *lTimeSep = QString::fromUtf16((ushort*)data);
    123         GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
    124         lAMPM = QString::fromUtf16((ushort*)data).toInt()==0;
    125         GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
    126         QString am = QString::fromUtf16((ushort*)data);
    127         if (!am.isEmpty())
    128             lAM = new QString(am);
    129         GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
    130         QString pm = QString::fromUtf16((ushort*)data);
    131         if (!pm.isEmpty() )
    132             lPM = new QString(pm);
    133     } , {
    134         char data[10];
    135         GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_SDATE, (char*)&data, 10);
    136         *lDateSep = QString::fromLocal8Bit(data);
    137         GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_STIME, (char*)&data, 10);
    138         *lTimeSep = QString::fromLocal8Bit(data);
    139         GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_ITIME, (char*)&data, 10);
    140         lAMPM = QString::fromLocal8Bit(data).toInt()==0;
    141         GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S1159, (char*)&data, 10);
    142         QString am = QString::fromLocal8Bit(data);
    143         if (!am.isEmpty())
    144             lAM = new QString(am);
    145         GetLocaleInfoA(LOCALE_USER_DEFAULT, LOCALE_S2359, (char*)&data, 10);
    146         QString pm = QString::fromLocal8Bit(data);
    147         if (!pm.isEmpty())
    148             lPM = new QString(pm);
    149     });
     117    wchar_t data[10];
     118    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDATE, data, 10);
     119    *lDateSep = QString::fromWCharArray(data);
     120    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STIME, data, 10);
     121    *lTimeSep = QString::fromWCharArray(data);
     122    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_ITIME, data, 10);
     123    lAMPM = QString::fromWCharArray(data).toInt() == 0;
     124    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S1159, data, 10);
     125    QString am = QString::fromWCharArray(data);
     126    if (!am.isEmpty())
     127        lAM = new QString(am);
     128    GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_S2359, data, 10);
     129    QString pm = QString::fromWCharArray(data);
     130    if (!pm.isEmpty() )
     131        lPM = new QString(pm);
    150132#else
    151133    *lDateSep = QLatin1Char('-');
     
    12631245
    12641246
    1265 /*! \reimp
     1247/*! \
    12661248
    12671249*/
     
    12951277
    12961278
    1297 /*! \reimp
     1279/*! \
    12981280
    12991281*/
     
    14591441}
    14601442
    1461 /*!  \reimp
     1443/*!  \
    14621444
    14631445*/
     
    15531535
    15541536
    1555 /*! \reimp
     1537/*! \
    15561538
    15571539*/
     
    17001682}
    17011683
    1702 /*! \reimp
     1684/*! \
    17031685
    17041686*/
     
    20782060
    20792061
    2080 /*! \reimp
     2062/*! \
    20812063
    20822064*/
     
    21242106
    21252107
    2126 /*! \reimp
     2108/*! \
    21272109
    21282110*/
     
    21922174
    21932175
    2194 /*! \reimp
     2176/*! \
    21952177
    21962178*/
     
    23272309}
    23282310
    2329 /*! \reimp
     2311/*! \
    23302312
    23312313*/
     
    24962478}
    24972479
    2498 /*! \reimp
     2480/*! \
    24992481
    25002482*/
     
    26672649
    26682650
    2669 /*!
     2651/*!
    26702652    \reimp
    26712653
    2672     Intercepts and handles resize events which have special meaning
    2673     for the Q3DateTimeEdit.
    2674 */
    2675 
     2654    Intercepts and handles the resize \a event, which hase a
     2655    special meaning for the Q3DateTimeEdit.
     2656*/
    26762657void Q3DateTimeEdit::resizeEvent(QResizeEvent *)
    26772658{
Note: See TracChangeset for help on using the changeset viewer.