From 88586b53b73675da3cb3d5a6288b7ba11365507a Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 28 Jan 2018 14:24:37 +0100 Subject: [PATCH] Switch bitwise operator in message from &= to |= Flags still don't work for me properly, probably due to EnumFlags not being fully implemented --- src/messages/message.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/messages/message.cpp b/src/messages/message.cpp index 2e95b6fad..f3ebd5b44 100644 --- a/src/messages/message.cpp +++ b/src/messages/message.cpp @@ -31,10 +31,10 @@ MessagePtr Message::createSystemMessage(const QString &text) message->addElement(new TimestampElement(QTime::currentTime())); message->addElement(new TextElement(text, MessageElement::Text, MessageColor::System)); - message->flags &= Message::System; + message->flags |= MessageFlags::System; message->searchText = text; - return MessagePtr(message); + return message; } MessagePtr Message::createTimeoutMessage(const QString &username, const QString &durationInSeconds, @@ -72,7 +72,7 @@ MessagePtr Message::createTimeoutMessage(const QString &username, const QString } MessagePtr message = Message::createSystemMessage(text); - message->flags &= Message::Timeout; + message->flags |= MessageFlags::System; message->timeoutUser = username; return message; }