Bug 302862 - Code in format-filter needs tidying.
Summary: Code in format-filter needs tidying.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: telepathy
Classification: Unmaintained
Component: text-ui-message-filters (show other bugs)
Version: git-latest
Platform: unspecified Linux
: NOR task
Target Milestone: Future
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-02 06:44 UTC by David Edmundson
Modified: 2024-09-18 19:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.