Commit f55cd636 authored by hjk's avatar hjk
Browse files

Debugger: Fix QList<QStringList> dumper with Qt 5



QStringList is movable in Qt 5.

Task-number: QTCREATORBUG-10211
Change-Id: I6b94acd37bbf8ca165960c50fd3da81408ccbb1b
Reviewed-by: default avatarDavid Schulz <david.schulz@digia.com>
parent dcccb90f
......@@ -265,6 +265,10 @@ movableTypes = set([
"QXmlStreamNotationDeclaration", "QXmlStreamEntityDeclaration"
])
movableTypes5 = set([
"QStringList"
])
class DumperBase:
......
......@@ -1414,7 +1414,10 @@ class Dumper(DumperBase):
return True
if self.isSimpleType(type):
return True
return self.stripNamespaceFromType(str(type)) in movableTypes
typeName = self.stripNamespaceFromType(str(type))
if typeName in movableTypes:
return True
return self.qtVersion() >= 0x050000 and typeName in movableTypes5
def putIntItem(self, name, value):
with SubItem(self, name):
......
......@@ -1618,6 +1618,19 @@ void tst_Dumpers::dumper_data()
% Check("l.0", "[0]", "101", "unsigned int")
% Check("l.2", "[2]", "102", "unsigned int");
QTest::newRow("QListStringList")
<< Data("#include <QStringList>\n",
"QStringList l;\n"
"l.append(\"aaa\");\n"
"QList<QStringList> ll;\n"
"ll.append(l);\n"
"ll.append(l);\n")
% CoreProfile()
% Check("ll", "<2 items>", "@QList<@QStringList>")
% Check("l", "<1 items>", "@QStringList")
% Check("ll.1", "[1]", "<1 items>", "@QStringList")
% Check("ll.1.0", "[0]", "\"aaa\"", "@QString");
QTest::newRow("QListUShort")
<< Data("#include <QList>\n",
"QList<ushort> l0,l;\n"
......
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