X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fqtuimessageprocessor.cpp;h=eee90aab002d88c805ef0509dae0556709388b13;hp=679705c30363e37016b2cc697e76985319213213;hb=0d418069762066b4640250efd5ba8d68bf0af178;hpb=9fc57dc2c000e80fb8bd746a090e2e8210e1278e diff --git a/src/qtui/qtuimessageprocessor.cpp b/src/qtui/qtuimessageprocessor.cpp index 679705c3..eee90aab 100644 --- a/src/qtui/qtuimessageprocessor.cpp +++ b/src/qtui/qtuimessageprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2016 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -26,8 +26,6 @@ #include "messagemodel.h" #include "network.h" -const int progressUpdateDelay = 100; // ms between progress signal updates - QtUiMessageProcessor::QtUiMessageProcessor(QObject *parent) : AbstractMessageProcessor(parent), _processing(false), @@ -72,7 +70,7 @@ void QtUiMessageProcessor::process(QList &msgs) while (msgIter != msgIterEnd) { checkForHighlight(*msgIter); preProcess(*msgIter); - msgIter++; + ++msgIter; } Client::messageModel()->insertMessages(msgs); return; @@ -132,7 +130,7 @@ void QtUiMessageProcessor::checkForHighlight(Message &msg) } foreach(QString nickname, nickList) { QRegExp nickRegExp("(^|\\W)" + QRegExp::escape(nickname) + "(\\W|$)", _nicksCaseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); - if (nickRegExp.indexIn(msg.contents()) >= 0) { + if (nickRegExp.indexIn(stripFormatCodes(msg.contents())) >= 0) { msg.setFlags(msg.flags() | Message::Highlight); return; } @@ -163,7 +161,7 @@ void QtUiMessageProcessor::checkForHighlight(Message &msg) else { rx = QRegExp("(^|\\W)" + QRegExp::escape(rule.name) + "(\\W|$)", rule.caseSensitive ? Qt::CaseSensitive : Qt::CaseInsensitive); } - bool match = (rx.indexIn(msg.contents()) >= 0); + bool match = (rx.indexIn(stripFormatCodes(msg.contents())) >= 0); if (match) { msg.setFlags(msg.flags() | Message::Highlight); return; @@ -192,7 +190,7 @@ void QtUiMessageProcessor::highlightListChanged(const QVariant &variant) rule["CS"].toBool() ? Qt::CaseSensitive : Qt::CaseInsensitive, rule["RegEx"].toBool(), rule["Channel"].toString()); - iter++; + ++iter; } }