Review Request: MessageProcessor and Filters

David Edmundson kde at davidedmundson.co.uk
Fri Feb 3 13:12:34 UTC 2012



> On Feb. 2, 2012, 3:01 p.m., David Edmundson wrote:
> > lib/message.cpp, line 67
> > <http://git.reviewboard.kde.org/r/103848/diff/1/?file=48500#file48500line67>
> >
> >     What was the motivation behind changing this from QString to const char*.
> >     
> >     (not saying it's wrong, I just want the reasoning)
> 
> Lasath Fernando wrote:
>     Was a pain in the ass to QLatinString() each time I wanted to use "Urls". 
>     
>     Also, I want to define a literal constant rather than typing "Urls", but I don't know how they're done according to KDE code policy. (at uni we'd use a #define)

If we define constants for everything that goes against the entire point of it being meta-data. If we can know up-front that we're storing urls we may as well just hardcode QList<QUrls> into the message class. 

The idea is that plugins at run time can randomly any old stuff, but we don't (at compile time) know what these parts are going to be.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103848/#review10284
-----------------------------------------------------------


On Feb. 3, 2012, 12:37 p.m., Lasath Fernando wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103848/
> -----------------------------------------------------------
> 
> (Updated Feb. 3, 2012, 12:37 p.m.)
> 
> 
> Review request for Telepathy and David Edmundson.
> 
> 
> Description
> -------
> 
> Create an extensible framework for dealing with incomming messages in text-ui. This patch implements a MessageProcessor and 3 MessageFilters: Url and emoticon parsers, as well as an image embedding plugin (for funsizes :).
> Eventually these will be turned into actual plugins that are loaded at runtime rather than being hardcoded. But for now, they just make David's code cleaner.
> 
> 
> Diffs
> -----
> 
>   lib/CMakeLists.txt 31dadd2 
>   lib/adium-theme-message-info.cpp c5e0dfc 
>   lib/adium-theme-view.h be90d65 
>   lib/adium-theme-view.cpp a0e7ac1 
>   lib/chat-widget.cpp 75acef0 
>   lib/emoticon-filter.cpp PRE-CREATION 
>   lib/escape-filter.cpp PRE-CREATION 
>   lib/filters.h PRE-CREATION 
>   lib/image-filter.cpp PRE-CREATION 
>   lib/message-processor.h PRE-CREATION 
>   lib/message-processor.cpp PRE-CREATION 
>   lib/message.h PRE-CREATION 
>   lib/message.cpp PRE-CREATION 
>   lib/url-filter.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/103848/diff/diff
> 
> 
> Testing
> -------
> 
> Spammed meme images at david. He seemed to be happy and replied with lots of smiley faces.
> 
> 
> Thanks,
> 
> Lasath Fernando
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20120203/a23fb085/attachment-0001.html>


More information about the KDE-Telepathy mailing list