Browse Source

Use QString::localeAwareCompare for comparsion

adaptive-webui-19844
Chocobo1 9 years ago
parent
commit
b4bdfa7b2b
  1. 2
      src/gui/search/searchwidget.cpp

2
src/gui/search/searchwidget.cpp

@ -129,7 +129,7 @@ void SearchWidget::fillCatCombobox() @@ -129,7 +129,7 @@ void SearchWidget::fillCatCombobox()
QList<QStrPair> tmpList;
foreach (const QString &cat, m_searchEngine->supportedCategories())
tmpList << qMakePair(SearchEngine::categoryFullName(cat), cat);
std::sort(tmpList.begin(), tmpList.end(), [](const QStrPair &l, const QStrPair &r) { return (l.first < r.first); } );
std::sort(tmpList.begin(), tmpList.end(), [](const QStrPair &l, const QStrPair &r) { return (QString::localeAwareCompare(l.first, r.first) < 0); });
foreach (const QStrPair &p, tmpList) {
qDebug("Supported category: %s", qPrintable(p.second));

Loading…
Cancel
Save