reloadSourceFiles();
postCommand(_("-break-list"), CB(handleBreakList));
QVariant var = QVariant::fromValue<GdbMi>(data);
- postCommand(_("p 0"), CB(handleStop2), var); // dummy
+ postCommand(_("p 2"), CB(handleStop2), var); // dummy
} else {
#ifdef Q_OS_LINUX
// For some reason, attaching to a stopped process causes *two* stops
if (isSynchroneous()) {
// This should only be called for fresh expanded items, not for
// items that had their children retrieved earlier.
- qDebug() << "\nUPDATE WATCH DATA: " << data.toString() << "\n";
+ //qDebug() << "\nUPDATE WATCH DATA: " << data.toString() << "\n";
#if 0
WatchData data1 = data;
data1.setAllUnneeded();
&& msg.startsWith(__("The program being debugged stopped while"))
&& msg.contains(__("qDumpObjectData440"))) {
// Fake full stop
- postCommand(_("p 0"), CB(handleStop2)); // dummy
+ postCommand(_("p 3"), CB(handleStop2)); // dummy
return;
}
#endif
postCommand(_("bb %1 %2")
.arg(int(theDebuggerBoolSetting(UseDebuggingHelpers)))
.arg(expanded.join(_(","))),
- WatchUpdate, CB(handleStackFrame1));
- postCommand(_("p 0"), WatchUpdate, CB(handleStackFrame2));
+ CB(handleStackFrame1));
+ postCommand(_("p 1"), CB(handleStackFrame2));
} else {
QString level = QString::number(currentFrame());
// '2' is 'list with type and value'
// qDebug() << "READ: " << list.at(i).toString();
manager()->watchHandler()->insertBulkData(list);
- manager()->watchHandler()->updateWatchers();
+ // FIXME:
+ //manager()->watchHandler()->updateWatchers();
+ rebuildModel();
} else {
QTC_ASSERT(false, /**/);
}
{
// Local variables of inlined code are reported as
// 26^done,locals={varobj={exp="this",value="",name="var4",exp="this",
- // numchild="1",type="const QtSharedPointer::Basic<CPlusPlus::..."
+ // numchild="1",type="const QtSharedPointer::Basic<CPlusPlus::..."}}
// We do not want these at all. Current hypotheses is that those
// "spurious" locals have _two_ "exp" field. Try to filter them:
#ifdef Q_OS_MAC
QTC_ASSERT(index.isValid(), return);
QTC_ASSERT(!watchItem(index)->fetchTriggered, return);
if (WatchItem *item = watchItem(index)) {
+ m_handler->m_expandedINames.insert(item->iname);
item->fetchTriggered = true;
- WatchData data = *item;
if (item->children.isEmpty()) {
+ WatchData data = *item;
data.setChildrenNeeded();
m_handler->m_manager->updateWatchData(data);
}
{
WatchItem &data = *watchItem(index);
if (role == ExpandedRole) {
- if (value.toBool())
+ if (value.toBool()) {
+ // Should already have been triggered by fetchMore()
+ QTC_ASSERT(m_handler->m_expandedINames.contains(data.iname), /**/);
m_handler->m_expandedINames.insert(data.iname);
- else
+ } else {
m_handler->m_expandedINames.remove(data.iname);
+ }
} else if (role == TypeFormatRole) {
m_handler->setFormat(data.type, value.toInt());
} else if (role == IndividualFormatRole) {
connect(act, SIGNAL(toggled(bool)),
this, SLOT(setAlternatingRowColorsHelper(bool)));
- connect(this, SIGNAL(expanded(QModelIndex)),
- this, SLOT(expandNode(QModelIndex)));
- connect(this, SIGNAL(collapsed(QModelIndex)),
- this, SLOT(collapseNode(QModelIndex)));
+ connect(this, SIGNAL(expanded(QModelIndex)),
+ this, SLOT(expandNode(QModelIndex)));
+ connect(this, SIGNAL(collapsed(QModelIndex)),
+ this, SLOT(collapseNode(QModelIndex)));
}
void WatchWindow::expandNode(const QModelIndex &idx)