Commit 40ce27ee authored by Christoffer Ackelman's avatar Christoffer Ackelman Committed by Esteban Blanc

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

parent 2fbece9a
......@@ -304,7 +304,7 @@ XttGeQt::XttGeQt(void* xg_parent_ctx, const char* xg_name,
graph->sound_cb = &ge_sound_cb;
graph->eventlog_cb = &ge_eventlog_cb;
grow_widget->setMinimumSize(window_width, window_height);
grow_widget->resize(window_width, window_height);
QObject::connect(((GraphQt*)graph)->grow_widget,
SIGNAL(resize_signal(QResizeEvent*)), toplevel,
......
......@@ -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,
......
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