forked from qt-creator/qt-creator
debugger: fix output of weak and strong reference counts in
QSharedPointer dumper
This commit is contained in:
@@ -1972,8 +1972,23 @@ static void qDumpQSharedPointer(QDumper &d)
|
|||||||
P(d, "name", "data");
|
P(d, "name", "data");
|
||||||
qDumpInnerValue(d, d.innertype, ptr.data());
|
qDumpInnerValue(d, d.innertype, ptr.data());
|
||||||
d.endHash();
|
d.endHash();
|
||||||
I(d, "strongref", 44);
|
const int v = sizeof(void *);
|
||||||
I(d, "weakref", 45);
|
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 << "]";
|
||||||
}
|
}
|
||||||
d.disarm();
|
d.disarm();
|
||||||
|
|||||||
@@ -808,6 +808,8 @@ void WatchHandler::cleanup()
|
|||||||
m_completeSet = initialSet();
|
m_completeSet = initialSet();
|
||||||
m_displaySet = m_completeSet;
|
m_displaySet = m_completeSet;
|
||||||
|
|
||||||
|
rebuildModel(); // to get the dummy entries back
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
for (EditWindows::ConstIterator it = m_editWindows.begin();
|
for (EditWindows::ConstIterator it = m_editWindows.begin();
|
||||||
it != m_editWindows.end(); ++it) {
|
it != m_editWindows.end(); ++it) {
|
||||||
|
|||||||
Reference in New Issue
Block a user