refactored EnumFlags

This commit is contained in:
fourtf
2018-08-07 07:55:31 +02:00
parent bfa75330a4
commit 381177dd24
24 changed files with 422 additions and 394 deletions
+18 -17
View File
@@ -12,27 +12,28 @@
namespace chatterino {
struct Message : boost::noncopyable {
enum MessageFlags : uint16_t {
None = 0,
System = (1 << 0),
Timeout = (1 << 1),
Highlighted = (1 << 2),
DoNotTriggerNotification = (1 << 3), // disable notification sound
Centered = (1 << 4),
Disabled = (1 << 5),
DisableCompactEmotes = (1 << 6),
Collapsed = (1 << 7),
DisconnectedMessage = (1 << 8),
Untimeout = (1 << 9),
PubSub = (1 << 10),
Subscription = (1 << 11),
};
enum class MessageFlag : uint16_t {
None = 0,
System = (1 << 0),
Timeout = (1 << 1),
Highlighted = (1 << 2),
DoNotTriggerNotification = (1 << 3), // disable notification sound
Centered = (1 << 4),
Disabled = (1 << 5),
DisableCompactEmotes = (1 << 6),
Collapsed = (1 << 7),
DisconnectedMessage = (1 << 8),
Untimeout = (1 << 9),
PubSub = (1 << 10),
Subscription = (1 << 11),
};
using MessageFlags = FlagsEnum<MessageFlag>;
struct Message : boost::noncopyable {
Message();
~Message();
FlagsEnum<MessageFlags> flags;
MessageFlags flags;
QTime parseTime;
QString id;
QString searchText;