[Kde-hardware-devel] Review Request 111964: Basic declarative (QML) interface for Solid
Kevin Ottens
ervin at kde.org
Wed Aug 28 15:31:35 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/111964/#review38799
-----------------------------------------------------------
tier1/solid/src/CMakeLists.txt
<http://git.reviewboard.kde.org/r/111964/#comment28655>
Better name it import, that seems to be the usual name for this type of plugins.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28668>
I don't get it, doesn't device() take two parameters?
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28661>
Should be "empty" for the property name.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28656>
Style is no space after * or &
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28657>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28658>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28659>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28660>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28662>
Should be emptyChanged for the signal.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28663>
No need to make it a slot the property is already there.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28664>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28665>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28666>
ditto.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28667>
No space after * and &.
tier1/solid/src/declarative/devices.h
<http://git.reviewboard.kde.org/r/111964/#comment28669>
No need for a d-pointer here, the class isn't exported.
tier1/solid/src/declarative/devices.cpp
<http://git.reviewboard.kde.org/r/111964/#comment28670>
Still no space after & but I'll stop pointing out that one. :-)
tier1/solid/src/declarative/solidextensionplugin.cpp
<http://git.reviewboard.kde.org/r/111964/#comment28671>
Looks like a typo indeed.
tier1/solid/src/declarative/solidextensionplugin.cpp
<http://git.reviewboard.kde.org/r/111964/#comment28672>
Then why is it here? :-)
- Kevin Ottens
On Aug. 28, 2013, 2:41 p.m., Ivan Čukić wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/111964/
> -----------------------------------------------------------
>
> (Updated Aug. 28, 2013, 2:41 p.m.)
>
>
> Review request for Solid, Àlex Fiestas, Aleix Pol Gonzalez, David Edmundson, and Kevin Ottens.
>
>
> Description
> -------
>
> 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.
>
>
> Diffs
> -----
>
> tier1/solid/src/CMakeLists.txt c3c462f
> tier1/solid/src/declarative/CMakeLists.txt PRE-CREATION
> tier1/solid/src/declarative/devices.h PRE-CREATION
> tier1/solid/src/declarative/devices.cpp PRE-CREATION
> tier1/solid/src/declarative/devices_p.h PRE-CREATION
> tier1/solid/src/declarative/qmldir PRE-CREATION
> tier1/solid/src/declarative/solidextensionplugin.h PRE-CREATION
> tier1/solid/src/declarative/solidextensionplugin.cpp PRE-CREATION
>
> Diff: http://git.reviewboard.kde.org/r/111964/diff/
>
>
> Testing
> -------
>
> Yes. Created a test QML application.
>
>
> Thanks,
>
> Ivan Čukić
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20130828/f1d7b795/attachment-0001.html>
More information about the Kde-hardware-devel
mailing list