Bug 185783 - [Qyoto] QComboBox.AddItem() and QComboBox.AddItems() don't produce same result
Summary: [Qyoto] QComboBox.AddItem() and QComboBox.AddItems() don't produce same result
Status: RESOLVED FIXED
Alias: None
Product: bindings
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kde-bindings
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-28 10:43 UTC by Cédric Belin
Modified: 2009-02-28 14:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Display produced by QComboBox.AddItem() method (7.12 KB, image/png)
2009-02-28 10:46 UTC, Cédric Belin
Details
Display produced by QComboBox.AddItems() method (6.68 KB, image/png)
2009-02-28 10:47 UTC, Cédric Belin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cédric Belin 2009-02-28 10:43:12 UTC
Version:           Qyoto 4.3 (libqyoto4.3-cil / package 4.1.4-0ubuntu1~intrepid1) (using KDE 4.1.4)
Compiler:          GMCS (Mono C# compiler) version 1.9.1.0 
OS:                Linux
Installed from:    Ubuntu Packages

When I try to fill a QComboBox with non-English strings (i.e. containing stressed characters like é,à, û...), I don't obtain the same result if I use QComboBox.AddItem() method in a loop that if I use QComboxBox.AddItems() method.

QComboBox.AddItem() method produces valid display : stressed characters are left untouched.
QComboBox.AddItems() method convert stressed characters to another encoding (don't know which one, but it's not Utf-8) producing garbage display of strings in combo box.

Here is a simple example :

var mainWindow=new QDialog();

var list=new List<string>();		
list.Add("ASCII - Coder une adresse e-mail");
list.Add("Base64 - Transmettre des données binaires");
list.Add("HTML - Caractères éligibles en entités HTML");
list.Add("LowerCase - Caractères alphabétiques en minuscules");

var combo1=new QComboBox(mainWindow);
foreach(var item in list) combo1.AddItem(item);

var combo2=new QComboBox(mainWindow);
combo2.AddItems(list);

combo1 and combo2 have not the same display !!!
Comment 1 Cédric Belin 2009-02-28 10:46:39 UTC
Created attachment 31697 [details]
Display produced by QComboBox.AddItem() method
Comment 2 Cédric Belin 2009-02-28 10:47:05 UTC
Created attachment 31698 [details]
Display produced by QComboBox.AddItems() method
Comment 3 Arno Rehn 2009-02-28 14:57:50 UTC
Just fixed this in r933255 in trunk and backported it to branch/4.2. This should be in 4.2.2.