Bug 210309 - setting device mode to discoverable/hidden doesn't work
Summary: setting device mode to discoverable/hidden doesn't work
Status: RESOLVED FIXED
Alias: None
Product: kde-bluetooth
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Unlisted Binaries Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Fiestas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 12:27 UTC by Ozan Çağlayan
Modified: 2009-10-26 11:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to fix the problem (1.87 KB, patch)
2009-10-12 12:29 UTC, Ozan Çağlayan
Details

Note You need to log in before you can comment on or make changes to this bug.
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