forked from qt-creator/qt-creator
Debugger: Remove unused WatchItem::state flag
Lately it was only set and read for debugging purposes. A mechanism similar to the ChildrenNeeded state is still needed and available through WatchItem::wantsChildren. Change-Id: I78c85d65bc35810be420bd0418db9675473697cd Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -1220,10 +1220,8 @@ void WatchModel::fetchMore(const QModelIndex &idx)
|
||||
WatchItem *item = nonRootItemForIndex(idx);
|
||||
if (item) {
|
||||
m_expandedINames.insert(item->iname);
|
||||
if (item->children().isEmpty()) {
|
||||
item->setChildrenNeeded();
|
||||
if (item->children().isEmpty())
|
||||
m_engine->expandItem(item->iname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2088,7 +2086,6 @@ void WatchHandler::watchExpression(const QString &exp, const QString &name)
|
||||
saveWatchers();
|
||||
|
||||
if (m_model->m_engine->state() == DebuggerNotReady) {
|
||||
item->setAllUnneeded();
|
||||
item->setValue(QString(QLatin1Char(' ')));
|
||||
item->update();
|
||||
} else {
|
||||
@@ -2111,7 +2108,6 @@ void WatchHandler::updateWatchExpression(WatchItem *item, const QString &newExp)
|
||||
|
||||
saveWatchers();
|
||||
if (m_model->m_engine->state() == DebuggerNotReady) {
|
||||
item->setAllUnneeded();
|
||||
item->setValue(QString(QLatin1Char(' ')));
|
||||
item->update();
|
||||
} else {
|
||||
@@ -2290,10 +2286,8 @@ void WatchHandler::fetchMore(const QString &iname) const
|
||||
{
|
||||
if (WatchItem *item = m_model->findItem(iname)) {
|
||||
m_model->m_expandedINames.insert(iname);
|
||||
if (item->children().isEmpty()) {
|
||||
item->setChildrenNeeded();
|
||||
if (item->children().isEmpty())
|
||||
m_model->m_engine->expandItem(iname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user