X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmessageevent.h;h=f8d636fd08730306de3e454393bae3a42edbe455;hp=7e6df2667d80fc0d6ce3593cd51db5194a69c76e;hb=1f21c1f9613031ae263eeed0c4883bfcd5488343;hpb=3a3e844f9fcfd12235a0086af75ecd503b621ef4 diff --git a/src/common/messageevent.h b/src/common/messageevent.h index 7e6df266..f8d636fd 100644 --- a/src/common/messageevent.h +++ b/src/common/messageevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,13 +32,12 @@ class COMMON_EXPORT MessageEvent : public NetworkEvent { public: explicit MessageEvent(Message::Type msgType, - Network *network, - QString msg, - const QString &sender = QString(), - QString target = QString(), - Message::Flags msgFlags = Message::None, - const QDateTime ×tamp = QDateTime() - ); + Network* network, + QString msg, + QString sender = {}, + QString target = {}, + Message::Flags msgFlags = Message::None, + const QDateTime& timestamp = {}); inline Message::Type msgType() const { return _msgType; } inline void setMsgType(Message::Type type) { _msgType = type; } @@ -54,14 +53,14 @@ public: inline void setMsgFlag(Message::Flag flag) { _msgFlags |= flag; } inline void setMsgFlags(Message::Flags flags) { _msgFlags = flags; } - static Event *create(EventManager::EventType type, QVariantMap &map, Network *network); + static Event* create(EventManager::EventType type, QVariantMap& map, Network* network); protected: - explicit MessageEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const override; + explicit MessageEvent(EventManager::EventType type, QVariantMap& map, Network* network); + void toVariantMap(QVariantMap& map) const override; inline QString className() const override { return "MessageEvent"; } - inline void debugInfo(QDebug &dbg) const override + inline void debugInfo(QDebug& dbg) const override { NetworkEvent::debugInfo(dbg); dbg.nospace() << ", sender = " << qPrintable(sender()) @@ -72,9 +71,8 @@ protected: << ", msgflags = " << qPrintable(QString::number(msgFlags(), 16)); } - private: - BufferInfo::Type bufferTypeByTarget(const QString &target) const; + BufferInfo::Type bufferTypeByTarget(const QString& target) const; Message::Type _msgType; BufferInfo::Type _bufferType;