<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;">The code looks nice, can't comment on the API since I haven't done much QMl, will add more reviewers for that.
Things to do before merging:
1-unittests (specially from the part where deviceAdded/Remove is filtered if not matching predicate)
2-examples
Otherwise, this looks awesome! let's wait and see what other people have to say about the api.
</pre>
<br />
<p>- Àlex</p>
<br />
<p>On August 12th, 2013, 9:03 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 and Kevin Ottens.</div>
<div>By Ivan Čukić.</div>
<p style="color: grey;"><i>Updated Aug. 12, 2013, 9:03 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/declarative/CMakeLists.txt <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/devices.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/devices.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/devices_p.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/qmldir <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/solidextensionplugin.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>tier1/solid/src/declarative/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>