Commit 378d3a8f authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Fix file name and memory leak in comparebranchview

parent f9653015
...@@ -68,7 +68,7 @@ target_sources( ...@@ -68,7 +68,7 @@ target_sources(
filehistorywidget.cpp filehistorywidget.cpp
quickdialog.cpp quickdialog.cpp
pushpulldialog.cpp pushpulldialog.cpp
comarebranchesview.cpp comparebranchesview.cpp
tools/kateprojectcodeanalysistoolcppcheck.cpp tools/kateprojectcodeanalysistoolcppcheck.cpp
tools/kateprojectcodeanalysistoolflake8.cpp tools/kateprojectcodeanalysistoolflake8.cpp
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
SPDX-License-Identifier: LGPL-2.0-or-later SPDX-License-Identifier: LGPL-2.0-or-later
*/ */
#include "comarebranchesview.h" #include "comparebranchesview.h"
#include "kateprojectpluginview.h" #include "kateprojectpluginview.h"
#include "kateprojectworker.h" #include "kateprojectworker.h"
...@@ -129,11 +129,11 @@ CompareBranchesView::CompareBranchesView(QWidget *parent, const QString &gitPath ...@@ -129,11 +129,11 @@ CompareBranchesView::CompareBranchesView(QWidget *parent, const QString &gitPath
{ {
setLayout(new QVBoxLayout); setLayout(new QVBoxLayout);
QStandardItem *root = new QStandardItem; QStandardItem root;
createFileTree(root, m_gitDir, items); createFileTree(&root, m_gitDir, items);
m_model.clear(); m_model.clear();
m_model.invisibleRootItem()->appendColumn(root->takeColumn(0)); m_model.invisibleRootItem()->appendColumn(root.takeColumn(0));
m_backBtn.setText(i18n("Back")); m_backBtn.setText(i18n("Back"));
m_backBtn.setIcon(QIcon::fromTheme(QStringLiteral("go-previous"))); m_backBtn.setIcon(QIcon::fromTheme(QStringLiteral("go-previous")));
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "gitwidget.h" #include "gitwidget.h"
#include "branchcheckoutdialog.h" #include "branchcheckoutdialog.h"
#include "branchesdialog.h" #include "branchesdialog.h"
#include "comarebranchesview.h" #include "comparebranchesview.h"
#include "git/gitdiff.h" #include "git/gitdiff.h"
#include "gitcommitdialog.h" #include "gitcommitdialog.h"
#include "gitstatusmodel.h" #include "gitstatusmodel.h"
......
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