aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/qtcreator/debugger/dumper.py2
-rw-r--r--tests/auto/debugger/tst_dumpers.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index 4805545d24..b800a5ab24 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -2924,6 +2924,8 @@ class DumperBase:
return str(simple)
if self.ldisplay is not None:
return self.ldisplay
+ if self.type.code == TypeCodeEnum:
+ return self.displayEnum()
#if self.ldata is not None:
# if sys.version_info[0] == 2 and isinstance(self.ldata, buffer):
# return bytes(self.ldata).encode('hex')
diff --git a/tests/auto/debugger/tst_dumpers.cpp b/tests/auto/debugger/tst_dumpers.cpp
index 9ac49187ba..f004a229bd 100644
--- a/tests/auto/debugger/tst_dumpers.cpp
+++ b/tests/auto/debugger/tst_dumpers.cpp
@@ -6836,12 +6836,14 @@ void tst_Dumpers::dumper_data()
QTest::newRow("Internal2")
- << Data("struct Foo { int bar = 15; }; \n"
+ << Data("enum E { V1, V2 };\n"
+ "struct Foo { int bar = 15; E e = V1; };\n"
"struct QtcDumperTest_PointerArray {\n"
" Foo *foos = new Foo[10];\n"
"};\n\n",
"QtcDumperTest_PointerArray tc; unused(&tc);\n")
+ Check("tc.0.bar", "15", "int")
+ + Check("tc.0.e", "V1 (0)", "E")
+ Check("tc.1.bar", "15", "int")
+ Check("tc.2.bar", "15", "int")
+ Check("tc.3.bar", "15", "int");