diff options
authorThomas Surrel <[email protected]>2018-11-23 22:56:38 +0100
committerThomas Surrel <[email protected]>2019-01-08 20:10:13 +0100
commitcb3237987b260449647ec4e8a914e511104ed2b6 (patch)
parent41e129444241ed7811953f69d2d183978fa10b3e (diff)
[Device Notifier] Keep the device label & icon after unmounting
Summary: When unmounting a device, the device notifier keeps the information of the device and its icon for a few seconds before it disappears. But the binding on the label and the icon was making them go blank before, leaving an emblem without an icon and a 'This device can now be safely removed' notice without the name of the device (although it did not always happen, this I am not sure why). The problem appeared with commit 61b2b173e8d68623a3681fd27c0ad0348bf41191 Test Plan: Unmount a removable device with the device notifier: for a few seconds, the device name and icon should still be displayed An example of the problem: {F6442095} Reviewers: #plasma, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: davidedmundson, filipf, plasma-devel Tags: #plasma Differential Revision:
1 files changed, 8 insertions, 2 deletions
diff --git a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
index cdb3af5..74fe783 100644
--- a/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
+++ b/applets/devicenotifier/package/contents/ui/FullRepresentation.qml
@@ -158,8 +158,14 @@ MouseArea {
DeviceItem {
width: notifierDialog.width
udi: DataEngineSource
- icon:[udi] ?[udi].Icon : ""
- deviceName:[udi] ?[udi].Description : ""
+ Binding on icon {
+ when:[udi] !== undefined
+ value:[udi].Icon
+ }
+ Binding on deviceName {
+ when:[udi] !== undefined
+ value:[udi].Description
+ }
emblemIcon: Emblems && Emblems[0] ? Emblems[0] : ""
state:[udi] ?[udi].State : 0