diff libgui/src/documentation.cc @ 30398:d4d83344d653 stable

maint: style check C++ files in src/ and libgui/ ahead of 7.1 release. * ButtonGroup.cc, Canvas.cc, CheckBoxControl.cc, Container.cc, ContextMenu.cc, EditControl.cc, Figure.cc, Figure.h, FigureWindow.cc, GenericEventNotify.h, ListBoxControl.cc, ListBoxControl.h, Logger.cc, Menu.cc, Object.cc, Panel.cc, PopupMenuControl.cc, PushButtonControl.cc, PushTool.cc, RadioButtonControl.cc, SliderControl.cc, Table.cc, Table.h, TextControl.cc, ToggleButtonControl.cc, ToggleTool.cc, ToolBar.cc, annotation-dialog.cc, qt-graphics-toolkit.cc, documentation-bookmarks.cc, documentation-bookmarks.h, documentation-dock-widget.h, documentation.cc, documentation.h, dw-main-window.h, files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc, find-files-model.cc, gui-preferences-dw.h, gui-preferences-ed.h, gui-preferences-global.h, gui-settings.h, interpreter-qobject.cc, led-indicator.cc, file-editor-interface.h, file-editor-tab.cc, file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc, find-dialog.h, marker.cc, octave-qscintilla.cc, octave-qscintilla.h, main-window.cc, main-window.h, octave-dock-widget.cc, octave-dock-widget.h, octave-qobject.cc, octave-qobject.h, octave-qtutils.h, qt-interpreter-events.cc, release-notes.cc, resource-manager.cc, set-path-dialog.cc, settings-dialog.cc, settings-dialog.h, shortcut-manager.cc, shortcut-manager.h, tab-bar.cc, tab-bar.h, variable-editor-model.cc, variable-editor-model.h, variable-editor.cc, variable-editor.h, workspace-model.cc, workspace-view.cc, mkoctfile.in.cc, octave-config.in.cc: Style check C++ files in src/ and libgui/ ahead of 7.1 release.
author Rik <rik@octave.org>
date Mon, 29 Nov 2021 15:58:51 -0800
parents 6cbd169e391b
children 796f54d4ddbf
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Mon Nov 29 12:36:04 2021 -0500
+++ b/libgui/src/documentation.cc	Mon Nov 29 15:58:51 2021 -0800
@@ -688,7 +688,7 @@
       = m_help_engine->linksForIdentifier (ref_name);
 #endif
 
-    QTabWidget *navi = static_cast<QTabWidget*> (widget (0));
+    QTabWidget *navi = static_cast<QTabWidget *> (widget (0));
 
     if (found_links.count() > 0)
       {
@@ -704,7 +704,7 @@
         // Switch to function index tab
         m_help_engine->indexWidget()->filterIndices (ref_name);
         QWidget *index_tab
-          = navi->findChild<QWidget*> ("documentation_tab_index");
+          = navi->findChild<QWidget *> ("documentation_tab_index");
         navi->setCurrentWidget (index_tab);
       }
     else
@@ -731,7 +731,7 @@
         search_query->setQuery (query);
 #endif
         QWidget *search_tab
-          = navi->findChild<QWidget*> ("documentation_tab_search");
+          = navi->findChild<QWidget *> ("documentation_tab_search");
         navi->setCurrentWidget (search_tab);
       }
   }
@@ -965,14 +965,14 @@
         anchor.remove (QRegExp ("^SEC_"));
         anchor.remove (QRegExp ("^XREF"));
         anchor.remove ("Concept-Index_cp_letter-");
-        anchor.replace ("-"," ");
+        anchor.replace ("-", " ");
 
         // 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)
           {
-            anchor.replace ("_00"+rx.cap (1), QChar (rx.cap (1).toInt (nullptr,16)));
+            anchor.replace ("_00"+rx.cap (1), QChar (rx.cap (1).toInt (nullptr, 16)));
             pos += rx.matchedLength();
           }
 
@@ -1016,7 +1016,7 @@
       }
   }
 
-  QVariant documentation_browser::loadResource (int type, const QUrl &url)
+  QVariant documentation_browser::loadResource (int type, const QUrl& url)
   {
     if (m_help_engine && url.scheme () == "qthelp")
       return QVariant (m_help_engine->fileData(url));