Bug 266359

Summary: [PATCH] UdisksStorageVolume tries too hard to construct label()
Product: [Frameworks and Libraries] solid Reporter: Will Stephenson <wstephenson>
Component: libsolid-udisksAssignee: Lukáš Tinkl <lukas>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Allow for empty label() by not constructing a return value.

Description Will Stephenson 2011-02-15 09:05:11 UTC
Created attachment 57269 [details]
Allow for empty label() by not constructing a return value.

Version:           unspecified (using KDE 4.6.0) 
OS:                Linux

If IdLabel and PartitionLabel are both empty, a value is constructed out of the vendor and product.  The documentation for Solid::StorageVolume::label() states "the volume label if available, QString() otherwise".  This constructed value breaks app logic which allows for label to be empty, and is IMO a step too far



Reproducible: Always
Comment 1 Lukáš Tinkl 2011-02-15 17:29:41 UTC
Git commit 0e6adca725db7f4baf73e7eaf224f47c7c33165f by Lukas Tinkl.
Committed on 15/02/2011 at 17:21.
Pushed by lukas into branch 'KDE/4.6'.

don't try to construct the label too hard

return an empty label instead, as per docs; fixes eg. kio_sysinfo

BUG: 266359

M  +0    -2    solid/solid/backends/udisks/udisksstoragevolume.cpp     

http://commits.kde.org/kdelibs/0e6adca725db7f4baf73e7eaf224f47c7c33165f