mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-24 02:42:50 +00:00
kinfocenter: fallback to UDI for button device text
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c9dbe0b9b6
commit
0b5adb0a39
1 changed files with 6 additions and 0 deletions
|
@ -77,6 +77,12 @@ void SolDevice::setDefaultDeviceText()
|
|||
if (!label.isEmpty()) {
|
||||
ddtString = label;
|
||||
}
|
||||
} else if(tiedDevice.isDeviceInterface(Solid::DeviceInterface::Button) && ddtString.isEmpty()) {
|
||||
// button that is not on keyboard for example does not have product/vendor
|
||||
QString label = SolDevice::udi().section("/", -1, -1);
|
||||
if (!label.isEmpty()) {
|
||||
ddtString = label;
|
||||
}
|
||||
}
|
||||
}
|
||||
setText(0,ddtString);
|
||||
|
|
Loading…
Add table
Reference in a new issue