Debugger: Correctly identify derived classes from references

Previously the correctly gdb-identified dynamic types were overwritten
with the value's static type. This is probably because the dynamic type
doesn't include the "&" for "reference". That, however, can easily be
fixed by just appending "&". As we're only handling references there it
should be safe to do so.

Task-number: QTCREATORBUG-10888
Change-Id: I7310916ce662956e66491423ad26658c32c8776b
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Ulf Hermann
2013-11-22 17:46:59 +01:00
committed by hjk
parent 692309849f
commit a8b215dcf1
+1 -1
View File
@@ -1253,7 +1253,7 @@ class Dumper(DumperBase):
# generic pointer." with MinGW's gcc 4.5 when it "identifies"
# a "QWidget &" as "void &" and with optimized out code.
self.putItem(value.cast(type.target().unqualified()))
self.putBetterType(typeName)
self.putBetterType("%s &" % self.currentType)
return
except RuntimeError:
self.putValue("<optimized out reference>")