X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fmessagefilter.h;h=61091f144f9c7731dc1deb9e8a561583c13e4ffb;hp=5354feb03588cd3da02b6f9e5d65dec4cf445686;hb=03f61d2ab68356bd74f6f014651c823e79678cbd;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce diff --git a/src/client/messagefilter.h b/src/client/messagefilter.h index 5354feb0..61091f14 100644 --- a/src/client/messagefilter.h +++ b/src/client/messagefilter.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 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 * @@ -15,13 +15,14 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef MESSAGEFILTER_H_ #define MESSAGEFILTER_H_ #include +#include #include "bufferinfo.h" #include "client.h" @@ -39,12 +40,14 @@ protected: public: MessageFilter(MessageModel *, const QList &buffers = QList(), QObject *parent = 0); - virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; virtual QString idString() const; - inline bool isSingleBufferFilter() const { return _validBuffers.count() == 1; } + + bool isSingleBufferFilter() const { return _validBuffers.count() == 1; } BufferId singleBufferId() const { return *(_validBuffers.constBegin()); } - inline bool containsBuffer(const BufferId &id) const { return _validBuffers.contains(id); } - inline QSet containedBuffers() const { return _validBuffers; } + bool containsBuffer(const BufferId &id) const { return _validBuffers.contains(id); } + QSet containedBuffers() const { return _validBuffers; } + + bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; public slots: void messageTypeFilterChanged(); @@ -62,7 +65,7 @@ private: void init(); QSet _validBuffers; - QMultiHash _filteredQuitMsgs; + std::set _filteredQuitMsgTime; ///< Timestamps (ms) of already forwarded quit messages int _messageTypeFilter; int _userNoticesTarget;