aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhjk <[email protected]>2010-01-06 13:30:11 +0100
committerhjk <[email protected]>2010-01-06 15:21:17 +0100
commit85b4b826ab9021dc720aac34bf205c9d24a31d8f (patch)
treef1bc68b8da5cd6e34595fc4a995e41e2df9f2053
parent6ced1c3e75e486b3c301c943f7d72d38bf0cd05d (diff)
debugger: use '*' as name for all pointers, add pointee only for display purposes
-rw-r--r--src/plugins/debugger/gdb/gdbengine.cpp2
-rw-r--r--src/plugins/debugger/watchhandler.cpp7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index 9024e1c87b5..6ff1cb08c87 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -3938,7 +3938,7 @@ void GdbEngine::handleVarListChildrenHelper(const GdbMi &item,
if (data.type == data.name) {
if (isPointerType(parent.type)) {
data.exp = "*(" + parent.exp + ')';
- data.name = _("*") + parent.name;
+ data.name = _("*"); // + parent.name;
} else {
// A type we derive from? gdb crashes when creating variables here
data.exp = parent.exp;
diff --git a/src/plugins/debugger/watchhandler.cpp b/src/plugins/debugger/watchhandler.cpp
index 37d9dc7794c..ae12376acb1 100644
--- a/src/plugins/debugger/watchhandler.cpp
+++ b/src/plugins/debugger/watchhandler.cpp
@@ -89,7 +89,7 @@ public:
{ parent = 0; }
void setData(const WatchData &data)
- { static_cast<WatchData &>(*this) = data; }
+ { static_cast<WatchData &>(*this) = data; parent = 0; }
WatchItem *parent;
QList<WatchItem *> children; // fetched children
@@ -775,12 +775,15 @@ void WatchModel::emitDataChanged(int column, const QModelIndex &parentIndex)
QVariant WatchModel::data(const QModelIndex &idx, int role) const
{
- const WatchItem &data = *watchItem(idx);
+ const WatchItem *item = watchItem(idx);
+ const WatchItem &data = *item;
switch (role) {
case Qt::DisplayRole: {
switch (idx.column()) {
case 0:
+ if (data.name == QLatin1String("*") && item->parent)
+ return QLatin1String("*") + item->parent->name;
return data.name;
case 1: {
int format = m_handler->m_individualFormats.value(data.iname, -1);