[LyX/master] Sort colors locale-aware

Juergen Spitzmueller spitz at lyx.org
Thu May 14 13:59:52 UTC 2026


commit b5f346da1a68a89bf9b3a2615222ee8d7a503ece
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Thu May 14 15:59:08 2026 +0200

    Sort colors locale-aware
    
    Otherwise sorting is wrong outside English
---
 src/frontends/qt/qt_helpers.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp
index 14f70f3f31..f84d2ec5a9 100644
--- a/src/frontends/qt/qt_helpers.cpp
+++ b/src/frontends/qt/qt_helpers.cpp
@@ -231,7 +231,8 @@ bool SortLocaleAware(QString const & lhs, QString const & rhs)
 
 bool ColorSorter(ColorCode lhs, ColorCode rhs)
 {
-	return compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
+	return QString::localeAwareCompare(toqstr(lcolor.getGUIName(lhs)),
+					   toqstr(lcolor.getGUIName(rhs))) < 0;
 }
 
 


More information about the lyx-cvs mailing list