summaryrefslogtreecommitdiff
path: root/taglistmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'taglistmodel.cpp')
-rw-r--r--taglistmodel.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/taglistmodel.cpp b/taglistmodel.cpp
index 435f5f1..9cf4fb7 100644
--- a/taglistmodel.cpp
+++ b/taglistmodel.cpp
@@ -24,9 +24,25 @@ bool collateTagNames(QString a, QString b) {
if (res_a.captured(1).isEmpty() && !res_b.captured(1).isEmpty())
return true;
- if (res_a.captured().toInt() < res_b.captured().toInt())
+ if (res_a.captured(1).toInt() < res_b.captured(1).toInt())
return true;
- /* FIXME TODO */
+
+ if (res_a.captured(1) != res_b.captured(1))
+ return false;
+
+ if (res_a.captured(2) < res_b.captured(2))
+ return true;
+
+ if (res_a.captured(2) != res_b.captured(2))
+ return false;
+
+ if (res_a.captured(3).isEmpty() && !res_b.captured(3).isEmpty())
+ return true;
+
+ if (res_a.captured(3).toInt() < res_b.captured(3).toInt())
+ return true;
+
+ return false;
}
void TagListModel::reloadTags()