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)
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.


No differences found