# HG changeset patch # User Rik # Date 1712612380 25200 # Node ID 689d4d069bbf746944be5ee935104283cf577e5f # Parent c7bd12648bc2d09881df97fe6cef44b776a06a3c maint: Use Octave coding convention of space between function name and parentheses in libgui/. * libgui/graphics/BaseControl.cc, libgui/graphics/Canvas.cc, libgui/graphics/Figure.cc, libgui/graphics/FigureWindow.cc, libgui/graphics/FigureWindow.h, libgui/graphics/QtHandlesUtils.cc, libgui/graphics/Table.h, libgui/graphics/annotation-dialog.cc, libgui/graphics/gl-select.cc, libgui/src/command-widget.cc, libgui/src/dialog.cc, libgui/src/documentation-bookmarks.cc, libgui/src/documentation.cc, libgui/src/dw-main-window.cc, libgui/src/files-dock-widget.cc, libgui/src/gui-settings.cc, libgui/src/gui-settings.h, libgui/src/gui-utils.cc, libgui/src/led-indicator.cc, libgui/src/m-editor/file-editor-tab.cc, libgui/src/m-editor/find-dialog.cc, libgui/src/m-editor/octave-qscintilla.cc, libgui/src/main-window.cc, libgui/src/main-window.h, libgui/src/octave-dock-widget.cc, libgui/src/set-path-dialog.cc, libgui/src/set-path-model.cc, libgui/src/settings-dialog.cc, libgui/src/tab-bar.cc, libgui/src/tab-bar.h, libgui/src/terminal-dock-widget.cc, libgui/src/variable-editor-model.cc, libgui/src/variable-editor-model.h, libgui/src/variable-editor.cc, libgui/src/workspace-model.h, libgui/src/workspace-view.cc: Use Octave coding convention of space between function name and parentheses. diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/BaseControl.cc --- a/libgui/graphics/BaseControl.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/BaseControl.cc Mon Apr 08 14:39:40 2024 -0700 @@ -74,7 +74,7 @@ QString qss = QString (":enabled { background: %1 none;\n" "color: %2; }") .arg(bcol.name ()).arg (fcol.name ()); - w->setStyleSheet(qss); + w->setStyleSheet (qss); return; } else if (props.style_is ("radiobutton") @@ -97,7 +97,7 @@ QString qss = QString (":enabled { background: %1 none;\n" "color: %2; }") .arg(bcol.name ()).arg (fcol.name ()); - w->setStyleSheet(qss); + w->setStyleSheet (qss); return; } else diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/Canvas.cc --- a/libgui/graphics/Canvas.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/Canvas.cc Mon Apr 08 14:39:40 2024 -0700 @@ -946,7 +946,7 @@ if (childObj.isa ("axes")) { #if defined (HAVE_QWHEELEVENT_POSITION) - QPoint pos = event->position().toPoint (); + QPoint pos = event->position ().toPoint (); #else QPoint pos = event->pos (); #endif @@ -976,7 +976,7 @@ if (zoom_enabled (figObj)) { - if (event->angleDelta().y () > 0) + if (event->angleDelta ().y () > 0) newMouseMode = ZoomInMode; else newMouseMode = ZoomOutMode; @@ -1018,7 +1018,7 @@ { axes::properties& ap = Utils::properties (axesObj); - double factor = (event->angleDelta().y () > 0 ? 0.1 : -0.1); + double factor = (event->angleDelta ().y () > 0 ? 0.1 : -0.1); if (event->modifiers () == Qt::NoModifier && mode != "horizontal") diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/Figure.cc --- a/libgui/graphics/Figure.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/Figure.cc Mon Apr 08 14:39:40 2024 -0700 @@ -260,7 +260,7 @@ if (! m_resizable) { win->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred); - win->setFixedSize (QSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); + win->setFixedSize (QSize (QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); } // Unlock window if it is maximized or full-screen @@ -273,7 +273,7 @@ if (! m_resizable) { win->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); - win->setFixedSize(win->size ()); + win->setFixedSize (win->size ()); } } @@ -420,13 +420,13 @@ if (fp.is_resize ()) { win->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred); - win->setFixedSize (QSize( QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); + win->setFixedSize (QSize (QWIDGETSIZE_MAX, QWIDGETSIZE_MAX)); m_resizable = true; } else { win->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed); - win->setFixedSize(win->size ()); + win->setFixedSize (win->size ()); m_resizable = false; } break; @@ -542,7 +542,7 @@ if (canvas) canvas->setCursor (mouseMode (), fp.get_pointer (), m_pointer_cdata, - fp.get_pointershapehotspot ().matrix_value()); + fp.get_pointershapehotspot ().matrix_value ()); } break; @@ -748,8 +748,7 @@ break; case QEvent::ChildAdded: - if (dynamic_cast (xevent)->child - ()->isWidgetType()) + if (dynamic_cast (xevent)->child ()->isWidgetType()) { octave::autolock guard (gh_mgr.graphics_lock ()); update (figure::properties::ID_TOOLBAR); @@ -759,8 +758,7 @@ break; case QEvent::ChildRemoved: - if (dynamic_cast (xevent)->child - ()->isWidgetType()) + if (dynamic_cast (xevent)->child ()->isWidgetType()) { octave::autolock guard (gh_mgr.graphics_lock ()); update (figure::properties::ID_TOOLBAR); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/FigureWindow.cc --- a/libgui/graphics/FigureWindow.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/FigureWindow.cc Mon Apr 08 14:39:40 2024 -0700 @@ -55,7 +55,7 @@ FigureWindow::showEvent (QShowEvent *ev) { QMainWindow::showEvent (ev); - emit figureWindowShown(); + emit figureWindowShown (); } OCTAVE_END_NAMESPACE(octave) diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/FigureWindow.h --- a/libgui/graphics/FigureWindow.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/FigureWindow.h Mon Apr 08 14:39:40 2024 -0700 @@ -45,10 +45,10 @@ QMenu * createPopupMenu (); protected: - void showEvent(QShowEvent *ev); + void showEvent (QShowEvent *ev); signals: - void figureWindowShown(); + void figureWindowShown (); }; diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/QtHandlesUtils.cc --- a/libgui/graphics/QtHandlesUtils.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/QtHandlesUtils.cc Mon Apr 08 14:39:40 2024 -0700 @@ -406,7 +406,7 @@ // We assume a standard mouse with 15 degree steps and Qt returns // 1/8 of a degree. - int ydelta = -(event->angleDelta().y ()); + int ydelta = -(event->angleDelta ().y ()); retval.setfield ("VerticalScrollCount", octave_value (ydelta / 120)); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/Table.h --- a/libgui/graphics/Table.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/Table.h Mon Apr 08 14:39:40 2024 -0700 @@ -80,7 +80,7 @@ bool m_blockUpdates; bool m_keyPressHandlerDefined; bool m_keyReleaseHandlerDefined; - QWidget * checkBoxForLogical(octave_value cal, bool enabled); + QWidget * checkBoxForLogical (octave_value cal, bool enabled); void updateData (int row, int col, octave_value value, std::string format, bool enabled); void updateData (int row, int col); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/annotation-dialog.cc --- a/libgui/graphics/annotation-dialog.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/annotation-dialog.cc Mon Apr 08 14:39:40 2024 -0700 @@ -124,7 +124,7 @@ // set props to the values of the gui m_props = octave_value_list (); - Matrix position(1, 4); + Matrix position (1, 4); position(0) = m_ui->sb_x->value (); position(1) = m_ui->sb_y->value (); position(2) = m_ui->sb_width->value (); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/graphics/gl-select.cc --- a/libgui/graphics/gl-select.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/graphics/gl-select.cc Mon Apr 08 14:39:40 2024 -0700 @@ -227,7 +227,7 @@ octave_idx_type nr = props.get_cdata ().rows (); double y_pix_size = (nr == 1 ? 1 : (yd(1) - yd(0)) / (nr - 1)); - ColumnVector p1(3, 0.0), p2(3, 0.0), p3(3, 0.0), p4(3, 0.0); + ColumnVector p1 (3, 0.0), p2 (3, 0.0), p3 (3, 0.0), p4 (3, 0.0); p1(0) = xd(0) - x_pix_size/2; p1(1) = yd(0) - y_pix_size/2; diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/command-widget.cc --- a/libgui/src/command-widget.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/command-widget.cc Mon Apr 08 14:39:40 2024 -0700 @@ -259,7 +259,7 @@ QString input_line = text (lines () - 1); if (input_line.startsWith (m_command_widget->prompt ())) - input_line.remove(0, m_command_widget->prompt ().length ()); + input_line.remove (0, m_command_widget->prompt ().length ()); input_line = input_line.trimmed (); @@ -348,7 +348,7 @@ { // Otherwise, store text process the expected event m_last_key_string = e->text (); - QsciScintilla::keyPressEvent(e); + QsciScintilla::keyPressEvent (e); } } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/dialog.cc --- a/libgui/src/dialog.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/dialog.cc Mon Apr 08 14:39:40 2024 -0700 @@ -418,7 +418,7 @@ view->setSelectionMode (QAbstractItemView::NoSelection); m_selector = view->selectionModel (); - for (int i = 0; i < initial.count(); i++) + for (int i = 0; i < initial.count (); i++) { QModelIndex idx = m_model->index (initial.value (i) - 1, 0, QModelIndex ()); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/documentation-bookmarks.cc --- a/libgui/src/documentation-bookmarks.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/documentation-bookmarks.cc Mon Apr 08 14:39:40 2024 -0700 @@ -66,10 +66,10 @@ m_tree->setContextMenuPolicy (Qt::CustomContextMenu); m_tree->setSelectionMode (QAbstractItemView::ExtendedSelection); m_tree->setSortingEnabled (false); - m_tree->setDragEnabled(true); - m_tree->viewport()->setAcceptDrops(true); - m_tree->setDropIndicatorShown(true); - m_tree->setDragDropMode(QAbstractItemView::InternalMove); + m_tree->setDragEnabled (true); + m_tree->viewport ()->setAcceptDrops (true); + m_tree->setDropIndicatorShown (true); + m_tree->setDragDropMode (QAbstractItemView::InternalMove); m_tree->setColumnCount (1); m_tree->setHeaderHidden (true); m_tree->setEditTriggers (QAbstractItemView::EditKeyPressed @@ -81,11 +81,11 @@ this, &documentation_bookmarks::handle_double_click); // Define the icons for the tree view - m_icon_folder.addPixmap (style ()->standardPixmap(QStyle::SP_DirClosedIcon), + m_icon_folder.addPixmap (style ()->standardPixmap (QStyle::SP_DirClosedIcon), QIcon::Normal, QIcon::Off); - m_icon_folder.addPixmap (style ()->standardPixmap(QStyle::SP_DirOpenIcon), + m_icon_folder.addPixmap (style ()->standardPixmap (QStyle::SP_DirOpenIcon), QIcon::Normal, QIcon::On); - m_icon_bookmark.addPixmap (style ()->standardPixmap(QStyle::SP_FileIcon)); + m_icon_bookmark.addPixmap (style ()->standardPixmap (QStyle::SP_FileIcon)); // Setup and read the bookmarkfile QFileInfo f (settings.fileName ()); @@ -234,7 +234,7 @@ { QTreeWidgetItem *new_folder = new QTreeWidgetItem (QStringList (folder)); new_folder->setData (0, tag_role, QVariant (folder_tag)); - new_folder->setFlags (new_folder->flags() | Qt::ItemIsEditable + new_folder->setFlags (new_folder->flags () | Qt::ItemIsEditable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled); new_folder->setChildIndicatorPolicy (QTreeWidgetItem::DontShowIndicatorWhenChildless); @@ -418,7 +418,7 @@ tr("Unable to write file %1:\n%2.\n\n" "Documentation bookmarks are not saved!\n") .arg (m_xbel_file.fileName ()) - .arg (m_xbel_file.errorString())); + .arg (m_xbel_file.errorString ())); return; } @@ -430,10 +430,10 @@ xml_writer.writeStartElement (dc_xbel_name_format); xml_writer.writeAttribute (dc_xbel_attr_version, dc_xbel_value_version); - for (int i = 0; i < m_tree->topLevelItemCount(); i++) + for (int i = 0; i < m_tree->topLevelItemCount (); i++) write_tree_item (&xml_writer, m_tree->topLevelItem (i)); - xml_writer.writeEndDocument(); + xml_writer.writeEndDocument (); m_xbel_file.flush (); m_xbel_file.close (); @@ -474,7 +474,7 @@ { error_message = tr ("Unable to read file %1:\n%2.") .arg (m_xbel_file.fileName ()) - .arg (m_xbel_file.errorString()); + .arg (m_xbel_file.errorString ()); return error_message; } @@ -488,7 +488,7 @@ return error_message; } - if (xml_reader.name() != dc_xbel_name_format + if (xml_reader.name () != dc_xbel_name_format || xml_reader.attributes ().value (dc_xbel_attr_version) != dc_xbel_value_version) { error_message = tr ("The file\n" @@ -522,7 +522,7 @@ if (tag == folder_tag) { // Next item is a folder, which might also have children - bool expanded = (xml_reader->attributes().value (dc_xbel_attr_folded) == dc_xbel_value_no); + bool expanded = (xml_reader->attributes ().value (dc_xbel_attr_folded) == dc_xbel_value_no); QTreeWidgetItem *new_folder = add_folder (title, item, expanded); @@ -532,7 +532,7 @@ { if (xml_reader->name () == dc_xbel_name_title) { - title = xml_reader->readElementText(); + title = xml_reader->readElementText (); new_folder->setText (0, title); } else if (xml_reader->name () == dc_xbel_name_folder) @@ -546,11 +546,11 @@ else if (tag == bookmark_tag) { // Next item is a bookmark, without children - QString url = xml_reader->attributes().value (dc_xbel_attr_href).toString (); + QString url = xml_reader->attributes ().value (dc_xbel_attr_href).toString (); while (xml_reader->readNextStartElement ()) { - if (xml_reader->name() == dc_xbel_name_title) - title = xml_reader->readElementText(); + if (xml_reader->name () == dc_xbel_name_title) + title = xml_reader->readElementText (); else xml_reader->skipCurrentElement (); } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/documentation.cc --- a/libgui/src/documentation.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/documentation.cc Mon Apr 08 14:39:40 2024 -0700 @@ -144,7 +144,7 @@ connect(m_help_engine, SIGNAL(setupFinished ()), m_help_engine->searchEngine (), SLOT(reindexDocumentation ())); - if (! m_help_engine->setupData()) + if (! m_help_engine->setupData ()) { #if defined (ENABLE_DOCS) QMessageBox::warning (this, tr ("Octave Documentation"), @@ -351,7 +351,7 @@ sys::recursive_rmdir (file_name); } - file.remove(); + file.remove (); } } @@ -401,7 +401,7 @@ popdown_button_prev_pages->setPopupMode (QToolButton::InstantPopup); popdown_button_prev_pages->setToolButtonStyle (Qt::ToolButtonTextOnly); popdown_button_prev_pages->setCheckable (false); - popdown_button_prev_pages->setArrowType(Qt::DownArrow); + popdown_button_prev_pages->setArrowType (Qt::DownArrow); m_tool_bar->addWidget (popdown_button_prev_pages); m_action_go_next @@ -415,7 +415,7 @@ popdown_button_next_pages->setMenu (m_next_pages_menu); popdown_button_next_pages->setPopupMode (QToolButton::InstantPopup); popdown_button_next_pages->setToolButtonStyle (Qt::ToolButtonTextOnly); - popdown_button_next_pages->setArrowType(Qt::DownArrow); + popdown_button_next_pages->setArrowType (Qt::DownArrow); m_tool_bar->addWidget (popdown_button_next_pages); connect (m_doc_browser, &documentation_browser::backwardAvailable, @@ -512,7 +512,7 @@ void documentation::global_search_started () { - qApp->setOverrideCursor(QCursor(Qt::WaitCursor)); + qApp->setOverrideCursor (QCursor (Qt::WaitCursor)); } void @@ -586,7 +586,7 @@ m_internal_search = QString (); } - qApp->restoreOverrideCursor(); + qApp->restoreOverrideCursor (); } void @@ -693,7 +693,7 @@ { if (m_doc_browser->hasFocus ()) { - m_doc_browser->copy(); + m_doc_browser->copy (); } } @@ -739,19 +739,19 @@ QTabWidget *navi = static_cast (widget (0)); - if (found_links.count() > 0) + if (found_links.count () > 0) { // First search in the function index #if defined (HAVE_QHELPENGINE_DOCUMENTSFORIDENTIFIER) - QUrl first_url = found_links.constFirst().url; + QUrl first_url = found_links.constFirst ().url; #else - QUrl first_url = found_links.constBegin().value (); + QUrl first_url = found_links.constBegin ().value (); #endif m_doc_browser->setSource (first_url); // Switch to function index tab - m_help_engine->indexWidget()->filterIndices (ref_name); + m_help_engine->indexWidget ()->filterIndices (ref_name); QWidget *index_tab = navi->findChild ("documentation_tab_index"); navi->setCurrentWidget (index_tab); @@ -768,7 +768,7 @@ #else QList query; query << QHelpSearchQuery (QHelpSearchQuery::DEFAULT, - QStringList (QString("\"") + ref_name + QString("\""))); + QStringList (QString ("\"") + ref_name + QString ("\""))); #endif m_internal_search = ref_name; search_engine->search (query); @@ -808,10 +808,10 @@ return; QString wildcard; - if (expression.contains (QLatin1Char('*'))) + if (expression.contains (QLatin1Char ('*'))) wildcard = expression; - m_help_engine->indexWidget ()->filterIndices(expression, wildcard); + m_help_engine->indexWidget ()->filterIndices (expression, wildcard); } void @@ -923,7 +923,7 @@ } if (do_setup) - m_help_engine->setupData(); + m_help_engine->setupData (); } } @@ -1091,7 +1091,7 @@ for (int i = 0; i < default_fonts.size (); ++i) { QString fontpath = - fonts_dir + default_fonts.at(i) + QString (".otf"); + fonts_dir + default_fonts.at (i) + QString (".otf"); QFontDatabase::addApplicationFont (fontpath); } } @@ -1123,9 +1123,9 @@ documentation_browser::loadResource (int type, const QUrl& url) { if (m_help_engine && url.scheme () == "qthelp") - return QVariant (m_help_engine->fileData(url)); + return QVariant (m_help_engine->fileData (url)); else - return QTextBrowser::loadResource(type, url); + return QTextBrowser::loadResource (type, url); } void @@ -1170,7 +1170,7 @@ { if (we->modifiers () == Qt::ControlModifier) { - if (we->angleDelta().y () > 0) + if (we->angleDelta ().y () > 0) zoom_in (); else zoom_out (); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/dw-main-window.cc --- a/libgui/src/dw-main-window.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/dw-main-window.cc Mon Apr 08 14:39:40 2024 -0700 @@ -88,7 +88,7 @@ new_actions.append (m_close_all_action); QMenu *menu = QMainWindow::createPopupMenu (); - QList actions = menu->actions(); + QList actions = menu->actions (); if (actions.length () > 0) { diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/files-dock-widget.cc --- a/libgui/src/files-dock-widget.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/files-dock-widget.cc Mon Apr 08 14:39:40 2024 -0700 @@ -106,23 +106,23 @@ return false; } - auto parent_dir = QDir(filePath (parent (idx))); + auto parent_dir = QDir (filePath (parent (idx))); - files_dock_widget *fdw = static_cast(parent()); + files_dock_widget *fdw = static_cast(parent ()); - fdw->file_remove_signal(parent_dir.filePath(old_name), parent_dir.filePath(new_name)); + fdw->file_remove_signal (parent_dir.filePath (old_name), parent_dir.filePath (new_name)); if (!parent_dir.rename (old_name, new_name)) { display_rename_failed_message (old_name, new_name); - fdw->file_renamed_signal(false); + fdw->file_renamed_signal (false); return false; } - fdw->file_renamed_signal(true); + fdw->file_renamed_signal (true); - emit fileRenamed(parent_dir.absolutePath(), old_name, new_name); - revert(); + emit fileRenamed (parent_dir.absolutePath (), old_name, new_name); + revert (); return true; } @@ -381,7 +381,7 @@ m_file_tree_view->setToolTip (tr ("Double-click to open file/folder, right click for alternatives")); // allow renaming directly in the tree view with - // m_file_tree_view->edit(index) + // m_file_tree_view->edit (index) m_file_system_model->setReadOnly (false); // delegate to improve rename ergonomy by pre-selecting text up to the // extension @@ -393,10 +393,10 @@ // and associate to F2 key shortcut m_rename_action = new QAction (tr ("Rename..."), this); m_rename_action->setShortcut (Qt::Key_F2); - m_rename_action->setShortcutContext(Qt::WidgetWithChildrenShortcut); + m_rename_action->setShortcutContext (Qt::WidgetWithChildrenShortcut); connect (m_rename_action, &QAction::triggered, this, &files_dock_widget::contextmenu_rename); - addAction(m_rename_action); + addAction (m_rename_action); // get sort column and order as well as column state (order and width) @@ -880,7 +880,7 @@ if (rows.size () > 0) { QModelIndex index = rows[0]; - m_file_tree_view->edit(index); + m_file_tree_view->edit (index); } } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/gui-settings.cc --- a/libgui/src/gui-settings.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/gui-settings.cc Mon Apr 08 14:39:40 2024 -0700 @@ -379,7 +379,7 @@ int font_size = font.pointSize (); if (font_size == -1) - font_size = static_cast (std::floor(font.pointSizeF ())); + font_size = static_cast (std::floor (font.pointSizeF ())); // check for valid font size, otherwise take default 10 QString default_font_size = "10"; @@ -678,7 +678,7 @@ QNetworkProxy::setApplicationProxy (proxy); // Set proxy for curl library if not based on environment variables - std::string proxy_url_str = proxy_url.toString().toStdString (); + std::string proxy_url_str = proxy_url.toString ().toStdString (); sys::env::putenv ("http_proxy", proxy_url_str); sys::env::putenv ("HTTP_PROXY", proxy_url_str); sys::env::putenv ("https_proxy", proxy_url_str); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/gui-settings.h --- a/libgui/src/gui-settings.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/gui-settings.h Mon Apr 08 14:39:40 2024 -0700 @@ -138,7 +138,7 @@ Reading a color from the gui_settings taking possible color modes into account. The default value for a second color mode @p mode=1 is deterimined from the standard default value @p mode=0 by inverting - the lightness (see get_color_value()) + the lightness (see get_color_value ()) @param pref gui preference (key string, default value); the default value can be given by QColor or QPalette::ColorRole diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/gui-utils.cc --- a/libgui/src/gui-utils.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/gui-utils.cc Mon Apr 08 14:39:40 2024 -0700 @@ -74,7 +74,7 @@ = actual_geometry.width () * actual_geometry.height (); QRect intersection; - foreach (const QScreen *screen, QGuiApplication::screens()) + foreach (const QScreen *screen, QGuiApplication::screens ()) { QRect screen_geom = screen->availableGeometry (); intersection = screen_geom.intersected (actual_geometry); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/led-indicator.cc --- a/libgui/src/led-indicator.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/led-indicator.cc Mon Apr 08 14:39:40 2024 -0700 @@ -37,7 +37,7 @@ led_indicator::led_indicator (led_state initial_state, QWidget *p) : QLabel (p) { - setFixedSize(12, 12); + setFixedSize (12, 12); set_state (initial_state); } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Mon Apr 08 14:39:40 2024 -0700 @@ -130,7 +130,7 @@ m_breakpoint_info.remove_line = -1; // Initialize last modification date to now - m_last_modified = QDateTime::currentDateTimeUtc(); + m_last_modified = QDateTime::currentDateTimeUtc (); connect (m_edit_area, SIGNAL (cursorPositionChanged (int, int)), this, SLOT (handle_cursor_moved (int, int))); @@ -708,7 +708,7 @@ // If new file, no lexer, or lexer has changed, // delete old one and set the newly created as current lexer if (! old_lexer || ! valid_file_name () - || QString(old_lexer->lexer ()) != QString(lexer->lexer ())) + || QString (old_lexer->lexer ()) != QString (lexer->lexer ())) { // Delete and set new lexer if (old_lexer) @@ -1911,7 +1911,7 @@ else file_to_load = fileName; QFile file (file_to_load); - if (!file.open(QIODevice::ReadOnly)) + if (! file.open (QIODevice::ReadOnly)) return file.errorString (); int col = 0, line = 0; @@ -2586,14 +2586,14 @@ if (! settings.bool_value (global_use_native_dialogs)) { // Qt file dialogs - fileDialog.setOption(QFileDialog::DontUseNativeDialog); + fileDialog.setOption (QFileDialog::DontUseNativeDialog); } else { // Native file dialogs: Test for already existing files is done manually // since native file dialogs might not consider the automatically // appended default extension when checking if the file already exists - fileDialog.setOption(QFileDialog::DontConfirmOverwrite); + fileDialog.setOption (QFileDialog::DontConfirmOverwrite); } // add the possible filters and the default suffix diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/m-editor/find-dialog.cc --- a/libgui/src/m-editor/find-dialog.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/m-editor/find-dialog.cc Mon Apr 08 14:39:40 2024 -0700 @@ -108,7 +108,7 @@ m_replace_line_edit->completer ()->setCaseSensitivity (Qt::CaseSensitive); m_replace_label->setBuddy (m_replace_line_edit); - int width = QFontMetrics (m_search_line_edit->font ()).averageCharWidth(); + int width = QFontMetrics (m_search_line_edit->font ()).averageCharWidth (); m_search_line_edit->setFixedWidth (20*width); m_replace_line_edit->setFixedWidth (20*width); @@ -198,8 +198,8 @@ setWindowModality (Qt::NonModal); - setAttribute(Qt::WA_ShowWithoutActivating); - setAttribute(Qt::WA_DeleteOnClose); + setAttribute (Qt::WA_ShowWithoutActivating); + setAttribute (Qt::WA_DeleteOnClose); } // The edit_area has changed: update relevant data of the file dialog diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/m-editor/octave-qscintilla.cc Mon Apr 08 14:39:40 2024 -0700 @@ -1034,7 +1034,7 @@ for (int i = 0; i < rx_list.length (); i++) { rx = QRegularExpression {rx_list.at (i)}; - QRegularExpressionMatch match = rx.match(new_msg); + QRegularExpressionMatch match = rx.match (new_msg); if (match.hasMatch ()) { err_line = match.captured (1).toInt (); @@ -1242,20 +1242,20 @@ bool octave_qscintilla::event (QEvent *e) { - if (m_debug_mode && e->type() == QEvent::ToolTip) + if (m_debug_mode && e->type () == QEvent::ToolTip) { // FIXME: can we handle display of a tooltip using an // interpreter event or a custom signal/slot connection? QHelpEvent *help_e = static_cast (e); - QString symbol = wordAtPoint (help_e->pos()); + QString symbol = wordAtPoint (help_e->pos ()); emit show_symbol_tooltip_signal (help_e->globalPos (), symbol); return true; } - return QsciScintilla::event(e); + return QsciScintilla::event (e); } void @@ -1413,7 +1413,7 @@ } else { - e->ignore(); + e->ignore (); } } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/main-window.cc --- a/libgui/src/main-window.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/main-window.cc Mon Apr 08 14:39:40 2024 -0700 @@ -815,7 +815,7 @@ // Loop over all directories in order to get all subdirs for (octave_idx_type i = 0; i < dir_list.length (); i++) { - std::string dir = dir_list.at(i).toStdString (); + std::string dir = dir_list.at (i).toStdString (); if (subdirs) paths.append (Fgenpath (ovl (dir))); @@ -928,14 +928,14 @@ if (preferred_style == global_style.def ().toString ()) preferred_style = m_default_style; - QApplication *qapp = m_octave_qobj.qapplication(); + QApplication *qapp = m_octave_qobj.qapplication (); if (preferred_style == global_extra_styles.at (EXTRA_STYLE_FUSION_DARK)) { - QStyle *new_style = QStyleFactory::create (QStringLiteral("Fusion")); + QStyle *new_style = QStyleFactory::create (QStringLiteral ("Fusion")); if (new_style) qapp->setStyle (new_style); - qapp->setPalette (getFusionDarkPalette()); + qapp->setPalette (getFusionDarkPalette ()); qapp->setStyleSheet ("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }"); } else @@ -1026,29 +1026,29 @@ } QPalette -main_window::getFusionDarkPalette() +main_window::getFusionDarkPalette () { QPalette darkPalette; - darkPalette.setColor(QPalette::Window, QColor(53, 53, 53)); - darkPalette.setColor(QPalette::WindowText, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::WindowText, QColor(127, 127, 127)); - darkPalette.setColor(QPalette::Base, QColor(42, 42, 42)); - darkPalette.setColor(QPalette::AlternateBase, QColor(66, 66, 66)); - darkPalette.setColor(QPalette::ToolTipBase, Qt::white); - darkPalette.setColor(QPalette::ToolTipText, Qt::white); - darkPalette.setColor(QPalette::Text, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::Text, QColor(127, 127, 127)); - darkPalette.setColor(QPalette::Dark, QColor(35, 35, 35)); - darkPalette.setColor(QPalette::Shadow, QColor(20, 20, 20)); - darkPalette.setColor(QPalette::Button, QColor(53, 53, 53)); - darkPalette.setColor(QPalette::ButtonText, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(127, 127, 127)); - darkPalette.setColor(QPalette::BrightText, Qt::red); - darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); - darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); - darkPalette.setColor(QPalette::Disabled, QPalette::Highlight, QColor(80, 80, 80)); - darkPalette.setColor(QPalette::HighlightedText, Qt::white); - darkPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, QColor(127, 127, 127)); + darkPalette.setColor (QPalette::Window, QColor (53, 53, 53)); + darkPalette.setColor (QPalette::WindowText, Qt::white); + darkPalette.setColor (QPalette::Disabled, QPalette::WindowText, QColor (127, 127, 127)); + darkPalette.setColor (QPalette::Base, QColor (42, 42, 42)); + darkPalette.setColor (QPalette::AlternateBase, QColor (66, 66, 66)); + darkPalette.setColor (QPalette::ToolTipBase, Qt::white); + darkPalette.setColor (QPalette::ToolTipText, Qt::white); + darkPalette.setColor (QPalette::Text, Qt::white); + darkPalette.setColor (QPalette::Disabled, QPalette::Text, QColor (127, 127, 127)); + darkPalette.setColor (QPalette::Dark, QColor (35, 35, 35)); + darkPalette.setColor (QPalette::Shadow, QColor (20, 20, 20)); + darkPalette.setColor (QPalette::Button, QColor (53, 53, 53)); + darkPalette.setColor (QPalette::ButtonText, Qt::white); + darkPalette.setColor (QPalette::Disabled, QPalette::ButtonText, QColor (127, 127, 127)); + darkPalette.setColor (QPalette::BrightText, Qt::red); + darkPalette.setColor (QPalette::Link, QColor (42, 130, 218)); + darkPalette.setColor (QPalette::Highlight, QColor (42, 130, 218)); + darkPalette.setColor (QPalette::Disabled, QPalette::Highlight, QColor (80, 80, 80)); + darkPalette.setColor (QPalette::HighlightedText, Qt::white); + darkPalette.setColor (QPalette::Disabled, QPalette::HighlightedText, QColor (127, 127, 127)); return darkPalette; } @@ -1385,7 +1385,7 @@ // FIXME: Remove, if for all common KDE versions (bug #54607) is resolved. if (! settings.bool_value (global_use_native_dialogs)) - fileDialog.setOption(QFileDialog::DontUseNativeDialog); + fileDialog.setOption (QFileDialog::DontUseNativeDialog); fileDialog.setNameFilter (tr ("Octave Files (*.m);;All Files (*)")); @@ -1396,7 +1396,7 @@ if (fileDialog.exec ()) { - QStringList open_file_names = fileDialog.selectedFiles(); + QStringList open_file_names = fileDialog.selectedFiles (); for (int i = 0; i < open_file_names.count (); i++) emit open_file_signal (open_file_names.at (i), m_file_encoding, -1); } @@ -1636,7 +1636,7 @@ return; } - if (isMaximized()) + if (isMaximized ()) { // If the window state is restored to maximized layout, the // horizontal layout is not preserved. This cann be avoided by @@ -1653,10 +1653,10 @@ setGeometry (av_geom); // Set (correct) available geometry // Force full title bar - setWindowFlags(Qt::WindowTitleHint - | Qt::WindowMinMaxButtonsHint - | Qt::WindowSystemMenuHint - | Qt::WindowCloseButtonHint); + setWindowFlags (Qt::WindowTitleHint + | Qt::WindowMinMaxButtonsHint + | Qt::WindowSystemMenuHint + | Qt::WindowCloseButtonHint); } if (! restoreState (settings.byte_array_value (mw_state))) diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/main-window.h --- a/libgui/src/main-window.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/main-window.h Mon Apr 08 14:39:40 2024 -0700 @@ -159,7 +159,7 @@ = QString ()); void show_about_octave (); void notice_settings (bool update_by_worker = false); - QPalette getFusionDarkPalette(); + QPalette getFusionDarkPalette (); void prepare_to_exit (); void go_to_previous_widget (); void reset_windows (); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/octave-dock-widget.cc --- a/libgui/src/octave-dock-widget.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/octave-dock-widget.cc Mon Apr 08 14:39:40 2024 -0700 @@ -185,7 +185,7 @@ ).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 ((icon_size*2)/3).arg ((icon_size*7)/3); } octave_dock_widget::octave_dock_widget (const QString& obj_name, QWidget *p) diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/set-path-dialog.cc --- a/libgui/src/set-path-dialog.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/set-path-dialog.cc Mon Apr 08 14:39:40 2024 -0700 @@ -132,7 +132,7 @@ m_path_list->setSelectionBehavior (QAbstractItemView::SelectRows); m_path_list->setSelectionMode (QAbstractItemView::ExtendedSelection); m_path_list->setAlternatingRowColors (true); - m_path_list->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_path_list->setSizePolicy (QSizePolicy::Expanding, QSizePolicy::Expanding); // layout everything QDialogButtonBox *button_box = new QDialogButtonBox (Qt::Horizontal); @@ -157,8 +157,8 @@ // main layout QHBoxLayout *main_hboxlayout = new QHBoxLayout; - main_hboxlayout->addWidget(path_edit_layout); - main_hboxlayout->addWidget(m_path_list); + main_hboxlayout->addWidget (path_edit_layout); + main_hboxlayout->addWidget (m_path_list); QGridLayout *main_layout = new QGridLayout; main_layout->addWidget (m_info_label, 0, 0); @@ -169,7 +169,7 @@ gui_settings settings; - restoreGeometry (settings.value(pd_geometry.settings_key ()).toByteArray()); + restoreGeometry (settings.value (pd_geometry.settings_key ()).toByteArray ()); } void @@ -206,7 +206,7 @@ } void -set_path_dialog::add_dir() +set_path_dialog::add_dir () { add_dir_common (false); } @@ -222,7 +222,7 @@ { set_path_model *m = static_cast (m_path_list->model ()); QItemSelectionModel *selmodel = m_path_list->selectionModel (); - QModelIndexList indexlist = selmodel->selectedIndexes(); + QModelIndexList indexlist = selmodel->selectedIndexes (); m->rm_dir (indexlist); selmodel->clearSelection (); @@ -233,7 +233,7 @@ { set_path_model *m = static_cast (m_path_list->model ()); QItemSelectionModel *selmodel = m_path_list->selectionModel (); - QModelIndexList indexlist = selmodel->selectedIndexes(); + QModelIndexList indexlist = selmodel->selectedIndexes (); m->move_dir_up (indexlist); // Update selection and view @@ -254,7 +254,7 @@ { set_path_model *m = static_cast (m_path_list->model ()); QItemSelectionModel *selmodel = m_path_list->selectionModel (); - QModelIndexList indexlist = selmodel->selectedIndexes(); + QModelIndexList indexlist = selmodel->selectedIndexes (); m->move_dir_down (indexlist); // Update selection and view @@ -275,7 +275,7 @@ { set_path_model *m = static_cast (m_path_list->model ()); QItemSelectionModel *selmodel = m_path_list->selectionModel (); - QModelIndexList indexlist = selmodel->selectedIndexes(); + QModelIndexList indexlist = selmodel->selectedIndexes (); m->move_dir_top (indexlist); // Update selection and view @@ -291,7 +291,7 @@ { set_path_model *m = static_cast (m_path_list->model ()); QItemSelectionModel *selmodel = m_path_list->selectionModel (); - QModelIndexList indexlist = selmodel->selectedIndexes(); + QModelIndexList indexlist = selmodel->selectedIndexes (); m->move_dir_bottom (indexlist); // Update selection and view diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/set-path-model.cc --- a/libgui/src/set-path-model.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/set-path-model.cc Mon Apr 08 14:39:40 2024 -0700 @@ -145,7 +145,7 @@ beginInsertRows (QModelIndex (), m_dirs.size (), m_dirs.size ()); - QList::Iterator it = m_dirs.begin(); + QList::Iterator it = m_dirs.begin (); m_dirs.insert (it, p); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/settings-dialog.cc --- a/libgui/src/settings-dialog.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/settings-dialog.cc Mon Apr 08 14:39:40 2024 -0700 @@ -138,7 +138,7 @@ if (first) { // Global style - QStringList styles = QStyleFactory::keys(); + QStringList styles = QStyleFactory::keys (); styles.append (global_extra_styles); combo_styles->addItems (styles); combo_styles->insertItem (0, global_style.def ().toString ()); @@ -344,10 +344,10 @@ m_rb_uncomment_strings[i], &QCheckBox::setDisabled); } - m_rb_comment_strings[i]->setText (ed_comment_strings.at(i)); + m_rb_comment_strings[i]->setText (ed_comment_strings.at (i)); m_rb_comment_strings[i]->setChecked (i == selected_comment_string); - m_rb_uncomment_strings[i]->setText (ed_comment_strings.at(i)); + m_rb_uncomment_strings[i]->setText (ed_comment_strings.at (i)); m_rb_uncomment_strings[i]->setAutoExclusive (false); m_rb_uncomment_strings[i]->setChecked ( 1 << i & selected_uncomment_string); } @@ -560,7 +560,7 @@ current_line_color->setObjectName (ed_highlight_current_line_color.settings_key ()); QLabel *current_line_color_label - = new QLabel(tr ("Color of highlighted current line (magenta (255,0,255) for automatic color)")); + = new QLabel (tr("Color of highlighted current line (magenta (255,0,255) for automatic color)")); QHBoxLayout *color_mode = new QHBoxLayout (); color_mode->addWidget (cb_color_mode); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/tab-bar.cc --- a/libgui/src/tab-bar.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/tab-bar.cc Mon Apr 08 14:39:40 2024 -0700 @@ -145,14 +145,14 @@ { QSize s = QTabBar::tabSizeHint (idx); if (m_rotated) - s.transpose(); + s.transpose (); return s; } // Reimplemented paint event allowing rotated tabs void -tab_bar::paintEvent(QPaintEvent *e) +tab_bar::paintEvent (QPaintEvent *e) { // Just process the original event if not rotated if (! m_rotated) @@ -162,14 +162,14 @@ QStylePainter painter (this); QStyleOptionTab opt; - for (int idx = 0; idx < count(); idx++) + for (int idx = 0; idx < count (); idx++) { initStyleOption (&opt, idx); painter.drawControl (QStyle::CE_TabBarTabShape, opt); painter.save (); - QSize s = opt.rect.size(); - s.transpose(); + QSize s = opt.rect.size (); + s.transpose (); QRect rect (QPoint (), s); rect.moveCenter (opt.rect.center ()); opt.rect = rect; @@ -209,9 +209,9 @@ // detect the mouse click if ((me->type () == QEvent::MouseButtonDblClick - && me->button() == Qt::LeftButton) + && me->button () == Qt::LeftButton) || (me->type () != QEvent::MouseButtonDblClick - && me->button() == Qt::MiddleButton)) + && me->button () == Qt::MiddleButton)) { // Middle click or double click -> close the tab // Make the clicked tab the current one and close it @@ -225,7 +225,7 @@ setCurrentIndex (current_idx); } else if (me->type () != QEvent::MouseButtonDblClick - && me->button() == Qt::RightButton) + && me->button () == Qt::RightButton) { // Right click, show context menu setCurrentIndex (clicked_idx); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/tab-bar.h --- a/libgui/src/tab-bar.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/tab-bar.h Mon Apr 08 14:39:40 2024 -0700 @@ -73,8 +73,8 @@ protected: - void paintEvent(QPaintEvent *e); - void mousePressEvent(QMouseEvent *event); + void paintEvent (QPaintEvent *e); + void mousePressEvent (QMouseEvent *event); private: diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/terminal-dock-widget.cc --- a/libgui/src/terminal-dock-widget.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/terminal-dock-widget.cc Mon Apr 08 14:39:40 2024 -0700 @@ -122,10 +122,10 @@ font.setPointSize (settings.int_value (cs_font_size)); - QFontMetrics metrics(font); + QFontMetrics metrics (font); - int win_x = metrics.maxWidth()*80; - int win_y = metrics.height()*25; + int win_x = metrics.maxWidth ()*80; + int win_y = metrics.height ()*25; int max_x = QGuiApplication::primaryScreen ()->availableGeometry ().width (); int max_y = QGuiApplication::primaryScreen ()->availableGeometry ().height (); diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/variable-editor-model.cc --- a/libgui/src/variable-editor-model.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/variable-editor-model.cc Mon Apr 08 14:39:40 2024 -0700 @@ -1381,7 +1381,7 @@ { if (requires_sub_editor (idx)) { - QString name = QString::fromStdString(m_rep->name ()); + QString name = QString::fromStdString (m_rep->name ()); emit edit_variable_signal (name + subscript_expression (idx), value_at (idx)); } diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/variable-editor-model.h --- a/libgui/src/variable-editor-model.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/variable-editor-model.h Mon Apr 08 14:39:40 2024 -0700 @@ -194,16 +194,16 @@ Qt::ItemFlags flags (const QModelIndex& idx) const; bool insertRows (int row, int count, - const QModelIndex& parent = QModelIndex()); + const QModelIndex& parent = QModelIndex ()); bool removeRows (int row, int count, - const QModelIndex& parent = QModelIndex()); + const QModelIndex& parent = QModelIndex ()); bool insertColumns (int column, int count, - const QModelIndex& parent = QModelIndex()); + const QModelIndex& parent = QModelIndex ()); bool removeColumns (int column, int count, - const QModelIndex& parent = QModelIndex()); + const QModelIndex& parent = QModelIndex ()); // Is cell at idx complex enough to require a sub editor? diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/variable-editor.cc --- a/libgui/src/variable-editor.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/variable-editor.cc Mon Apr 08 14:39:40 2024 -0700 @@ -75,7 +75,7 @@ QSignalMapper *plot_mapper = new QSignalMapper (menu); - for (int i = 0; i < list.size(); ++i) + for (int i = 0; i < list.size (); ++i) plot_mapper->setMapping (menu->addAction (list.at (i), plot_mapper, SLOT (map ())), list.at (i)); @@ -277,7 +277,7 @@ emit variable_focused_signal (objectName ()); } - else if (old == focusWidget()) + else if (old == focusWidget ()) { if (titleBarWidget () != nullptr) { @@ -602,7 +602,7 @@ QVector vect; vect << from_row + 1 << to_row + 1 << from_col + 1 << to_col + 1; - QList range = QList::fromVector(vect); + QList range = QList::fromVector (vect); return range; } @@ -1214,7 +1214,7 @@ } } if (! focus_set) - setFocus(); + setFocus (); } } } @@ -1677,7 +1677,7 @@ const char *member) { QAction *action = new QAction (icon, text, this); - connect(action, SIGNAL (triggered ()), receiver, member); + connect (action, SIGNAL (triggered ()), receiver, member); QToolButton *button = new ReturnFocusToolButton (m_tool_bar); button->setDefaultAction (action); button->setText (text); @@ -1703,7 +1703,7 @@ tr ("Save"), this, SLOT (save ())); addAction (m_save_action); m_save_action->setShortcutContext (Qt::WidgetWithChildrenShortcut); - m_save_action->setStatusTip(tr("Save variable to a file")); + m_save_action->setStatusTip (tr("Save variable to a file")); QAction *action = new QAction (settings.icon ("document-save-as"), tr ("Save in format ..."), m_tool_bar); @@ -1734,15 +1734,15 @@ action = add_tool_bar_button (settings.icon ("edit-cut"), tr ("Cut"), this, SLOT (cutClipboard ())); - action->setStatusTip(tr("Cut data to clipboard")); + action->setStatusTip (tr("Cut data to clipboard")); action = add_tool_bar_button (settings.icon ("edit-copy"), tr ("Copy"), this, SLOT (copyClipboard ())); - action->setStatusTip(tr("Copy data to clipboard")); + action->setStatusTip (tr("Copy data to clipboard")); action = add_tool_bar_button (settings.icon ("edit-paste"), tr ("Paste"), this, SLOT (pasteClipboard ())); - action->setStatusTip(tr("Paste clipboard into variable data")); + action->setStatusTip (tr("Paste clipboard into variable data")); m_tool_bar->addSeparator (); @@ -1776,7 +1776,7 @@ action = add_tool_bar_button (settings.icon ("go-up"), tr ("Up"), this, SLOT (levelUp ())); - action->setStatusTip(tr("Go one level up in variable hierarchy")); + action->setStatusTip (tr("Go one level up in variable hierarchy")); // The QToolButton mouse-clicks change active window, so connect all // HoverToolButton and ReturnFocusToolButton objects to the mechanism @@ -1812,7 +1812,7 @@ this, &variable_editor::restore_hovered_focus_variable); } - m_tool_bar->setAttribute(Qt::WA_ShowWithoutActivating); + m_tool_bar->setAttribute (Qt::WA_ShowWithoutActivating); m_tool_bar->setFocusPolicy (Qt::NoFocus); // Disabled when no tab is present. diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/workspace-model.h --- a/libgui/src/workspace-model.h Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/workspace-model.h Mon Apr 08 14:39:40 2024 -0700 @@ -77,7 +77,7 @@ signals: void model_changed (); - void prompt_variable_editor(); + void prompt_variable_editor (); public slots: diff -r c7bd12648bc2 -r 689d4d069bbf libgui/src/workspace-view.cc --- a/libgui/src/workspace-view.cc Mon Apr 08 13:59:26 2024 -0700 +++ b/libgui/src/workspace-view.cc Mon Apr 08 14:39:40 2024 -0700 @@ -172,7 +172,7 @@ workspace_view::setModel (workspace_model *model) { m_filter_model.setSourceModel (model); - m_filter_model.setFilterKeyColumn(0); + m_filter_model.setFilterKeyColumn (0); m_view->setModel (&m_filter_model);