Commit 24a225de authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Avoid a bunch of function calls

parent f14c50da
......@@ -85,16 +85,17 @@ void NavigatorView::modelAttached(Model *model)
m_treeModel->setView(this);
treeWidget()->expandAll();
QTreeView *treeView = treeWidget();
treeView->expandAll();
treeWidget()->header()->setResizeMode(0, QHeaderView::Stretch);
treeWidget()->header()->resizeSection(1,26);
treeWidget()->setRootIsDecorated(false);
treeWidget()->setIndentation(20);
treeView->header()->setResizeMode(0, QHeaderView::Stretch);
treeView->header()->resizeSection(1,26);
treeView->setRootIsDecorated(false);
treeView->setIndentation(20);
#ifdef _LOCK_ITEMS_
treeWidget()->header()->resizeSection(2,20);
treeView->header()->resizeSection(2,20);
#endif
treeWidget()->setHeaderHidden(true);
treeView->setHeaderHidden(true);
}
void NavigatorView::modelAboutToBeDetached(Model *model)
......
......@@ -81,9 +81,4 @@ void NavigatorWidget::setTreeModel(QAbstractItemModel* model)
m_treeView->setModel(model);
}
QTreeView *NavigatorWidget::treeView()
{
return m_treeView;
}
}
......@@ -47,7 +47,7 @@ public:
virtual ~NavigatorWidget();
void setTreeModel(QAbstractItemModel *model);
QTreeView *treeView();
QTreeView *treeView() const { return m_treeView; }
private:
NavigatorTreeView *m_treeView;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment