Review Request 109605: Fix Plasmate loading local folders with the wrong API

Giorgos Tsiapaliokas terietor at gmail.com
Sat Mar 23 14:25:31 UTC 2013


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

Ship it!


Ship It!

- Giorgos Tsiapaliokas


On March 23, 2013, 7:16 a.m., Yuen Hoe Lim wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/109605/
> -----------------------------------------------------------
> 
> (Updated March 23, 2013, 7:16 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Description
> -------
> 
> Noticed that when I use Plasmate to load some of my old python plasmoids (using import from local folder), the project gets loaded but the API type is immediately changed to "declarativeappletscript", breaking the python plasmoid. I dug into the code a bit and noticed that MainWindow::loadProject calls MainWindow::checkMetafile, which checks the projectrc file in the target folder for a "radioButtonChecked" entry and sets the API type in the real metadata file based on this value. Projects loaded from existing folders do not have the projectrc file and the one that gets auto-created does not have this "radioButtonChecked" entry, and so the API gets set (incorrectly) to the default type, which is "declarativeappletscript".
> 
> This is a quick patch that simply skips resetting the API in the metadatafile if the "radioButtonChecked" entry is not found. I realize that this may not be the ideal solution, but I'm not really sure how the whole projectrc vs metadata thing is supposed to work. I'll be happy to amend the fix if someone could tell me the "correct way" :)
> 
> 
> Diffs
> -----
> 
>   plasmate/mainwindow.cpp 13234ec 
> 
> Diff: http://git.reviewboard.kde.org/r/109605/diff/
> 
> 
> Testing
> -------
> 
> Some brief testing. It fixes the incorrect API bug without seeming to affect other load types afaik.
> 
> 
> Thanks,
> 
> Yuen Hoe Lim
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130323/b9c956c7/attachment.html>


More information about the Plasma-devel mailing list