diff libinterp/corefcn/debug.cc @ 21311:718332a58d35

Fix left mouse button in editor margin bug from cset 65827e9cccb8 * octave-qt-link.cc (do_debug_cd_or_addpath_error): Back out 65827e9cccb8 to use uiwidget_creator instead of QMessageBox. * file_editor_tab.cc (handle_context_menu_break_condition): Validate condition using bp_table::condition_valid, to allow file_in_path to be called from a callback.jo * debug.{cc,h} (condition_valid): make member method, not static function.
author Lachlan Andrew <lachlanbis@gmail.com>
date Thu, 11 Feb 2016 19:59:32 +1100
parents 40de9f8f23a6
children 280ea93d48dd
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc	Sun Feb 14 13:16:05 2016 +1100
+++ b/libinterp/corefcn/debug.cc	Thu Feb 11 19:59:32 2016 +1100
@@ -600,8 +600,8 @@
 // Currently allows conditions with side-effects, like 'y+=10' and 'y++';
 // it is odd that the former is not flagged by "is_assignment_expression".
 // Throws an exception if not valid.
-static bool
-condition_valid (const std::string& cond)
+bool
+bp_table::condition_valid (const std::string& cond)
 {
   if (cond.length () > 0)
     {
@@ -649,7 +649,7 @@
   if (! dbg_fcn)
     error ("add_breakpoint: unable to find function '%s'\n", fname.c_str ());
 
-  condition_valid (condition);  // throws error if condition not valid
+  condition_valid (condition); // Throw error if condition not valid.
 
   intmap retval;