changeset 14797:67c6835e51b6 gui

Correctly recognize bool type in Workspace window. Add stubs for inline function and function handle support. * symbol-information.h: Differentiate between real scalar and bool type. Add stubs for inline function and function handle support.
author Rik <octave@nomad.inbox5.com>
date Thu, 21 Jun 2012 15:07:05 -0700
parents e10d7bcfdd9e
children 625be3eb27c5
files gui/src/symbol-information.h
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gui/src/symbol-information.h	Thu Jun 21 22:30:08 2012 +0200
+++ b/gui/src/symbol-information.h	Thu Jun 21 15:07:05 2012 -0700
@@ -123,7 +123,7 @@
       _value = QString ("\'%1\'").arg (ov.string_value ().c_str ());
     else if (ov.is_dq_string ())
       _value = QString ("\"%1\"").arg (ov.string_value ().c_str ());
-    else if (ov.is_real_scalar ())
+    else if (ov.is_real_scalar () && ! ov.is_bool_type ())
       _value = QString ("%1").arg (ov.scalar_value ());
     else if (ov.is_complex_scalar ())
       _value = QString ("%1 + %2i").arg (ov.scalar_value ())
@@ -132,14 +132,18 @@
       _value =  QString ("%1 : %2 : %3").arg (ov.range_value ().base ())
                                         .arg (ov.range_value ().inc ())
                                         .arg (ov.range_value ().limit ());
-    else if (ov.is_matrix_type())
+    else if (ov.is_matrix_type ())
+      _value = QString ("%1x%2").arg (ov.rows ())
+                                .arg (ov.columns ());
+    else if (ov.is_cell ())
       _value = QString ("%1x%2").arg (ov.rows ())
                                 .arg (ov.columns ());
-    else if (ov.is_cell())
-      _value = QString ("%1x%2").arg (ov.rows ())
-                                .arg (ov.columns ());
-    else if (ov.is_bool_type () && !ov.is_matrix_type())
-      _value = ov.bool_value () ? "true" : "false";
+    else if (ov.is_bool_type ())
+      _value = ov.bool_value () ? QString ("true") : QString ("false");
+    else if (ov.is_function_handle ())
+      _value = QString ("FIXME: function handle found"); // See code for func2str for a possible solution
+    else if (ov.is_inline_function ())
+      _value = QString ("FIXME: inline function found"); // See code for formula for a possible solution
     else
       _value = QString ("<Type not recognized>");