summaryrefslogtreecommitdiffstats
path: root/gui/groupview/GroupView.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-11-10 08:51:24 +0100
committerPetr Mrázek <peterix@gmail.com>2014-11-10 08:51:24 +0100
commit5711b1be95a826daf0e11b64bec04c4b0d2ea5ef (patch)
tree8141716398aab297f6e319ec1006d89a391ff87e /gui/groupview/GroupView.cpp
parent90eea4f05c4fac56d91d7c2d2a36db3873a1af20 (diff)
downloadMultiMC-5711b1be95a826daf0e11b64bec04c4b0d2ea5ef.tar
MultiMC-5711b1be95a826daf0e11b64bec04c4b0d2ea5ef.tar.gz
MultiMC-5711b1be95a826daf0e11b64bec04c4b0d2ea5ef.tar.lz
MultiMC-5711b1be95a826daf0e11b64bec04c4b0d2ea5ef.tar.xz
MultiMC-5711b1be95a826daf0e11b64bec04c4b0d2ea5ef.zip
'Fix' instance group sorting
Diffstat (limited to 'gui/groupview/GroupView.cpp')
-rw-r--r--gui/groupview/GroupView.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/gui/groupview/GroupView.cpp b/gui/groupview/GroupView.cpp
index 31d242dd..502cf259 100644
--- a/gui/groupview/GroupView.cpp
+++ b/gui/groupview/GroupView.cpp
@@ -62,12 +62,28 @@ void GroupView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int e
scheduleDelayedItemsLayout();
}
+class LocaleString : public QString
+{
+public:
+ LocaleString(const char *s) : QString(s)
+ {
+ }
+ LocaleString(const QString &s) : QString(s)
+ {
+ }
+};
+
+inline bool operator<(const LocaleString &lhs, const LocaleString &rhs)
+{
+ return (QString::localeAwareCompare(lhs, rhs) < 0);
+}
+
void GroupView::updateGeometries()
{
geometryCache.clear();
int previousScroll = verticalScrollBar()->value();
- QMap<QString, VisualGroup *> cats;
+ QMap<LocaleString, VisualGroup *> cats;
for (int i = 0; i < model()->rowCount(); ++i)
{