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

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

HasInvitation must be unique

(cherry picked from commit 21f4d2b904276bed449be89bbd8f877f2ea9e471)

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/3b7248a89d0cf199223e32b9e27e654ce41e01ed

diff --git a/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp b/messagelist/src/core/widgets/autotests/searchlinecommandtest.cpp
index a82388f6e..2c7f55478 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.