Bug 210309

Summary: setting device mode to discoverable/hidden doesn't work
Product: kde-bluetooth Reporter: Ozan Çağlayan <ozan>
Component: generalAssignee: Alex Fiestas <afiestas>
Status: RESOLVED FIXED    
Severity: normal CC: afiestas, info
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to fix the problem

Description Ozan Çağlayan 2009-10-12 12:27:09 UTC
Version:            (using KDE 4.3.2)
Compiler:          GCC 4.3.3 
OS:                Linux
Installed from:    Unspecified Linux

When kbluetooth runs in a localized language, setting device mode to discoverable/hidden doesn't work because the relevant code portion checks equality of the currently selected item agains "discoverable".

The matching should be done in a localization-transparent manner like using setItemData() etc.
Comment 1 Ozan Çağlayan 2009-10-12 12:29:04 UTC
Created attachment 37531 [details]
Patch to fix the problem

Use itemData facility to not depend on translated strings when checking if the selected item is "discoverable"
Comment 2 Cyril Brosch 2009-10-26 11:04:28 UTC
I can confirm for KBluetooth 0.4 (KDE 4.3.2) with German localization.
Comment 3 Ozan Çağlayan 2009-10-26 11:10:13 UTC
// Add Alex to CC as I can't change the Assignee
Comment 4 Alex Fiestas 2009-10-26 11:20:27 UTC
Wow, thx for the patch!
If I remember correctly there are a couple more of comaprations like this one, I'll have to take a look at it before release the final 0.4.

I'll review the patch ASAP.

Thx again!
Comment 5 Alex Fiestas 2009-10-26 11:56:43 UTC
Thanks for the patch it works very well!
Comment 6 Alex Fiestas 2009-10-26 11:57:00 UTC
SVN commit 1040499 by afiestas:

Patch by Ozan Çağlayan
Use itemData facility to not depend on translated strings when checking if the
selected item is "discoverable"
BUG: 210309

 M  +9 -4      adapterwidget.cpp  
 M  +1 -1      adapterwidget.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040499