If no BeRTOS version is selected the Wizard automatically select the latest
[bertos.git] / wizard / qvariant_converter.py
index 256b4fc303544d187b9ee86f46a6daf68fe1bb0c..0e160927733b7e5c68f2f5c5cc16c2c8a22b1ff1 100644 (file)
@@ -9,27 +9,9 @@
 # Author: Lorenzo Berni <duplo@develer.com>
 #
 
-from PyQt4.QtCore import *
+from PyQt4.QtCore import PYQT_VERSION_STR
 
-def getString(qvariant):
-    string = unicode(qvariant.toString())
-    return string
-
-def getStringList(qvariant):
-    string_list = [unicode(string) for string in qvariant.toStringList()]
-    return string_list
-
-def getStringDict(qvariant):
-    dict_str_str = {}
-    for key, value in qvariant.toMap().items():
-        dict_str_str[unicode(key)] = unicode(value.toString())
-    return dict_str_str
-
-def getBool(qvariant):
-    return qvariant.toBool()
-
-def getDict(qvariant):
-    dict_str_variant = {}
-    for key, value in qvariant.toMap().items():
-        dict_str_variant[unicode(key)] = value
-    return dict_str_variant
\ No newline at end of file
+if PYQT_VERSION_STR > "4.4.3":
+    from qvariant_converter_new import *
+else:
+    from qvariant_converter_old import *