Details
-
Bug
-
Resolution: Invalid
-
P4: Low
-
None
-
4.7.0
-
None
-
Windows 7 (64bit), Qt fresh from the 4.7 branch
Description
We are using a serialization of QVariantMaps into a XML file in creator. We noticed that retrieving QChar from that store fails: Even though the XML serialization does contain the letter we stored originally, reading back that serialization always returns a '\0' character.
We use QVariant's setValue(string_from_xml) method followed by QVariant's convert(type).
Observed behavior:
- Works for QString, int, etc.
- Conversion to QChar does not work: the QVariant does contain a QChar of '\0', typeName() of the QVariant is empty.
Expected behavior:\
- Works for QString, int, etc.
- Conversion to QChar works. The QVariant will contain a QChar for the first (and only) character in the string we pass to setValue, typeName() should return the proper string for QChar.
Attached you will find a piece of code which demonstrates the issue.