<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 />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been submitted with commit d8d096cb36e69bcc0d3c7d9a466e5026053ca0c7 by Ivan Čukić to branch frameworks.</pre>
<br />
<p>- Commit</p>
<br />
<p>On August 29th, 2013, 5:06 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, 5:06 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>