Review Request 124361: Fix battery widget not appearing after kdeconnectd restarts

Albert Vaca Cintora albertvaka at gmail.com
Thu Jul 16 17:37:38 UTC 2015


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

Ship it!


Looks good, thanks! Although I'm not sure I understand why deleting the DBusAdaptor when you do it doesn't make it crash (see my comment below).


plugins/battery/batterydbusinterface.cpp (line 37)
<https://git.reviewboard.kde.org/r/124361/#comment56952>

    So this deletes the old DBusAdaptor after we add a new one, and this doesn't crash as opposed as deleting it on destroy, am I right? It's kind of weird :/ Maybe add a comment explaining this?


- Albert Vaca Cintora


On July 15, 2015, 4:52 a.m., Lamarque Souza wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124361/
> -----------------------------------------------------------
> 
> (Updated July 15, 2015, 4:52 a.m.)
> 
> 
> Review request for kdeconnect.
> 
> 
> Repository: kdeconnect-kde
> 
> 
> Description
> -------
> 
> Sometimes (just sometimes) battery widget does not show up at system tray when I log in. After I restart kdeconnectd I see the message "dbus interface not valid" in my session's log and the battery widget still does not appear. After some investigation it seems m_dbusInterface is becoming invalid and consequently DevicesModel::refreshDeviceList() does nothing. This patch works around this problem.
> 
> I added another workaround to fix the memory leak described in 0f38eb34a4ee25f5a1c182822cebe5b44c788aaa. The leaked object is the same one reported as invalid by DevicesModel::refreshDeviceList(), so maybe the problem is related.
> 
> Oddly, there is no bug entry in bugs.kde.org about this problem.
> 
> 
> Diffs
> -----
> 
>   interfaces/devicesmodel.h 816810e 
>   interfaces/devicesmodel.cpp 3ac68ab 
>   plugins/battery/batterydbusinterface.h fb5d768 
>   plugins/battery/batterydbusinterface.cpp 4b885ff 
> 
> Diff: https://git.reviewboard.kde.org/r/124361/diff/
> 
> 
> Testing
> -------
> 
> Battery widget appears again when my phone's kdeconnect agent sends any dbus update signal to kdeconnect-kde. No crashes due to deleting BatteryDbusInterface object.
> 
> 
> Thanks,
> 
> Lamarque Souza
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150716/8267d6c8/attachment.html>


More information about the KDEConnect mailing list