Revert wrong commit. The problem with QVariant API needs to be analysed more deeply
authorduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 7 Sep 2009 19:06:58 +0000 (19:06 +0000)
committerduplo <duplo@38d2e660-2303-0410-9eaa-f027e97ec537>
Mon, 7 Sep 2009 19:06:58 +0000 (19:06 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2892 38d2e660-2303-0410-9eaa-f027e97ec537

wizard/qvariant_converter_newer.py

index 30317e8f0c067d155be5e299a0499cc96d679ef0..597d01ce05e0ccee0bb061bad2ce6a7c1119884a 100644 (file)
@@ -56,8 +56,8 @@ def convertStringList(string_list):
 def getStringDict(qvariant):
     dict_str_str = {}
     try:
-        for key, value in qvariant.toMap().items():
-            dict_str_str[unicode(key)] = unicode(value.toString())
+        for key, value in qvariant.toPyObject().items():
+            dict_str_str[unicode(key)] = unicode(value)
     except:
         pass
     return dict_str_str
@@ -92,7 +92,7 @@ def convertBoolDict(dict_str_bool):
 def getDict(qvariant):
     dict_str_variant = {}
     try:
-        for key, value in qvariant.toMap().items():
+        for key, value in qvariant.toPyObject().items():
             dict_str_variant[unicode(key)] = value
     except:
         pass