# HG changeset patch # User Andrew Janke # Date 1554982640 14400 # Node ID 465ac679e9760a508147c85c0da69107a06adb72 # Parent 77320d48b33efc85c4c93e74d6ccdb2d9952bc22 Fix typos and grammar errors in comments in libgui (patch #9790) * color-picker.cc, documentation.cc, dw-main-window.cc, files-dock-widget.cc, gui-preferences-mw.h, history-dock-widget.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, find-dialog.cc, octave-qscintilla.cc, main-window.cc, octave-dock-widget.cc, octave-dock-widget.h, resource-manager.cc, shortcut-manager.cc, tab-bar.cc, tab-bar.h, variable-editor.cc, variable-editor.h, workspace-model.cc, workspace-view.cc: Fix typos and grammar errors in comments. diff -r 77320d48b33e -r 465ac679e976 libgui/src/color-picker.cc --- a/libgui/src/color-picker.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/color-picker.cc Thu Apr 11 07:37:20 2019 -0400 @@ -39,7 +39,7 @@ { m_color = old_color; setFlat (true); - setFocusPolicy (Qt::NoFocus); // no focus, would changes the color + setFocusPolicy (Qt::NoFocus); // no focus, would change the color update_button (); connect (this, SIGNAL (clicked (void)), SLOT (select_color (void))); } diff -r 77320d48b33e -r 465ac679e976 libgui/src/documentation.cc --- a/libgui/src/documentation.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/documentation.cc Thu Apr 11 07:37:20 2019 -0400 @@ -559,15 +559,15 @@ selected.append (selected_item); } - // Apply selection and move back to the beginning - m_doc_browser->setExtraSelections (selected); - m_doc_browser->moveCursor (QTextCursor::Start); + // Apply selection and move back to the beginning + m_doc_browser->setExtraSelections (selected); + m_doc_browser->moveCursor (QTextCursor::Start); } void documentation::notice_settings (const gui_settings *settings) { - // If m_help_engine is not defined, the object accessed by this method - // are not valid. Thus, just return in this case + // If m_help_engine is not defined, the objects accessed by this method + // are not valid. Thus, just return in this case. if (! m_help_engine) return; @@ -840,7 +840,7 @@ QString title = m_doc_browser->historyTitle (prev_next*(i+1)); title.remove (QRegExp ("\\s*\\(*GNU Octave \\(version [^\\)]*\\)[: \\)]*")); - // Sinve the title only contains the section name and not the + // Since the title only contains the section name and not the // specific anchor, extract the latter from the url and append // it to the title QString url = m_doc_browser->historyUrl (prev_next*(i+1)).toString (); @@ -856,7 +856,7 @@ anchor.remove ("Concept-Index_cp_letter-"); anchor.replace ("-"," "); - // replace encoded special chars by there unencoded versions + // replace encoded special chars by their unencoded versions QRegExp rx = QRegExp ("_00([0-7][0-9a-f])"); int pos = 0; while ((pos = rx.indexIn(anchor, pos)) != -1) diff -r 77320d48b33e -r 465ac679e976 libgui/src/dw-main-window.cc --- a/libgui/src/dw-main-window.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/dw-main-window.cc Thu Apr 11 07:37:20 2019 -0400 @@ -231,7 +231,7 @@ if (ev->type () == QEvent::StyleChange) { // This might indicate un- or re-docking a widget: Make sure - // floating widget get a copy of our actions + // floating widgets get a copy of our actions for (int i = m_dw_list.length () - 1; i >= 0; i--) { // First remove possibly existing actions diff -r 77320d48b33e -r 465ac679e976 libgui/src/files-dock-widget.cc --- a/libgui/src/files-dock-widget.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/files-dock-widget.cc Thu Apr 11 07:37:20 2019 -0400 @@ -226,7 +226,7 @@ m_file_tree_view->setAnimated (true); m_file_tree_view->setToolTip (tr ("Double-click to open file/folder, right click for alternatives")); - // get sort column and order as well as cloumn state (order and width) + // get sort column and order as well as column state (order and width) m_file_tree_view->sortByColumn (settings->value (fb_sort_column).toInt (), @@ -298,7 +298,7 @@ setFocusProxy (m_current_directory); - m_sync_octave_dir = true; // default, overwirtten with notice_settings () + m_sync_octave_dir = true; // default, overwritten with notice_settings () m_octave_dir = ""; } @@ -390,8 +390,8 @@ if (m_sync_octave_dir && set_octave_dir) process_set_current_dir (fileInfo.absoluteFilePath ()); - // see if its in the list, and if it is, - // remove it and then, put at top of the list + // see if it's in the list, and if it is, + // remove it and then put at top of the list int index = m_current_directory->findText (fileInfo.absoluteFilePath ()); if (index != -1) @@ -726,7 +726,7 @@ { if (info.isDir ()) { - // see if direcory is empty + // see if directory is empty QDir path (info.absoluteFilePath ()); QList fileLst = path.entryInfoList (QDir::AllEntries | QDir::NoDotAndDotDot); @@ -743,7 +743,7 @@ emit file_remove_signal (info.filePath (), QString ()); // Remove the file. bool st = m_file_system_model->remove (index); - // reload the old file if removing was not successful + // Reload the old file if removing was not successful if (! st) emit file_renamed_signal (false); } @@ -864,7 +864,7 @@ void files_dock_widget::notice_settings (const gui_settings *settings) { - // Qsettings pointer is checked before emitting. + // QSettings pointer is checked before emitting. int size_idx = settings->value (global_icon_size).toInt (); size_idx = (size_idx > 0) - (size_idx < 0) + 1; // Make valid index from 0 to 2 diff -r 77320d48b33e -r 465ac679e976 libgui/src/gui-preferences-mw.h --- a/libgui/src/gui-preferences-mw.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/gui-preferences-mw.h Thu Apr 11 07:37:20 2019 -0400 @@ -34,7 +34,7 @@ 0x00,0x00,0x00,0x00,0x00,0x00,0x05,0x00 }; -// FIXME: usew the following version when Qt4 support is dropped +// FIXME: use the following version when Qt4 support is dropped // QVariant (QByteArrayLiteral ("\x1\xd9\xd0\xcb\0\x2\0\0\0\0\0\0\0\0\0\x1b\0\0\x3\xaf\0\0\x2\xb8\0\0\0\0\0\0\0\x39\0\0\x3\xaf\0\0\x2\xb8\0\0\0\0\0\0\0\0\x5\0"))); const gui_pref mw_geometry ("MainWindow/geometry", @@ -77,7 +77,7 @@ '\0',0xff,0xff,0xff,0xff,'\0','\0','\0','\0','\0','\0','\0','\0' }; -// FIXME: usew the following version when Qt4 support is dropped +// FIXME: use the following version when Qt4 support is dropped // QVariant (QByteArrayLiteral ("\0\0\0\xff\0\0\0\0\xfd\0\0\0\x2\0\0\0\0\0\0\x1&\0\0\x2+\xfc\x2\0\0\0\x3\xfb\0\0\0\x1e\0\x46\0i\0l\0\x65\0s\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0?\0\0\0\xac\0\0\0\x88\0\xff\xff\xff\xfb\0\0\0\x1a\0W\0o\0r\0k\0s\0p\0\x61\0\x63\0\x65\0V\0i\0\x65\0w\x1\0\0\0\xf1\0\0\0\xca\0\0\0\x82\0\xff\xff\xff\xfb\0\0\0\"\0H\0i\0s\0t\0o\0r\0y\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\x1\xc1\0\0\0\xa9\0\0\0\x82\0\xff\xff\xff\0\0\0\x1\0\0\x2\x84\0\0\x2+\xfc\x2\0\0\0\x1\xfc\0\0\0?\0\0\x2+\0\0\0\xeb\x1\0\0\x1b\xfa\0\0\0\0\x2\0\0\0\x4\xfb\0\0\0$\0T\0\x65\0r\0m\0i\0n\0\x61\0l\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x46\0\xff\xff\xff\xfb\0\0\0.\0\x44\0o\0\x63\0u\0m\0\x65\0n\0t\0\x61\0t\0i\0o\0n\0\x44\0o\0\x63\0k\0W\0i\0\x64\0g\0\x65\0t\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\xcf\0\xff\xff\xff\xfb\0\0\0\x14\0\x46\0i\0l\0\x65\0\x45\0\x64\0i\0t\0o\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\x62\0\xff\xff\xff\xfb\0\0\0\x1c\0V\0\x61\0r\0i\0\x61\0\x62\0l\0\x65\0\x45\0\x64\0i\0t\0o\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0;\0\xff\xff\xff\0\0\0\0\0\0\x2+\0\0\0\x4\0\0\0\x4\0\0\0\b\0\0\0\b\xfc\0\0\0\x1\0\0\0\x2\0\0\0\x1\0\0\0\x16\0M\0\x61\0i\0n\0T\0o\0o\0l\0\x42\0\x61\0r\x1\0\0\0\0\xff\xff\xff\xff\0\0\0\0\0\0\0\0"))); const gui_pref mw_state ("MainWindow/windowState", diff -r 77320d48b33e -r 465ac679e976 libgui/src/history-dock-widget.h --- a/libgui/src/history-dock-widget.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/history-dock-widget.h Thu Apr 11 07:37:20 2019 -0400 @@ -50,12 +50,12 @@ void information (const QString& message); - //! Signal emitted, whenever the user double-clicked a command in the + //! Signal emitted whenever the user double-clicks a command in the //! history. void command_double_clicked (const QString& command); - //! Signale emitted, whenever the user selects commands and chooses + //! Signal emitted whenever the user selects commands and chooses //! "Create script" from the popup menu. void command_create_script (const QString& commands); diff -r 77320d48b33e -r 465ac679e976 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/m-editor/file-editor-tab.cc Thu Apr 11 07:37:20 2019 -0400 @@ -323,8 +323,9 @@ void file_editor_tab::handle_context_menu_edit (const QString& word_at_cursor) { - // search for a subfunction in actual file (this is done at first because - // octave finds this function before other with same name in the search path + // Search for a subfunction in actual file (this is done first because + // Octave finds this function before others with the same name in the + // search path. QRegExp rxfun1 ("^[\t ]*function[^=]+=[\t ]*" + word_at_cursor + "[\t ]*\\([^\\)]*\\)[\t ]*$"); QRegExp rxfun2 ("^[\t ]*function[\t ]+" @@ -366,7 +367,7 @@ // If "dbstop if ..." selected from context menu, create a conditional // breakpoint. The default condition is (a) the existing condition if there - // is already a breakpoint (b) any selected text, or (c) empty + // is already a breakpoint, (b) any selected text, or (c) empty void file_editor_tab::handle_context_menu_break_condition (int linenr) { // Ensure editor line numbers match Octave core's line numbers. @@ -631,7 +632,7 @@ } else if (! valid_file_name ()) { - // new, no yet named file: let us assume it is octave + // new, not yet named file: let us assume it is octave #if defined (HAVE_LEXER_OCTAVE) lexer = new QsciLexerOctave (); m_is_octave_file = true; @@ -662,7 +663,7 @@ delete old_lexer; m_edit_area->setLexer (lexer); - // build information for auto completion (APIs) + // Build information for auto completion (APIs) m_lexer_apis = new QsciAPIs (lexer); connect (this, SIGNAL (request_add_octave_apis (const QStringList&)), @@ -725,14 +726,14 @@ if (m_is_octave_file) { // Keywords and Builtins do not change, these informations can be - // stored in prepared form in a file. Information on function are - // changing frequently, then if functions should also be auto- - // completed, the date of any existing file is checked. + // stored in prepared form in a file. Informations on functions + // are changing frequently, then if functions should also be + // auto-completed, the date of any existing file is checked. // Keywords are always used m_prep_apis_file = m_prep_apis_path + lexer->lexer () + "_k"; - // Buitlins are only used if the user settings say so + // Builtins are only used if the user settings say so if (octave_builtins) m_prep_apis_file += 'b'; @@ -887,7 +888,7 @@ m_edit_area->set_selection_marker_color (hg); // fix line number width with respect to the font size of the lexer and - // set the line numbers font depending on the lexers font + // set the line numbers font depending on the lexer's font if (settings->value (ed_show_line_numbers).toBool ()) { // Line numbers width @@ -1773,7 +1774,7 @@ // reset the possibly still existing read only state m_edit_area->setReadOnly (false); - // if we are in this slot and the list of breakpoint is not empty, + // if we are in this slot and the list of breakpoints is not empty, // then this tab was saved during an exit of the applications (not // restoring the breakpoints and not emptying the list) and the user // canceled this closing late on. @@ -1972,7 +1973,7 @@ int count_crlf = text.count (eol_crlf); int count_lf = text.count (eol_lf) - count_crlf; // isolated lf - int count_cr = text.count (eol_cr) - count_crlf; // isolated cr; + int count_cr = text.count (eol_cr) - count_crlf; // isolated cr resource_manager& rmgr = m_octave_qobj.get_resource_manager (); gui_settings *settings = rmgr.get_settings (); @@ -2283,7 +2284,7 @@ // set the window title to actual filename (not modified) update_window_title (false); - // files is save -> not modified, update encoding in statusbar + // file is save -> not modified, update encoding in statusbar m_edit_area->setModified (false); m_enc_indicator->setText (m_encoding); @@ -2534,7 +2535,7 @@ if (file_exists && ! do_close) { // Test if file is really modified or if just the timezone has - // changed. In the latter, just return without doing anything + // changed. In the latter, just return without doing anything. QDateTime modified = QFileInfo (m_file_name).lastModified ().toUTC (); if (modified <= m_last_modified) @@ -2592,7 +2593,7 @@ } // give editor and this tab the focus, - // possibly making the editor visible if it is hidden + // possibly making the editor visible if it is hidden emit set_focus_editor_signal (this); m_edit_area->setFocus (); @@ -2827,7 +2828,7 @@ } else { - // do not reload: readd to the file watche + // do not reload: readd to the file watcher m_file_system_watcher.addPath (m_file_name); } } @@ -2864,7 +2865,7 @@ if (m_edit_area->isModified ()) { - // The best that can be done if the editor contents has been + // The best that can be done if the editor contents have been // modified is to see if there is a match with the original // line number of any existing breakpoints. We can put a normal // debugger pointer at that breakpoint position. Otherwise, it @@ -3083,9 +3084,9 @@ // Here we go for breaking the current line by inserting a newline. // For determining the position of a specific column, we have to get - // the column from the QScintila function without taking tab lengths - // into account, since the calculation from line/col to position ignores - // this, too + // the column from the QScintilla function without taking tab lengths + // into account, since the calculation from line/col to position + // ignores this, too. m_edit_area->getCursorPosition (&line, &col); int c = 0; int col_space = col; diff -r 77320d48b33e -r 465ac679e976 libgui/src/m-editor/file-editor-tab.h --- a/libgui/src/m-editor/file-editor-tab.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/m-editor/file-editor-tab.h Thu Apr 11 07:37:20 2019 -0400 @@ -116,10 +116,9 @@ bool remove_on_success, bool restore_breakpoints); - // FIXME: The following is similar to "process_octave_code" - // signal. However, currently that signal is connected to - // something that simply focuses a window and not actually - // communicate with Octave. + // FIXME: The following is similar to "process_octave_code" signal. + // However, currently that signal is connected to something that simply + // focuses a window and does not actually communicate with Octave. // // void evaluate_octave_command (const QString& command); @@ -217,7 +216,7 @@ void handle_save_file_as_answer_cancel (void); void handle_save_as_filter_selected (const QString& filter); - // When user changes encoding after decoding errors where found + // When user changes encoding after decoding errors were found void handle_current_enc_changed (const QString& enc); // When apis preparation has finished and is ready to save diff -r 77320d48b33e -r 465ac679e976 libgui/src/m-editor/file-editor.cc --- a/libgui/src/m-editor/file-editor.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/m-editor/file-editor.cc Thu Apr 11 07:37:20 2019 -0400 @@ -96,12 +96,12 @@ file_editor::file_editor (QWidget *p, base_qobject& oct_qobj) : file_editor_interface (p, oct_qobj) { - // Set current editing directory before construct because loaded + // Set current editing directory before construction because loaded // files will change ced accordingly. m_ced = QDir::currentPath (); - // set action that are later added by the main window to null, - // preventing access to them when they are still undefined + // Set actions that are later added by the main window to null, + // preventing access to them when they are still undefined. m_undo_action = nullptr; m_copy_action = nullptr; m_paste_action = nullptr; @@ -171,7 +171,7 @@ QString sc_cont = settings->sc_value (sc_main_debug_continue); if (sc_run == sc_cont) - m_run_action->setShortcut (QKeySequence ()); // prevent ambigous shortcuts + m_run_action->setShortcut (QKeySequence ()); // prevent ambiguous shortcuts m_run_action->setToolTip (tr ("Continue")); // update tool tip } @@ -247,7 +247,7 @@ if (startup && ! isFloating ()) { - // check is editor is really visible or hidden between tabbed widgets + // check if editor is really visible or hidden between tabbed widgets QList tab_list = main_win ()->findChildren(); bool in_tab = false; @@ -323,7 +323,7 @@ qSort (s_data); - // finally open the file with the desired encoding in the desired order + // finally open the files with the desired encoding in the desired order for (int n = 0; n < s_data.count (); ++n) request_open_file (s_data.at (n).file_name, s_data.at (n).encoding, s_data.at (n).line); @@ -391,13 +391,12 @@ bool file_editor::check_closing (void) { - // When the application or the editor is closing and the user wants - // to close all files in the latter case all editor tabs are checked - // whether they need to be saved. During these ckecked the tabs are - // not closed since the user might cancel closing octave during one - // of these saving dialogs. Therefore, saving the session for - // restoring at next start is not done before the application is - // definitely closing. + // When the application or the editor is closing and the user wants to + // close all files, in the latter case all editor tabs are checked whether + // they need to be saved. During these checks tabs are not closed since + // the user might cancel closing Octave during one of these saving dialogs. + // Therefore, saving the session for restoring at next start is not done + // before the application is definitely closing. std::list fe_tab_lst = m_tab_widget->tab_list (); m_number_of_tabs = fe_tab_lst.size (); @@ -415,11 +414,10 @@ for (auto fe_tab : fe_tab_lst) { - // If there was a cancellation, make the already saved/discarded - // tabs recovering from the exit by removing the read-only state - // and by recovering the debugger breakpoints. Finally return - // false in order to cancel closing the application or the - // editor + // If there was a cancellation, make the already saved/discarded tabs + // recover from the exit by removing the read-only state and by + // recovering the debugger breakpoints. Finally return false in order + // to cancel closing the application or the editor. if (fe_tab->check_file_modified (false) == QMessageBox::Cancel) { @@ -497,7 +495,7 @@ // Finally close all the tabs and return indication that we can exit // the application or close the editor. // Closing and deleting the tabs makes the editor visible. In case it was - // hidden before, this state has to be restored afterwards + // hidden before, this state has to be restored afterwards. bool vis = isVisible (); for (auto editor_tab : editor_tab_lst) @@ -997,7 +995,7 @@ { // Note: to overwrite the contents of some other file editor tab // with the same name requires identifying which file editor tab - // that is (not too difficult) then close that tab. Of course, + // that is (not too difficult) then closing that tab. Of course, // that could trigger another dialog box if the file editor tab // with the same name has modifications in it. This could become // somewhat confusing to the user. For now, opt to do nothing. @@ -1086,7 +1084,7 @@ request_open_file (file); } - // Slot used for signals indicating that a file was changed/rename or + // Slot used for signals indicating that a file was changed/renamed or // is going to be deleted/renamed void file_editor::handle_file_remove (const QString& old_name, const QString& new_name) @@ -1165,8 +1163,8 @@ { m_no_focus = true; // Remember for not focussing editor - // Loop over all file that have to be reloaded. Start at the end of the - // list, otherwise the stored indexes are not correct + // Loop over all files that have to be reloaded. Start at the end of the + // list, otherwise the stored indexes are not correct. for (int i = m_tmp_closed_files.count () - 1; i >= 0; i--) { // Load old or new file @@ -1297,8 +1295,8 @@ void file_editor::set_shortcuts (void) { - // Shortcuts also available in the main window, as well as the realted - // ahotcuts, are defined in main_window and added to the editor + // Shortcuts also available in the main window, as well as the related + // shortcuts, are defined in main_window and added to the editor shortcut_manager& scmgr = m_octave_qobj.get_shortcut_manager (); @@ -1388,8 +1386,8 @@ } // This slot is a reimplementation of the virtual slot in octave_dock_widget. - // We need this for creating an empty script when the editor has no open files - // and is made visible + // We need this for creating an empty script when the editor has no open + // files and is made visible. void file_editor::handle_visibility (bool visible) { if (m_closed && visible) @@ -1473,8 +1471,8 @@ if (openFileName.isEmpty ()) { - // This happens if edit is calles without an argument - // Open eitor with empty edit area instead (as new file would do) + // This happens if edit is called without an argument + // Open editor with empty edit area instead (as new file would do) request_new_file (""); } else @@ -1807,7 +1805,7 @@ // FIXME: what was the intended purpose of this unused variable? // QStyle *editor_style = QApplication::style (); - // Menu bar: do not set it native, required in MacOS and Ubuntu Unity (Qt5) + // Menu bar: do not set it native, required in macOS and Ubuntu Unity (Qt5) // for a visible menu bar in the editor widget. This property is ignored // on other platforms. m_menu_bar = new QMenuBar (editor_widget); @@ -2590,7 +2588,7 @@ // 1. The path of the file rel. to the dir is not equal to the // its absolute one. // If both are equal, then there is no relative path and removed - // directoy and file are on different drives (e.g.on windows) + // directory and file are on different drives (e.g. on windows) // 2. The (real) relative path does not start with "../", i.e., // the file can be reached from the directory by descending only if ((rel_path_to_file != abs_path_to_file) diff -r 77320d48b33e -r 465ac679e976 libgui/src/m-editor/find-dialog.cc --- a/libgui/src/m-editor/find-dialog.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/m-editor/find-dialog.cc Thu Apr 11 07:37:20 2019 -0400 @@ -613,7 +613,7 @@ _edit_area->getCursorPosition (&line,&col); _rep_all = 1; - find_next (); // find first occurence (forward) + find_next (); // find first occurrence (forward) _edit_area->beginUndoAction (); while (_find_result_available) // while search string is found diff -r 77320d48b33e -r 465ac679e976 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/m-editor/octave-qscintilla.cc Thu Apr 11 07:37:20 2019 -0400 @@ -609,7 +609,7 @@ } } - // Do smart indendation of current selection or line. + // Do smart indentation of current selection or line. void octave_qscintilla::smart_indent_line_or_selected_text (int lineFrom, int lineTo) { @@ -1171,7 +1171,7 @@ void octave_qscintilla::auto_close (int auto_endif, int linenr, const QString& line, QString& first_word) { - // Insert and "end" for an "if" etc., if needed. + // Insert an "end" for an "if" etc., if needed. // (Use of "while" allows "return" to skip the rest. // It may be clearer to use "if" and "goto", // but that violates the coding standards.) diff -r 77320d48b33e -r 465ac679e976 libgui/src/main-window.cc --- a/libgui/src/main-window.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/main-window.cc Thu Apr 11 07:37:20 2019 -0400 @@ -228,7 +228,7 @@ init_terminal_size (); - // Connect signals for changes in visibility not before window is + // Connect signals for changes in visibility now before window is // shown. connect_visibility_changed (); @@ -311,7 +311,7 @@ void main_window::focus_changed (QWidget *, QWidget *new_widget) { // If there is no new widget (e.g., when pressing and the global - // menu gets active, we can return immediately + // menu gets active), we can return immediately if (! new_widget) return; @@ -325,7 +325,7 @@ while (w_new && w_new != m_main_tool_bar && count < 100) { // Go through all dock widgets and check whether the current widget - // widget with focus is a child of one of it + // with focus is a child of one of them. for (auto w : w_list) { if (w->isAncestorOf (w_new)) @@ -335,7 +335,7 @@ if (dock) break; - // If not yet found (in case w_new is not a childs of its dock widget), + // If not yet found (in case w_new is not a child of its dock widget), // test next widget in the focus chain w_new = qobject_cast (w_new->previousInFocusChain ()); @@ -880,7 +880,7 @@ QString name = widget->objectName (); if (! name.isEmpty ()) { - // if children has a name + // if child has a name icon = dw_icon_set_names[icon_set_found].path; // prefix | octave-logo if (dw_icon_set_names[icon_set_found].name != "NONE") icon += name + ".png"; // add widget name and ext. @@ -1041,7 +1041,7 @@ void main_window::accept_directory_line_edit (void) { // Get new directory name, and change to it if it is new. Otherwise, - // the combo box will triggers the "activated" signal to change to the + // the combo box will trigger the "activated" signal to change to the // directory. QString dir = m_current_directory_combo_box->currentText (); @@ -1303,7 +1303,7 @@ if (ok && new_name.length () > 0) { - // append suffix if it not already exists + // append suffix if it does not already exist if (new_name.rightRef (2) != ".m") new_name.append (".m"); // check whether new files are created without prompt @@ -1329,7 +1329,7 @@ { // INTERPRETER THREAD - // Split possible subfuntions + // Split possible subfunctions QStringList fcn_list = fname.split ('>'); QString fcn_name = fcn_list.at (0) + ".m"; @@ -1484,7 +1484,7 @@ void main_window::set_window_layout (gui_settings *settings) { // Restore main window state and geometry from settings file or, in case - // of an error from the default layout + // of an error, from the default layout. if (settings) { if (! restoreState (settings->value (mw_state).toByteArray ())) @@ -1567,7 +1567,7 @@ settings->setValue (mw_geometry.key, saveGeometry ()); settings->setValue (mw_state.key, saveState ()); - // write the list of recent used directories + // write the list of recently used directories QStringList curr_dirs; for (int i=0; icount (); i++) { @@ -1776,7 +1776,7 @@ { // this slot is called when the terminal gets/loses focus - // return if the user don't want to use readline shortcuts + // return if the user doesn't want to use readline shortcuts if (! m_prevent_readline_conflicts) return; @@ -1884,7 +1884,7 @@ } // The following slot is called after files have been selected in the - // open file dialog., possibly with a new selected encoding stored in + // open file dialog, possibly with a new selected encoding stored in // m_file_encoding void main_window::request_open_files (const QStringList& open_file_names) { @@ -2145,7 +2145,7 @@ connect (m_file_browser_window, SIGNAL (file_renamed_signal (bool)), m_editor_window, SLOT (handle_file_renamed (bool))); - // Signals for removing/renaming files/dirs in the temrinal window + // Signals for removing/renaming files/dirs in the terminal window connect (qt_link, SIGNAL (file_renamed_signal (bool)), m_editor_window, SLOT (handle_file_renamed (bool))); #endif @@ -2475,7 +2475,7 @@ clipboard_has_changed (); #if defined (Q_OS_WIN32) // Always enable paste action (unreliable clipboard signals in windows) - // FIXME: This has to be removed, when the clipboards signals in windows + // FIXME: This has to be removed, when the clipboard signals in windows // are working again m_paste_action->setEnabled (true); m_clear_clipboard_action->setEnabled (true); @@ -2539,7 +2539,7 @@ void main_window::editor_tabs_changed (bool have_tabs) { - // Set state of action which depend on the existance of editor tabs + // Set state of actions which depend on the existence of editor tabs m_editor_has_tabs = have_tabs; m_debug_step_over->setEnabled (have_tabs); } @@ -2559,7 +2559,7 @@ { if (checkable) { - // action for visibilty of dock widget + // action for visibility of dock widget connect (action, SIGNAL (toggled (bool)), widget, SLOT (setVisible (bool))); diff -r 77320d48b33e -r 465ac679e976 libgui/src/octave-dock-widget.cc --- a/libgui/src/octave-dock-widget.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/octave-dock-widget.cc Thu Apr 11 07:37:20 2019 -0400 @@ -173,8 +173,8 @@ "}\n" ).arg (close_icon).arg (float_icon).arg (icon_size) .arg (close_tooltip).arg (float_tooltip) - .arg (titlebar_foreground). arg (titlebar_background) - .arg ((icon_size*2)/3). arg((icon_size*7)/3); + .arg (titlebar_foreground).arg (titlebar_background) + .arg ((icon_size*2)/3).arg((icon_size*7)/3); } octave_dock_widget::octave_dock_widget (const QString& obj_name, QWidget *p, diff -r 77320d48b33e -r 465ac679e976 libgui/src/octave-dock-widget.h --- a/libgui/src/octave-dock-widget.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/octave-dock-widget.h Thu Apr 11 07:37:20 2019 -0400 @@ -96,7 +96,7 @@ signals: //! Custom signal that tells whether a user has clicked away that dock - //! widget, i.e the active dock widget has changed. + //! widget, i.e. the active dock widget has changed. void active_changed (bool active); diff -r 77320d48b33e -r 465ac679e976 libgui/src/resource-manager.cc --- a/libgui/src/resource-manager.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/resource-manager.cc Thu Apr 11 07:37:20 2019 -0400 @@ -92,7 +92,7 @@ // location ($HOME/.config/octave/qt-settings) for impoting all // available keys into the new settings file. // Do not look for an old settings file if XDG_CONFIG_HOME is set, - // since then a non-existin new settings file does not necessarily + // since then a nonexistent new settings file does not necessarily // indicate a first run of octave with new config file locations. #if defined (HAVE_QSTANDARDPATHS) QString home_path @@ -109,7 +109,7 @@ if (ofile.exists ()) { - // Old settings file exists, create a gui_settings object related + // Old settings file exists; create a gui_settings object related // to it and copy all available keys to the new settings gui_settings old_settings (old_settings_file, QSettings::IniFormat); @@ -377,8 +377,8 @@ if (! m_settings->value (global_icon_theme).toBool ()) return QIcon (":/actions/icons/" + icon_name + ".png"); - // Use system icon theme with own files as fallback except the fallback is - // explicitly disabled (fallback=false) + // Use system icon theme with own files as fallback except when the + // fallback is explicitly disabled (fallback=false) if (fallback) return QIcon::fromTheme (icon_name, QIcon (":/actions/icons/" + icon_name + ".png")); diff -r 77320d48b33e -r 465ac679e976 libgui/src/shortcut-manager.cc --- a/libgui/src/shortcut-manager.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/shortcut-manager.cc Thu Apr 11 07:37:20 2019 -0400 @@ -191,8 +191,8 @@ init (tr ("Community News"), sc_main_news_community_news); // Tab handling - // The following shortcuts are moved into a separate tab. The key names - // are not change for preserving compatibility with older versions + // The following shortcuts are moved into a separate tab. The key names + // are not changed, to preserve compatibility with older versions. init (tr ("Close Tab"), sc_edit_file_close); init (tr ("Close All Tabs"), sc_edit_file_close_all); init (tr ("Close Other Tabs"), sc_edit_file_close_other); @@ -620,7 +620,7 @@ shortcut_info.m_default_sc = settings->sc_def_value (sc); m_sc << shortcut_info; - // insert shortcut in order check for duplicates later + // insert shortcut in order to check for duplicates later if (! actual.isEmpty ()) m_shortcut_hash[actual.toString ()] = m_sc.count (); m_action_hash[sc.key] = m_sc.count (); diff -r 77320d48b33e -r 465ac679e976 libgui/src/tab-bar.cc --- a/libgui/src/tab-bar.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/tab-bar.cc Thu Apr 11 07:37:20 2019 -0400 @@ -21,7 +21,7 @@ */ // This file implements a tab bar derived from QTabBar with a contextmenu -// and possibility to close a tab via double-left and middle mouse click. +// and possibility to close a tab via double-left or middle mouse click. #if defined (HAVE_CONFIG_H) # include "config.h" @@ -182,8 +182,8 @@ // A tab was closed: // Was the possibly only closed tab before or after the // previously current tab? According to the result, use previous - // index or reduce it by one. Also prevent using a too large - // if other or all files were closed. + // index or reduce it by one. Also prevent using a too large + // index if other or all files were closed. int new_idx = count () - 1; if (new_idx > 0) { diff -r 77320d48b33e -r 465ac679e976 libgui/src/tab-bar.h --- a/libgui/src/tab-bar.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/tab-bar.h Thu Apr 11 07:37:20 2019 -0400 @@ -21,7 +21,7 @@ */ // This file implements a tab bar derived from QTabBar with a contextmenu -// and possibility to close a tab via double-left and middle mouse click. +// and possibility to close a tab via double-left or middle mouse click. #if ! defined (octave_tab_bar_h) #define octave_tab_bar_h 1 diff -r 77320d48b33e -r 465ac679e976 libgui/src/variable-editor.cc --- a/libgui/src/variable-editor.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/variable-editor.cc Thu Apr 11 07:37:20 2019 -0400 @@ -1291,7 +1291,7 @@ // Must supply a title for a QLabel to be created. Calling set_title() // more than once will add more QLabels. Could change octave_dock_widget - // to always supply a QLabl (initially empty) and then simply update its + // to always supply a QLabel (initially empty) and then simply update its // contents. page->set_title (name); if (page->titleBarWidget () != nullptr) @@ -1660,7 +1660,7 @@ action->setStatusTip(tr("Go one level up in variable hierarchy")); // The QToolButton mouse-clicks change active window, so connect all - // HoverToolButton and RuternFocusToolButton objects to the mechanism + // HoverToolButton and ReturnFocusToolButton objects to the mechanism // that restores active window and focus before acting. QList hbuttonlist = m_tool_bar->findChildren ("" diff -r 77320d48b33e -r 465ac679e976 libgui/src/variable-editor.h --- a/libgui/src/variable-editor.h Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/variable-editor.h Thu Apr 11 07:37:20 2019 -0400 @@ -220,9 +220,8 @@ variable_editor_model *m_var_model; }; - // Gadgets to keep track and restore what variable window - // was in focus just prior to selecting something on the - // menu bar + // Gadgets to keep track of and restore what variable window was in focus + // just prior to selecting something on the menu bar. class HoverToolButton : public QToolButton { diff -r 77320d48b33e -r 465ac679e976 libgui/src/workspace-model.cc --- a/libgui/src/workspace-model.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/workspace-model.cc Thu Apr 11 07:37:20 2019 -0400 @@ -48,7 +48,7 @@ m_columnNames.append (tr ("Value")); m_columnNames.append (tr ("Attribute")); - // Initialize the bachground and foreground colors of special + // Initialize the background and foreground colors of special // classes in the workspace view. The structure is // m_storage_class_colors(1,2,...,colors): background colors // m_storage_class_colors(colors+1,...,2*colors): foreground colors @@ -109,7 +109,7 @@ = ws_class_chars.indexOf (m_scopes[idx.row ()].toLatin1 ()); if (actual_class >= 0) { - // Valid class: Get backgorund (normal indexes) or foreground + // Valid class: Get background (normal indexes) or foreground // color (indexes with offset) if (role == Qt::ForegroundRole) actual_class += ws_colors_count; diff -r 77320d48b33e -r 465ac679e976 libgui/src/workspace-view.cc --- a/libgui/src/workspace-view.cc Wed Jan 01 17:40:49 2020 +0100 +++ b/libgui/src/workspace-view.cc Thu Apr 11 07:37:20 2019 -0400 @@ -180,7 +180,7 @@ m_view->setModel (&m_filter_model); - // set the sorting after a model was set, it would be ignored otherwise + // set the sorting after the model is set, it would be ignored otherwise resource_manager& rmgr = m_octave_qobj.get_resource_manager (); gui_settings *settings = rmgr.get_settings (); m_view->sortByColumn ( @@ -333,7 +333,7 @@ QModelIndex index = m_view->indexAt (qpos); - // if it isnt Local, Glocal etc, allow the ctx menu + // if it isn't Local, Global etc, allow the ctx menu if (index.isValid () && index.column () == 0) { QString var_name = get_var_name (index);