From 1e51ce8681c1231c22d0f99a6cac7b9d7665082f Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 27 Oct 2019 22:56:49 +0100 Subject: [PATCH] cc-classes: add missing virtual destructors Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2b5e1e1accbc49c4378379866042b709f6091507 Author: Thilo Graf Date: 2019-10-27 (Sun, 27 Oct 2019) --- src/gui/components/cc_button_select.h | 1 + src/gui/components/cc_frm_button.h | 2 ++ src/gui/components/cc_frm_chain.h | 3 ++- src/gui/components/cc_frm_footer.h | 2 ++ src/gui/components/cc_frm_window.h | 2 ++ src/gui/widget/hintbox.h | 2 ++ src/gui/widget/msgbox.h | 2 +- 7 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_button_select.h b/src/gui/components/cc_button_select.h index d6157b379..866949020 100644 --- a/src/gui/components/cc_button_select.h +++ b/src/gui/components/cc_button_select.h @@ -37,6 +37,7 @@ class CCButtonSelect public: CCButtonSelect(); + virtual ~CCButtonSelect(){}; ///returns selected button object, return value as pointer to object, NULL means nothing is selected CComponentsButton* getSelectedButtonObject(); diff --git a/src/gui/components/cc_frm_button.h b/src/gui/components/cc_frm_button.h index f23be2014..d9f08b3f0 100644 --- a/src/gui/components/cc_frm_button.h +++ b/src/gui/components/cc_frm_button.h @@ -132,6 +132,8 @@ class CComponentsButton : public CComponentsFrmChain, public CCTextScreen int shadow_mode = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_FRAME_PLUS_0, fb_pixel_t color_body = COL_BUTTON_BODY, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + virtual ~CComponentsButton(){}; + ///set text color void setButtonTextColor(fb_pixel_t caption_color){cc_btn_text_col = caption_color;}; diff --git a/src/gui/components/cc_frm_chain.h b/src/gui/components/cc_frm_chain.h index 560984a5e..e50f521cb 100644 --- a/src/gui/components/cc_frm_chain.h +++ b/src/gui/components/cc_frm_chain.h @@ -74,7 +74,8 @@ class CComponentsFrmChain : public CComponentsForm fb_pixel_t& color_frame = COL_FRAME_PLUS_0, fb_pixel_t& color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t& color_shadow = COL_SHADOW_PLUS_0); -// ~CComponentsFrmChain(); //inherited from CComponentsForm + + virtual ~CComponentsFrmChain(){}; ///defines mode for arrangement direction of items, see also chn_direction virtual void setDirection(int direction); diff --git a/src/gui/components/cc_frm_footer.h b/src/gui/components/cc_frm_footer.h index 142eeeb80..43684a5bf 100644 --- a/src/gui/components/cc_frm_footer.h +++ b/src/gui/components/cc_frm_footer.h @@ -81,6 +81,8 @@ class CComponentsFooter : public CComponentsHeader, public CCButtonSelect fb_pixel_t color_body = COL_MENUFOOT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0, int sizeMode = CC_HEADER_SIZE_LARGE); + + virtual ~CComponentsFooter(){}; ///add button labels with string label type as content, count as size_t, chain_width as int, label width as int void setButtonLabels(const struct button_label_cc * const content, const size_t& label_count, const int& chain_width = 0, const int& label_width = 0); diff --git a/src/gui/components/cc_frm_window.h b/src/gui/components/cc_frm_window.h index 199ff5759..cec4c04c8 100644 --- a/src/gui/components/cc_frm_window.h +++ b/src/gui/components/cc_frm_window.h @@ -204,6 +204,8 @@ class CComponentsWindow : public CComponentsForm, CCHeaderTypes fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_SHADOW_PLUS_0); + virtual ~CComponentsWindow(){}; + /** * Add an item to body object, also usable is addCCItem() to add items to the window object * @param[in] cc_Item diff --git a/src/gui/widget/hintbox.h b/src/gui/widget/hintbox.h index 5acd75559..a29c5954d 100644 --- a/src/gui/widget/hintbox.h +++ b/src/gui/widget/hintbox.h @@ -341,6 +341,8 @@ class CHint : public CHintBox * @li optional: expects type bool, enable/disable backround paint, default = true */ CHint(const neutrino_locale_t Text, bool show_background = true); + + virtual ~CHint(){}; }; /** diff --git a/src/gui/widget/msgbox.h b/src/gui/widget/msgbox.h index f095a9996..f847198ce 100644 --- a/src/gui/widget/msgbox.h +++ b/src/gui/widget/msgbox.h @@ -226,7 +226,7 @@ class CMsgBox : public CHintBox const msg_result_t& Default_result = mbrNone, const int& Text_mode = DEFAULT_MSGBOX_TEXT_MODE); -// ~CMsgBox(); //inherited + virtual ~CMsgBox(){}; /** * exec caller * @return int