<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/109605/">http://git.reviewboard.kde.org/r/109605/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Plasma.</div>
<div>By Yuen Hoe Lim.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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" :)</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Some brief testing. It fixes the incorrect API bug without seeming to affect other load types afaik.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>plasmate/mainwindow.cpp <span style="color: grey">(13234ec)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/109605/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>