<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/112679/">http://git.reviewboard.kde.org/r/112679/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">2 issues I'd like to get advise for inline.</pre>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/112679/diff/1/?file=189054#file189054line77" style="color: black; font-weight: bold; text-decoration: underline;">staging/kservice/src/services/ktraderparsetree_p.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &,</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int matchConstraintPlugin( const ParseTreeBase *_tree, KPluginInfo _info,</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">74</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="o">:</span> <span class="n">service</span><span class="p">(</span> <span class="n">_service</span> <span class="p">),</span> <span class="n">maxima</span><span class="p">(</span> <span class="n">_m</span> <span class="p">),</span> <span class="n">offers</span><span class="p">(</span> <span class="n">_offers</span> <span class="p">)</span> <span class="p">{}</span></pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">77</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="o">:</span> <span class="n">service</span><span class="p">(</span> <span class="n">_service</span><span class="hl"> </span><span class="p"><span class="hl">),</span></span><span class="hl"> </span><span class="n"><span class="hl">info</span></span><span class="p"><span class="hl">(</span></span><span class="hl"> </span><span class="n"><span class="hl">KPluginInfo</span></span><span class="p"><span class="hl">()</span></span> <span class="p">),</span> <span class="n">maxima</span><span class="p">(</span> <span class="n">_m</span> <span class="p">),</span> <span class="n">offers</span><span class="p">(</span> <span class="n">_offers</span> <span class="p">)<span class="hl">,</span></span><span class="hl"> </span><span class="n"><span class="hl">pluginOffers</span></span><span class="p"><span class="hl">(</span></span><span class="hl"> </span><span class="n"><span class="hl">KPluginInfo</span></span><span class="o"><span class="hl">::</span></span><span class="n"><span class="hl">List</span></span><span class="p"><span class="hl">()</span></span><span class="hl"> </span><span class="p"><span class="hl">)</span></span> <span class="p">{}</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Here, the KPluginInfo::List goes out of scope immediately, so we end up with an invalid reference. It's not accessed, but this seems rather ugly. It also yields a compiler warning.
How can this be solved elegantly?
(Same problem in the other ctor, where the KService::List& becomes invalid.)</pre>
</div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="http://git.reviewboard.kde.org/r/112679/diff/1/?file=189054#file189054line80" style="color: black; font-weight: bold; text-decoration: underline;">staging/kservice/src/services/ktraderparsetree_p.h</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int matchConstraint( const ParseTreeBase *_tree, const KService::Ptr &,</pre></td>
<td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">int matchConstraintPlugin( const ParseTreeBase *_tree, KPluginInfo _info,</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
<th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">80</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="o">:</span> <span class="n">service</span><span class="p">(</span> <span class="mi">0</span> <span class="p">),</span> <span class="n">info</span><span class="p">(</span> <span class="n">_info</span> <span class="p">),</span> <span class="n">maxima</span><span class="p">(</span> <span class="n">_m</span> <span class="p">),</span> <span class="n">offers</span><span class="p">(</span> <span class="n">KService</span><span class="o">::</span><span class="n">List</span><span class="p">()</span> <span class="p">),</span> <span class="n">pluginOffers</span><span class="p">(</span> <span class="n">_offers</span> <span class="p">)</span> <span class="p">{}</span></pre></td>
</tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">here, the KService::List& becomes invalid, see issue right above.</pre>
</div>
<br />
<p>- Sebastian</p>
<br />
<p>On September 12th, 2013, 1:33 a.m. UTC, Sebastian Kügler wrote:</p>
<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 KDE Frameworks and David Faure.</div>
<div>By Sebastian Kügler.</div>
<p style="color: grey;"><i>Updated Sept. 12, 2013, 1:33 a.m.</i></p>
<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;">This patch allows search through KPluginInfo::List, additionally to KService::List. Together with the other patches from my set It makes it possible to search through the plugin's (JSON-based) metadata, using our constraint syntax.
It adds a ctor that takes a KPluginInfo::List& and adds the necessary branches to look within either the KService::List or the KPluginInfo::List.
There's one problem I don't know an elegant solution to, will point that out in the diff.
This, and the other patches from this set are also in kdelibs[sebas/pluginlocator]</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;">- Added tests (separate review), all pass
- Ported Plasma::PluginLoader from KServiceTypeTrader to KPluginTrader and tested the querying in a real-world scenario, no regressions spotted
- No regressions in existing tests
</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>staging/kservice/src/services/ktraderparsetree.cpp <span style="color: grey">(4257e43)</span></li>
<li>staging/kservice/src/services/ktraderparsetree_p.h <span style="color: grey">(7664943)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/112679/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>