Introduce event filters
authorManuel Nickschas <sputnick@quassel-irc.org>
Tue, 28 Sep 2010 16:37:14 +0000 (18:37 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Wed, 13 Oct 2010 23:06:32 +0000 (01:06 +0200)
commit5e9a649d94d1832e0b4f3f296e8a2df2d8741d9b
tree2a8ee56e72d570db48939a9721f860921d3b90cd
parentec383094a149ea409686beb7694d06d5b49d048c
Introduce event filters

You can now register event filters, either by using registerObject() and providing methods
starting with "filter" (by default), similar to the process functions, or by using registerEventFilter().

These filter methods take an Event* and return a bool. If false, the event won't be delivered to the
target object at all. A typical use case would be to only accept events that are targeted to a particular
network and ignoring the rest, without having to check the net in each event handler.

Note that priority is ignored; for registerObject(), filters are added with the most specialized first,
and for registerEventFilter() you're responsible for the correct order.
src/common/eventmanager.cpp
src/common/eventmanager.h