[pim/messagelib] messagelist/src/core/widgets: HasInvitation must be unique

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 21f4d2b904276bed449be89bbd8f877f2ea9e471 by Laurent Montel.
Committed on 06/08/2026 at 19:48.
Pushed by mlaurent into branch 'master'.

HasInvitation must be unique

M  +5    -0    messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp
M  +1    -1    messagelist/src/core/widgets/searchlinecommand.cpp

https://invent.kde.org/pim/messagelib/-/commit/21f4d2b904276bed449be89bbd8f877f2ea9e471

diff --git a/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp b/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp
index 193d16818..744965f4a 100644
--- a/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp
+++ b/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp
@@ -506,6 +506,11 @@ void SearchLineCommandTest::mustBeUnique()
         info.type = MessageList::Core::SearchLineCommand::HasAttachment;
         QVERIFY(info.mustBeUnique());
     }
+    {
+        MessageList::Core::SearchLineCommand::SearchLineInfo info;
+        info.type = MessageList::Core::SearchLineCommand::HasInvitation;
+        QVERIFY(info.mustBeUnique());
+    }
     {
         MessageList::Core::SearchLineCommand::SearchLineInfo info;
         info.type = MessageList::Core::SearchLineCommand::Cc;
diff --git a/messagelist/src/core/widgets/searchlinecommand.cpp b/messagelist/src/core/widgets/searchlinecommand.cpp
index 02c288543..f4a013922 100644
--- a/messagelist/src/core/widgets/searchlinecommand.cpp
+++ b/messagelist/src/core/widgets/searchlinecommand.cpp
@@ -65,7 +65,7 @@ bool SearchLineCommand::mustBeUnique(SearchLineType type)
 {
     return type == HasAttachment || type == IsImportant || type == IsRead || type == IsUnRead || type == IsIgnored || type == IsHam || type == IsSpam
         || type == IsWatched || type == IsReplied || type == IsForwarded || type == IsEncrypted || type == IsQueued || type == IsSent || type == IsDeleted
-        || type == IsAction;
+        || type == IsAction || type == HasInvitation;
 }
 
 bool SearchLineCommand::isEmpty() const
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.