Commit 0428a109 authored by hjk's avatar hjk
Browse files

debugger: fix output of weak and strong reference counts in

QSharedPointer dumper
parent 86c544b4
......@@ -1972,8 +1972,23 @@ static void qDumpQSharedPointer(QDumper &d)
P(d, "name", "data");
qDumpInnerValue(d, d.innertype, ptr.data());
d.endHash();
I(d, "strongref", 44);
I(d, "weakref", 45);
const int v = sizeof(void *);
d.beginHash();
const void *weak = addOffset(deref(addOffset(d.data, v)), v);
P(d, "name", "weakref");
P(d, "value", *static_cast<const int *>(weak));
P(d, "type", "int");
P(d, "addr", weak);
P(d, "numchild", "0");
d.endHash();
d.beginHash();
const void *strong = addOffset(weak, sizeof(int));
P(d, "name", "strongref");
P(d, "value", *static_cast<const int *>(strong));
P(d, "type", "int");
P(d, "addr", strong);
P(d, "numchild", "0");
d.endHash();
d << "]";
}
d.disarm();
......
......@@ -808,6 +808,8 @@ void WatchHandler::cleanup()
m_completeSet = initialSet();
m_displaySet = m_completeSet;
rebuildModel(); // to get the dummy entries back
#if 0
for (EditWindows::ConstIterator it = m_editWindows.begin();
it != m_editWindows.end(); ++it) {
......
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