TreeModel: Inform view about changed root

This removes the need to emit the respective signal by the caller
of setRootItem() if the tree has been constructed before using
setRootItem().

Change-Id: I6f6210a9ef7d9ec3d347dc7cfdaf853535ca7656
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Christian Stenger
2015-06-04 07:52:12 +02:00
parent e2f8a9883b
commit 35680abd9e

View File

@@ -967,6 +967,7 @@ void TreeModel::setRootItem(TreeItem *item)
delete m_root;
m_root = item;
item->setModel(this);
emit layoutChanged();
}
void TreeModel::setHeader(const QStringList &displays)