Commit 68a70745 authored by hjk's avatar hjk

Debugger: Remove workaround for older LLDB

... that breaks QHash display for keys with value 0.

Task-number: QTCREATORBUG-14451
Change-Id: I8578d9f1d14c367beaccabc5373bd75860ee454b
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 8014e2f8
......@@ -621,10 +621,6 @@ def qdump__QHash(d, value):
with SubItem(d, i):
if isCompact:
key = it["key"]
if not key:
# LLDB can't access directly since it's in anonymous union
# for Qt4 optimized int keytype
key = it[1]["key"]
d.putMapName(key, j)
d.putItem(it["value"])
d.putType(valueType)
......@@ -638,10 +634,6 @@ def qform__QHashNode():
def qdump__QHashNode(d, value):
key = value["key"]
if not key:
# LLDB can't access directly since it's in anonymous union
# for Qt4 optimized int keytype
key = value[1]["key"]
val = value["value"]
if d.isMapCompact(key.type, val.type):
d.putMapName(key)
......
......@@ -1716,6 +1716,7 @@ void tst_Dumpers::dumper_data()
"h1.insert(\"!\", QList<int>() << 1 << 2);\n\n"
"QHash<int, float> h2;\n"
"h2[0] = 33.0;\n"
"h2[11] = 11.0;\n"
"h2[22] = 22.0;\n\n"
......@@ -1765,9 +1766,10 @@ void tst_Dumpers::dumper_data()
+ Check("h1.2.value.0", "[0]", "1", "int")
+ Check("h1.2.value.1", "[1]", "2", "int")
+ Check("h2", "<2 items>", "@QHash<int, float>")
+ Check("h2.0", "[0] 22", "22", "float")
+ Check("h2.1", "[1] 11", "11", "float")
+ Check("h2", "<3 items>", "@QHash<int, float>")
+ Check("h2.0", "[0] 0", "33", "float")
+ Check("h2.1", "[1] 22", "22", "float")
+ Check("h2.2", "[2] 11", "11", "float")
+ Check("h3", "<1 items>", "@QHash<@QString, int>")
+ Check("h3.0", "[0]", "", "@QHashNode<@QString, int>")
......
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