Debugger: Make the time stamp recording option work for single items

Should help to drill down to individual expensive dumpers.

Change-Id: I983ba075231784f71dd9d5c3bda375a3ee508bf6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2019-04-09 08:23:24 +02:00
parent 57cac11e20
commit e95fd876aa
10 changed files with 53 additions and 18 deletions

View File

@@ -53,6 +53,9 @@ WatchTreeView::WatchTreeView(WatchType type)
connect(this, &QTreeView::expanded, this, &WatchTreeView::expandNode);
connect(this, &QTreeView::collapsed, this, &WatchTreeView::collapseNode);
connect(action(LogTimeStamps), &QAction::triggered,
this, &WatchTreeView::updateTimeColumn);
}
void WatchTreeView::expandNode(const QModelIndex &idx)
@@ -96,6 +99,14 @@ void WatchTreeView::setModel(QAbstractItemModel *model)
connect(watchModel, &WatchModelBase::updateFinished,
this, &WatchTreeView::hideProgressIndicator);
}
updateTimeColumn();
}
void WatchTreeView::updateTimeColumn()
{
if (header())
header()->setSectionHidden(WatchModelBase::TimeColumn, !boolSetting(LogTimeStamps));
}
void WatchTreeView::handleItemIsExpanded(const QModelIndex &idx)