modernize: Use override instead of virtual
[quassel.git] / src / common / ircevent.h
index 881fd93..c3611e4 100644 (file)
@@ -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  *
  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
  ***************************************************************************/
 
-#ifndef IRCEVENT_H
-#define IRCEVENT_H
+#pragma once
+
+#include "common-export.h"
 
 #include "networkevent.h"
 #include "util.h"
 
-class IrcEvent : public NetworkEvent
+class COMMON_EXPORT IrcEvent : public NetworkEvent
 {
 public:
     explicit IrcEvent(EventManager::EventType type, Network *network, const QString &prefix, const QStringList &params = QStringList())
@@ -45,10 +46,10 @@ public:
 
 protected:
     explicit IrcEvent(EventManager::EventType type, QVariantMap &map, Network *network);
-    void toVariantMap(QVariantMap &map) const;
+    void toVariantMap(QVariantMap &map) const override;
 
-    virtual inline QString className() const { return "IrcEvent"; }
-    virtual inline void debugInfo(QDebug &dbg) const
+    inline QString className() const override { return "IrcEvent"; }
+    inline void debugInfo(QDebug &dbg) const override
     {
         NetworkEvent::debugInfo(dbg);
         dbg << ", prefix = " << qPrintable(prefix())
@@ -62,7 +63,7 @@ private:
 };
 
 
-class IrcEventNumeric : public IrcEvent
+class COMMON_EXPORT IrcEventNumeric : public IrcEvent
 {
 public:
     explicit IrcEventNumeric(uint number, Network *network, const QString &prefix, const QString &target, const QStringList &params = QStringList())
@@ -78,10 +79,10 @@ public:
 
 protected:
     explicit IrcEventNumeric(EventManager::EventType type, QVariantMap &map, Network *network);
-    void toVariantMap(QVariantMap &map) const;
+    void toVariantMap(QVariantMap &map) const override;
 
-    virtual inline QString className() const { return "IrcEventNumeric"; }
-    virtual inline void debugInfo(QDebug &dbg) const
+    inline QString className() const override { return "IrcEventNumeric"; }
+    inline void debugInfo(QDebug &dbg) const override
     {
         dbg << ", num = " << number();
         NetworkEvent::debugInfo(dbg);
@@ -99,7 +100,7 @@ private:
 };
 
 
-class IrcEventRawMessage : public IrcEvent
+class COMMON_EXPORT IrcEventRawMessage : public IrcEvent
 {
 public:
     explicit inline IrcEventRawMessage(EventManager::EventType type, Network *network,
@@ -120,10 +121,10 @@ public:
 
 protected:
     explicit IrcEventRawMessage(EventManager::EventType type, QVariantMap &map, Network *network);
-    void toVariantMap(QVariantMap &map) const;
+    void toVariantMap(QVariantMap &map) const override;
 
-    virtual inline QString className() const { return "IrcEventRawMessage"; }
-    virtual inline void debugInfo(QDebug &dbg) const
+    inline QString className() const override { return "IrcEventRawMessage"; }
+    inline void debugInfo(QDebug &dbg) const override
     {
         NetworkEvent::debugInfo(dbg);
         dbg << ", target = " << qPrintable(target())
@@ -137,6 +138,3 @@ private:
 
     friend class IrcEvent;
 };
-
-
-#endif