client: Port old HighlightRule to ExpressionMatch
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 1 Sep 2018 21:29:02 +0000 (16:29 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 3 Sep 2018 20:12:02 +0000 (22:12 +0200)
commit54ebc1bf00f4f9a8376629925329f0e72be04662
tree5b842f1f0871ab0e3ec6d98ec2701f582ca42532
parent6fd69e84e6c395a108e6b2620c6428907b7d7efd
client: Port old HighlightRule to ExpressionMatch

Port QtUiMessageProcessor HighlightRule objects to ExpressionMatch
class, providing easy caching and simplifying expression handling.

Migrate HighlightRule struct into a full-blown class for easier
management and greater assurance over automatic internal cache
management.

Port QtUiMessageProcessor to ExpressionMatch for nickname matching,
providing easy caching and simplifying expression handling.

Add tons of documentation comments, too, and fix up line lengths.

NOTE: Legacy highlight rules lack support for "sender", "ID", and
inverse rules.  There's no technical reason for this, just lack of
developer time.  Feel free to add support in the future!  Just make
sure to not miss any part - I'd suggest simply replacing the legacy
LegacyHighlightRule class in QtUiMessageProcessor with the full one
from HighlightRuleManager, and don't forget to fix
> QtUiMessageProcessor::HighlightRule::operator!=()
...and...
> QtUiMessageProcessor::HighlightRule::determineExpressions()
src/qtui/qtuimessageprocessor.cpp
src/qtui/qtuimessageprocessor.h