From e3ad180e9452be85ff35a10b4bb4a0dbf1ac11b4 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 6 Dec 2016 20:07:50 +0100 Subject: Make destructors virtual as appropriate. --- plugingui/button.h | 2 +- plugingui/canvas.h | 2 ++ plugingui/checkbox.h | 1 + plugingui/combobox.h | 2 +- plugingui/drawable.h | 2 ++ plugingui/filebrowser.h | 2 +- plugingui/knob.h | 1 + plugingui/label.h | 1 + plugingui/lineedit.h | 2 +- plugingui/listbox.h | 2 +- plugingui/listboxbasic.h | 2 +- plugingui/listboxthin.h | 2 +- plugingui/progressbar.h | 2 +- plugingui/slider.h | 1 + plugingui/textedit.h | 2 +- plugingui/verticalline.h | 1 + 16 files changed, 18 insertions(+), 9 deletions(-) (limited to 'plugingui') diff --git a/plugingui/button.h b/plugingui/button.h index f409a55..04656ba 100644 --- a/plugingui/button.h +++ b/plugingui/button.h @@ -40,7 +40,7 @@ namespace GUI { class Button : public Widget { public: Button(Widget *parent); - ~Button(); + virtual ~Button(); // From Widget: bool isFocusable() override { return true; } diff --git a/plugingui/canvas.h b/plugingui/canvas.h index 8cfe083..cafe483 100644 --- a/plugingui/canvas.h +++ b/plugingui/canvas.h @@ -35,6 +35,8 @@ namespace GUI class Canvas { public: + virtual ~Canvas() = default; + //! @returns a reference to the pixel buffer. virtual PixelBufferAlpha& GetPixelBuffer() = 0; diff --git a/plugingui/checkbox.h b/plugingui/checkbox.h index f26c8d6..f85c1d9 100644 --- a/plugingui/checkbox.h +++ b/plugingui/checkbox.h @@ -36,6 +36,7 @@ namespace GUI { class CheckBox : public Widget { public: CheckBox(Widget *parent); + virtual ~CheckBox() = default; void setText(std::string text); diff --git a/plugingui/combobox.h b/plugingui/combobox.h index 2cf0eba..8946600 100644 --- a/plugingui/combobox.h +++ b/plugingui/combobox.h @@ -43,7 +43,7 @@ class ComboBox { public: ComboBox(Widget* parent); - ~ComboBox(); + virtual ~ComboBox(); void addItem(std::string name, std::string value); diff --git a/plugingui/drawable.h b/plugingui/drawable.h index 346102d..ff9a4ff 100644 --- a/plugingui/drawable.h +++ b/plugingui/drawable.h @@ -36,6 +36,8 @@ class Colour; class Drawable { public: + virtual ~Drawable() = default; + virtual std::size_t width() const = 0; virtual std::size_t height() const = 0; diff --git a/plugingui/filebrowser.h b/plugingui/filebrowser.h index bc2019f..20f8197 100644 --- a/plugingui/filebrowser.h +++ b/plugingui/filebrowser.h @@ -41,7 +41,7 @@ namespace GUI { class FileBrowser : public Widget { public: FileBrowser(Widget *parent); - ~FileBrowser(); + virtual ~FileBrowser(); void setPath(const std::string& path); diff --git a/plugingui/knob.h b/plugingui/knob.h index 220ee80..64d66e1 100644 --- a/plugingui/knob.h +++ b/plugingui/knob.h @@ -37,6 +37,7 @@ namespace GUI { class Knob : public Widget { public: Knob(Widget *parent); + virtual ~Knob() = default; // From Widget: bool catchMouse() override { return true; } diff --git a/plugingui/label.h b/plugingui/label.h index 019df17..f76a598 100644 --- a/plugingui/label.h +++ b/plugingui/label.h @@ -43,6 +43,7 @@ enum class TextAlignment { class Label : public Widget { public: Label(Widget *parent); + virtual ~Label() = default; void setText(const std::string& text); diff --git a/plugingui/lineedit.h b/plugingui/lineedit.h index d5d68b6..76babcc 100644 --- a/plugingui/lineedit.h +++ b/plugingui/lineedit.h @@ -41,7 +41,7 @@ class LineEdit { public: LineEdit(Widget *parent); - ~LineEdit(); + virtual ~LineEdit(); bool isFocusable() override { return true; } diff --git a/plugingui/listbox.h b/plugingui/listbox.h index 1d5ed14..3032951 100644 --- a/plugingui/listbox.h +++ b/plugingui/listbox.h @@ -42,7 +42,7 @@ class ListBox { public: ListBox(Widget *parent); - ~ListBox(); + virtual ~ListBox(); void addItem(std::string name, std::string value); void addItems(std::vector &items); diff --git a/plugingui/listboxbasic.h b/plugingui/listboxbasic.h index 73d841d..ae2bdae 100644 --- a/plugingui/listboxbasic.h +++ b/plugingui/listboxbasic.h @@ -47,7 +47,7 @@ public: }; ListBoxBasic(Widget *parent); - ~ListBoxBasic(); + virtual ~ListBoxBasic(); void addItem(const std::string& name, const std::string& value); void addItems(const std::vector& items); diff --git a/plugingui/listboxthin.h b/plugingui/listboxthin.h index 3f429f6..a5605f2 100644 --- a/plugingui/listboxthin.h +++ b/plugingui/listboxthin.h @@ -44,7 +44,7 @@ class ListBoxThin { public: ListBoxThin(Widget *parent); - ~ListBoxThin(); + virtual ~ListBoxThin(); void addItem(std::string name, std::string value); void addItems(std::vector &items); diff --git a/plugingui/progressbar.h b/plugingui/progressbar.h index 9c651ef..bc8b82e 100644 --- a/plugingui/progressbar.h +++ b/plugingui/progressbar.h @@ -48,7 +48,7 @@ class ProgressBar { public: ProgressBar(Widget* parent); - ~ProgressBar(); + virtual ~ProgressBar(); void setTotal(std::size_t total); void setValue(std::size_t value); diff --git a/plugingui/slider.h b/plugingui/slider.h index 694be59..1ef3070 100644 --- a/plugingui/slider.h +++ b/plugingui/slider.h @@ -33,6 +33,7 @@ namespace GUI { class Slider : public Widget { public: Slider(Widget* parent); + virtual ~Slider() = default; // From Widget: bool catchMouse() override { return true; } diff --git a/plugingui/textedit.h b/plugingui/textedit.h index ed93ae5..edad302 100644 --- a/plugingui/textedit.h +++ b/plugingui/textedit.h @@ -41,7 +41,7 @@ namespace GUI { class TextEdit : public Widget { public: TextEdit(Widget *parent); - ~TextEdit(); + virtual ~TextEdit(); // From Widget bool isFocusable() override { return true; } diff --git a/plugingui/verticalline.h b/plugingui/verticalline.h index dce5563..3403244 100644 --- a/plugingui/verticalline.h +++ b/plugingui/verticalline.h @@ -34,6 +34,7 @@ namespace GUI { class VerticalLine : public Widget { public: VerticalLine(Widget* parent); + virtual ~VerticalLine() = default; protected: // From Widget: -- cgit v1.2.3