- Timestamp:
- Nov 23, 2009, 1:22:05 AM (16 years ago)
- Location:
- trunk/src/corelib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/corelib/codecs/qtextcodec.cpp
r135 r340 743 743 } 744 744 745 static bool codecForLocaleSet = false; 746 void qt_resetCodecForLocale() 747 { 748 // if QTextCodec::codecForLocale() was called, we assume that the user has 749 // explicitly set the codec he wants for the locale and don't attempt to 750 // autodetect it again 751 if (!codecForLocaleSet) 752 setupLocaleMapper(); 753 } 754 745 755 /*! 746 756 \class QTextCodec … … 1064 1074 return; 1065 1075 #endif 1076 codecForLocaleSet = true; 1066 1077 localeMapper = c; 1067 1078 if (!localeMapper) -
trunk/src/corelib/kernel/qcoreapplication.cpp
r68 r340 497 497 d->appendApplicationPathToLibraryPaths(); 498 498 } 499 // QCoreApplication is most likely constructed after static QFactroyLoader 500 // instances (such as the one for QTextCodecFactoryInterface_iid). Hence, we 501 // need to inform these instances that we have added new paths. 502 QFactoryLoader::refreshAll(); 503 #ifndef QT_NO_TEXTCODECPLUGIN 504 // libaryPaths() calls QTextCodec::codecForLocale() before it adds the 505 // appiication path to the library path. As a result, if this path contains 506 // a plugin for the codec requested in LANG, this request will be ignored 507 // because the locale would have been already set by codecForLocale() 508 // Request codec auto-detection again. 509 extern void qt_resetCodecForLocale(); // qtextcodec.cpp 510 qt_resetCodecForLocale(); 511 #endif 499 512 #endif 500 513
Note:
See TracChangeset
for help on using the changeset viewer.