# HG changeset patch # User John W. Eaton # Date 1347305422 14400 # Node ID 67fabb3d81f4a7471f5da38df9d0f1da820a0a03 # Parent 95504932d422661663ffe83dee45321131dfdada display class of variables in workspace viewer instead of type * symbol-information.h, symbol-information.cc (symbol_information::_class): Rename from _type. Change all uses. * workspace-model.cc (workspace_model::workspace_model): Display "Class" instead of "Type". diff -r 95504932d422 -r 67fabb3d81f4 libgui/src/symbol-information.cc --- a/libgui/src/symbol-information.cc Mon Sep 10 12:42:25 2012 -0600 +++ b/libgui/src/symbol-information.cc Mon Sep 10 15:30:22 2012 -0400 @@ -45,7 +45,7 @@ _scope = hidden; _symbol = QString (symbol_record.name ().c_str ()); - _type = QString (symbol_record.varval ().type_name ().c_str ()); + _class = QString (symbol_record.varval ().class_name ().c_str ()); octave_value ov = symbol_record.varval (); // In case we have really large matrices or strings, cut them down diff -r 95504932d422 -r 67fabb3d81f4 libgui/src/symbol-information.h --- a/libgui/src/symbol-information.h Mon Sep 10 12:42:25 2012 -0600 +++ b/libgui/src/symbol-information.h Mon Sep 10 15:30:22 2012 -0400 @@ -56,7 +56,7 @@ }; QString _symbol; - QString _type; + QString _class; QString _value; QString _dimension; Scope _scope; @@ -65,7 +65,7 @@ int hash () const { - return qHash (_symbol) + qHash (_type) + qHash (_value) + return qHash (_symbol) + qHash (_class) + qHash (_value) + qHash (_dimension) + (int)_scope; } @@ -76,7 +76,7 @@ if (hash () == other.hash ()) { return _symbol == other._symbol - && _type == other._type + && _class == other._class && _value == other._value && _scope == other._scope && _dimension == other._dimension; diff -r 95504932d422 -r 67fabb3d81f4 libgui/src/workspace-model.cc --- a/libgui/src/workspace-model.cc Mon Sep 10 12:42:25 2012 -0600 +++ b/libgui/src/workspace-model.cc Mon Sep 10 15:30:22 2012 -0400 @@ -38,7 +38,7 @@ : QAbstractItemModel(parent), octave_event_observer () { QList rootData; - rootData << tr ("Name") << tr ("Type") << tr("Dimension") << tr ("Value"); + rootData << tr ("Name") << tr ("Class") << tr("Dimension") << tr ("Value"); _rootItem = new tree_item(rootData); insert_top_level_item(0, new tree_item ("Local")); @@ -95,7 +95,7 @@ tree_item *child = new tree_item (); child->set_data (0, s._symbol); - child->set_data (1, s._type); + child->set_data (1, s._class); child->set_data (2, s._dimension); child->set_data (3, s._value);