diff options
author | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-12-17 15:43:37 +0100 |
---|---|---|
committer | jaseg <git-bigdata-wsl-arch@jaseg.de> | 2020-12-17 15:43:37 +0100 |
commit | 6a484c615ae3f04873fe41a415277ef6c2c37573 (patch) | |
tree | b2f429eb1baf703463821624691921e1426b7361 /taglistmodel.cpp | |
parent | c6713d0876ce2d99f912151c9884477606909681 (diff) | |
download | numberator-master.tar.gz numberator-master.tar.bz2 numberator-master.zip |
Diffstat (limited to 'taglistmodel.cpp')
-rw-r--r-- | taglistmodel.cpp | 20 |
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()
|