Switch bitwise operator in message from &= to |=

Flags still don't work for me properly, probably due to EnumFlags not
being fully implemented
This commit is contained in:
Rasmus Karlsson 2018-01-28 14:24:37 +01:00
parent 2f0844ebd9
commit 88586b53b7

View file

@ -31,10 +31,10 @@ MessagePtr Message::createSystemMessage(const QString &text)
message->addElement(new TimestampElement(QTime::currentTime())); message->addElement(new TimestampElement(QTime::currentTime()));
message->addElement(new TextElement(text, MessageElement::Text, MessageColor::System)); message->addElement(new TextElement(text, MessageElement::Text, MessageColor::System));
message->flags &= Message::System; message->flags |= MessageFlags::System;
message->searchText = text; message->searchText = text;
return MessagePtr(message); return message;
} }
MessagePtr Message::createTimeoutMessage(const QString &username, const QString &durationInSeconds, 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); MessagePtr message = Message::createSystemMessage(text);
message->flags &= Message::Timeout; message->flags |= MessageFlags::System;
message->timeoutUser = username; message->timeoutUser = username;
return message; return message;
} }