Corrected some omissions for the QString v2 API conversion.

Mon, 28 Dec 2009 17:05:28 +0000

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 28 Dec 2009 17:05:28 +0000
changeset 5
fa319c01b604
parent 4
ed9829a5fe55
child 6
52e8c820d0dd

Corrected some omissions for the QString v2 API conversion.

DebugClients/Python/DebugClientBase.py file | annotate | diff | comparison | revisions
DebugClients/Python3/DebugClientBase.py file | annotate | diff | comparison | revisions
E4XML/ProjectHandler.py file | annotate | diff | comparison | revisions
Preferences/ConfigurationPages/EditorExportersPage.py file | annotate | diff | comparison | revisions
--- a/DebugClients/Python/DebugClientBase.py	Mon Dec 28 16:34:27 2009 +0000
+++ b/DebugClients/Python/DebugClientBase.py	Mon Dec 28 17:05:28 2009 +0000
@@ -1433,12 +1433,7 @@
         """
         qttype = vtype.split('.')[-1]
         varlist = []
-        if qttype == 'QString':
-            varlist.append(("", "QString", "%s" % unicode(value)))
-        elif qttype == 'QStringList':
-            for s in value:
-                varlist.append(("", "QString", "%s" % unicode(s)))
-        elif qttype == 'QChar':
+        if qttype == 'QChar':
             varlist.append(("", "QChar", "%s" % unichr(value.unicode())))
             varlist.append(("", "int", "%d" % value.unicode()))
         elif qttype == 'QPoint':
@@ -1464,7 +1459,7 @@
             varlist.append(("width", "float", "%g" % value.width()))
             varlist.append(("height", "float", "%g" % value.height()))
         elif qttype == 'QColor':
-            varlist.append(("name", "QString", "%s" % value.name()))
+            varlist.append(("name", "str", "%s" % value.name()))
             r, g, b, a = value.getRgb()
             varlist.append(("rgb", "int", "%d, %d, %d, %d" % (r, g, b, a)))
             h, s, v, a = value.getHsv()
@@ -1478,27 +1473,27 @@
         elif qttype == 'QDateTime':
             varlist.append(("", "QDateTime", "%s" % unicode(value.toString())))
         elif qttype == 'QDir':
-            varlist.append(("path", "QString", "%s" % unicode(value.path())))
-            varlist.append(("absolutePath", "QString", "%s" % \
+            varlist.append(("path", "str", "%s" % unicode(value.path())))
+            varlist.append(("absolutePath", "str", "%s" % \
                 unicode(value.absolutePath())))
-            varlist.append(("canonicalPath", "QString", "%s" % \
+            varlist.append(("canonicalPath", "str", "%s" % \
                 unicode(value.canonicalPath())))
         elif qttype == 'QFile':
-            varlist.append(("fileName", "QString", "%s" % unicode(value.fileName())))
+            varlist.append(("fileName", "str", "%s" % unicode(value.fileName())))
         elif qttype == 'QFont':
-            varlist.append(("family", "QString", "%s" % unicode(value.family())))
+            varlist.append(("family", "str", "%s" % unicode(value.family())))
             varlist.append(("pointSize", "int", "%d" % value.pointSize()))
             varlist.append(("weight", "int", "%d" % value.weight()))
             varlist.append(("bold", "bool", "%s" % value.bold()))
             varlist.append(("italic", "bool", "%s" % value.italic()))
         elif qttype == 'QUrl':
-            varlist.append(("url", "QString", "%s" % unicode(value.toString())))
-            varlist.append(("scheme", "QString", "%s" % unicode(value.scheme())))
-            varlist.append(("user", "QString", "%s" % unicode(value.userName())))
-            varlist.append(("password", "QString", "%s" % unicode(value.password())))
-            varlist.append(("host", "QString", "%s" % unicode(value.host())))
+            varlist.append(("url", "str", "%s" % unicode(value.toString())))
+            varlist.append(("scheme", "str", "%s" % unicode(value.scheme())))
+            varlist.append(("user", "str", "%s" % unicode(value.userName())))
+            varlist.append(("password", "str", "%s" % unicode(value.password())))
+            varlist.append(("host", "str", "%s" % unicode(value.host())))
             varlist.append(("port", "int", "%d" % value.port()))
-            varlist.append(("path", "QString", "%s" % unicode(value.path())))
+            varlist.append(("path", "str", "%s" % unicode(value.path())))
         elif qttype == 'QModelIndex':
             varlist.append(("valid", "bool", "%s" % value.isValid()))
             if value.isValid():
@@ -1508,35 +1503,35 @@
                 varlist.append(("internalPointer", "void *", "%s" % \
                     value.internalPointer()))
         elif qttype == 'QRegExp':
-            varlist.append(("pattern", "QString", "%s" % unicode(value.pattern())))
+            varlist.append(("pattern", "str", "%s" % unicode(value.pattern())))
         
         # GUI stuff
         elif qttype == 'QAction':
-            varlist.append(("name", "QString", "%s" % unicode(value.objectName())))
-            varlist.append(("text", "QString", "%s" % unicode(value.text())))
-            varlist.append(("icon text", "QString", "%s" % unicode(value.iconText())))
-            varlist.append(("tooltip", "QString", "%s" % unicode(value.toolTip())))
-            varlist.append(("whatsthis", "QString", "%s" % unicode(value.whatsThis())))
-            varlist.append(("shortcut", "QString", "%s" % \
+            varlist.append(("name", "str", "%s" % unicode(value.objectName())))
+            varlist.append(("text", "str", "%s" % unicode(value.text())))
+            varlist.append(("icon text", "str", "%s" % unicode(value.iconText())))
+            varlist.append(("tooltip", "str", "%s" % unicode(value.toolTip())))
+            varlist.append(("whatsthis", "str", "%s" % unicode(value.whatsThis())))
+            varlist.append(("shortcut", "str", "%s" % \
                 unicode(value.shortcut().toString())))
         elif qttype == 'QKeySequence':
             varlist.append(("value", "", "%s" % unicode(value.toString())))
             
         # XML stuff
         elif qttype == 'QDomAttr':
-            varlist.append(("name", "QString", "%s" % unicode(value.name())))
-            varlist.append(("value", "QString", "%s" % unicode(value.value())))
+            varlist.append(("name", "str", "%s" % unicode(value.name())))
+            varlist.append(("value", "str", "%s" % unicode(value.value())))
         elif qttype == 'QDomCharacterData':
-            varlist.append(("data", "QString", "%s" % unicode(value.data())))
+            varlist.append(("data", "str", "%s" % unicode(value.data())))
         elif qttype == 'QDomComment':
-            varlist.append(("data", "QString", "%s" % unicode(value.data())))
+            varlist.append(("data", "str", "%s" % unicode(value.data())))
         elif qttype == "QDomDocument":
-            varlist.append(("text", "QString", "%s" % unicode(value.toString())))
+            varlist.append(("text", "str", "%s" % unicode(value.toString())))
         elif qttype == 'QDomElement':
-            varlist.append(("tagName", "QString", "%s" % unicode(value.tagName())))
-            varlist.append(("text", "QString", "%s" % unicode(value.text())))
+            varlist.append(("tagName", "str", "%s" % unicode(value.tagName())))
+            varlist.append(("text", "str", "%s" % unicode(value.text())))
         elif qttype == 'QDomText':
-            varlist.append(("data", "QString", "%s" % unicode(value.data())))
+            varlist.append(("data", "str", "%s" % unicode(value.data())))
             
         # Networking stuff
         elif qttype == 'QHostAddress':
--- a/DebugClients/Python3/DebugClientBase.py	Mon Dec 28 16:34:27 2009 +0000
+++ b/DebugClients/Python3/DebugClientBase.py	Mon Dec 28 17:05:28 2009 +0000
@@ -1448,12 +1448,7 @@
         """
         qttype = vtype.split('.')[-1]
         varlist = []
-        if qttype == 'QString':
-            varlist.append(("", "QString", "{0}".format(value)))
-        elif qttype == 'QStringList':
-            for s in value:
-                varlist.append(("", "QString", "{0}".format(s)))
-        elif qttype == 'QChar':
+        if qttype == 'QChar':
             varlist.append(("", "QChar", "{0}".format(chr(value.unicode()))))
             varlist.append(("", "int", "{0:d}".format(value.unicode())))
         elif qttype == 'QPoint':
@@ -1479,7 +1474,7 @@
             varlist.append(("width", "float", "{0:g}".format(value.width())))
             varlist.append(("height", "float", "{0:g}".format(value.height())))
         elif qttype == 'QColor':
-            varlist.append(("name", "QString", "{0}".format(value.name())))
+            varlist.append(("name", "str", "{0}".format(value.name())))
             r, g, b, a = value.getRgb()
             varlist.append(("rgb", "int", 
                             "{0:d}, {1:d}, {2:d}, {3:d}".format(r, g, b, a)))
@@ -1496,27 +1491,27 @@
         elif qttype == 'QDateTime':
             varlist.append(("", "QDateTime", "{0}".format(value.toString())))
         elif qttype == 'QDir':
-            varlist.append(("path", "QString", "{0}".format(value.path())))
-            varlist.append(("absolutePath", "QString", 
+            varlist.append(("path", "str", "{0}".format(value.path())))
+            varlist.append(("absolutePath", "str", 
                             "{0}".format(value.absolutePath())))
-            varlist.append(("canonicalPath", "QString", 
+            varlist.append(("canonicalPath", "str", 
                             "{0}".format(value.canonicalPath())))
         elif qttype == 'QFile':
-            varlist.append(("fileName", "QString", "{0}".format(value.fileName())))
+            varlist.append(("fileName", "str", "{0}".format(value.fileName())))
         elif qttype == 'QFont':
-            varlist.append(("family", "QString", "{0}".format(value.family())))
+            varlist.append(("family", "str", "{0}".format(value.family())))
             varlist.append(("pointSize", "int", "{0:d}".format(value.pointSize())))
             varlist.append(("weight", "int", "{0:d}".format(value.weight())))
             varlist.append(("bold", "bool", "{0}".format(value.bold())))
             varlist.append(("italic", "bool", "{0}".format(value.italic())))
         elif qttype == 'QUrl':
-            varlist.append(("url", "QString", "{0}".format(value.toString())))
-            varlist.append(("scheme", "QString", "{0}".format(value.scheme())))
-            varlist.append(("user", "QString", "{0}".format(value.userName())))
-            varlist.append(("password", "QString", "{0}".format(value.password())))
-            varlist.append(("host", "QString", "{0}".format(value.host())))
+            varlist.append(("url", "str", "{0}".format(value.toString())))
+            varlist.append(("scheme", "str", "{0}".format(value.scheme())))
+            varlist.append(("user", "str", "{0}".format(value.userName())))
+            varlist.append(("password", "str", "{0}".format(value.password())))
+            varlist.append(("host", "str", "{0}".format(value.host())))
             varlist.append(("port", "int", "%d" % value.port()))
-            varlist.append(("path", "QString", "{0}".format(value.path())))
+            varlist.append(("path", "str", "{0}".format(value.path())))
         elif qttype == 'QModelIndex':
             varlist.append(("valid", "bool", "{0}".format(value.isValid())))
             if value.isValid():
@@ -1526,35 +1521,35 @@
                 varlist.append(("internalPointer", "void *", 
                                 "{0}".format(value.internalPointer())))
         elif qttype == 'QRegExp':
-            varlist.append(("pattern", "QString", "{0}".format(value.pattern())))
+            varlist.append(("pattern", "str", "{0}".format(value.pattern())))
         
         # GUI stuff
         elif qttype == 'QAction':
-            varlist.append(("name", "QString", "{0}".format(value.objectName())))
-            varlist.append(("text", "QString", "{0}".format(value.text())))
-            varlist.append(("icon text", "QString", "{0}".format(value.iconText())))
-            varlist.append(("tooltip", "QString", "{0}".format(value.toolTip())))
-            varlist.append(("whatsthis", "QString", "{0}".format(value.whatsThis())))
-            varlist.append(("shortcut", "QString", 
+            varlist.append(("name", "str", "{0}".format(value.objectName())))
+            varlist.append(("text", "str", "{0}".format(value.text())))
+            varlist.append(("icon text", "str", "{0}".format(value.iconText())))
+            varlist.append(("tooltip", "str", "{0}".format(value.toolTip())))
+            varlist.append(("whatsthis", "str", "{0}".format(value.whatsThis())))
+            varlist.append(("shortcut", "str", 
                             "{0}".format(value.shortcut().toString())))
         elif qttype == 'QKeySequence':
             varlist.append(("value", "", "{0}".format(value.toString())))
             
         # XML stuff
         elif qttype == 'QDomAttr':
-            varlist.append(("name", "QString", "{0}".format(value.name())))
-            varlist.append(("value", "QString", "{0}".format(value.value())))
+            varlist.append(("name", "str", "{0}".format(value.name())))
+            varlist.append(("value", "str", "{0}".format(value.value())))
         elif qttype == 'QDomCharacterData':
-            varlist.append(("data", "QString", "{0}".format(value.data())))
+            varlist.append(("data", "str", "{0}".format(value.data())))
         elif qttype == 'QDomComment':
-            varlist.append(("data", "QString", "{0}".format(value.data())))
+            varlist.append(("data", "str", "{0}".format(value.data())))
         elif qttype == "QDomDocument":
-            varlist.append(("text", "QString", "{0}".format(value.toString())))
+            varlist.append(("text", "str", "{0}".format(value.toString())))
         elif qttype == 'QDomElement':
-            varlist.append(("tagName", "QString", "{0}".format(value.tagName())))
-            varlist.append(("text", "QString", "{0}".format(value.text())))
+            varlist.append(("tagName", "str", "{0}".format(value.tagName())))
+            varlist.append(("text", "str", "{0}".format(value.text())))
         elif qttype == 'QDomText':
-            varlist.append(("data", "QString", "{0}".format(value.data())))
+            varlist.append(("data", "str", "{0}".format(value.data())))
             
         # Networking stuff
         elif qttype == 'QHostAddress':
--- a/E4XML/ProjectHandler.py	Mon Dec 28 16:34:27 2009 +0000
+++ b/E4XML/ProjectHandler.py	Mon Dec 28 17:05:28 2009 +0000
@@ -106,14 +106,14 @@
         """
         Handler method for the "ProjectWordList" end tag.
         """
-        path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+        path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         self.project.pdata["SPELLWORDS"] = [path]
         
     def endProjectExcludeList(self):
         """
         Handler method for the "ProjectExcludeList" end tag.
         """
-        path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+        path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         self.project.pdata["SPELLEXCLUDES"] = [path]
         
     def startProgLanguage(self, attrs):
@@ -323,7 +323,7 @@
         Handler method for the "TranslationPattern" end tag.
         """
         self.project.pdata["TRANSLATIONPATTERN"].append(
-            unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))))
+            Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
         
     def startTranslationsBinPath(self, attrs):
         """
@@ -339,7 +339,7 @@
         Handler method for the "TranslationsBinPath" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["TRANSLATIONSBINPATH"].append(path)
@@ -358,7 +358,7 @@
         Handler method for the "Source" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["SOURCES"].append(path)
@@ -377,7 +377,7 @@
         Handler method for the "Form" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["FORMS"].append(path)
@@ -396,7 +396,7 @@
         Handler method for the "Translation" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["TRANSLATIONS"].append(path)
@@ -415,7 +415,7 @@
         Handler method for the "TranslationException" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["TRANSLATIONEXCEPTIONS"].append(path)
@@ -434,7 +434,7 @@
         Handler method for the "Resource" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["RESOURCES"].append(path)
@@ -453,7 +453,7 @@
         Handler method for the "Interface" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["INTERFACES"].append(path)
@@ -472,7 +472,7 @@
         Handler method for the "Other" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["OTHERS"].append(path)
@@ -491,7 +491,7 @@
         Handler method for the "MainScript" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         self.project.pdata["MAINSCRIPT"] = [path]
@@ -572,7 +572,7 @@
         Handler method for the "TranslationPrefix" end tag.
         """
         if self.version >= '4.3':
-            path = unicode(Utilities.toNativeSeparators(self.utf8_to_code(self.buffer)))
+            path = Utilities.toNativeSeparators(self.utf8_to_code(self.buffer))
         else:
             path = self.__buildPath()
         if not path.endswith("_"):
--- a/Preferences/ConfigurationPages/EditorExportersPage.py	Mon Dec 28 16:34:27 2009 +0000
+++ b/Preferences/ConfigurationPages/EditorExportersPage.py	Mon Dec 28 17:05:28 2009 +0000
@@ -39,7 +39,7 @@
         for exporter in exporters:
             self.exportersCombo.addItem(exporter, QVariant(self.pageIds[exporter]))
         
-        self.pdfFontCombo.addItem(self.trUtf8("Courier"), QVariant("QVariant"))
+        self.pdfFontCombo.addItem(self.trUtf8("Courier"), QVariant("Courier"))
         self.pdfFontCombo.addItem(self.trUtf8("Helvetica"), QVariant("Helvetica"))
         self.pdfFontCombo.addItem(self.trUtf8("Times"), QVariant("Times"))
         

eric ide

mercurial