Commit e94e4030 authored by hjk's avatar hjk

Debugger: Fix QList<QStringList> dumper for LLDB

QStringList is movable in Qt 5

Change-Id: I5b0bee9c55e54f62c93a8515af0f56cdafed78bf
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 3f7b1812
......@@ -255,23 +255,6 @@ class UnnamedSubItem(SubItem):
self.iname = "%s.%s" % (self.d.currentIName, component)
self.name = None
movableTypes = set([
"QBrush", "QBitArray", "QByteArray", "QCustomTypeInfo", "QChar", "QDate",
"QDateTime", "QFileInfo", "QFixed", "QFixedPoint", "QFixedSize",
"QHashDummyValue", "QIcon", "QImage", "QLine", "QLineF", "QLatin1Char",
"QLocale", "QMatrix", "QModelIndex", "QPoint", "QPointF", "QPen",
"QPersistentModelIndex", "QResourceRoot", "QRect", "QRectF", "QRegExp",
"QSize", "QSizeF", "QString", "QTime", "QTextBlock", "QUrl", "QVariant",
"QXmlStreamAttribute", "QXmlStreamNamespaceDeclaration",
"QXmlStreamNotationDeclaration", "QXmlStreamEntityDeclaration"
])
movableTypes5 = set([
"QStringList"
])
class DumperBase:
def __init__(self):
self.isCdb = False
......@@ -473,6 +456,23 @@ class DumperBase:
except:
pass
def isKnownMovableType(self, type):
if type in (
"QBrush", "QBitArray", "QByteArray", "QCustomTypeInfo", "QChar", "QDate",
"QDateTime", "QFileInfo", "QFixed", "QFixedPoint", "QFixedSize",
"QHashDummyValue", "QIcon", "QImage", "QLine", "QLineF", "QLatin1Char",
"QLocale", "QMatrix", "QModelIndex", "QPoint", "QPointF", "QPen",
"QPersistentModelIndex", "QResourceRoot", "QRect", "QRectF", "QRegExp",
"QSize", "QSizeF", "QString", "QTime", "QTextBlock", "QUrl", "QVariant",
"QXmlStreamAttribute", "QXmlStreamNamespaceDeclaration",
"QXmlStreamNotationDeclaration", "QXmlStreamEntityDeclaration"
):
return True
return type == "QStringList" and self.qtVersion() >= 0x050000
def cleanAddress(addr):
if addr is None:
return "<no address>"
......
......@@ -1415,10 +1415,7 @@ class Dumper(DumperBase):
return True
if self.isSimpleType(type):
return True
typeName = self.stripNamespaceFromType(str(type))
if typeName in movableTypes:
return True
return self.qtVersion() >= 0x050000 and typeName in movableTypes5
return self.isKnownMovableType(self.stripNamespaceFromType(str(type)))
def putIntItem(self, name, value):
with SubItem(self, name):
......
......@@ -574,10 +574,9 @@ class Dumper(DumperBase):
return format
def isMovableType(self, type):
if type.GetTypeClass() in (lldb.eTypeClassBuiltin,
lldb.eTypeClassPointer):
if type.GetTypeClass() in (lldb.eTypeClassBuiltin, lldb.eTypeClassPointer):
return True
return self.stripNamespaceFromType(type.GetName()) in movableTypes
return self.isKnownMovableType(self.stripNamespaceFromType(type.GetName()))
def putIntItem(self, name, value):
with SubItem(self, name):
......
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