changeset 27221:0fe52ad36b24

delete unused workspace model setData function and rename_variable signal * workspace-model.h, workspace-model.cc (workspace_model::setData): Delete function. (workspace_model::rename_variable): Delete signal.
author John W. Eaton <jwe@octave.org>
date Mon, 01 Jul 2019 18:05:46 -0400
parents 9a4a9fcc186b
children f5b967060442
files libgui/src/workspace-model.cc libgui/src/workspace-model.h
diffstat 2 files changed, 0 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/workspace-model.cc	Mon Jul 01 18:00:04 2019 -0400
+++ b/libgui/src/workspace-model.cc	Mon Jul 01 18:05:46 2019 -0400
@@ -213,31 +213,6 @@
     return retval;
   }
 
-  bool
-  workspace_model::setData (const QModelIndex& idx, const QVariant& value,
-                            int role)
-  {
-    bool retval = false;
-
-    if (idx.column () == 0 && role == Qt::EditRole)
-      {
-        QString qold_name = m_symbols[idx.row ()];
-
-        QString qnew_name = value.toString ();
-
-        std::string new_name = qnew_name.toStdString ();
-
-        if (valid_identifier (new_name))
-          {
-            emit rename_variable (qold_name, qnew_name);
-
-            retval = true;
-          }
-      }
-
-    return retval;
-  }
-
   void
   workspace_model::set_workspace (bool top_level, bool /* debug */,
                                   const symbol_info_list& syminfo)
--- a/libgui/src/workspace-model.h	Mon Jul 01 18:00:04 2019 -0400
+++ b/libgui/src/workspace-model.h	Mon Jul 01 18:05:46 2019 -0400
@@ -66,9 +66,6 @@
 
     QVariant data (const QModelIndex& index, int role) const;
 
-    bool setData (const QModelIndex& index, const QVariant& value,
-                  int role = Qt::EditRole);
-
     bool is_top_level (void) const { return m_top_level; }
 
     QColor storage_class_color (int s_class)
@@ -92,8 +89,6 @@
     void model_changed (void);
     void prompt_variable_editor(void);
 
-    void rename_variable (const QString& old_name, const QString& new_name);
-
   private:
 
     void clear_data (void);