Review Request: RSS dataengine now supports multiple feeds.

Rob Scheepmaker r.scheepmaker at student.utwente.nl
Tue Feb 12 18:39:58 CET 2008



> On 2008-02-11 12:25:34, Aaron Seigo wrote:
> > trunk/playground/base/plasma/engines/rss/rss.cpp, line 49
> > <http://matt.rogers.name/r/111/diff/1/#file276line49>
> >
> >     this will break if there is a legitimate ',' in the feed URL?
> 
> Rob Scheepmaker wrote:
>     Well, applets using this engine should url encode the commas in the url's. Until there is some way to pass array's / lists to dataengines I don't think there's a better solution... But if there is, please suggest!
> 
> Riccardo Iaconelli wrote:
>     What about breaking on ' @ PLASMA BREAK! @ '?
>     At least it will be more difficult to be breaked by the url. :P

Hehe, yeah, that would be relatively safe. I've also discussed on IRC about using a \0 character as break (apparently QStrings can contain \0's...), but it all seems a bit, well, plain ugly to me. And I think we want to avoid a situation in which every dataengine who offers the option of querying a list of data, chooses another way to implement that. The real solution, I think, is if Plasma::DataEngine accepts QStringLists or something like that. Until then, I can maybe add a static function to the engine, which can be used for urlencoding commas, making it easier for applets to avoid the comma in url problem. Sigh... commas in url's... madness!


- Rob


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://matt.rogers.name/r/111/#review104
-----------------------------------------------------------


On 2008-02-11 18:55:24, Rob Scheepmaker wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://matt.rogers.name/r/111/
> -----------------------------------------------------------
> 
> (Updated 2008-02-11 18:55:24)
> 
> 
> Review request for Plasma.
> 
> 
> Summary
> -------
> 
> My first contribution to the KDE project! This diff should add support for requesting a comma separated list of multiple feeds from the RSS dataengine, which will merge the entries from the different feeds in one convenient time sorted list. I'm really new to QT / plasma, so I've probably done some things wrong... so I'm looking forward to getting feedback from people who actually know what they're doing. ;)
> I've updated the diff, making the indentation consistent, and letting the engine create only one source (the one requested), since creating unrequested sources could lead to complications... To avoid the increase in bandwidth if an applet wants to, say, display both a combined list and a list containing only a single feed, the dataengine caches individual RSS feeds for one minute (the minimum update time). This time should maybe depend on the interval?
> 
> 
> Diffs
> -----
> 
>   trunk/playground/base/plasma/engines/rss/rss.h
>   trunk/playground/base/plasma/engines/rss/rss.cpp
> 
> Diff: http://matt.rogers.name/r/111/diff
> 
> 
> Testing
> -------
> 
> Not a lot atm. I've tested with both plasmaengineexplorer and the news applet in trunk. Feeding the news applet in trunk with a comma seperated list of url's shows that it works! Data abstraction rocks :). It seems however that the first time the data is requested, the feeds aren't really merged... the next update works fine. I'm still looking into that.
> 
> 
> Thanks,
> 
> Rob
> 
>



More information about the Panel-devel mailing list