Review Request: Implement Searchexpansion Filter

Lasath Fernando kde at lasath.org
Tue Aug 7 23:13:56 UTC 2012



> On July 15, 2012, 4:51 p.m., David Edmundson wrote:
> > lib/message.cpp, line 36
> > <http://git.reviewboard.kde.org/r/105433/diff/2/?file=72216#file72216line36>
> >
> >     I agree with Martin we can't alter every message for the sake of one plugin. 
> >     
> >     What you can do is trim it in the filter.
> >     KUriFilterData data(message.mainMessagePart().trimmed());
> >     
> >     that will still pass all your test cases exactly.
> >     
> >     Related: 
> >      - as you have this test suite, add a message with leading and trailing whitespace to make sure no plugin ever alters it.
> 
> David Edmundson wrote:
>     This patch was committed without my comment addressed.

Oh that one. I thought I replied here but oh well, more herp derping on my part.

The justification for this is that this is already done in other places, like in MessagesModel (and HTML ignores multiple whitespaces anyway). So overall, this shouldn't change the look of how things are displayed in the chat. 

I was going to remove other code that messed with whitespace as I found them.


- Lasath


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


On July 12, 2012, 8:39 a.m., Lasath Fernando wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105433/
> -----------------------------------------------------------
> 
> (Updated July 12, 2012, 8:39 a.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Even with all the mucking around I did, I still managed to get some work done today after all :)
> 
> Okay, this filter is fairly straightforward, it takes the whole message and sticks it through KUriFiler::filterSearchUri().
> 
> I had to make a slight tweak to Message so that it ignores leading and trailing whitespace. 
> 
> This does have a slight catch in that it runs after UrlFilter, so the URLs it sticks in aren't clickable. But since this is really meant for outgoing messages, I thought it wasn't a major requirement.
> 
> 
> Diffs
> -----
> 
>   filters/CMakeLists.txt 4560704 
>   filters/searchexpansion/CMakeLists.txt PRE-CREATION 
>   filters/searchexpansion/ktptextui_message_filter_searchexpansion.desktop PRE-CREATION 
>   filters/searchexpansion/searchexpansion-filter.h PRE-CREATION 
>   filters/searchexpansion/searchexpansion-filter.cpp PRE-CREATION 
>   lib/message.cpp d0e62b4 
>   tests/message-processor-basic-tests.h 35f931f 
>   tests/message-processor-basic-tests.cpp 554ce1a 
> 
> Diff: http://git.reviewboard.kde.org/r/105433/diff/
> 
> 
> Testing
> -------
> 
> Passed Unit tests.
> 
> 
> Thanks,
> 
> Lasath Fernando
> 
>

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


More information about the KDE-Telepathy mailing list