Commit 4d152262 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Simplify KateProjectView, remove QStackedWidget

Not needed anymore
parent 2cd842db
......@@ -34,7 +34,6 @@ KateProjectView::KateProjectView(KateProjectPluginView *pluginView, KateProject
: m_pluginView(pluginView)
, m_project(project)
, m_treeView(new KateProjectViewTree(pluginView, project))
, m_stackWidget(new QStackedWidget(this))
, m_filter(new KLineEdit())
, m_branchBtn(new QToolButton)
{
......@@ -45,12 +44,10 @@ KateProjectView::KateProjectView(KateProjectPluginView *pluginView, KateProject
layout->setSpacing(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(m_branchBtn);
layout->addWidget(m_stackWidget);
layout->addWidget(m_treeView);
layout->addWidget(m_filter);
setLayout(layout);
m_stackWidget->addWidget(m_treeView);
m_branchBtn->setAutoRaise(true);
m_branchBtn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
m_branchBtn->setSizePolicy(QSizePolicy::Minimum, m_branchBtn->sizePolicy().verticalPolicy());
......@@ -134,17 +131,6 @@ void KateProjectView::filterTextChanged(const QString &filterText)
}
}
void KateProjectView::setTreeViewAsCurrent()
{
Q_ASSERT(m_treeView != m_stackWidget->currentWidget());
auto currentFileHistory = m_stackWidget->currentWidget();
m_stackWidget->removeWidget(currentFileHistory);
delete currentFileHistory;
m_stackWidget->setCurrentWidget(m_treeView);
}
void KateProjectView::showFileGitHistory(const QString &file)
{
FileHistory::showFileHistory(file);
......
......@@ -69,8 +69,6 @@ private Q_SLOTS:
*/
void filterTextChanged(const QString &filterText);
void setTreeViewAsCurrent();
void showFileGitHistory(const QString &file);
/**
......@@ -96,11 +94,6 @@ private:
*/
KateProjectViewTree *m_treeView;
/**
* Contains treeview + file history commit list
*/
QStackedWidget *m_stackWidget;
/**
* filter
*/
......
Supports Markdown
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