Bug 302862

Summary: Code in format-filter needs tidying.
Product: [Unmaintained] telepathy Reporter: David Edmundson <kde>
Component: text-ui-message-filtersAssignee: Telepathy Bugs <kde-telepathy-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: task CC: mayank25080562, mklapetek
Priority: NOR    
Version: git-latest   
Target Milestone: Future   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description David Edmundson 2012-07-02 06:44:28 UTC
Post-merged code review:

You store FormatTags as typedef QPair<QRegExp, QString>

Which is really sensible (well done), especially as compiling a reg-ex can be slow.

but in the actual replacement we turn the regexp into a string, and then back into a (different) regular expression, never using the initial regexp from the FormatTag as a reg-exp, this is just weird and confusing.

Also "addTag" don't convert a QString into a char* and back (it's overly slow, passing a const reference is basically "free") and don't convert a QString into a char! which you also do.
Comment 1 mayank 2014-03-04 05:27:29 UTC
david: has this been done ?
Comment 2 Martin Klapetek 2014-03-04 08:55:22 UTC
No. Otherwise it would be closed already.
Comment 3 Christoph Cullmann 2024-09-18 19:18:09 UTC
Dear user, unfortunately Telepathy is no longer maintained.

Please migrate to another solution, e.g. for Jabber a possibility is Kaidan, for Matrix a candidate is NeoChat.