Mercurial > jwe > octave
diff libgui/src/m-editor/marker.cc @ 21158:65827e9cccb8
Gui support for enhancement of dbstop.
* octave-qscintilla.cc (contextMenuEvent): Capture right-click in the
left margins to show a context menu for "dbstop if...".
* octave-qscintilla.{cc,h} (contextmenu_break_condition): new function
* file-editor-interface.h: pass condition to
handle_update_breakpoint_marker_request
* file-editor-tab.{cc,h}: (file_editor_tab, bp_info,
handle_request_add_breakpoint, next_breakpoint,
previous_breakpoint, do_breakpoint_marker,
add_breakpoint_callback):
Allow conditional breakpoint markers
* file-editor-tab.cc (handle_context_menu_break_condition): new function
* file-editor.{cc,h} (request_open_file, add_file_editor_tab,
handle_delete_debugger_pointer_request): pass bp conditions.
* marker.{cc,h} (marker, construct, handle_report_editor_linenr):
pass breakpoint conditions
* main-window.{cc,h} (handle_update_breakpoint_marker_request):
pass breakpoint condition.
* octave-link.h (update_breakpoint): pass breakpoint condition.
* octave-qt-link.{cc,h} (do_update_breakpoint): pass breakpoint condition.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Sat, 30 Jan 2016 10:13:34 +1100 |
parents | ea50940c362f |
children | 40de9f8f23a6 |
line wrap: on
line diff
--- a/libgui/src/m-editor/marker.cc Sun Jan 24 11:02:30 2016 +1100 +++ b/libgui/src/m-editor/marker.cc Sat Jan 30 10:13:34 2016 +1100 @@ -32,16 +32,16 @@ marker::marker (QsciScintilla *area, int original_linenr, editor_markers type, - int editor_linenr) : QObject () + int editor_linenr, const QString& condition) : QObject () { - construct (area, original_linenr, type, editor_linenr); + construct (area, original_linenr, type, editor_linenr, condition); } marker::marker (QsciScintilla *area, int original_linenr, - editor_markers type) : QObject () + editor_markers type, const QString& condition) : QObject () { - construct (area, original_linenr, type, original_linenr - 1); + construct (area, original_linenr, type, original_linenr - 1, condition); } @@ -52,12 +52,14 @@ void marker::construct (QsciScintilla *area, int original_linenr, - editor_markers type, int editor_linenr) + editor_markers type, int editor_linenr, + const QString& condition) { _edit_area = area; _original_linenr = original_linenr; _marker_type = type; _mhandle = _edit_area->markerAdd (editor_linenr, _marker_type); + _condition = condition; } @@ -96,10 +98,14 @@ void -marker::handle_find_translation (int linenr, int& translation_linenr) +marker::handle_find_translation (int linenr, int& translation_linenr, + marker *& bp) { if (_original_linenr == linenr) - translation_linenr = _edit_area->markerLine (_mhandle); + { + translation_linenr = _edit_area->markerLine (_mhandle); + bp = this; + } } @@ -126,9 +132,10 @@ void -marker::handle_report_editor_linenr (QIntList& list) +marker::handle_report_editor_linenr (QIntList& lines, QStringList& conditions) { - list << _edit_area->markerLine (_mhandle); + lines << _edit_area->markerLine (_mhandle); + conditions << _condition; }