Skip to content
Snippets Groups Projects
Commit e159b1df authored by Olivier Langella's avatar Olivier Langella
Browse files

destructor messages

parent 22c9ef4c
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@
#include <QMessageBox>
EditLabelMethods::EditLabelMethods(ProjectWindow *parent):
QDialog(parent),
QDialog(),
ui(new Ui::EditLabelMethodView)
{
ui->setupUi(this);
......@@ -53,7 +53,10 @@ EditLabelMethods::EditLabelMethods(ProjectWindow *parent):
#endif
}
EditLabelMethods::~EditLabelMethods() {
qDebug() << "EditLabelMethods::~EditLabelMethods";
delete ui;
qDebug() << "EditLabelMethods::~EditLabelMethods end";
}
void EditLabelMethods::setProjectSp(ProjectSp project_sp) {
......
......@@ -100,14 +100,16 @@ MainWindow::MainWindow(QWidget *parent):
MainWindow::~MainWindow()
{
qDebug() << "MainWindow::~MainWindow";
_worker_thread.quit();
_worker_thread.wait();
//if (_p_ms_data_file != nullptr) delete _p_ms_data_file;
delete ui;
delete _project_window;
//delete _project_window;
delete _p_load_results_dialog;
delete _p_export_spreadsheet_dialog;
delete _p_waiting_message_dialog;
qDebug() << "MainWindow::~MainWindow end";
}
......
......@@ -41,7 +41,9 @@ AutomaticFilterWidget::AutomaticFilterWidget(QWidget * parent):
AutomaticFilterWidget::~AutomaticFilterWidget()
{
qDebug() << "AutomaticFilterWidget::~AutomaticFilterWidget";
delete ui;
qDebug() << "AutomaticFilterWidget::~AutomaticFilterWidget end";
}
......
......@@ -51,7 +51,9 @@ IdentificationGroupWidget::IdentificationGroupWidget(ProjectWindow * parent, Ide
IdentificationGroupWidget::~IdentificationGroupWidget()
{
qDebug() << "IdentificationGroupWidget::~IdentificationGroupWidget";
delete ui;
qDebug() << "IdentificationGroupWidget::~IdentificationGroupWidget end";
}
void IdentificationGroupWidget::doViewPtmIslandList() {
......
......@@ -91,10 +91,25 @@ ProjectWindow::ProjectWindow(MainWindow *parent):
ProjectWindow::~ProjectWindow()
{
qDebug() << "ProjectWindow::~ProjectWindow";
//if (_p_ms_data_file != nullptr) delete _p_ms_data_file;
_worker_thread.quit();
_worker_thread.wait();
qDebug() << "ProjectWindow::~ProjectWindow1";
delete ui;
qDebug() << "ProjectWindow::~ProjectWindow2";
//delete _p_fasta_str_li ;
qDebug() << "ProjectWindow::~ProjectWindow3";
//delete _p_automatic_filter_widget;
qDebug() << "ProjectWindow::~ProjectWindow4";
//delete _p_edit_modifications;
qDebug() << "ProjectWindow::~ProjectWindow5";
//delete _p_edit_label_methods ;
qDebug() << "ProjectWindow::~ProjectWindow6";
//delete _p_waiting_message_dialog;
qDebug() << "ProjectWindow::~ProjectWindow end";
}
......
......@@ -166,28 +166,19 @@ void ProteinListWindow::doFocusReceived(bool has_focus) {
void ProteinListWindow::showContextMenu(const QPoint & pos) {
QMenu contextMenu(tr("Context menu"), this);
if (_p_context_menu == nullptr) {
_p_context_menu = new QMenu(tr("Context menu"), this);
QAction accession_action("accession", this);
accession_action.setCheckable(true);
accession_action.setChecked(_display_evalue);
connect(&accession_action, SIGNAL(toggled(bool)), this, SLOT(showAccessionColumn(bool)));
contextMenu.addAction(&accession_action);
QAction evalue_action("Evalue", this);
evalue_action.setCheckable(true);
evalue_action.setChecked(_display_evalue);
connect(&evalue_action, SIGNAL(toggled(bool)), this, SLOT(showEvalueColumn(bool)));
contextMenu.addAction(&evalue_action);
ProteinListQactionColumn * p_action;
for (unsigned int i=0; i < _protein_table_model_p->columnCount(); i++) {
p_action = new ProteinListQactionColumn(this,ProteinTableModel::getProteinListColumn(i));
contextMenu.addAction(p_action);
_p_context_menu->addAction(p_action);
}
contextMenu.exec(mapToGlobal(pos));
_p_context_menu->exec(mapToGlobal(pos));
}
_p_context_menu->show();
}
......@@ -195,6 +186,9 @@ ProteinListWindow::~ProteinListWindow()
{
//if (_p_ms_data_file != nullptr) delete _p_ms_data_file;
delete ui;
if (_p_context_menu != nullptr) {
delete _p_context_menu;
}
}
......
......@@ -27,6 +27,7 @@
#include <QMainWindow>
#include <QAction>
#include <QMenu>
#include "proteintablemodel.h"
#include "proteintableproxymodel.h"
......@@ -103,6 +104,7 @@ private:
ProteinTableModel * _protein_table_model_p = nullptr;
ProteinTableProxyModel * _p_proxy_model = nullptr;
ProjectWindow * _project_window;
QMenu * _p_context_menu = nullptr;
bool _display_evalue = true;
bool _display_accession = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment