[gnote] Fix compiler warnings regarding missing virtual destructors



commit a3868d869c701603181310ce5b83b7d3e06e5b8e
Author: Aurimas Černius <aurisc4 gmail com>
Date:   Fri Apr 9 22:32:43 2021 +0300

    Fix compiler warnings regarding missing virtual destructors

 src/mainwindowembeds.hpp       | 5 +++++
 src/notebase.hpp               | 3 ++-
 src/synchronization/syncui.hpp | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/mainwindowembeds.hpp b/src/mainwindowembeds.hpp
index dd69a0c5..25adfc01 100644
--- a/src/mainwindowembeds.hpp
+++ b/src/mainwindowembeds.hpp
@@ -34,6 +34,7 @@ class EmbeddableWidget;
 class EmbeddableWidgetHost
 {
 public:
+  virtual ~EmbeddableWidgetHost() {}
   virtual void embed_widget(EmbeddableWidget &) = 0;
   virtual void unembed_widget(EmbeddableWidget &) = 0;
   virtual void foreground_embedded(EmbeddableWidget &) = 0;
@@ -49,6 +50,7 @@ class EmbeddableWidget
 {
 public:
   EmbeddableWidget() : m_host(NULL) {}
+  virtual ~EmbeddableWidget() {}
   virtual Glib::ustring get_name() const = 0;
   virtual void embed(EmbeddableWidgetHost *h);
   virtual void unembed();
@@ -76,6 +78,7 @@ private:
 class SearchableItem
 {
 public:
+  virtual ~SearchableItem() {}
   virtual void perform_search(const Glib::ustring & search_text) = 0;
   virtual bool supports_goto_result();
   virtual bool goto_next_result();
@@ -86,6 +89,7 @@ public:
 class HasEmbeddableToolbar
 {
 public:
+  virtual ~HasEmbeddableToolbar() {}
   virtual Gtk::Widget *embeddable_toolbar() = 0;
 };
 
@@ -93,6 +97,7 @@ public:
 class HasActions
 {
 public:
+  virtual ~HasActions() {}
   virtual std::vector<PopoverWidget> get_popover_widgets() = 0;
   virtual std::vector<MainWindowAction::Ptr> get_widget_actions() = 0;
 
diff --git a/src/notebase.hpp b/src/notebase.hpp
index 13432300..d9264c4e 100644
--- a/src/notebase.hpp
+++ b/src/notebase.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2011-2014,2017,2019-2020 Aurimas Cernius
+ * Copyright (C) 2011-2014,2017,2019-2021 Aurimas Cernius
  * Copyright (C) 2009 Hubert Figuiere
  *
  * This program is free software: you can redistribute it and/or modify
@@ -196,6 +196,7 @@ public:
   static Glib::ustring parse_text_content(const Glib::ustring & content);
 
   NoteBase(const Glib::ustring & filepath, NoteManagerBase & manager);
+  virtual ~NoteBase() {}
 
   NoteManagerBase & manager()
     {
diff --git a/src/synchronization/syncui.hpp b/src/synchronization/syncui.hpp
index 65eb04de..bd0aecab 100644
--- a/src/synchronization/syncui.hpp
+++ b/src/synchronization/syncui.hpp
@@ -1,7 +1,7 @@
 /*
  * gnote
  *
- * Copyright (C) 2012-2014,2017,2019 Aurimas Cernius
+ * Copyright (C) 2012-2014,2017,2019,2021 Aurimas Cernius
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -41,6 +41,7 @@ namespace sync {
     typedef sigc::slot<void> SlotConnecting;
     typedef sigc::slot<void> SlotIdle;
 
+    virtual ~SyncUI() {}
     virtual void sync_state_changed(SyncState state) = 0;
     void note_synchronized_th(const Glib::ustring & noteTitle, NoteSyncType type);
     virtual void note_synchronized(const Glib::ustring & noteTitle, NoteSyncType type) = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]