Changeset 622 for trunk/src/corelib/tools/qstring.cpp
- Timestamp:
- Mar 3, 2010, 8:54:13 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/tools/qstring.cpp
r567 r622 4632 4632 return 0; 4633 4633 } 4634 #elif defined(Q_OS_OS2) && !defined(QT_NO_TEXTCODEC) 4634 #elif defined(Q_OS_OS2) 4635 extern Q_CORE_EXPORT QString qt_system_locale_name(); // qlocale.cpp 4636 // UniCreateLocaleObject("") creates an "en_US" locale when LANG is not set 4637 // but we want to get the system locale so always use the exact name as 4638 // returned by qt_system_locale_name() (it also takes LANG into account) 4635 4639 #if !defined(QT_NO_THREAD) 4636 4640 static QAtomicPointer<void> localeObj; 4637 4641 if (!localeObj) { 4638 4642 LocaleObject lo = 0; 4639 UniCreateLocaleObject(UNI_UCS_STRING_POINTER, (UniChar *)L"", &lo); 4643 UniCreateLocaleObject(UNI_UCS_STRING_POINTER, 4644 qt_system_locale_name().utf16(), &lo); 4640 4645 if (!localeObj.testAndSetRelaxed(0, lo)) 4641 4646 UniFreeLocaleObject(lo); // we are too late … … 4644 4649 static LocaleObject localeObj = 0; 4645 4650 if (!localeObj) 4646 UniCreateLocaleObject(UNI_UCS_STRING_POINTER, (UniChar *)L"", &localeObj); 4651 UniCreateLocaleObject(UNI_UCS_STRING_POINTER, 4652 qt_system_locale_name().utf16(), &localeObj); 4647 4653 #endif 4648 4654 if (localeObj) {
Note:
See TracChangeset
for help on using the changeset viewer.