static QTextCodec *localeMapper = Q_NULLPTR;
QTextCodec *QTextCodec::cftr = Q_NULLPTR;
#ifndef QT_NO_THREAD
-Q_GLOBAL_STATIC_WITH_ARGS(QMutex, textCodecsMutex, (QMutex::Recursive))
+Q_GLOBAL_STATIC(QMutex, textCodecsMutex)
#endif
class QTextCodecCleanup : public QList<QTextCodec*>
foreach(const QByteArray &codec, QIcuCodec::allCodecs()) {
if (nameMatch(name, codec)) {
+ locker.unlock();
return new QIcuCodec(name);
}
}
foreach(const int codec, QIcuCodec::allMibs()) {
if (mib == codec) {
+ locker.unlock();
return new QIcuCodec(mib);
}
}
*/
void QTextCodec::setCodecForLocale(QTextCodec *c)
{
-#ifndef QT_NO_THREAD
- QMutexLocker locker(textCodecsMutex());
-#endif
localeMapper = c;
if (!localeMapper)
setupLocaleMapper();
QTextCodec* QTextCodec::codecForLocale()
{
-#ifndef QT_NO_THREAD
- QMutexLocker locker(textCodecsMutex());
-#endif
if (!localeMapper)
setupLocaleMapper();