diff libgui/src/dialog.h @ 29550:8dd0fca2a3d9

where possible, use default destructors in GUI classes In most cases, don't explicitly delete objects that have parents in the QObject class hierarchy as they will be deleted automatically when the parent object is deleted. Explicitly declare more destructors as "default". Files affected: dialog.cc, dialog.h, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc, documentation.h, m-editor/file-editor.cc, m-editor/file-editor.h, main-window.cc, main-window.h, set-path-dialog.cc, set-path-dialog.h, tab-bar.cc, tab-bar.h, terminal-dock-widget.cc, and terminal-dock-widget.h.
author John W. Eaton <jwe@octave.org>
date Thu, 22 Apr 2021 12:52:14 -0400
parents 0a5b15007766
children 796f54d4ddbf
line wrap: on
line diff
--- a/libgui/src/dialog.h	Wed Apr 21 13:23:16 2021 -0400
+++ b/libgui/src/dialog.h	Thu Apr 22 12:52:14 2021 -0400
@@ -181,6 +181,8 @@
                    const QStringList& button, const QString& defbutton,
                    const QStringList& role);
 
+    ~MessageDialog (void) = default;
+
   private:
 
     void closeEvent (QCloseEvent *)
@@ -205,7 +207,7 @@
                 const QStringList& prompt, const QString& ok_string,
                 const QString& cancel_string);
 
-    ~ListDialog (void);
+    ~ListDialog (void) = default;
 
   signals:
 
@@ -238,6 +240,8 @@
                  const QString& title, const QFloatList& nr,
                  const QFloatList& nc, const QStringList& defaults);
 
+    ~InputDialog (void) = default;
+
   signals:
 
     void finish_input (const QStringList&, int);
@@ -261,6 +265,8 @@
                 const QString& title, const QString& filename,
                 const QString& dirname, const QString& multimode);
 
+    ~FileDialog (void) = default;
+
   signals:
 
     void finish_input (const QStringList&, const QString&, int);