Debugger: Some view resizeing fine-tuning

Change-Id: I5ad041e658089ed3f965cf5fb77fda00571389b9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
hjk
2014-06-06 00:53:31 +02:00
parent 0f17cb8046
commit e61119feb9
3 changed files with 14 additions and 13 deletions

View File

@@ -93,20 +93,18 @@ void BaseTreeView::setModel(QAbstractItemModel *model)
void BaseTreeView::connectColumnAdjustment()
{
if (m_alwaysAdjustColumns && model()) {
connect(model(), SIGNAL(layoutChanged()), this, SLOT(resizeColumns()));
connect(model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(resizeColumns()));
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(resizeColumns()));
connect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(resizeColumns()));
connect(model(), SIGNAL(layoutChanged()), this, SLOT(resizeColumns()));
}
}
void BaseTreeView::disconnectColumnAdjustment()
{
if (m_alwaysAdjustColumns && model()) {
disconnect(model(), SIGNAL(layoutChanged()), this, SLOT(resizeColumns()));
disconnect(model(), SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(resizeColumns()));
disconnect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(resizeColumns()));
disconnect(this, SIGNAL(collapsed(QModelIndex)), this, SLOT(resizeColumns()));
disconnect(model(), SIGNAL(layoutChanged()), this, SLOT(resizeColumns()));
}
}