diff libgui/src/m-editor/file-editor-tab.cc @ 27272:9de4741a896e

Do not ignore user preferences for locale encoding on non-Windows platforms. * gui-preferences.h, resource-manager.cc (do_combo_encoding), file-editor-tab.cc (file_editor_tab), input.cc (input_system, mfile_encoding): Remove special case for non-Windows platforms.
author Markus Mützel <markus.muetzel@gmx.de>
date Sun, 21 Jul 2019 12:43:19 +0200
parents a4416cd6bb4f
children 7455523fdf01
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc	Sun Jul 21 12:16:09 2019 +0200
+++ b/libgui/src/m-editor/file-editor-tab.cc	Sun Jul 21 12:43:19 2019 +0200
@@ -231,15 +231,10 @@
     setFocusProxy (_edit_area);
 
     // encoding, not updated with the settings
-#if defined (Q_OS_WIN32)
     QString locale_enc_name =
       QTextCodec::codecForLocale ()->name ().toUpper ().prepend ("SYSTEM (").append (")");
     _encoding = settings->value ("editor/default_encoding", locale_enc_name)
                 .toString ();
-#else
-    _encoding = settings->value ("editor/default_encoding", "UTF-8")
-                .toString ();
-#endif
     _enc_indicator->setText (_encoding);
     // no changes in encoding yet
     _new_encoding = _encoding;
@@ -2414,7 +2409,7 @@
   {
     QTextCodec *codec = QTextCodec::codecForName (_encoding.toLatin1 ());
 
-    // "SYSTEM" is used as alias for the locale encoding on Windows systems.
+    // "SYSTEM" is used as alias for the locale encoding.
     if ((! codec) && _encoding.startsWith("SYSTEM"))
       codec = QTextCodec::codecForLocale ();