+QString EventManager::enumName(EventType type) const {
+ return eventEnum().valueToKey(type);
+}
+
+/* NOTE:
+ Registering and calling handlers works fine even if they specify a subclass of Event as their parameter.
+ However, this most probably is a result from a reinterpret_cast somewhere deep inside Qt, so there is *no*
+ type safety. If the event sent is of the wrong class type, you'll get a neat segfault!
+ Thus, we need to make sure that events are of the correct class type when sending!
+
+ We might add a registration-time check later, which will require matching the enum base name (e.g. "IrcEvent") with
+ the type the handler claims to support. This still won't protect us from someone sending an IrcEvent object
+ with an enum type "NetworkIncoming", for example.
+
+ Another way would be to add a check into the various Event subclasses, such that the ctor matches the given event type
+ with the actual class. Possibly (optionally) using rtti...
+*/
+
+void EventManager::registerObject(QObject *object, Priority priority, const QString &methodPrefix) {