[Kde-hardware-devel] Review Request 123263: WIP: KDE Connect backend for Solid

Lamarque Souza lamarque at kde.org
Sun Apr 5 17:54:54 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123263/#review78531
-----------------------------------------------------------



src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp (line 42)
<https://git.reviewboard.kde.org/r/123263/#comment53723>

    You can do what Android does here: set a default percentage value (-1 ou 0) and let the onChargeChanged() slot to update to the correct value when it cames.
    
    For charging state you can create a watcher from the QDBusPendingReply() object above and connect a slot to update m_charging variable. You can do the same for m_chargePercent if you wish.



src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp (line 45)
<https://git.reviewboard.kde.org/r/123263/#comment53718>

    If there was any error during dbus call calling value() will lead to crash().



src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp (line 79)
<https://git.reviewboard.kde.org/r/123263/#comment53719>

    Is it possible to retrieve a correct value for this and the other values below (timeToEmpty, timeToFull, etc)?



src/solid/devices/backends/kdeconnect/kdeconnectmanager.cpp (line 116)
<https://git.reviewboard.kde.org/r/123263/#comment53724>

    Answering your question from this patch's description: yes, I prefer that you call onDeviceAdded() slot for each device appended here. You can also use a watcher in this class' constructor to update m_devices asynchronously. Otherwise, no KdeConnectManager::deviceAdded() signal is emitted during KdeConnectManager startup even though m_devices is not empty. This method should just return the ids from m_devices.


- Lamarque Souza


On April 5, 2015, 3:57 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123263/
> -----------------------------------------------------------
> 
> (Updated April 5, 2015, 3:57 p.m.)
> 
> 
> Review request for Solid, Albert Vaca Cintora and Emmanuel Pescosta.
> 
> 
> Repository: solid
> 
> 
> Description
> -------
> 
> This adds a KDE Connect backend to Solid enabling us to show phone battery status in the device notifier, and have the phone appear in the device notifier like an external storage.
> 
> It is pretty synchronous at the moment. Any ideas how I could improve that? I guess when someone wants to get devices, it creates a new device interface and calls allDevices() or devicesFromQuery() immediately afterwards, so I cannot just do that stuff async and defer population? Or call deviceAdded for each of the initial ones once I have them?
> 
> It requires adjustment in the kdeconnect KIO slave so it can handle addresses like kdeconnect://org/kde/kdeconnect/123456 or kdeconnect:udi=/org/kde/kdeconnect/123456 (like mtp kio does) because all Dolphin or the device notifier have is the UDI. It also needs a new device action that matches "Portable Media Player" with the "kdeconnect" protocol, similar to mtp.
> 
> By adjusting the predicate in Dolphin's Places sidebar (and probably the file dialog) to query for the "kdeconnect" protocol, we can have its places automatically updated without having KDE Connect manually mess with KFilePlaces.
> 
> 
> Diffs
> -----
> 
>   src/solid/devices/CMakeLists.txt 9271ae1 
>   src/solid/devices/backends/kdeconnect/CMakeLists.txt PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectbattery.h PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectbattery.cpp PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectdevice.h PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectdevice.cpp PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectdeviceinterface.h PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectdeviceinterface.cpp PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectmanager.h PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectmanager.cpp PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectportablemediaplayer.h PRE-CREATION 
>   src/solid/devices/backends/kdeconnect/kdeconnectportablemediaplayer.cpp PRE-CREATION 
>   src/solid/devices/managerbase.cpp eee4de5 
> 
> Diff: https://git.reviewboard.kde.org/r/123263/diff/
> 
> 
> Testing
> -------
> 
> With some crash fixes already pushed to plasma-workspace it works pretty well.
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20150405/6dfb2c72/attachment-0001.html>


More information about the Kde-hardware-devel mailing list