Commit 63f3360e authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Remove the showFileHistory signals

We can use the widget directly now

The action is also removed, will be adding it to mainWindow soon
parent 4d152262
......@@ -6,6 +6,7 @@
*/
#include "kateprojecttreeviewcontextmenu.h"
#include "filehistorywidget.h"
#include "git/gitutils.h"
#include "kateproject.h"
#include "kateprojectinfoviewterminal.h"
......@@ -220,7 +221,7 @@ void KateProjectTreeViewContextMenu::exec(const QString &filename, const QModelI
/** start the edit */
parent->edit(index);
} else if (action == fileHistory) {
showFileHistory(index.data(Qt::UserRole).toString());
FileHistory::showFileHistory(index.data(Qt::UserRole).toString());
} else if (addFile && action == addFile) {
QString name = getName(parent);
if (!name.isEmpty()) {
......
......@@ -25,11 +25,6 @@ public:
* @return project
*/
void exec(const QString &filename, const QModelIndex &index, const QPoint &pos, KateProjectViewTree *parent);
/**
* emits on clicking Menu->Show File History
*/
Q_SIGNAL void showFileHistory(const QString &file);
};
#endif
......@@ -7,7 +7,6 @@
#include "kateprojectview.h"
#include "branchcheckoutdialog.h"
#include "filehistorywidget.h"
#include "gitprocess.h"
#include "gitwidget.h"
#include "kateprojectfiltermodel.h"
......@@ -86,20 +85,6 @@ KateProjectView::KateProjectView(KateProjectPluginView *pluginView, KateProject
connect(&m_branchChangedWatcher, &QFileSystemWatcher::fileChanged, this, [this] {
m_project->reload(true);
});
pluginView->actionCollection()
->addAction(QStringLiteral("git_show_file_history"),
this,
[this] {
auto file = m_treeView->currentIndex().data(Qt::UserRole).toString();
if (!file.isEmpty()) {
showFileGitHistory(file);
}
})
->setText(i18n("Show File Git History"));
// file history
connect(m_treeView, &KateProjectViewTree::showFileHistory, this, &KateProjectView::showFileGitHistory);
}
KateProjectView::~KateProjectView()
......@@ -131,11 +116,6 @@ void KateProjectView::filterTextChanged(const QString &filterText)
}
}
void KateProjectView::showFileGitHistory(const QString &file)
{
FileHistory::showFileHistory(file);
}
void KateProjectView::checkAndRefreshGit()
{
const auto dotGitPath = getRepoBasePath(m_project->baseDir());
......
......@@ -69,8 +69,6 @@ private Q_SLOTS:
*/
void filterTextChanged(const QString &filterText);
void showFileGitHistory(const QString &file);
/**
* On project model change, check if project
* is a git repo and then show/hide the branch
......
......@@ -250,7 +250,6 @@ void KateProjectViewTree::contextMenuEvent(QContextMenuEvent *event)
}
KateProjectTreeViewContextMenu menu;
connect(&menu, &KateProjectTreeViewContextMenu::showFileHistory, this, &KateProjectViewTree::showFileHistory);
menu.exec(filePath, index, viewport()->mapToGlobal(event->pos()), this);
event->accept();
......
......@@ -103,9 +103,6 @@ private:
* our project
*/
KateProject *m_project;
Q_SIGNALS:
void showFileHistory(const QString &file);
};
#endif
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