forked from qt-creator/qt-creator
Enabled the use of Debugger-specific watch/locals models.
- Modified WatchModel to handle storage of an hierarchy of WatchItems. - Factored out code for asynchronous population to AsyncWatchModel and added a mixin for convenient handling - Added base class for synchronous models. - Implement simple, synchronous models for CDB, greatly simplifying code and finally getting manual expansion right. Signed-off-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -327,9 +327,11 @@ void WatchWindow::editItem(const QModelIndex &idx)
|
||||
Q_UNUSED(idx); // FIXME
|
||||
}
|
||||
|
||||
void WatchWindow::setModel(QAbstractItemModel *model)
|
||||
void WatchWindow::setModel(QAbstractItemModel *newModel)
|
||||
{
|
||||
QTreeView::setModel(model);
|
||||
if (model() == newModel)
|
||||
return;
|
||||
QTreeView::setModel(newModel);
|
||||
|
||||
setRootIsDecorated(true);
|
||||
header()->setDefaultAlignment(Qt::AlignLeft);
|
||||
@@ -337,7 +339,7 @@ void WatchWindow::setModel(QAbstractItemModel *model)
|
||||
if (m_type != LocalsType)
|
||||
header()->hide();
|
||||
|
||||
connect(model, SIGNAL(layoutChanged()), this, SLOT(resetHelper()));
|
||||
connect(newModel, SIGNAL(layoutChanged()), this, SLOT(resetHelper()));
|
||||
}
|
||||
|
||||
void WatchWindow::resetHelper()
|
||||
|
||||
Reference in New Issue
Block a user