X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Feventmanager.h;h=6eab19de3168d926fe7971c0a22929037887387c;hp=16b83bc4e5ac0afbf85ccdd3ad4695e22f6801ab;hb=e8a39b4c3c92e193ab861a3fea84a261bb6fbd24;hpb=d3dcda30c8cbee75c0c8f500f4ab552bde513036 diff --git a/src/common/eventmanager.h b/src/common/eventmanager.h index 16b83bc4..6eab19de 100644 --- a/src/common/eventmanager.h +++ b/src/common/eventmanager.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 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,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef EVENTMANAGER_H -#define EVENTMANAGER_H +#pragma once + +#include "common-export.h" #include @@ -28,7 +29,7 @@ class Event; class Network; -class EventManager : public QObject +class COMMON_EXPORT EventManager : public QObject { Q_OBJECT Q_FLAGS(EventFlag EventFlags) @@ -91,6 +92,7 @@ public : IrcEventAccount, IrcEventAway, IrcEventCap, + IrcEventChghost, IrcEventInvite, IrcEventJoin, IrcEventKick, @@ -103,6 +105,7 @@ public : IrcEventPrivmsg, IrcEventQuit, IrcEventTopic, + IrcEventError, /// ERROR message from server IrcEventWallops, IrcEventRawPrivmsg, ///< Undecoded privmsg (still needs CTCP parsing) IrcEventRawNotice, ///< Undecoded notice (still needs CTCP parsing) @@ -119,7 +122,7 @@ public : KeyEvent = 0x00060000 }; - EventManager(QObject *parent = 0); + EventManager(QObject *parent = nullptr); static EventType eventTypeByName(const QString &name); static EventType eventGroupByName(const QString &name); @@ -149,7 +152,7 @@ public slots: protected: virtual Network *networkById(NetworkId id) const = 0; - virtual void customEvent(QEvent *event); + void customEvent(QEvent *event) override; private: struct Handler { @@ -157,7 +160,7 @@ private: int methodIndex; Priority priority; - explicit Handler(QObject *obj = 0, int method = 0, Priority prio = NormalPriority) + explicit Handler(QObject *obj = nullptr, int method = 0, Priority prio = NormalPriority) { object = obj; methodIndex = method; @@ -193,6 +196,4 @@ private: }; -Q_DECLARE_OPERATORS_FOR_FLAGS(EventManager::EventFlags); - -#endif +Q_DECLARE_OPERATORS_FOR_FLAGS(EventManager::EventFlags)