X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fnetworkevent.h;h=878b06460b1b3f8a810786404b0c3529543e8489;hp=39f71e452380044909e2d543dc891b2bf2d8f26b;hb=e8a39b4c3c92e193ab861a3fea84a261bb6fbd24;hpb=0a43227b8cd44625f4881cc1545d42c8c8a4876c diff --git a/src/common/networkevent.h b/src/common/networkevent.h index 39f71e45..878b0646 100644 --- a/src/common/networkevent.h +++ b/src/common/networkevent.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,8 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef NETWORKEVENT_H -#define NETWORKEVENT_H +#pragma once #include #include @@ -27,7 +26,7 @@ #include "event.h" #include "network.h" -class NetworkEvent : public Event +class COMMON_EXPORT NetworkEvent : public Event { public: explicit NetworkEvent(EventManager::EventType type, Network *network) @@ -42,10 +41,10 @@ public: protected: explicit NetworkEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const; + void toVariantMap(QVariantMap &map) const override; - virtual inline QString className() const { return "NetworkEvent"; } - virtual inline void debugInfo(QDebug &dbg) const { dbg.nospace() << ", net = " << qPrintable(_network->networkName()); } + inline QString className() const override { return "NetworkEvent"; } + inline void debugInfo(QDebug &dbg) const override { dbg.nospace() << ", net = " << qPrintable(_network->networkName()); } private: Network *_network; @@ -54,7 +53,7 @@ private: /*****************************************************************************/ -class NetworkConnectionEvent : public NetworkEvent +class COMMON_EXPORT NetworkConnectionEvent : public NetworkEvent { public: explicit NetworkConnectionEvent(EventManager::EventType type, Network *network, Network::ConnectionState state) @@ -67,10 +66,10 @@ public: protected: explicit NetworkConnectionEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const; + void toVariantMap(QVariantMap &map) const override; - virtual inline QString className() const { return "NetworkConnectionEvent"; } - virtual inline void debugInfo(QDebug &dbg) const + inline QString className() const override { return "NetworkConnectionEvent"; } + inline void debugInfo(QDebug &dbg) const override { NetworkEvent::debugInfo(dbg); dbg.nospace() << ", state = " << qPrintable(QString::number(_state)); @@ -84,7 +83,7 @@ private: }; -class NetworkDataEvent : public NetworkEvent +class COMMON_EXPORT NetworkDataEvent : public NetworkEvent { public: explicit NetworkDataEvent(EventManager::EventType type, Network *network, const QByteArray &data) @@ -97,10 +96,10 @@ public: protected: explicit NetworkDataEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const; + void toVariantMap(QVariantMap &map) const override; - virtual inline QString className() const { return "NetworkDataEvent"; } - virtual inline void debugInfo(QDebug &dbg) const + inline QString className() const override { return "NetworkDataEvent"; } + inline void debugInfo(QDebug &dbg) const override { NetworkEvent::debugInfo(dbg); dbg.nospace() << ", data = " << data(); @@ -114,7 +113,7 @@ private: }; -class NetworkSplitEvent : public NetworkEvent +class COMMON_EXPORT NetworkSplitEvent : public NetworkEvent { public: explicit NetworkSplitEvent(EventManager::EventType type, @@ -134,10 +133,10 @@ public: protected: explicit NetworkSplitEvent(EventManager::EventType type, QVariantMap &map, Network *network); - void toVariantMap(QVariantMap &map) const; + void toVariantMap(QVariantMap &map) const override; - virtual inline QString className() const { return "NetworkSplitEvent"; } - virtual inline void debugInfo(QDebug &dbg) const + inline QString className() const override { return "NetworkSplitEvent"; } + inline void debugInfo(QDebug &dbg) const override { NetworkEvent::debugInfo(dbg); dbg.nospace() << ", channel = " << qPrintable(channel()) @@ -153,6 +152,3 @@ private: friend class NetworkEvent; }; - - -#endif