From 6a484c615ae3f04873fe41a415277ef6c2c37573 Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 17 Dec 2020 15:43:37 +0100 Subject: WIP --- taglistmodel.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'taglistmodel.cpp') 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() -- cgit