Mercurial > octave
changeset 29056:dbf8a7f16c4e
maint: merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Thu, 12 Nov 2020 18:28:49 +0100 |
parents | 226df400639c (current diff) 8f07c47242b8 (diff) |
children | 450920c987b8 |
files | libgui/src/resource-manager.cc |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/resource-manager.cc Thu Nov 12 02:02:39 2020 -0500 +++ b/libgui/src/resource-manager.cc Thu Nov 12 18:28:49 2020 +0100 @@ -519,8 +519,10 @@ // FIXME: The default is "SYSTEM" on all platforms. So can this fallback // logic be removed completely? bool default_exists = false; - if (QTextCodec::codecForName (ed_default_enc.def.toString ().toLatin1 ()) - || (ed_default_enc.def.toString ().startsWith ("SYSTEM"))) + bool show_system = false; + if (ed_default_enc.def.toString ().startsWith ("SYSTEM")) + show_system = true; + else if (QTextCodec::codecForName (ed_default_enc.def.toString ().toLatin1 ())) default_exists = true; QString default_enc = @@ -546,10 +548,10 @@ // prepend the default item combo->insertSeparator (0); - if (default_exists) + if (show_system) + combo->insertItem (0, default_enc); + else combo->insertItem (0, ed_default_enc.def.toString ()); - else - combo->insertItem (0, default_enc); // select the default or the current one int idx = combo->findText (enc, Qt::MatchExactly);