Explorar el Código

UI: sort audio sources by name locale aware

Exeldro hace 5 años
padre
commit
792ceb028e
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      UI/item-widget-helpers.hpp

+ 1 - 1
UI/item-widget-helpers.hpp

@@ -34,7 +34,7 @@ void InsertQObjectByName(std::vector<QObjectPtr> &controls, QObjectPtr control)
 {
 {
 	QString name = control->objectName();
 	QString name = control->objectName();
 	auto finder = [name](QObjectPtr elem) {
 	auto finder = [name](QObjectPtr elem) {
-		return elem->objectName() > name;
+		return name.localeAwareCompare(elem->objectName()) < 0;
 	};
 	};
 	auto found_at = std::find_if(controls.begin(), controls.end(), finder);
 	auto found_at = std::find_if(controls.begin(), controls.end(), finder);