[Bug 302862] New: Code in format-filter is a bit mental
David Edmundson
kde at davidedmundson.co.uk
Mon Jul 2 07:44:28 BST 2012
https://bugs.kde.org/show_bug.cgi?id=302862
Bug ID: 302862
Severity: task
Version: git-latest
Priority: NOR
Assignee: kde-telepathy-bugs at kde.org
Summary: Code in format-filter is a bit mental
Classification: Unclassified
OS: Linux
Reporter: kde at davidedmundson.co.uk
Hardware: Other
Status: NEW
Component: text-ui-message-filters
Product: telepathy
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.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kde-telepathy-bugs
mailing list