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

Lamarque Souza lamarque at kde.org
Fri Jul 17 03:45:29 UTC 2015


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

(Updated July 17, 2015, 3:45 a.m.)


Status
------

This change has been marked as submitted.


Review request for kdeconnect.


Changes
-------

Submitted with commit 208c11de1a7222b9f91c5a5d7b9310e0a5c38d04 by Lamarque V. Souza to branch master.


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/20150717/92420bf7/attachment-0001.html>


More information about the KDEConnect mailing list