Commit 62803ada authored by hjk's avatar hjk
Browse files

Debugger: Add some convenience helpers for python dumpers



Change-Id: I7fc35ea571895024e9da597d30167e02eda7df47
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 27d34cd0
......@@ -414,6 +414,9 @@ class DumperBase:
# assume no Qt 3 support by default
return False
def lookupQtType(self, typeName):
return self.lookupType(self.qtNamespace() + typeName)
# Clamps size to limit.
def computeLimit(self, size, limit):
if limit == 0:
......@@ -509,6 +512,12 @@ class DumperBase:
elided, data = self.encodeStringHelper(self.extractPointer(value), limit)
return data
def encodedUtf16ToUtf8(self, s):
return ''.join([chr(int(s[i:i+2], 16)) for i in range(0, len(s), 4)])
def encodeStringUtf8(self, value, limit = 0):
return self.encodedUtf16ToUtf8(self.encodeString(value, limit))
def stringData(self, value):
return self.byteArrayDataHelper(self.extractPointer(value))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment