From cf5429a39bff1386868b1578dd863f319e6ae089 Mon Sep 17 00:00:00 2001 From: Jonathan White Date: Sat, 5 Mar 2022 12:00:11 -0500 Subject: [PATCH] Allow colon in tags and sort alphabetically * Fix #7489 - allow colon and period in tag names * Fix #7490 - sort tags alphabetically --- src/core/Entry.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/Entry.cpp b/src/core/Entry.cpp index c79207150..f0b6fc4cd 100644 --- a/src/core/Entry.cpp +++ b/src/core/Entry.cpp @@ -192,8 +192,10 @@ QString Entry::tags() const QStringList Entry::tagList() const { - static QRegExp rx("(\\ |\\,|\\.|\\:|\\t|\\;)"); - return tags().split(rx, QString::SkipEmptyParts); + static QRegExp rx("(\\ |\\,|\\t|\\;)"); + auto taglist = tags().split(rx, QString::SkipEmptyParts); + std::sort(taglist.begin(), taglist.end()); + return taglist; } const TimeInfo& Entry::timeInfo() const