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