Commit 2524e11e authored by Christoffer Ackelman's avatar Christoffer Ackelman

Moved deletion of base class fields from child classes to base class.

parent 85abf746
......@@ -67,7 +67,6 @@ PnViewerNavGtk::PnViewerNavGtk(void* l_parent_ctx, GtkWidget* l_parent_wid,
//
PnViewerNavGtk::~PnViewerNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -59,7 +59,6 @@ PnViewerNavQt::PnViewerNavQt(
PnViewerNavQt::~PnViewerNavQt()
{
delete brow;
form_widget->close();
}
......
......@@ -341,6 +341,7 @@ PnViewerNav::PnViewerNav(void* l_parent_ctx, viewer_eType l_type)
//
PnViewerNav::~PnViewerNav()
{
delete brow;
}
PnViewerNavBrow::~PnViewerNavBrow()
......
......@@ -78,7 +78,6 @@ GsdAttrNavGtk::~GsdAttrNavGtk()
{
delete trace_timerid;
delete wow;
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -75,7 +75,6 @@ GsdmlAttrNavGtk::~GsdmlAttrNavGtk()
{
delete trace_timerid;
delete wow;
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -95,7 +95,6 @@ GsdAttrNavMotif::~GsdAttrNavMotif()
{
delete trace_timerid;
delete wow;
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -62,7 +62,6 @@ GsdAttrNavQt::GsdAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
GsdAttrNavQt::~GsdAttrNavQt()
{
delete trace_timerid;
delete brow;
form_widget->close();
}
......
......@@ -62,7 +62,6 @@ GsdmlAttrNavQt::GsdmlAttrNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
GsdmlAttrNavQt::~GsdmlAttrNavQt()
{
delete trace_timerid;
delete brow;
form_widget->close();
}
......
......@@ -433,6 +433,7 @@ GsdAttrNav::GsdAttrNav(void* xn_parent_ctx, const char* xn_name, pb_gsd* xn_gsd,
//
GsdAttrNav::~GsdAttrNav()
{
delete brow;
}
GsdAttrNavBrow::~GsdAttrNavBrow()
......
......@@ -465,6 +465,7 @@ GsdmlAttrNav::GsdmlAttrNav(void* xn_parent_ctx, const char* xn_name,
//
GsdmlAttrNav::~GsdmlAttrNav()
{
delete brow;
}
GsdmlAttrNavBrow::~GsdmlAttrNavBrow()
......
......@@ -72,7 +72,6 @@ TblNavGtk::TblNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
TblNavGtk::~TblNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -61,7 +61,6 @@ TblNavQt::TblNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
TblNavQt::~TblNavQt()
{
delete brow;
form_widget->close();
}
......
......@@ -149,6 +149,7 @@ TblNav::TblNav(void* xn_parent_ctx, sevcli_sHistItem* xn_itemlist,
//
TblNav::~TblNav()
{
delete brow;
}
TblNavBrow::~TblNavBrow()
......
......@@ -61,7 +61,6 @@ WbBckWNavGtk::WbBckWNavGtk(void* l_parent_ctx, GtkWidget* l_parent_wid,
//
WbBckWNavGtk::~WbBckWNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -61,7 +61,6 @@ WbExpWNavGtk::WbExpWNavGtk(void* l_parent_ctx, GtkWidget* l_parent_wid,
//
WbExpWNavGtk::~WbExpWNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -80,7 +80,6 @@ WAttNavGtk::WAttNavGtk(void* wa_parent_ctx, wattnav_eType wa_type,
//
WAttNavGtk::~WAttNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -78,7 +78,6 @@ WdaNavGtk::WdaNavGtk(void* wa_parent_ctx, GtkWidget* wa_parent_wid,
//
WdaNavGtk::~WdaNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -144,14 +144,6 @@ WNavGtk::~WNavGtk()
if (trace_started)
g_source_remove(trace_timerid);
menu_tree_free();
PalFile::config_tree_free(menu);
for (int i = 1; i < brow_cnt; i++) {
brow_DeleteSecondaryCtx(brow_stack[brow_cnt]->ctx);
brow_stack[brow_cnt]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
delete wow;
gtk_widget_destroy(form_widget);
}
......
......@@ -70,7 +70,6 @@ WPkgNavGtk::WPkgNavGtk(void* wa_parent_ctx, GtkWidget* wa_parent_wid,
//
WPkgNavGtk::~WPkgNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -70,7 +70,6 @@ WRevNavGtk::WRevNavGtk(void* wa_parent_ctx, GtkWidget* wa_parent_wid,
//
WRevNavGtk::~WRevNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -99,7 +99,6 @@ WAttNavMotif::~WAttNavMotif()
if (trace_started)
XtRemoveTimeOut(trace_timerid);
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -98,7 +98,6 @@ WdaNavMotif::~WdaNavMotif()
if (trace_started)
XtRemoveTimeOut(trace_timerid);
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -154,14 +154,6 @@ WNavMotif::~WNavMotif()
if (avoid_deadlock)
XtRemoveTimeOut(deadlock_timerid);
menu_tree_free();
PalFile::config_tree_free(menu);
for (int i = 1; i < brow_cnt; i++) {
brow_DeleteSecondaryCtx(brow_stack[brow_cnt]->ctx);
brow_stack[brow_cnt]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
delete wow;
XtDestroyWidget(form_widget);
}
......
......@@ -86,7 +86,6 @@ WPkgNavMotif::WPkgNavMotif(void* wa_parent_ctx, Widget wa_parent_wid,
//
WPkgNavMotif::~WPkgNavMotif()
{
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -59,7 +59,6 @@ WbBckWNavQt::WbBckWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbBckWNavQt::~WbBckWNavQt()
{
debug_print("WbBckWNavQt::~WbBckWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -59,7 +59,6 @@ WbExpWNavQt::WbExpWNavQt(void* l_parent_ctx, QWidget* l_parent_wid,
WbExpWNavQt::~WbExpWNavQt()
{
debug_print("WbExpWNavQt::~WbExpWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -63,7 +63,6 @@ WAttNavQt::WAttNavQt(void* wa_parent_ctx, wattnav_eType wa_type,
WAttNavQt::~WAttNavQt()
{
delete brow;
form_widget->close();
}
......
......@@ -65,7 +65,6 @@ WdaNavQt::WdaNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WdaNavQt::~WdaNavQt()
{
debug_print("WdaNavQt::~WdaNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -132,14 +132,6 @@ WNavQt::~WNavQt()
delete trace_obj;
menu_tree_free();
PalFile::config_tree_free(menu);
for (int i = 1; i < brow_cnt; i++) {
brow_DeleteSecondaryCtx(brow_stack[brow_cnt]->ctx);
brow_stack[brow_cnt]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
form_widget->close();
}
......
......@@ -57,7 +57,6 @@ WPkgNavQt::WPkgNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WPkgNavQt::~WPkgNavQt()
{
debug_print("WPkgNavQt::~WPkgNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -57,7 +57,6 @@ WRevNavQt::WRevNavQt(void* wa_parent_ctx, QWidget* wa_parent_wid,
WRevNavQt::~WRevNavQt()
{
debug_print("WRevNavQt::~WRevNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -225,6 +225,7 @@ WbBckWNav::WbBckWNav(void* l_parent_ctx, ldh_tSesContext l_ldhses,
//
WbBckWNav::~WbBckWNav()
{
delete brow;
}
WbBckWNavBrow::~WbBckWNavBrow()
......
......@@ -335,6 +335,7 @@ WbExpWNav::WbExpWNav(
//
WbExpWNav::~WbExpWNav()
{
delete brow;
list_free();
}
......
......@@ -77,6 +77,7 @@ WAttNav::WAttNav(void* wa_parent_ctx, wattnav_eType wa_type,
//
WAttNav::~WAttNav()
{
delete brow;
}
//
......
......@@ -91,6 +91,7 @@ WdaNav::WdaNav(void* wa_parent_ctx, const char* wa_name,
//
WdaNav::~WdaNav()
{
delete brow;
}
//
......
......@@ -647,6 +647,14 @@ WNav::WNav(void* xn_parent_ctx, const char* xn_name, const char* xn_layout,
//
WNav::~WNav()
{
menu_tree_free();
PalFile::config_tree_free(menu);
for (int i = 1; i < brow_cnt; i++) {
brow_DeleteSecondaryCtx(brow_stack[brow_cnt]->ctx);
brow_stack[brow_cnt]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
}
//
......
......@@ -92,6 +92,7 @@ WPkgNav::WPkgNav(void* wa_parent_ctx, const char* wa_name,
//
WPkgNav::~WPkgNav()
{
delete brow;
}
//
......
......@@ -445,6 +445,7 @@ WRevNav::WRevNav(void* wa_parent_ctx, ldh_tSession wa_ldhses,
//
WRevNav::~WRevNav()
{
delete brow;
}
//
......
......@@ -63,7 +63,6 @@ CoLogWNavGtk::CoLogWNavGtk(
//
CoLogWNavGtk::~CoLogWNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -63,7 +63,6 @@ MsgListGtk::MsgListGtk(
//
MsgListGtk::~MsgListGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -74,7 +74,6 @@ NodelistNavGtk::~NodelistNavGtk()
if (trace_started)
g_source_remove(trace_timerid);
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -77,7 +77,6 @@ TreeNavGtk::TreeNavGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
TreeNavGtk::~TreeNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -86,7 +86,6 @@ CoXHelpNavGtk::~CoXHelpNavGtk()
brow_stack[i]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -84,7 +84,6 @@ MsgListMotif::MsgListMotif(void* ev_parent_ctx, Widget ev_parent_wid, Widget* w)
//
MsgListMotif::~MsgListMotif()
{
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -120,7 +120,6 @@ CoXHelpNavMotif::~CoXHelpNavMotif()
brow_stack[i]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -58,7 +58,6 @@ CoLogWNavQt::CoLogWNavQt(
CoLogWNavQt::~CoLogWNavQt()
{
debug_print("CoLogWNavQt::~CoLogWNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -55,7 +55,6 @@ MsgListQt::MsgListQt(void* ev_parent_ctx, QWidget* ev_parent_wid, QWidget** w)
MsgListQt::~MsgListQt()
{
delete brow;
form_widget->close();
}
......
......@@ -69,7 +69,6 @@ NodelistNavQt::~NodelistNavQt()
debug_print("NodelistNavQt::~NodelistNavQt\n");
delete trace_obj;
delete brow;
form_widget->close();
}
......
......@@ -65,7 +65,6 @@ TreeNavQt::TreeNavQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
TreeNavQt::~TreeNavQt()
{
debug_print("TreeNavQt::~TreeNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -72,7 +72,6 @@ CoXHelpNavQt::~CoXHelpNavQt()
brow_stack[i]->free_pixmaps();
delete brow_stack[i];
}
delete brow;
form_widget->close();
}
......
......@@ -213,6 +213,7 @@ CoLogWNav::CoLogWNav(void* l_parent_ctx, int l_show_item)
//
CoLogWNav::~CoLogWNav()
{
delete brow;
}
CoLogWNavBrow::~CoLogWNavBrow()
......
......@@ -228,6 +228,7 @@ MsgList::MsgList(void* ev_parent_ctx)
//
MsgList::~MsgList()
{
delete brow;
}
MsgListBrow::~MsgListBrow()
......
......@@ -350,6 +350,7 @@ NodelistNav::NodelistNav(void* nodelist_parent_ctx,
//
NodelistNav::~NodelistNav()
{
delete brow;
}
NodelistNavBrow::~NodelistNavBrow()
......
......@@ -223,6 +223,7 @@ TreeNav::TreeNav(void* xn_parent_ctx, pwr_tAttrRef* xn_itemlist,
//
TreeNav::~TreeNav()
{
delete brow;
}
TreeNavBrow::~TreeNavBrow()
......
......@@ -290,6 +290,7 @@ CoXHelpNav::CoXHelpNav(void* xn_parent_ctx, char* xn_name,
//
CoXHelpNav::~CoXHelpNav()
{
delete brow;
}
//
......
......@@ -77,7 +77,6 @@ AttrNavGtk::~AttrNavGtk()
if (trace_started)
g_source_remove(trace_timerid);
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -254,8 +254,6 @@ SubGraphsGtk::~SubGraphsGtk()
attrlist_p = next_p;
}
delete brow;
gtk_widget_destroy(toplevel);
}
......
......@@ -74,8 +74,6 @@ SubPaletteGtk::SubPaletteGtk(void* xn_parent_ctx, GtkWidget* xn_parent_wid,
//
SubPaletteGtk::~SubPaletteGtk()
{
delete brow;
// XtDestroyWidget( form_widget);
}
void SubPaletteGtk::set_inputfocus(int focus)
......
......@@ -96,7 +96,6 @@ AttrNavMotif::~AttrNavMotif()
if (trace_started)
XtRemoveTimeOut(trace_timerid);
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -228,7 +228,6 @@ SubGraphsMotif::~SubGraphsMotif()
attrlist_p = next_p;
}
delete brow;
XtDestroyWidget(parent_wid);
}
......
......@@ -88,7 +88,6 @@ SubPaletteMotif::SubPaletteMotif(void* xn_parent_ctx, Widget xn_parent_wid,
//
SubPaletteMotif::~SubPaletteMotif()
{
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -68,7 +68,6 @@ AttrNavQt::~AttrNavQt()
debug_print("AttrNavQt::~AttrNavQt\n");
delete trace_obj;
delete brow;
form_widget->close();
}
......
......@@ -177,8 +177,6 @@ SubGraphsQt::~SubGraphsQt()
free((char*)attrlist_p);
attrlist_p = next_p;
}
delete brow;
}
void SubGraphsQt::trace_start()
......
......@@ -64,7 +64,6 @@ SubPaletteQt::SubPaletteQt(void* xn_parent_ctx, QWidget* xn_parent_wid,
SubPaletteQt::~SubPaletteQt()
{
debug_print("SubPaletteQt::~SubPaletteQt\n");
delete brow;
}
void SubPaletteQt::set_inputfocus(int focus)
......
......@@ -1580,6 +1580,7 @@ AttrNav::AttrNav(void* xn_parent_ctx, attr_eType xn_type, const char* xn_name,
//
AttrNav::~AttrNav()
{
delete brow;
}
AttrNavBrow::~AttrNavBrow()
......
......@@ -143,6 +143,7 @@ SubGraphs::SubGraphs(void* xn_parent_ctx, const char* xn_name, void* xn_growctx,
//
SubGraphs::~SubGraphs()
{
delete brow;
}
SubGraphsBrow::~SubGraphsBrow()
......
......@@ -658,6 +658,7 @@ SubPalette::SubPalette(
//
SubPalette::~SubPalette()
{
delete brow;
}
SubPaletteBrow::~SubPaletteBrow()
......
......@@ -66,7 +66,6 @@ CLogNavGtk::CLogNavGtk(
//
CLogNavGtk::~CLogNavGtk()
{
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -72,7 +72,6 @@ EvListGtk::~EvListGtk()
delete browtree;
if (browbase && browbase != brow)
delete browbase;
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -82,7 +82,6 @@ XAttNavGtk::~XAttNavGtk()
delete trace_timerid;
delete wow;
delete brow;
gtk_widget_destroy(form_widget);
}
......
......@@ -121,26 +121,6 @@ XNavGtk::~XNavGtk()
delete autoack_timerid;
delete trace_timerid;
if (mcp) {
free(mcp);
mcp = 0;
}
menu_tree_free();
delete (ItemMenu*)root_item;
for (int i = 0; i < brow_cnt; i++) {
brow_stack[i]->free_pixmaps();
if (i != 0)
brow_DeleteSecondaryCtx(brow_stack[i]->ctx);
delete brow_stack[i];
}
collect_brow->free_pixmaps();
brow_DeleteSecondaryCtx(collect_brow->ctx);
delete collect_brow;
delete brow;
if (op)
delete op;
gtk_widget_destroy(form_widget);
}
......
......@@ -85,7 +85,6 @@ CLogNavMotif::CLogNavMotif(
//
CLogNavMotif::~CLogNavMotif()
{
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -86,7 +86,6 @@ EvListMotif::EvListMotif(void* ev_parent_ctx, Widget ev_parent_wid,
//
EvListMotif::~EvListMotif()
{
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -100,7 +100,6 @@ XAttNavMotif::~XAttNavMotif()
delete trace_timerid;
delete wow;
delete brow;
XtDestroyWidget(form_widget);
}
......
......@@ -142,22 +142,7 @@ XNavMotif::~XNavMotif()
{
closing_down = 1;
if (mcp) {
free(mcp);
mcp = 0;
}
menu_tree_free();
for (int i = 0; i < brow_cnt; i++) {
brow_stack[i]->free_pixmaps();
brow_DeleteSecondaryCtx(brow_stack[i]->ctx);
delete brow_stack[i];
}
brow_DeleteSecondaryCtx(collect_brow->ctx);
delete collect_brow;
collect_brow->free_pixmaps();
delete brow;
if (op)
delete op;
delete trace_timerid;
XtDestroyWidget(form_widget);
}
......
......@@ -57,7 +57,6 @@ CLogNavQt::CLogNavQt(
CLogNavQt::~CLogNavQt()
{
debug_print("CLogNavQt::~CLogNavQt\n");
delete brow;
form_widget->close();
}
......
......@@ -73,7 +73,6 @@ EvListQt::~EvListQt()
if (browbase && browbase != brow) {
delete browbase;
}
delete brow;
form_widget->close();
}
......
......@@ -66,7 +66,6 @@ XAttNavQt::~XAttNavQt()
}
delete trace_timerid;
delete brow;
form_widget->close();
}
......
......@@ -110,25 +110,6 @@ XNavQt::~XNavQt()
delete autoack_timerid;
delete trace_timerid;
if (mcp) {
free(mcp);
mcp = 0;
}
menu_tree_free();
delete (ItemMenu*)root_item;
for (int i = 0; i < brow_cnt; i++) {
brow_stack[i]->free_pixmaps();
if (i != 0) {
brow_DeleteSecondaryCtx(brow_stack[i]->ctx);
}
delete brow_stack[i];
}
collect_brow->free_pixmaps();
brow_DeleteSecondaryCtx(collect_brow->ctx);
delete collect_brow;
delete brow;
form_widget->close();
}
......
......@@ -290,6 +290,7 @@ CLogNav::CLogNav(void* clog_parent_ctx)
//
CLogNav::~CLogNav()
{
delete brow;
}
CLogNavBrow::~CLogNavBrow()
......
......@@ -837,6 +837,7 @@ EvList::EvList(void* ev_parent_ctx, ev_eType ev_type, int ev_size,
//
EvList::~EvList()
{
delete brow;
for (unsigned int i = 0; i < alarm_table_cnt; i++) {
gdh_DLUnrefObjectInfo(alarm_tables_refid[i]);
if (alarm_table_member_cnt[i] > 0)
......
......@@ -80,6 +80,7 @@ XAttNav::XAttNav(void* xa_parent_ctx, xattnav_eType xa_type,
//
XAttNav::~XAttNav()
{
delete brow;
}
//
......
......@@ -1352,6 +1352,25 @@ XNav::XNav(void* xn_parent_ctx, const char* xn_name, xnav_sStartMenu* root_menu,
//
XNav::~XNav()
{
if (mcp) {
free(mcp);
mcp = 0;
}
menu_tree_free();
delete (ItemMenu*)root_item;
for (int i = 0; i < brow_cnt; i++) {
brow_stack[i]->free_pixmaps();
if (i != 0)
brow_DeleteSecondaryCtx(brow_stack[i]->ctx);
delete brow_stack[i];
}
collect_brow->free_pixmaps();
brow_DeleteSecondaryCtx(collect_brow->ctx);
delete collect_brow;
delete brow;
if (op)
delete op;
}
//
......
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