Mercurial > octave
diff libgui/src/m-editor/file-editor-tab.cc @ 25103:078b795c5219 stable
maint: style check C++ ahead of 4.4 release.
* ButtonGroup.cc, Canvas.cc, Figure.cc, GLCanvas.cc, GLCanvas.h,
ListBoxControl.cc, ObjectProxy.cc, QTerminal.h, dialog.cc, documentation.cc,
files-dock-widget.cc, history-dock-widget.cc, file-editor-tab.cc,
file-editor.h, find-dialog.cc, marker.h, octave-qscintilla.cc,
octave-qscintilla.h, main-window.cc, webinfo.cc, resource-manager.h,
settings-dialog.cc, shortcut-manager.cc, shortcut-manager.h,
variable-editor.cc, workspace-view.cc, build-env.in.cc, __ilu__.cc, cellfun.cc,
data.cc, dirfns.cc, dynamic-ld.h, environment.cc, error.cc, fcn-info.cc,
gl-render.cc, gl2ps-print.cc, graphics.cc, graphics.in.h, help.cc,
interpreter.cc, load-path.cc, load-save.cc, ls-mat5.cc, mex.cc, oct-stream.cc,
oct-stream.h, qz.cc, sighandlers.cc, sparse-xpow.cc, svd.cc, symscope.h,
symtab.cc, symtab.h, sysdep.cc, url-handle-manager.h, utils.cc, variables.cc,
__init_fltk__.cc, __ode15__.cc, gzip.cc, ov-base.cc, ov-builtin.h, ov-cell.cc,
ov-class.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-java.cc, ov-re-diag.cc,
op-b-sbm.cc, op-bm-b.cc, op-bm-bm.cc, op-bm-sbm.cc, op-cdm-cdm.cc, op-cell.cc,
op-cm-cm.cc, op-cm-cs.cc, op-cm-m.cc, op-cm-s.cc, op-cm-scm.cc, op-cm-sm.cc,
op-cs-cm.cc, op-cs-cs.cc, op-cs-m.cc, op-cs-s.cc, op-cs-scm.cc, op-cs-sm.cc,
op-dm-dm.cc, op-dm-scm.cc, op-dm-sm.cc, op-fcdm-fcdm.cc, op-fcm-fcm.cc,
op-fcm-fcs.cc, op-fcm-fm.cc, op-fcm-fs.cc, op-fcs-fcm.cc, op-fcs-fcs.cc,
op-fcs-fm.cc, op-fcs-fs.cc, op-fdm-fdm.cc, op-fm-fcm.cc, op-fm-fcs.cc,
op-fm-fm.cc, op-fm-fs.cc, op-fs-fcm.cc, op-fs-fcs.cc, op-fs-fm.cc, op-fs-fs.cc,
op-m-cm.cc, op-m-cs.cc, op-m-m.cc, op-m-s.cc, op-m-scm.cc, op-m-sm.cc,
op-pm-pm.cc, op-pm-scm.cc, op-pm-sm.cc, op-range.cc, op-s-cm.cc, op-s-cs.cc,
op-s-m.cc, op-s-s.cc, op-s-scm.cc, op-s-sm.cc, op-sbm-b.cc, op-sbm-bm.cc,
op-sbm-sbm.cc, op-scm-cm.cc, op-scm-cs.cc, op-scm-m.cc, op-scm-s.cc,
op-scm-scm.cc, op-scm-sm.cc, op-sm-cm.cc, op-sm-cs.cc, op-sm-m.cc, op-sm-s.cc,
op-sm-scm.cc, op-sm-sm.cc, op-str-m.cc, op-str-s.cc, op-str-str.cc,
bp-table.cc, comment-list.h, jit-ir.h, jit-typeinfo.cc, jit-typeinfo.h, lex.h,
parse.h, pt-binop.h, pt-decl.h, pt-eval.cc, pt-jit.cc, pt-jit.h, pt-misc.h,
token.h, CMatrix.cc, CMatrix.h, CSparse.cc, CSparse.h, dMatrix.h, fCMatrix.cc,
fCMatrix.h, fMatrix.h, Faddeeva.cc, gepbalance.cc, hess.cc, oct-fftw.cc,
oct-fftw.h, file-stat.cc, lo-sysinfo.cc, action-container.h, f77-fcn.h,
lo-regexp.cc, oct-mutex.h, oct-shlib.cc:
Use Octave coding conventions in C++ files.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 03 Apr 2018 13:52:07 -0700 |
parents | b5b83fcbb498 |
children | 389757b7b6af 052a0d5dfd2c |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Tue Apr 03 21:48:53 2018 +0200 +++ b/libgui/src/m-editor/file-editor-tab.cc Tue Apr 03 13:52:07 2018 -0700 @@ -230,10 +230,10 @@ // encoding, not updated with the settings #if defined (Q_OS_WIN32) _encoding = settings->value ("editor/default_encoding", "SYSTEM") - .toString (); + .toString (); #else _encoding = settings->value ("editor/default_encoding", "UTF-8") - .toString (); + .toString (); #endif _enc_indicator->setText (_encoding); // no changes in encoding yet @@ -639,18 +639,18 @@ #if defined (HAVE_QSTANDARDPATHS) QString prep_apis_path = QStandardPaths::writableLocation (QStandardPaths::HomeLocation) - + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/"; + + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/"; #else QString prep_apis_path = QDesktopServices::storageLocation (QDesktopServices::HomeLocation) - + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/"; + + "/.config/octave/" + QString (OCTAVE_VERSION) + "/qsci/"; #endif // get settings which infos are used for octave bool octave_builtins = settings->value ( - "editor/codeCompletion_octave_builtins", true).toBool (); + "editor/codeCompletion_octave_builtins", true).toBool (); bool octave_functions = settings->value ( - "editor/codeCompletion_octave_functions", true).toBool (); + "editor/codeCompletion_octave_functions", true).toBool (); if (_is_octave_file) { @@ -714,7 +714,7 @@ interpreter& interp = __get_interpreter__ ( - "file_editor_tab::update_lexer_settings"); + "file_editor_tab::update_lexer_settings"); if (octave_builtins) add_octave_apis (F__builtins__ (interp)); // add new entries @@ -799,7 +799,7 @@ QFont line_numbers_font = lexer->defaultFont (); int font_size = line_numbers_font.pointSize (); font_size = font_size - + settings->value ("editor/line_numbers_size", 0).toInt (); + + settings->value ("editor/line_numbers_size", 0).toInt (); if (font_size < 4) font_size = 4; line_numbers_font.setPointSize (font_size); @@ -1441,10 +1441,10 @@ QSettings *settings = resource_manager::get_settings (); used_comment_str = QInputDialog::getText ( - this, tr ("Comment selected text"), - tr ("Comment string to use:\n"), QLineEdit::Normal, - settings->value (oct_last_comment_str, comment_str.at (0)).toString (), - &ok); + this, tr ("Comment selected text"), + tr ("Comment string to use:\n"), QLineEdit::Normal, + settings->value (oct_last_comment_str, comment_str.at (0)).toString (), + &ok); if ((! ok) || used_comment_str.isEmpty ()) return; // No input, do nothing @@ -1624,8 +1624,8 @@ // editor tab can't be made parent because it may be deleted depending // upon the response. Instead, change the _edit_area to read only. QMessageBox::StandardButtons buttons = QMessageBox::Save | - QMessageBox::Discard | - QMessageBox::Cancel; + QMessageBox::Discard | + QMessageBox::Cancel; // For now, just a warning message about closing a tab that has been // modified seems sufficient. Exit-condition-specific messages could @@ -1800,7 +1800,7 @@ #endif QSettings *settings = resource_manager::get_settings (); QsciScintilla::EolMode eol_mode = static_cast<QsciScintilla::EolMode> ( - settings->value ("editor/default_eol_mode",os_eol_mode).toInt ()); + settings->value ("editor/default_eol_mode",os_eol_mode).toInt ()); int count_max = 0; @@ -1882,8 +1882,8 @@ int eol_mode = QsciScintilla::EolUnix; #endif _edit_area->setEolMode ( - static_cast<QsciScintilla::EolMode> ( - settings->value ("editor/default_eol_mode",eol_mode).toInt ())); + static_cast<QsciScintilla::EolMode> ( + settings->value ("editor/default_eol_mode",eol_mode).toInt ())); update_eol_indicator (); @@ -2151,7 +2151,8 @@ fileDialog->selectFile (_file_name); QFileInfo file_info (_file_name); if (file_info.suffix () != "m") - { // it is not an octave file + { + // it is not an octave file fileDialog->selectNameFilter (filters.at (1)); // "All Files" fileDialog->setDefaultSuffix (""); // no default suffix } @@ -2424,9 +2425,9 @@ (settings->value ("editor/highlightCurrentLine", true).toBool ()); bool match_keywords = settings->value - ("editor/codeCompletion_keywords",true).toBool (); + ("editor/codeCompletion_keywords",true).toBool (); bool match_document = settings->value - ("editor/codeCompletion_document",true).toBool (); + ("editor/codeCompletion_document",true).toBool (); QsciScintilla::AutoCompletionSource source = QsciScintilla::AcsNone; if (match_keywords) @@ -2739,7 +2740,8 @@ if (bp != nullptr) { if ((cond == "") != (bp->get_cond () == "")) - { // can only reuse conditional bp as conditional + { + // can only reuse conditional bp as conditional emit remove_breakpoint_via_debugger_linenr (line); bp = nullptr; } @@ -2949,7 +2951,7 @@ #if defined (HAVE_QSCI_VERSION_2_6_0) , true #endif - ); + ); // loop over all occurrences and set the related indicator int oline, ocol;