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

Remove unnecessary ctors/dtors

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