Commit 40a46927 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Changed so that XttTrace can be closed by deleting the object without calling close().

parent 09eeae9a
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
#include "xtt_trace_qt.h" #include "xtt_trace_qt.h"
#include <QAction> #include <QAction>
#include <QCloseEvent>
#include <QMenu> #include <QMenu>
#include <QMenuBar> #include <QMenuBar>
#include <QSplitter> #include <QSplitter>
...@@ -173,14 +174,12 @@ void RtTraceQtWidget::activate_helpplclist() ...@@ -173,14 +174,12 @@ void RtTraceQtWidget::activate_helpplclist()
RtTraceQt::~RtTraceQt() RtTraceQt::~RtTraceQt()
{ {
trace_tNode *node, *fnode;
trace_stop(); trace_stop();
/* Delete all trace children windows */ /* Delete all trace children windows */
for (node = trace_list; node;) { for (trace_tNode *node = trace_list; node;) {
delete node->tractx; delete node->tractx;
fnode = node->Next; trace_tNode *fnode = node->Next;
free((char*)node); free((char*)node);
node = fnode; node = fnode;
} }
...@@ -188,6 +187,10 @@ RtTraceQt::~RtTraceQt() ...@@ -188,6 +187,10 @@ RtTraceQt::~RtTraceQt()
nav_shell->close(); nav_shell->close();
} }
if (toplevel) {
delete toplevel;
}
if (trace_timerid) { if (trace_timerid) {
delete trace_timerid; delete trace_timerid;
} }
...@@ -211,7 +214,7 @@ RtTrace* RtTraceQt::subwindow_new(void* ctx, pwr_tObjid oid, pwr_tStatus* sts) ...@@ -211,7 +214,7 @@ RtTrace* RtTraceQt::subwindow_new(void* ctx, pwr_tObjid oid, pwr_tStatus* sts)
void RtTraceQtWidget::closeEvent(QCloseEvent* event) void RtTraceQtWidget::closeEvent(QCloseEvent* event)
{ {
rt->activate_close(); rt->activate_close();
QWidget::closeEvent(event); event->ignore();
} }
RtTraceQt::RtTraceQt(void* tr_parent_ctx, pwr_tObjid tr_objid, RtTraceQt::RtTraceQt(void* tr_parent_ctx, pwr_tObjid tr_objid,
......
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