OSDN Git Service

effectively revert 215ced5fb8d4fef90c789f67b3581a1b4e72544d
authorIvailo Monev <xakepa10@laimg.moc>
Mon, 12 Aug 2019 23:11:42 +0000 (23:11 +0000)
committerIvailo Monev <xakepa10@laimg.moc>
Mon, 12 Aug 2019 23:11:42 +0000 (23:11 +0000)
Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
src/core/codecs/qtextcodec.cpp

index c66be61..148806e 100644 (file)
@@ -311,6 +311,11 @@ static QTextCodec *checkForCodec(const QByteArray &name) {
 */
 static void setupLocaleMapper()
 {
+
+#ifndef QT_NO_ICONV
+    localeMapper = QTextCodec::codecForName("System");
+#endif
+
 #if defined (_XOPEN_UNIX) && !defined(Q_OS_OSF)
     if (!localeMapper) {
         char *charset = nl_langinfo (CODESET);
@@ -416,10 +421,6 @@ static void setupLocaleMapper()
 
     }
 
-#ifndef QT_NO_ICONV
-    if (!localeMapper)
-        localeMapper = QTextCodec::codecForName("System");
-#endif
     // If everything failed, we default to 8859-1
     // We could perhaps default to 8859-15.
     if (!localeMapper)