Commit f0d7fadd authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

QT: Fixed segfault when closing GE.

parent 2ce662fe
......@@ -309,12 +309,6 @@ void CoWowQt::PopList(void* data)
pop(ctx);
}
void CoWowQt::DeleteList(void* data)
{
CoWowListWidgetQt* ctx = (CoWowListWidgetQt*)data;
ctx->close();
}
void CoWowWarrantQt::reject()
{
QDialog::reject();
......
......@@ -196,7 +196,6 @@ public:
void(action_cb)(void*, char*, int), void(cancel_cb)(void*), void* ctx,
int show_apply_button = 0);
void PopList(void* ctx);
void DeleteList(void* ctx);
void CreateFileSelDia(const char* title, void* parent_ctx,
void (*file_selected_cb)(void*, char*, wow_eFileSelType),
wow_eFileSelType file_type, wow_eFileSelAction action);
......
......@@ -63,6 +63,7 @@
#include "wb_wnav_selformat.h"
#include <QApplication>
#include <QCloseEvent>
#include <QFontDatabase>
#include <QHBoxLayout>
#include <QInputDialog>
......@@ -1237,7 +1238,7 @@ void GeQt::update()
void GeQtWidget::closeEvent(QCloseEvent* event)
{
ge->Ge::activate_exit();
QWidget::closeEvent(event);
event->ignore();
}
void GeQtWidget::focusInEvent(QFocusEvent* event)
......@@ -1266,11 +1267,11 @@ GeQt::~GeQt()
}
if (open_dialog) {
wow->DeleteList(open_dialog);
((CoWowListWidgetQt*)open_dialog)->close();
}
if (subgraphs_widget) {
subgraphs_widget->close();
if (subgraphs) {
delete subgraphs;
}
delete subpalette;
delete recall_entry;
......@@ -1288,7 +1289,7 @@ GeQt::~GeQt()
delete objectnav;
}
toplevel->close();
delete toplevel;
if (exit_when_close) {
exit(0);
......@@ -1325,7 +1326,6 @@ GeQt::GeQt(void* x_parent_ctx, ldh_tSesContext x_ldhses, int x_exit_when_close,
toplevel->setMinimumSize(window_width, window_height);
toplevel->setWindowTitle(fl(title));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
CoWowQt::SetWindowIcon(toplevel);
......
......@@ -45,6 +45,7 @@
#include "ge_attr_qt.h"
#include "ge_subgraphs_qt.h"
#include <QCloseEvent>
#include <QMenuBar>
#include <QTimer>
#include <QVBoxLayout>
......@@ -57,7 +58,7 @@ void SubGraphsQtWidget::closeEvent(QCloseEvent* event)
trace_timerid->stop();
delete subgraphs;
}
QWidget::closeEvent(event);
event->ignore();
}
void SubGraphsQtWidget::focusInEvent(QFocusEvent* event)
......@@ -119,7 +120,6 @@ SubGraphsQt::SubGraphsQt(void* xn_parent_ctx, const char* xn_name,
toplevel = new SubGraphsQtWidget(this);
toplevel->setMinimumSize(300, 500);
toplevel->setWindowTitle(fl(name));
toplevel->setAttribute(Qt::WA_DeleteOnClose);
// Menu
QMenuBar* menu_bar = new QMenuBar(toplevel);
......@@ -171,6 +171,8 @@ SubGraphsQt::~SubGraphsQt()
}
delete brow;
delete toplevel;
}
void SubGraphsQt::trace_start()
......
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