Changeset 635


Ignore:
Timestamp:
Mar 5, 2010, 12:31:57 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

general: QLocale: Fixed broken tools builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/corelib/tools/qlocale.cpp

    r623 r635  
    372372static uint default_number_options = 0;
    373373
    374 #ifndef QT_NO_SYSTEMLOCALE
    375374static QByteArray envVarLocale()
    376375{
    377     static QByteArray lang = 0;
    378 #ifdef Q_OS_UNIX
     376    ;
     377#if
    379378    lang = qgetenv("LC_ALL");
     379
    380380    if (lang.isNull())
    381381        lang = qgetenv("LC_NUMERIC");
     382
    382383    if (lang.isNull())
    383384#endif
     
    386387}
    387388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
    388414
    389415#if defined(Q_OS_WIN)
     
    944970** Wrappers for OS/2 locale system functions
    945971*/
    946 
    947 Q_CORE_EXPORT QString qt_system_locale_name()
    948 {
    949     QString locale = QString::fromLatin1(envVarLocale());
    950     if (locale.isEmpty()) {
    951         // get the locale from the system country code
    952         COUNTRYCODE code = { 0, 0 };
    953         COUNTRYINFO info;
    954         ULONG actual;
    955         APIRET arc = DosQueryCtryInfo(sizeof(info), &code, &info, &actual);
    956         if (arc == NO_ERROR) {
    957             UniChar localeName[8];
    958             if (UniMapCtryToLocale(info.country, localeName,
    959                                    sizeof(localeName)) == ULS_SUCCESS)
    960                 locale = QString::fromUtf16(localeName);
    961         }
    962     }
    963 
    964     return locale;
    965 }
    966972
    967973/*!
Note: See TracChangeset for help on using the changeset viewer.