Mercurial > octave-nkf
changeset 16443:7a2ee6ea7800
rename dbstop -> breakpoint in GUI interface functions
* file-editor-interface.h
(file_editor_interface::handle_update_breakpoint_marker_request):
Rename from
file_editor_interface::handle_update_dbstop_marker_request.
* file-editor-tab.h, file-editor-tab.cc
(file_editor_tab::do_breakpoint_marker): Rename from
file_editor_tab::do_dbstop_marker. Change all uses.
* file-editor.h, file-editor.cc
(file_editor::handle_update_breakpoint_marker_request): Rename from
file_editor::handle_update_dbstop_marker_request. Change all uses.
diff --git a/libgui/src/octave-qt-link.cc b/libgui/src/octave-qt-link.cc
* octave-qt-link.h (octave_qt_link::update_breakpoint_marker_signal):
Rename from octave_qt_link::update_dbstop_marker_signal. Change all
uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 06 Apr 2013 13:06:40 -0400 |
parents | 302157614308 |
children | 6cd66a5a76e8 |
files | libgui/src/m-editor/file-editor-interface.h libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor-tab.h libgui/src/m-editor/file-editor.cc libgui/src/m-editor/file-editor.h libgui/src/main-window.cc libgui/src/octave-qt-link.cc libgui/src/octave-qt-link.h libinterp/interpfcn/octave-link.h |
diffstat | 9 files changed, 42 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-interface.h Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/m-editor/file-editor-interface.h Sat Apr 06 13:06:40 2013 -0400 @@ -53,9 +53,9 @@ virtual void handle_delete_debugger_pointer_request (const QString& file, int line) = 0; - virtual void handle_update_dbstop_marker_request (bool insert, - const QString& file, - int line) = 0; + virtual void + handle_update_breakpoint_marker_request (bool insert, const QString& file, + int line) = 0; virtual void handle_edit_file_request (const QString& file) = 0; @@ -66,7 +66,7 @@ virtual void request_open_file () = 0; virtual void request_open_file (const QString& openFileName, int line = -1, bool debug_pointer = false, - bool dbstop_marker = false, + bool breakpoint_marker = false, bool insert = true) = 0; //signals:
--- a/libgui/src/m-editor/file-editor-tab.cc Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/m-editor/file-editor-tab.cc Sat Apr 06 13:06:40 2013 -0400 @@ -1158,7 +1158,7 @@ } void -file_editor_tab::do_dbstop_marker (bool insert, const QWidget *ID, int line) +file_editor_tab::do_breakpoint_marker (bool insert, const QWidget *ID, int line) { if (ID != this || ID == 0) return;
--- a/libgui/src/m-editor/file-editor-tab.h Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/m-editor/file-editor-tab.h Sat Apr 06 13:06:40 2013 -0400 @@ -82,7 +82,7 @@ void insert_debugger_pointer (const QWidget *ID, int line = -1); void delete_debugger_pointer (const QWidget *ID, int line = -1); - void do_dbstop_marker (bool insert, const QWidget *ID, int line = -1); + void do_breakpoint_marker (bool insert, const QWidget *ID, int line = -1); void set_modified (bool modified = true);
--- a/libgui/src/m-editor/file-editor.cc Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/m-editor/file-editor.cc Sat Apr 06 13:06:40 2013 -0400 @@ -150,7 +150,7 @@ void file_editor::request_open_file (const QString& openFileName, int line, bool debug_pointer, - bool dbstop_marker, bool insert) + bool breakpoint_marker, bool insert) { // Check if the user wants to use a custom file editor. QSettings *settings = resource_manager::get_settings (); @@ -189,8 +189,8 @@ if (debug_pointer) emit fetab_insert_debugger_pointer (p->second, line-1); - if (dbstop_marker) - emit fetab_do_dbstop_marker (insert, p->second, line-1); + if (breakpoint_marker) + emit fetab_do_breakpoint_marker (insert, p->second, line-1); } emit fetab_set_focus (p->second); @@ -216,8 +216,8 @@ if (debug_pointer) emit fetab_insert_debugger_pointer (fileEditorTab, line-1); - if (dbstop_marker) - emit fetab_do_dbstop_marker + if (breakpoint_marker) + emit fetab_do_breakpoint_marker (insert, fileEditorTab, line-1); } } @@ -342,7 +342,7 @@ } void -file_editor::handle_update_dbstop_marker_request (bool insert, +file_editor::handle_update_breakpoint_marker_request (bool insert, const QString& file, int line) { request_open_file (file, line, false, true, insert); @@ -955,8 +955,8 @@ f, SLOT (insert_debugger_pointer (const QWidget *, int))); connect (this, SIGNAL (fetab_delete_debugger_pointer (const QWidget *, int)), f, SLOT (delete_debugger_pointer (const QWidget *, int))); - connect (this, SIGNAL (fetab_do_dbstop_marker (bool, const QWidget *, int)), - f, SLOT (do_dbstop_marker (bool, const QWidget *, int))); + connect (this, SIGNAL (fetab_do_breakpoint_marker (bool, const QWidget *, int)), + f, SLOT (do_breakpoint_marker (bool, const QWidget *, int))); _tab_widget->setCurrentWidget (f); }
--- a/libgui/src/m-editor/file-editor.h Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/m-editor/file-editor.h Sat Apr 06 13:06:40 2013 -0400 @@ -92,7 +92,7 @@ void fetab_goto_line (const QWidget* ID, int line = -1); void fetab_insert_debugger_pointer (const QWidget* ID, int line = -1); void fetab_delete_debugger_pointer (const QWidget* ID, int line = -1); - void fetab_do_dbstop_marker (bool insert, const QWidget* ID, int line = -1); + void fetab_do_breakpoint_marker (bool insert, const QWidget* ID, int line = -1); void fetab_set_focus (const QWidget* ID); public slots: @@ -136,7 +136,7 @@ void handle_insert_debugger_pointer_request (const QString& file, int line); void handle_delete_debugger_pointer_request (const QString& file, int line); - void handle_update_dbstop_marker_request (bool insert, const QString& file, + void handle_update_breakpoint_marker_request (bool insert, const QString& file, int line); void handle_edit_file_request (const QString& file); @@ -146,7 +146,7 @@ private slots: void request_open_file (const QString& fileName, int line = -1, bool debug_pointer = false, - bool dbstop_marker = false, bool insert = true); + bool breakpoint_marker = false, bool insert = true); private: void construct ();
--- a/libgui/src/main-window.cc Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/main-window.cc Sat Apr 06 13:06:40 2013 -0400 @@ -1178,9 +1178,9 @@ this, SLOT (handle_exit_debugger ())); connect (_octave_qt_link, - SIGNAL (update_dbstop_marker_signal (bool, const QString&, int)), + SIGNAL (update_breakpoint_marker_signal (bool, const QString&, int)), _file_editor, - SLOT (handle_update_dbstop_marker_request (bool, const QString&, int))); + SLOT (handle_update_breakpoint_marker_request (bool, const QString&, int))); connect (_octave_qt_link, SIGNAL (edit_file_signal (const QString&)),
--- a/libgui/src/octave-qt-link.cc Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/octave-qt-link.cc Sat Apr 06 13:06:40 2013 -0400 @@ -43,6 +43,14 @@ main_thread->execute_interpreter (); } +bool +octave_qt_link::do_edit_file (const std::string& file) +{ + emit edit_file_signal (QString::fromStdString (file)); + + return true; +} + void octave_qt_link::do_change_directory (const std::string& dir) { @@ -118,15 +126,7 @@ octave_qt_link::do_update_breakpoint (bool insert, const std::string& file, int line) { - emit update_dbstop_marker_signal (insert, QString::fromStdString (file), line); -} - -bool -octave_qt_link::do_edit_file (const std::string& file) -{ - emit edit_file_signal (QString::fromStdString (file)); - - return true; + emit update_breakpoint_marker_signal (insert, QString::fromStdString (file), line); } void
--- a/libgui/src/octave-qt-link.h Sat Apr 06 11:51:23 2013 -0400 +++ b/libgui/src/octave-qt-link.h Sat Apr 06 13:06:40 2013 -0400 @@ -53,6 +53,8 @@ void execute_interpreter (void); + bool do_edit_file (const std::string& file); + void do_change_directory (const std::string& dir); void do_update_workspace (void); @@ -70,8 +72,6 @@ void do_update_breakpoint (bool insert, const std::string& file, int line); - bool do_edit_file (const std::string& file); - private: // No copying! @@ -81,7 +81,6 @@ octave_qt_link& operator = (const octave_qt_link&); void do_insert_debugger_pointer (const std::string& file, int line); - void do_delete_debugger_pointer (const std::string& file, int line); // Thread running octave_main. @@ -89,6 +88,8 @@ signals: + void edit_file_signal (const QString& file); + void change_directory_signal (const QString& dir); void set_history_signal (const QStringList& hist); @@ -98,12 +99,10 @@ void enter_debugger_signal (void); void exit_debugger_signal (void); - void update_dbstop_marker_signal (bool insert, const QString& file, int line); - - void edit_file_signal (const QString& file); + void update_breakpoint_marker_signal (bool insert, const QString& file, + int line); void insert_debugger_pointer_signal (const QString&, int); - void delete_debugger_pointer_signal (const QString&, int); };
--- a/libinterp/interpfcn/octave-link.h Sat Apr 06 11:51:23 2013 -0400 +++ b/libinterp/interpfcn/octave-link.h Sat Apr 06 13:06:40 2013 -0400 @@ -108,6 +108,12 @@ instance->do_finished_readline_hook (); } + static bool + edit_file (const std::string& file) + { + return instance_ok () ? instance->do_edit_file (file) : false; + } + static void change_directory (const std::string& dir) { if (instance_ok ()) @@ -183,12 +189,6 @@ instance->do_update_breakpoint (insert, file, line); } - static bool - edit_file (const std::string& file) - { - return instance_ok () ? instance->do_edit_file (file) : false; - } - static void connect_link (octave_link *); private: @@ -245,6 +245,8 @@ void do_entered_readline_hook (void) { } void do_finished_readline_hook (void) { } + virtual bool do_edit_file (const std::string& file) = 0; + virtual void do_change_directory (const std::string& dir) = 0; virtual void do_update_workspace (void) = 0; @@ -262,8 +264,6 @@ virtual void do_update_breakpoint (bool insert, const std::string& file, int line) = 0; - - virtual bool do_edit_file (const std::string& file) = 0; }; #endif // OCTAVELINK_H