Commit d12c9306 authored by Waqar Ahmed's avatar Waqar Ahmed
Browse files

Remove unnecessary ctors/dtors

parent d8107866
......@@ -7,6 +7,7 @@
#include "kateprojecttreeviewcontextmenu.h"
#include "git/gitutils.h"
#include "kateprojectviewtree.h"
#include <KApplicationTrader>
#include <KIO/ApplicationLauncherJob>
......@@ -26,17 +27,7 @@
#include <QMimeType>
#include <QStandardPaths>
#include "kateprojectviewtree.h"
KateProjectTreeViewContextMenu::KateProjectTreeViewContextMenu()
{
}
KateProjectTreeViewContextMenu::~KateProjectTreeViewContextMenu()
{
}
void KateProjectTreeViewContextMenu::exec(const QString &filename, const QModelIndex &index, const QPoint &pos, QWidget *parent)
void KateProjectTreeViewContextMenu::exec(const QString &filename, const QModelIndex &index, const QPoint &pos, KateProjectViewTree *parent)
{
/**
* Create context menu
......@@ -122,7 +113,7 @@ void KateProjectTreeViewContextMenu::exec(const QString &filename, const QModelI
dlg->setAttribute(Qt::WA_DeleteOnClose);
dlg->show();
} else if (action == rename) {
static_cast<KateProjectViewTree *>(parent)->edit(index);
parent->edit(index);
} else if (action == fileHistory) {
showFileHistory(index.data(Qt::UserRole).toString());
} else {
......
......@@ -14,6 +14,7 @@
class QWidget;
class QModelIndex;
class KateProjectViewTree;
class KateProjectTreeViewContextMenu : public QObject
{
......@@ -24,18 +25,13 @@ public:
* @param pluginView our plugin view
* @param project project this view is for
*/
KateProjectTreeViewContextMenu();
/**
* deconstruct project
*/
~KateProjectTreeViewContextMenu();
KateProjectTreeViewContextMenu() = default;
/**
* our project.
* @return project
*/
void exec(const QString &filename, const QModelIndex &index, const QPoint &pos, QWidget *parent);
void exec(const QString &filename, const QModelIndex &index, const QPoint &pos, KateProjectViewTree *parent);
/**
* emits on clicking Menu->Show File History
......
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