changeset 24708:75090f34ffb1

style fixes for varaible editor * variable-editor.h, variable-editor.cc (class var_editor_tab, class var_editor_tab_Widget): Explicitly delete copy constructor and operator =. (class variable_editor): List all member variables together. (variable_editor::variable_editor): Explicitly initialize all data members.
author John W. Eaton <jwe@octave.org>
date Thu, 08 Feb 2018 11:27:39 -0500
parents 80ad1a9de879
children 6a6108db3a6b
files libgui/src/variable-editor.cc libgui/src/variable-editor.h
diffstat 2 files changed, 20 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/variable-editor.cc	Thu Feb 08 12:19:04 2018 +0100
+++ b/libgui/src/variable-editor.cc	Thu Feb 08 11:27:39 2018 -0500
@@ -180,7 +180,10 @@
     m_stylesheet (""),
     m_font (),
     m_sel_font (),
-    m_table_colors ()
+    m_table_colors (),
+    m_close_action (nullptr),
+    m_close_others_action (nullptr),
+    m_close_all_action (nullptr)
 {
   setObjectName ("variable_editor");
   set_title (tr ("Variable Editor"));
--- a/libgui/src/variable-editor.h	Thu Feb 08 12:19:04 2018 +0100
+++ b/libgui/src/variable-editor.h	Thu Feb 08 11:27:39 2018 -0500
@@ -54,6 +54,12 @@
 
   ~var_editor_tab (void) = default;
 
+  // No copying!
+
+  var_editor_tab (const var_editor_tab&) = delete;
+
+  var_editor_tab& operator = (const var_editor_tab&) = delete;
+
   QTableView * get_edit_view (void) const;
   QTextEdit * get_disp_view (void) const;
 
@@ -93,6 +99,12 @@
 
   ~var_editor_tab_widget (void) = default;
 
+  // No copying!
+
+  var_editor_tab_widget (const var_editor_tab_widget&) = delete;
+
+  var_editor_tab_widget& operator = (const var_editor_tab_widget&) = delete;
+
   tab_bar * get_tab_bar (void) const;
 
   bool current_tab_has_focus (void) const;
@@ -229,6 +241,10 @@
 
   QList<QColor> m_table_colors;
 
+  QAction *m_close_action;
+  QAction *m_close_others_action;
+  QAction *m_close_all_action;
+
   QList<int> octave_to_coords (QString&);
 
   // Get the real variable name from the tab text
@@ -240,10 +256,6 @@
   void update_colors (void);
 
   void construct_tool_bar (void);
-
-  QAction *m_close_action;
-  QAction *m_close_others_action;
-  QAction *m_close_all_action;
 };
 
 #endif