<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/111964/">http://git.reviewboard.kde.org/r/111964/</a>
</td>
</tr>
</table>
<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/111964/diff/4/?file=185592#file185592line12" style="color: black; font-weight: bold; text-decoration: underline;">tier1/solid/src/imports/CMakeLists.txt</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<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">12</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span class="err">qt5_use_modules(solidextensionplugin</span> <span class="err">Core</span> <span class="err">Widgets</span> <span class="err">Declarative</span> <span class="err">DBus</span> <span class="err">Quick</span> <span class="err">Qml)</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;">Hm, just spotting it now. Do you really need all of that? In fact I'd expect you to need only Qml. Also qt5_use_modules is now obsolete so you shouldn't use that macro at all.</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/111964/diff/4/?file=185592#file185592line18" style="color: black; font-weight: bold; text-decoration: underline;">tier1/solid/src/imports/CMakeLists.txt</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<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">18</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="s">Qt5::Declarative</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;">Same here, isn't Qt5::Qml enough?</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/111964/diff/4/?file=185598#file185598line31" style="color: black; font-weight: bold; text-decoration: underline;">tier1/solid/src/imports/solidextensionplugin.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<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">31</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> <span class="s">"instantiated plugin object"</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;">Please comment it out</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/111964/diff/4/?file=185598#file185598line37" style="color: black; font-weight: bold; text-decoration: underline;">tier1/solid/src/imports/solidextensionplugin.cpp</a>
<span style="font-weight: normal;">
(Diff revision 4)
</span>
</th>
</tr>
</thead>
<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">37</font></th>
<td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> <span class="s">"plugin loaded, registering types "</span> <span class="o"><<</span> <span class="n">uri</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;">ditto.</pre>
</div>
<br />
<p>- Kevin</p>
<br />
<p>On August 29th, 2013, 3:56 p.m. UTC, Ivan Čukić 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 Solid, Àlex Fiestas, Aleix Pol Gonzalez, David Edmundson, and Kevin Ottens.</div>
<div>By Ivan Čukić.</div>
<p style="color: grey;"><i>Updated Aug. 29, 2013, 3:56 p.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;">revision 0:
This one will need more review and discussion - it exposes some of Solid functionality to QML.
The reason Solid classes are not exported directly is that they don't tend to have a no-arg constructor, and some of them are not QObjects.
It registers a class (org.kde.solid.)Devices (initially modelled after DeviceNotifier) that contains the following features:
- ability to list all devices or just those that match a defined query (Solid::Predicate)
- signals for when devices that match the query are added or deleted
- isEmpty property - are there no devices that match the query?
- count property - the number of devices that match the query
- devices property - a list of udis of the devices that match the query
- device method that returns a QObject interface to the device.
The things I'm in doubt about:
1. devices property and device(...) method are similarly named, while one gets udis, and the other actual DeviceInterface object.
Possible solutions:
- devices -> udis or deviceUdis
- device(...) -> deviceInterface(...) or something else
2. If the user creates two instances with the same query, both instances will contain a query and a Solid::Predicate, the query will be parsed two times and similar.
The implementation could be complicated a bit by creating private parts of instances with the same queries to be shared, but is it worth it?
revision 1:
Shared backends when two Devices objects have a same query.</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;">Yes. Created a test QML application.</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>tier1/solid/src/CMakeLists.txt <span style="color: grey">(c3c462f)</span></li>
<li>tier1/solid/src/imports/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/devices.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/devices.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/devices_p.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/qmldir <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/solidextensionplugin.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/imports/solidextensionplugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111964/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>