X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fctcpevent.h;h=f9d7f4375a91ebb02629be80819f0a1611aacfa8;hb=98144aaad0cd747f186edcd0e36a1d67326ac766;hp=4365ae86092ce78fc31b10c73ef33761ffd99a13;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c;p=quassel.git diff --git a/src/common/ctcpevent.h b/src/common/ctcpevent.h index 4365ae86..f9d7f437 100644 --- a/src/common/ctcpevent.h +++ b/src/common/ctcpevent.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 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 * @@ -18,14 +18,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef CTCPEVENT_H -#define CTCPEVENT_H +#pragma once + +#include "common-export.h" #include "ircevent.h" #include +#include -class CtcpEvent : public IrcEvent +class COMMON_EXPORT CtcpEvent : public IrcEvent { public: enum CtcpType { @@ -33,14 +35,14 @@ public: Reply }; - explicit CtcpEvent(EventManager::EventType type, Network *network, const QString &prefix, const QString &target, - CtcpType ctcpType, const QString &ctcpCmd, const QString ¶m, + explicit CtcpEvent(EventManager::EventType type, Network *network, const QString &prefix, QString target, + CtcpType ctcpType, QString ctcpCmd, QString param, const QDateTime ×tamp = QDateTime(), const QUuid &uuid = QUuid()) : IrcEvent(type, network, prefix), _ctcpType(ctcpType), - _ctcpCmd(ctcpCmd), - _target(target), - _param(param), + _ctcpCmd(std::move(ctcpCmd)), + _target(std::move(target)), + _param(std::move(param)), _uuid(uuid) { setTimestamp(timestamp); @@ -69,10 +71,10 @@ public: protected: explicit CtcpEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const; + void toVariantMap(QVariantMap &map) const override; - virtual inline QString className() const { return "CtcpEvent"; } - virtual inline void debugInfo(QDebug &dbg) const + inline QString className() const override { return "CtcpEvent"; } + inline void debugInfo(QDebug &dbg) const override { NetworkEvent::debugInfo(dbg); dbg << ", prefix = " << qPrintable(prefix()) @@ -90,6 +92,3 @@ private: QString _target, _param, _reply; QUuid _uuid; }; - - -#endif