BaseTreeView: Make resizeColumns() publicly accessible

Simplifies the only used code path through the model and a custom
signal.

Change-Id: I9bbab725cdd122b7261a8f14b101786e38e61e57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-02-21 08:35:22 +01:00
parent aa8c4aad16
commit 7f73f3950e
5 changed files with 9 additions and 10 deletions

View File

@@ -1126,7 +1126,7 @@ bool WatchModel::setData(const QModelIndex &idx, const QVariant &value, int role
m_expandedINames.remove(item->iname);
}
if (item->iname.contains('.'))
emit columnAdjustmentRequested();
m_handler->updateWatchersWindow();
return true;
case LocalsTypeFormatRole:
@@ -2347,8 +2347,6 @@ void WatchModel::clearWatches()
void WatchHandler::updateWatchersWindow()
{
emit m_model->columnAdjustmentRequested();
// Force show/hide of watchers and return view.
int showWatch = !theWatcherNames.isEmpty();
int showReturn = m_model->m_returnRoot->childCount() != 0;