Commit 7b63aca2 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Added destructor to ge widget.

parent 51ddfbfa
......@@ -189,7 +189,6 @@ int AttrQt::reconfigure_attr()
void AttrQtWidget::closeEvent(QCloseEvent* event)
{
debug_print("AttrQtWidget::closeEvent\n");
if (attr->close_cb) {
(attr->close_cb)(
attr->parent_ctx, attr, attr->object, attr->client_data, 0);
......@@ -437,7 +436,6 @@ AttrQt::AttrQt(QWidget* a_parent_wid, void* a_parent_ctx, attr_eType a_type,
AttrQt::~AttrQt()
{
debug_print("AttrQt::~AttrQt\n");
if (original_data) {
delete original_data;
}
......
......@@ -51,7 +51,6 @@ AttrNavQt::AttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
{
trace_obj = new AttrNavQtTraceObject(this);
debug_print("creating a scrolledbrowwidgetqt\n");
form_widget
= scrolledbrowwidgetqt_new(AttrNav::init_brow_cb, this, &brow_widget);
......@@ -63,7 +62,6 @@ AttrNavQt::AttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
AttrNavQt::~AttrNavQt()
{
debug_print("AttrNavQt::~AttrNavQt\n");
delete trace_obj;
delete brow;
......@@ -80,11 +78,6 @@ AttrNavQtTraceObject::AttrNavQtTraceObject(AttrNavQt* parent) : QObject(), attrn
trace_timerid = new QTimer(this);
}
AttrNavQtTraceObject::~AttrNavQtTraceObject()
{
debug_print("AttrNavQtTraceObject::~AttrNavQtTraceObject\n");
}
void AttrNavQtTraceObject::trace_scan()
{
if (attrnav->trace_started) {
......
......@@ -70,7 +70,6 @@ class AttrNavQtTraceObject : public QObject {
public:
AttrNavQtTraceObject(AttrNavQt* parent);
~AttrNavQtTraceObject();
public slots:
void trace_scan();
......
......@@ -1268,30 +1268,6 @@ void GeQtWidget::focusInEvent(QFocusEvent* event)
QWidget::focusInEvent(event);
}
// Reimplemented from Ge, but replaced 'delete this' with 'close()' to avoid
// segmentation fault when Qt tries to use the (deleted) object
/*
void GeQt::save_and_close()
{
char name[40];
graph->get_name( name);
if ( streq( name, "")) {
if ( ! graph->is_subgraph())
open_input_dialog( "Graph name", "Save Graph", "",
Ge::save_graph_and_close);
else
open_input_dialog( "SubGraph name", "Save SubGraph", "",
Ge::save_graph_and_close);
}
else {
save_graph( this, name);
QWidget::close();
}
}
*/
GeQt::~GeQt()
{
debug_print("GeQt::~GeQt\n");
......@@ -1304,16 +1280,25 @@ GeQt::~GeQt()
wow->DeleteList(open_dialog);
}
if (plantctx) {
delete plantctx;
if (subgraphs) {
delete subgraphs;
}
toplevel->close();
delete recall_entry;
delete text_recall;
delete name_recall;
delete value_recall;
delete cmd_recall;
delete graph;
delete wow;
if (plantctx) {
delete plantctx;
}
if (objectnav) {
delete objectnav;
}
toplevel->close();
if (exit_when_close) {
exit(0);
......
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