X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommon%2Fbufferinfo.cpp;h=2eaa2ed4c3fa17576af7fedf1eaf5cad8106f520;hb=42ab7cc22c4702716db2b8bfa1d4545169f772e6;hp=ae569efaad3f65db48c2aa1c478b524f451ab896;hpb=5b686746c880e5cda6d5de3e08180ea4332ff222;p=quassel.git diff --git a/src/common/bufferinfo.cpp b/src/common/bufferinfo.cpp index ae569efa..2eaa2ed4 100644 --- a/src/common/bufferinfo.cpp +++ b/src/common/bufferinfo.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2012 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -22,6 +22,7 @@ #include #include #include +#include #include "bufferinfo.h" @@ -30,8 +31,6 @@ BufferInfo::BufferInfo() : _bufferId(0), _netid(0), - _type(InvalidBuffer), - _groupId(0), _bufferName(QString()) { } @@ -42,7 +41,7 @@ BufferInfo::BufferInfo(BufferId id, NetworkId networkid, Type type, uint gid, Q _netid(networkid), _type(type), _groupId(gid), - _bufferName(buf) + _bufferName(std::move(buf)) { } @@ -62,6 +61,14 @@ QString BufferInfo::bufferName() const } +bool BufferInfo::acceptsRegularMessages() const +{ + if(_type == StatusBuffer || _type == InvalidBuffer) + return false; + return true; +} + + QDebug operator<<(QDebug dbg, const BufferInfo &b) { dbg.nospace() << "(bufId: " << b.bufferId() << ", netId: " << b.networkId() << ", groupId: " << b.groupId() << ", buf: " << b.bufferName() << ")";