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