Commit bc947761 authored by Christoffer Ackelman's avatar Christoffer Ackelman

QT: Fixed xtt_fast, xtt_sevhist and xtt_trend destructors.

parent 6a4c3e62
......@@ -1358,9 +1358,7 @@ int GeCurve::configure_axes()
grow_ResetNodraw(growaxis_ctx);
grow_Redraw(growaxis_ctx);
if (cd->x_data[0]) {
update_times_markers();
}
return 1;
}
......
......@@ -182,7 +182,7 @@ public:
grow_tObject curve_axisobject;
grow_tObject curve_markobject1;
grow_tObject curve_markobject2;
GeCurveData* cd;
GeCurveData* cd = NULL;
grow_tObject mark1_text;
grow_tObject mark2_text;
grow_tObject mark1_rect;
......
......@@ -53,14 +53,13 @@ XttFastQt::XttFastQt(void* parent_ctx, QWidget* parent_wid, char* name,
unsigned int options, int xn_color_theme, void* basewidget, int* sts)
: XttFast(parent_ctx, name, fast_arp, xn_color_theme, sts)
{
char title[250];
if (EVEN(*sts)) {
// Error from XttFast constructor
return;
}
*sts = XNAV__SUCCESS;
char title[250];
if (!streq(name, "")) {
strncpy(title, name, sizeof(title));
} else {
......@@ -88,10 +87,9 @@ XttFastQt::XttFastQt(void* parent_ctx, QWidget* parent_wid, const char* name,
strncpy(title, filename, sizeof(title));
if (EVEN(*sts)) {
// Error from XttFast
// Error from XttFast constructor
return;
}
*sts = XNAV__SUCCESS;
curve = new GeCurveQt(
......@@ -108,15 +106,17 @@ XttFastQt::XttFastQt(void* parent_ctx, QWidget* parent_wid, const char* name,
XttFastQt::~XttFastQt()
{
debug_print("XttFastQt::~XttFastQt\n");
if (timerid) {
timerid->remove();
}
for (int i = 0; i < fast_cnt; i++) {
gdh_UnrefObjectInfo(new_subid);
}
if (curve) {
delete curve;
}
if (gcd) {
delete gcd;
}
delete wow;
}
\ No newline at end of file
......@@ -58,10 +58,9 @@ XttSevHistQt::XttSevHistQt(void* parent_ctx, QWidget* x_parent_wid,
strncpy(title, name, sizeof(title));
if (EVEN(*sts)) {
// Error from XttSevHist
// Error from XttSevHist constructor
return;
}
*sts = XNAV__SUCCESS;
curve = new GeCurveQt(this, parent_wid, title, NULL, gcd, 1, xn_width,
......@@ -104,10 +103,9 @@ XttSevHistQt::XttSevHistQt(void* parent_ctx, QWidget* x_parent_wid,
strncpy(title, name, sizeof(title));
if (EVEN(*sts)) {
// Error from XttSevHist
// Error from XttSevHist constructor
return;
}
*sts = XNAV__SUCCESS;
curve = new GeCurveQt(
......@@ -124,16 +122,21 @@ XttSevHistQt::XttSevHistQt(void* parent_ctx, QWidget* x_parent_wid,
XttSevHistQt::~XttSevHistQt()
{
debug_print("XttSevHistQt::~XttSevHistQt\n");
if (otree) {
delete otree;
}
if (timerid) {
timerid->remove();
}
if (curve) {
delete curve;
}
if (gcd) {
delete gcd;
}
if (wow) {
delete wow;
}
}
XttOTree* XttSevHistQt::tree_new(const char* title, pwr_tAttrRef* itemlist,
......
......@@ -58,6 +58,7 @@ XttTrendQt::XttTrendQt(void* parent_ctx, QWidget* x_parent_wid, char* name,
parent_wid(x_parent_wid)
{
if (EVEN(*sts)) {
// Error from XttTrend constructor
return;
}
*sts = XNAV__SUCCESS;
......@@ -88,7 +89,6 @@ XttTrendQt::XttTrendQt(void* parent_ctx, QWidget* x_parent_wid, char* name,
XttTrendQt::~XttTrendQt()
{
debug_print("XttTrendQt::~XttTrendQt\n");
if (timerid) {
timerid->remove();
}
......@@ -96,12 +96,14 @@ XttTrendQt::~XttTrendQt()
for (int i = 0; i < trend_cnt; i++) {
gdh_UnrefObjectInfo(subid[i]);
}
delete curve;
if (gcd) {
delete gcd;
}
if (otree) {
delete otree;
}
delete wow;
}
XttOTree* XttTrendQt::tree_new(const char* title, pwr_tAttrRef* itemlist,
......
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