From 1da8ef74071231f12d5584c398aa640260438e2d Mon Sep 17 00:00:00 2001 From: eelke Date: Mon, 31 Dec 2018 09:51:52 +0100 Subject: [PATCH] Remove all knowledge of DatabaseWindow from CrudTab (unwanted dependency) --- pglab/CrudTab.cpp | 4 +--- pglab/CrudTab.h | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/pglab/CrudTab.cpp b/pglab/CrudTab.cpp index d831c7f..57c1c45 100644 --- a/pglab/CrudTab.cpp +++ b/pglab/CrudTab.cpp @@ -1,7 +1,6 @@ #include "CrudTab.h" #include "ui_CrudTab.h" #include "CrudModel.h" -#include "DatabaseWindow.h" #include "ResultTableModelUtil.h" #include "PgLabItemDelegate.h" #include "IntegerRange.h" @@ -12,10 +11,9 @@ #include -CrudTab::CrudTab(IPluginContentWidgetContext *context, DatabaseWindow *parent) +CrudTab::CrudTab(IPluginContentWidgetContext *context, QWidget *parent) : PluginContentWidget(context, parent) , ui(new Ui::CrudTab) - , m_window(parent) { ui->setupUi(this); diff --git a/pglab/CrudTab.h b/pglab/CrudTab.h index 64ae374..838492d 100644 --- a/pglab/CrudTab.h +++ b/pglab/CrudTab.h @@ -13,14 +13,13 @@ namespace Ui { class OpenDatabase; class CrudModel; -class DatabaseWindow; class CrudTab : public PluginContentWidget { Q_OBJECT public: - explicit CrudTab(IPluginContentWidgetContext *context, DatabaseWindow *parent = nullptr); + explicit CrudTab(IPluginContentWidgetContext *context, QWidget *parent = nullptr); ~CrudTab() override; void setConfig(std::shared_ptr db, const PgClass &table); @@ -31,8 +30,6 @@ public: private: Ui::CrudTab *ui; - DatabaseWindow *m_window; - std::shared_ptr m_db; std::optional m_table; @@ -40,7 +37,6 @@ private: std::vector actions; private slots: -// void tableView_currentRowChanged(const QModelIndex ¤t, const QModelIndex &previous); void on_actionRemove_rows_triggered(); void headerCustomContextMenu(const QPoint &pos); };