From 4507cea74049b0b4bf32ccfd4e4e58a150443a58 Mon Sep 17 00:00:00 2001 From: duplo Date: Mon, 12 Jan 2009 19:41:01 +0000 Subject: [PATCH] Modify the getString function git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2164 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/qvariant_converter_old.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/wizard/qvariant_converter_old.py b/wizard/qvariant_converter_old.py index dbdeb4b4..5e555b30 100644 --- a/wizard/qvariant_converter_old.py +++ b/wizard/qvariant_converter_old.py @@ -9,11 +9,18 @@ # Author: Lorenzo Berni # +""" +Awful module for the conversion from python types to qvariant, for make the wizard compatible with older version of pyqt (<= 4.4.3) +""" + from PyQt4.QtCore import * import pickle def getString(qvariant): - string = unicode(qvariant.toString()) + if type(qvariant) == str or type(qvariant) == unicode: + string = qvariant + else: + string = unicode(qvariant.toString()) return string def convertString(string): -- 2.25.1