changeset 33599:7f18c537e101

maint: Update Qt macros to avoid name collisions It is a known problem with Qt that terms like "signals", "slots", and "emit" can conflict with other libraries using those identifiers. So far, Octave has not had that problem, but to allow for potential future use of third-party libraries, especially the C++17 STL's parallelization functions, these terms are being updated to their Qt-specific collision-safe versions. Discussion: https://octave.discourse.group/t/updating-qt-macro-names-to-avoid-name-collisions/5627 and discussions linked therein. This patch makes the following changes through the part of the Octave codebase using Qt: * signals --> Q_SIGNALS * slots --> Q_SLOTS * emit --> Q_EMIT The above changes were guided and verified by passing "-DQT_NO_KEYWORDS" to CXXFLAGS when building Octave.
author Arun Giridhar <arungiridhar@gmail.com>
date Fri, 17 May 2024 19:49:10 -0400
parents 02d01047b6fe
children 4816c2afe5ef
files libgui/graphics/BaseControl.cc libgui/graphics/ButtonControl.cc libgui/graphics/ButtonControl.h libgui/graphics/ButtonGroup.cc libgui/graphics/ButtonGroup.h libgui/graphics/Canvas.cc libgui/graphics/Canvas.h libgui/graphics/Container.h libgui/graphics/ContextMenu.cc libgui/graphics/ContextMenu.h libgui/graphics/EditControl.cc libgui/graphics/EditControl.h libgui/graphics/Figure.cc libgui/graphics/Figure.h libgui/graphics/FigureWindow.cc libgui/graphics/FigureWindow.h libgui/graphics/GLCanvas.cc libgui/graphics/ListBoxControl.cc libgui/graphics/ListBoxControl.h libgui/graphics/Menu.cc libgui/graphics/Menu.h libgui/graphics/Object.h libgui/graphics/ObjectProxy.cc libgui/graphics/ObjectProxy.h libgui/graphics/PopupMenuControl.cc libgui/graphics/PopupMenuControl.h libgui/graphics/PushTool.cc libgui/graphics/PushTool.h libgui/graphics/SliderControl.cc libgui/graphics/SliderControl.h libgui/graphics/Table.cc libgui/graphics/Table.h libgui/graphics/TextEdit.cc libgui/graphics/TextEdit.h libgui/graphics/ToggleTool.cc libgui/graphics/ToggleTool.h libgui/graphics/ToolBar.h libgui/graphics/annotation-dialog.h libgui/graphics/qt-graphics-toolkit.cc libgui/graphics/qt-graphics-toolkit.h libgui/qterminal/libqterminal/QTerminal.cc libgui/qterminal/libqterminal/QTerminal.h libgui/qterminal/libqterminal/unix/Emulation.cpp libgui/qterminal/libqterminal/unix/Emulation.h libgui/qterminal/libqterminal/unix/Filter.cpp libgui/qterminal/libqterminal/unix/Filter.h libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h libgui/qterminal/libqterminal/unix/ScreenWindow.cpp libgui/qterminal/libqterminal/unix/ScreenWindow.h libgui/qterminal/libqterminal/unix/SelfListener.cpp libgui/qterminal/libqterminal/unix/SelfListener.h libgui/qterminal/libqterminal/unix/TerminalModel.cpp libgui/qterminal/libqterminal/unix/TerminalModel.h libgui/qterminal/libqterminal/unix/TerminalView.cpp libgui/qterminal/libqterminal/unix/TerminalView.h libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp libgui/qterminal/libqterminal/unix/Vt102Emulation.h libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h libgui/src/color-picker.h libgui/src/command-widget.cc libgui/src/command-widget.h libgui/src/community-news.h libgui/src/dialog.cc libgui/src/dialog.h libgui/src/documentation-bookmarks.h libgui/src/documentation-dock-widget.h libgui/src/documentation.cc libgui/src/documentation.h libgui/src/dw-main-window.h libgui/src/external-editor-interface.cc libgui/src/external-editor-interface.h libgui/src/files-dock-widget.cc libgui/src/files-dock-widget.h libgui/src/find-files-dialog.cc libgui/src/find-files-dialog.h libgui/src/find-widget.cc libgui/src/find-widget.h libgui/src/history-dock-widget.cc libgui/src/history-dock-widget.h libgui/src/interpreter-qobject.cc libgui/src/interpreter-qobject.h libgui/src/led-indicator.h libgui/src/m-editor/file-editor-interface.h libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor-tab.h libgui/src/m-editor/file-editor.cc libgui/src/m-editor/file-editor.h libgui/src/m-editor/find-dialog.h libgui/src/m-editor/marker.cc libgui/src/m-editor/marker.h libgui/src/m-editor/octave-qscintilla.cc libgui/src/m-editor/octave-qscintilla.h libgui/src/main-window.cc libgui/src/main-window.h libgui/src/news-reader.cc libgui/src/news-reader.h libgui/src/octave-dock-widget.cc libgui/src/octave-dock-widget.h libgui/src/octave-qobject.cc libgui/src/octave-qobject.h libgui/src/qt-interpreter-events.cc libgui/src/qt-interpreter-events.h libgui/src/release-notes.h libgui/src/set-path-dialog.cc libgui/src/set-path-dialog.h libgui/src/set-path-model.cc libgui/src/set-path-model.h libgui/src/settings-dialog.cc libgui/src/settings-dialog.h libgui/src/shortcuts-tree-widget.cc libgui/src/shortcuts-tree-widget.h libgui/src/tab-bar.cc libgui/src/tab-bar.h libgui/src/terminal-dock-widget.cc libgui/src/terminal-dock-widget.h libgui/src/variable-editor-model.cc libgui/src/variable-editor-model.h libgui/src/variable-editor.cc libgui/src/variable-editor.h libgui/src/welcome-wizard.h libgui/src/workspace-model.cc libgui/src/workspace-model.h libgui/src/workspace-view.cc libgui/src/workspace-view.h
diffstat 126 files changed, 677 insertions(+), 677 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/BaseControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/BaseControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -258,19 +258,19 @@
         graphics_object fig = go.get_ancestor ("figure");
         if (fig)
           {
-            emit gh_set_event (fig.get_handle (), "currentobject",
+            Q_EMIT gh_set_event (fig.get_handle (), "currentobject",
                                m_handle.value (), false);
 
             if (m->button () != Qt::LeftButton || ! up.enable_is ("on"))
               {
-                emit gh_set_event (fig.get_handle (), "selectiontype",
+                Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                    Utils::figureSelectionType (m), false);
-                emit gh_set_event (fig.get_handle (), "currentpoint",
+                Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                                    Utils::figureCurrentPoint (fig, m),
                                    false);
-                emit gh_callback_event (fig.get_handle (),
+                Q_EMIT gh_callback_event (fig.get_handle (),
                                         "windowbuttondownfcn");
-                emit gh_callback_event (m_handle, "buttondownfcn");
+                Q_EMIT gh_callback_event (m_handle, "buttondownfcn");
 
                 if (m->button () == Qt::RightButton)
                   ContextMenu::executeAt (m_interpreter, up,
@@ -283,11 +283,11 @@
             else
               {
                 if (up.style_is ("listbox"))
-                  emit gh_set_event (fig.get_handle (), "selectiontype",
+                  Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                      Utils::figureSelectionType (m),
                                      false);
                 else
-                  emit gh_set_event (fig.get_handle (), "selectiontype",
+                  Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                      octave_value ("normal"), false);
               }
           }
@@ -305,9 +305,9 @@
 
           if (fig)
             {
-              emit gh_set_event (fig.get_handle (), "currentpoint",
+              Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                                  Utils::figureCurrentPoint (fig, m), false);
-              emit gh_callback_event (fig.get_handle (),
+              Q_EMIT gh_callback_event (fig.get_handle (),
                                       "windowbuttonmotionfcn");
             }
         }
@@ -322,18 +322,18 @@
             Utils::makeKeyEventStruct (dynamic_cast<QKeyEvent *> (xevent));
           graphics_object fig = object ().get_ancestor ("figure");
 
-          emit gh_set_event (fig.get_handle (), "currentcharacter",
+          Q_EMIT gh_set_event (fig.get_handle (), "currentcharacter",
                              keyData.getfield ("Character"), false);
-          emit gh_callback_event (m_handle, "keypressfcn", keyData);
+          Q_EMIT gh_callback_event (m_handle, "keypressfcn", keyData);
         }
       break;
 
     case QEvent::FocusIn:
-      emit gh_set_event (m_handle, "__focus__", "on", false);
+      Q_EMIT gh_set_event (m_handle, "__focus__", "on", false);
       break;
 
     case QEvent::FocusOut:
-      emit gh_set_event (m_handle, "__focus__", "off", false);
+      Q_EMIT gh_set_event (m_handle, "__focus__", "off", false);
       break;
 
     default:
--- a/libgui/graphics/ButtonControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ButtonControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -137,8 +137,8 @@
       double newValue = (checked ? up.get_max () : up.get_min ());
 
       if (oldValue.numel () != 1 || (newValue != oldValue(0)))
-        emit gh_set_event (m_handle, "value", newValue, false);
-      emit gh_callback_event (m_handle, "callback");
+        Q_EMIT gh_set_event (m_handle, "value", newValue, false);
+      Q_EMIT gh_callback_event (m_handle, "callback");
     }
 }
 
@@ -148,7 +148,7 @@
   QAbstractButton *btn = qWidget<QAbstractButton> ();
 
   if (! btn->isCheckable ())
-    emit gh_callback_event (m_handle, "callback");
+    Q_EMIT gh_callback_event (m_handle, "callback");
 }
 
 OCTAVE_END_NAMESPACE(octave);
--- a/libgui/graphics/ButtonControl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ButtonControl.h	Fri May 17 19:49:10 2024 -0400
@@ -46,7 +46,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void clicked ();
   void toggled (bool checked);
 
--- a/libgui/graphics/ButtonGroup.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ButtonGroup.cc	Fri May 17 19:49:10 2024 -0400
@@ -492,7 +492,7 @@
         }
 
       if (oldValue != newValue)
-        emit gh_set_event (m_handle, "selectedobject",
+        Q_EMIT gh_set_event (m_handle, "selectedobject",
                            newValue.as_octave_value (), false);
     }
 }
@@ -522,7 +522,7 @@
       eventData.setfield ("Source", bp.get___myhandle__ ().as_octave_value ());
       eventData.setfield ("EventName", "SelectionChanged");
       octave_value selectionChangedEventObject (eventData);
-      emit gh_callback_event (m_handle, "selectionchangedfcn",
+      Q_EMIT gh_callback_event (m_handle, "selectionchangedfcn",
                               selectionChangedEventObject);
     }
 }
--- a/libgui/graphics/ButtonGroup.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ButtonGroup.h	Fri May 17 19:49:10 2024 -0400
@@ -66,7 +66,7 @@
   void update (int pId);
   void redraw ();
 
-private slots:
+private Q_SLOTS:
   void buttonToggled (bool toggled);
   void buttonClicked (QAbstractButton *btn);
 
--- a/libgui/graphics/Canvas.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Canvas.cc	Fri May 17 19:49:10 2024 -0400
@@ -184,7 +184,7 @@
 
   octave::autolock guard (gh_mgr.graphics_lock ());
 
-  emit gh_set_event (fig.get_handle (), "currentpoint",
+  Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                      Utils::figureCurrentPoint (fig, event), false);
 
   Matrix children = obj.get_properties ().get_children ();
@@ -213,7 +213,7 @@
           cp(0, 0) = p1(0); cp(0, 1) = p1(1); cp(0, 2) = p1(2);
           cp(1, 0) = p2(0); cp(1, 1) = p2(1); cp(1, 2) = p2(2);
 
-          emit gh_set_event (childObj.get_handle (), "currentpoint", cp,
+          Q_EMIT gh_set_event (childObj.get_handle (), "currentpoint", cp,
                              false);
         }
     }
@@ -227,7 +227,7 @@
 
   octave::autolock guard (gh_mgr.graphics_lock ());
 
-  emit gh_set_event (fig.get_handle (), "currentpoint",
+  Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                      Utils::figureCurrentPoint (fig), false);
 
   Matrix children = obj.get_properties ().get_children ();
@@ -255,7 +255,7 @@
           cp(0, 0) = p1(0); cp(0, 1) = p1(1); cp(0, 2) = p1(2);
           cp(1, 0) = p2(0); cp(1, 1) = p2(1); cp(1, 2) = p2(2);
 
-          emit gh_set_event (childObj.get_handle (), "currentpoint", cp,
+          Q_EMIT gh_set_event (childObj.get_handle (), "currentpoint", cp,
                              false);
         }
     }
@@ -522,7 +522,7 @@
               && ! figObj.get ("windowbuttonmotionfcn").isempty ())
             {
               updateCurrentPoint (figObj, obj, event);
-              emit gh_callback_event (figObj.get_handle (),
+              Q_EMIT gh_callback_event (figObj.get_handle (),
                                       "windowbuttonmotionfcn");
             }
         }
@@ -670,23 +670,23 @@
               fprop.set_currentobject (Matrix ());
 
             // Update figure "selectiontype" and "currentpoint"
-            emit gh_set_event (figObj.get_handle (), "selectiontype",
+            Q_EMIT gh_set_event (figObj.get_handle (), "selectiontype",
                                Utils::figureSelectionType (event, isdblclick),
                                false);
 
             updateCurrentPoint (figObj, obj, event);
 
-            emit gh_callback_event (figObj.get_handle (),
+            Q_EMIT gh_callback_event (figObj.get_handle (),
                                     "windowbuttondownfcn",
                                     button_number (event));
 
             // Execute the "buttondownfcn" of the selected object.  If the
             // latter is empty then execute the figure "buttondownfcn"
             if (currentObj && ! currentObj.get ("buttondownfcn").isempty ())
-              emit gh_callback_event (currentObj.get_handle (),
+              Q_EMIT gh_callback_event (currentObj.get_handle (),
                                       "buttondownfcn", button_number (event));
             else if (figObj && ! figObj.get ("buttondownfcn").isempty ())
-              emit gh_callback_event (figObj.get_handle (),
+              Q_EMIT gh_callback_event (figObj.get_handle (),
                                       "buttondownfcn", button_number (event));
 
             // Show context menu of the selected object
@@ -870,7 +870,7 @@
           graphics_object figObj (obj.get_ancestor ("figure"));
 
           updateCurrentPoint (figObj, obj, event);
-          emit gh_callback_event (figObj.get_handle (), "windowbuttonupfcn");
+          Q_EMIT gh_callback_event (figObj.get_handle (), "windowbuttonupfcn");
         }
     }
   else if (m_mouseMode == TextMode)
@@ -901,7 +901,7 @@
                   props = anno_dlg.get_properties ();
                   props.prepend (figObj.get_handle ().as_octave_value ());
 
-                  emit interpreter_event
+                  Q_EMIT interpreter_event
                     ([this, props] (octave::interpreter& interp)
                      {
                        // INTERPRETER THREAD
@@ -1041,7 +1041,7 @@
       if (! figObj.get ("windowscrollwheelfcn").isempty ())
         {
           octave_scalar_map eventData = Utils::makeScrollEventStruct (event);
-          emit gh_callback_event (m_handle, "windowscrollwheelfcn",
+          Q_EMIT gh_callback_event (m_handle, "windowscrollwheelfcn",
                                   eventData);
         }
     }
@@ -1066,9 +1066,9 @@
 
           octave_scalar_map eventData = Utils::makeKeyEventStruct (event);
 
-          emit gh_set_event (figObj.get_handle (), "currentcharacter",
+          Q_EMIT gh_set_event (figObj.get_handle (), "currentcharacter",
                              eventData.getfield ("Character"), false);
-          emit gh_callback_event (figObj.get_handle (), "keypressfcn",
+          Q_EMIT gh_callback_event (figObj.get_handle (), "keypressfcn",
                                   eventData);
         }
 
@@ -1092,7 +1092,7 @@
       if (obj.valid_object ())
         {
           graphics_object figObj (obj.get_ancestor ("figure"));
-          emit gh_callback_event (figObj.get_handle (), "keyreleasefcn",
+          Q_EMIT gh_callback_event (figObj.get_handle (), "keyreleasefcn",
                                   Utils::makeKeyEventStruct (event));
         }
 
--- a/libgui/graphics/Canvas.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Canvas.h	Fri May 17 19:49:10 2024 -0400
@@ -82,7 +82,7 @@
 
   virtual uint8NDArray getPixels () { return do_getPixels (m_handle); };
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
--- a/libgui/graphics/Container.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Container.h	Fri May 17 19:49:10 2024 -0400
@@ -49,7 +49,7 @@
 
   Canvas * canvas (const graphics_handle& handle, bool create = true);
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
--- a/libgui/graphics/ContextMenu.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ContextMenu.cc	Fri May 17 19:49:10 2024 -0400
@@ -98,14 +98,14 @@
 void
 ContextMenu::aboutToShow ()
 {
-  emit gh_callback_event (m_handle, "callback");
-  emit gh_set_event (m_handle, "visible", "on", false);
+  Q_EMIT gh_callback_event (m_handle, "callback");
+  Q_EMIT gh_set_event (m_handle, "visible", "on", false);
 }
 
 void
 ContextMenu::aboutToHide ()
 {
-  emit gh_set_event (m_handle, "visible", "off", false);
+  Q_EMIT gh_set_event (m_handle, "visible", "off", false);
 }
 
 QWidget *
--- a/libgui/graphics/ContextMenu.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ContextMenu.h	Fri May 17 19:49:10 2024 -0400
@@ -60,7 +60,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void aboutToShow ();
   void aboutToHide ();
 };
--- a/libgui/graphics/EditControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/EditControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -272,17 +272,17 @@
   if (m_textChanged)
     {
       if (m_multiLine)
-        emit gh_set_event (m_handle, "string",
+        Q_EMIT gh_set_event (m_handle, "string",
                            Utils::toCellString (txt.split ("\n")), false);
       else
-        emit gh_set_event (m_handle, "string",
+        Q_EMIT gh_set_event (m_handle, "string",
                            Utils::toStdString (txt), false);
 
       m_textChanged = false;
     }
 
   if (txt.length () > 0)
-    emit gh_callback_event (m_handle, "callback");
+    Q_EMIT gh_callback_event (m_handle, "callback");
 }
 
 void
@@ -294,12 +294,12 @@
                      ? qWidget<TextEdit> ()->toPlainText ()
                      : qWidget<QLineEdit> ()->text ());
       if (m_multiLine)
-        emit gh_set_event (m_handle, "string",
+        Q_EMIT gh_set_event (m_handle, "string",
                            Utils::toCellString (txt.split ("\n")), false);
       else
-        emit gh_set_event (m_handle, "string", Utils::toStdString (txt),
+        Q_EMIT gh_set_event (m_handle, "string", Utils::toStdString (txt),
                            false);
-      emit gh_callback_event (m_handle, "callback");
+      Q_EMIT gh_callback_event (m_handle, "callback");
 
       m_textChanged = false;
     }
--- a/libgui/graphics/EditControl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/EditControl.h	Fri May 17 19:49:10 2024 -0400
@@ -64,7 +64,7 @@
   bool updateSingleLine (int pId);
   bool updateMultiLine (int pId);
 
-private slots:
+private Q_SLOTS:
   void textChanged ();
   void editingFinished ();
   void returnPressed ();
--- a/libgui/graphics/Figure.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Figure.cc	Fri May 17 19:49:10 2024 -0400
@@ -676,7 +676,7 @@
 
   figure::properties& fp = properties<figure> ();
 
-  emit gh_set_event (m_handle, prop, fp.bbox2position (bb), false,
+  Q_EMIT gh_set_event (m_handle, prop, fp.bbox2position (bb), false,
                      prop == "position");
 }
 
@@ -722,7 +722,7 @@
             {
             case QEvent::Close:
               xevent->ignore ();
-              emit gh_callback_event (m_handle, "closerequestfcn");
+              Q_EMIT gh_callback_event (m_handle, "closerequestfcn");
               return true;
 
             default:
--- a/libgui/graphics/Figure.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Figure.h	Fri May 17 19:49:10 2024 -0400
@@ -114,16 +114,16 @@
 
   void enableMouseTracking ();
 
-private slots:
+private Q_SLOTS:
   void updateFigureHeight (int delta_h);
   void updateContainer ();
   void figureWindowShown ();
   void screenChanged (QScreen *);
 
-public slots:
+public Q_SLOTS:
   uint8NDArray slotGetPixels ();
 
-signals:
+Q_SIGNALS:
   void asyncUpdate ();
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
--- a/libgui/graphics/FigureWindow.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/FigureWindow.cc	Fri May 17 19:49:10 2024 -0400
@@ -55,7 +55,7 @@
 FigureWindow::showEvent (QShowEvent *ev)
 {
   QMainWindow::showEvent (ev);
-  emit figureWindowShown ();
+  Q_EMIT figureWindowShown ();
 }
 
 OCTAVE_END_NAMESPACE(octave)
--- a/libgui/graphics/FigureWindow.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/FigureWindow.h	Fri May 17 19:49:10 2024 -0400
@@ -47,7 +47,7 @@
 protected:
   void showEvent (QShowEvent *ev);
 
-signals:
+Q_SIGNALS:
   void figureWindowShown ();
 
 };
--- a/libgui/graphics/GLCanvas.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/GLCanvas.cc	Fri May 17 19:49:10 2024 -0400
@@ -348,7 +348,7 @@
     }
   catch (octave::execution_exception& ee)
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([ee] ()
         {
           // INTERPRETER THREAD
--- a/libgui/graphics/ListBoxControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ListBoxControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -189,8 +189,8 @@
       for (const auto& idx : l)
         value(i++) = idx.row () + 1;
 
-      emit gh_set_event (m_handle, "value", octave_value (value), false);
-      emit gh_callback_event (m_handle, "callback");
+      Q_EMIT gh_set_event (m_handle, "value", octave_value (value), false);
+      Q_EMIT gh_callback_event (m_handle, "callback");
     }
 
   m_selectionChanged = false;
--- a/libgui/graphics/ListBoxControl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ListBoxControl.h	Fri May 17 19:49:10 2024 -0400
@@ -54,7 +54,7 @@
   bool eventFilter (QObject *watched, QEvent *e);
   void sendSelectionChange ();
 
-private slots:
+private Q_SLOTS:
   void itemSelectionChanged ();
   void itemActivated (const QModelIndex&);
   void itemPressed (QListWidgetItem *);
--- a/libgui/graphics/Menu.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Menu.cc	Fri May 17 19:49:10 2024 -0400
@@ -291,13 +291,13 @@
 
   if (action->isCheckable ())
     action->setChecked (! action->isChecked ());
-  emit gh_callback_event (m_handle, "menuselectedfcn");
+  Q_EMIT gh_callback_event (m_handle, "menuselectedfcn");
 }
 
 void
 Menu::actionHovered ()
 {
-  emit gh_callback_event (m_handle, "menuselectedfcn");
+  Q_EMIT gh_callback_event (m_handle, "menuselectedfcn");
 }
 
 void
--- a/libgui/graphics/Menu.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Menu.h	Fri May 17 19:49:10 2024 -0400
@@ -57,7 +57,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void actionTriggered ();
   void actionHovered ();
 
--- a/libgui/graphics/Object.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Object.h	Fri May 17 19:49:10 2024 -0400
@@ -86,7 +86,7 @@
   virtual void do_connections (const QObject *receiver,
                                const QObject *emitter = nullptr);
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
@@ -106,7 +106,7 @@
                      const octave_value& value, bool notify_toolkit,
                      bool redraw_figure);
 
-public slots:
+public Q_SLOTS:
   void slotUpdate (int pId);
   void slotFinalize ();
   void slotRedraw ();
--- a/libgui/graphics/ObjectProxy.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ObjectProxy.cc	Fri May 17 19:49:10 2024 -0400
@@ -87,7 +87,7 @@
 void
 ObjectProxy::update (int pId)
 {
-  emit sendUpdate (pId);
+  Q_EMIT sendUpdate (pId);
 }
 
 void
@@ -108,13 +108,13 @@
 void
 ObjectProxy::redraw ()
 {
-  emit sendRedraw ();
+  Q_EMIT sendRedraw ();
 }
 
 void
 ObjectProxy::show ()
 {
-  emit sendShow ();
+  Q_EMIT sendShow ();
 }
 
 void
--- a/libgui/graphics/ObjectProxy.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ObjectProxy.h	Fri May 17 19:49:10 2024 -0400
@@ -53,7 +53,7 @@
   Object * object () { return m_object; }
   void setObject (Object *obj);
 
-signals:
+Q_SIGNALS:
   void sendUpdate (int pId);
   void sendRedraw ();
   void sendShow ();
--- a/libgui/graphics/PopupMenuControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/PopupMenuControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -95,7 +95,7 @@
           }
         else
           {
-            emit gh_set_event (m_handle, "value",
+            Q_EMIT gh_set_event (m_handle, "value",
                                octave_value (box->count () > 0 ? 1.0 : 0.0),
                                false);
           }
@@ -140,9 +140,9 @@
 {
   if (! m_blockUpdate)
     {
-      emit gh_set_event (m_handle, "value", octave_value (double (index + 1)),
+      Q_EMIT gh_set_event (m_handle, "value", octave_value (double (index + 1)),
                          false);
-      emit gh_callback_event (m_handle, "callback");
+      Q_EMIT gh_callback_event (m_handle, "callback");
     }
 }
 
--- a/libgui/graphics/PopupMenuControl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/PopupMenuControl.h	Fri May 17 19:49:10 2024 -0400
@@ -50,7 +50,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void currentIndexChanged (int index);
 
 private:
--- a/libgui/graphics/PushTool.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/PushTool.cc	Fri May 17 19:49:10 2024 -0400
@@ -74,7 +74,7 @@
 void
 PushTool::clicked ()
 {
-  emit gh_callback_event (m_handle, "clickedcallback");
+  Q_EMIT gh_callback_event (m_handle, "clickedcallback");
 }
 
 OCTAVE_END_NAMESPACE(octave);
--- a/libgui/graphics/PushTool.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/PushTool.h	Fri May 17 19:49:10 2024 -0400
@@ -48,7 +48,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void clicked ();
 };
 
--- a/libgui/graphics/SliderControl.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/SliderControl.cc	Fri May 17 19:49:10 2024 -0400
@@ -159,8 +159,8 @@
             {
               double dval = dmin + (ival * (dmax - dmin) / RANGE_INT_MAX);
 
-              emit gh_set_event (m_handle, "value", octave_value (dval));
-              emit gh_callback_event (m_handle, "callback");
+              Q_EMIT gh_set_event (m_handle, "value", octave_value (dval));
+              Q_EMIT gh_callback_event (m_handle, "callback");
             }
         }
     }
--- a/libgui/graphics/SliderControl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/SliderControl.h	Fri May 17 19:49:10 2024 -0400
@@ -50,7 +50,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void valueChanged (int ival);
 
 private:
--- a/libgui/graphics/Table.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Table.cc	Fri May 17 19:49:10 2024 -0400
@@ -505,7 +505,7 @@
       octave_scalar_map eventData;
       eventData.setfield ("Indices", indices);
       octave_value cellSelectionCallbackEventObject (eventData);
-      emit gh_callback_event (m_handle, "cellselectioncallback",
+      Q_EMIT gh_callback_event (m_handle, "cellselectioncallback",
                               cellSelectionCallbackEventObject);
     }
 }
@@ -552,7 +552,7 @@
 
       octave_value cellEditCallbackEventObject (eventData);
 
-      emit gh_callback_event (m_handle, "celleditcallback",
+      Q_EMIT gh_callback_event (m_handle, "celleditcallback",
                               cellEditCallbackEventObject);
     }
 }
@@ -590,7 +590,7 @@
               if (edit_data.string_value () != old_data.string_value ())
                 {
                   m_curData = octave_value (cell);
-                  emit gh_set_event (m_handle, "data", octave_value (cell),
+                  Q_EMIT gh_set_event (m_handle, "data", octave_value (cell),
                                      false);
                 }
 
@@ -611,7 +611,7 @@
                           columnformat (col), columneditable (col));
 
               m_curData = octave_value (cell);
-              emit gh_set_event (m_handle, "data", octave_value (cell),
+              Q_EMIT gh_set_event (m_handle, "data", octave_value (cell),
                                  false);
 
               octave_value error = octave_value ("");
@@ -640,7 +640,7 @@
                       columneditable (col));
 
           m_curData = octave_value (data);
-          emit gh_set_event (m_handle, "data", data, false);
+          Q_EMIT gh_set_event (m_handle, "data", data, false);
 
           octave_value error = octave_value ("");
           sendCellEditCallback (row,
@@ -704,7 +704,7 @@
           if (new_value != old_value)
             {
               m_curData = octave_value (matrix);
-              emit gh_set_event (m_handle, "data", octave_value (matrix),
+              Q_EMIT gh_set_event (m_handle, "data", octave_value (matrix),
                                  false);
             }
 
@@ -738,7 +738,7 @@
               if (new_value != old_value)
                 {
                   m_curData = octave_value (cell);
-                  emit gh_set_event (m_handle, "data", octave_value (cell),
+                  Q_EMIT gh_set_event (m_handle, "data", octave_value (cell),
                                      false);
                 }
 
@@ -848,7 +848,7 @@
           new_data = data;
         }
       m_curData = octave_value (new_data);
-      emit gh_set_event (m_handle, "data", new_data, false);
+      Q_EMIT gh_set_event (m_handle, "data", new_data, false);
 
       sendCellEditCallback (row,
                             col,
@@ -1369,7 +1369,7 @@
   extent(0, 2) = s.width ();
   extent(0, 3) = s.height () ;
   graphics_object go = object ();
-  emit gh_set_event (go.get_handle (), "extent", extent, false);
+  Q_EMIT gh_set_event (go.get_handle (), "extent", extent, false);
 }
 
 void
@@ -1537,14 +1537,14 @@
 
             if (m->button () != Qt::LeftButton || ! tp.is_enable ())
               {
-                emit gh_set_event (fig.get_handle (), "selectiontype",
+                Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                    Utils::figureSelectionType (m), false);
-                emit gh_set_event (fig.get_handle (), "currentpoint",
+                Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                                    Utils::figureCurrentPoint (fig, m),
                                    false);
-                emit gh_callback_event (fig.get_handle (),
+                Q_EMIT gh_callback_event (fig.get_handle (),
                                         "windowbuttondownfcn");
-                emit gh_callback_event (m_handle, "buttondownfcn");
+                Q_EMIT gh_callback_event (m_handle, "buttondownfcn");
 
                 if (m->button () == Qt::RightButton)
                   ContextMenu::executeAt (m_interpreter, properties (),
@@ -1556,7 +1556,7 @@
               }
             else
               {
-                emit gh_set_event (fig.get_handle (), "selectiontype",
+                Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                    octave_value ("normal"), false);
               }
           }
@@ -1572,9 +1572,9 @@
                 octave_scalar_map keyData = Utils::makeKeyEventStruct (k);
                 graphics_object fig = object ().get_ancestor ("figure");
 
-                emit gh_set_event (fig.get_handle (), "currentcharacter",
+                Q_EMIT gh_set_event (fig.get_handle (), "currentcharacter",
                                    keyData.getfield ("Character"), false);
-                emit gh_callback_event (m_handle, "keypressfcn", keyData);
+                Q_EMIT gh_callback_event (m_handle, "keypressfcn", keyData);
               }
             int row = m_tableWidget->currentRow ();
             int col = m_tableWidget->currentColumn ();
@@ -1658,9 +1658,9 @@
                 octave_scalar_map keyData = Utils::makeKeyEventStruct (k);
                 graphics_object fig = object ().get_ancestor ("figure");
 
-                emit gh_set_event (fig.get_handle (), "currentcharacter",
+                Q_EMIT gh_set_event (fig.get_handle (), "currentcharacter",
                                    keyData.getfield ("Character"), false);
-                emit gh_callback_event (m_handle, "keyreleasefcn", keyData);
+                Q_EMIT gh_callback_event (m_handle, "keyreleasefcn", keyData);
               }
           }
           break;
@@ -1684,14 +1684,14 @@
 
             if (m->button () != Qt::LeftButton || ! tp.is_enable ())
               {
-                emit gh_set_event (fig.get_handle (), "selectiontype",
+                Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                    Utils::figureSelectionType (m), false);
-                emit gh_set_event (fig.get_handle (), "currentpoint",
+                Q_EMIT gh_set_event (fig.get_handle (), "currentpoint",
                                    Utils::figureCurrentPoint (fig, m),
                                    false);
-                emit gh_callback_event (fig.get_handle (),
+                Q_EMIT gh_callback_event (fig.get_handle (),
                                         "windowbuttondownfcn");
-                emit gh_callback_event (m_handle, "buttondownfcn");
+                Q_EMIT gh_callback_event (m_handle, "buttondownfcn");
 
                 if (m->button () == Qt::RightButton)
                   ContextMenu::executeAt (m_interpreter, tp,
@@ -1703,7 +1703,7 @@
               }
             else
               {
-                emit gh_set_event (fig.get_handle (), "selectiontype",
+                Q_EMIT gh_set_event (fig.get_handle (), "selectiontype",
                                    Utils::figureSelectionType (m), false);
 
                 QComboBox *comboBox_0 = qobject_cast<QComboBox *> (watched);
--- a/libgui/graphics/Table.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/Table.h	Fri May 17 19:49:10 2024 -0400
@@ -67,7 +67,7 @@
   void updateRearrangeableColumns ();
   void updateRowname ();
 
-private slots:
+private Q_SLOTS:
   void itemChanged (QTableWidgetItem *item);
   void comboBoxCurrentIndexChanged (const QString& value);
   void cellClicked (int row, int col);
--- a/libgui/graphics/TextEdit.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/TextEdit.cc	Fri May 17 19:49:10 2024 -0400
@@ -38,7 +38,7 @@
 {
   QTextEdit::focusOutEvent (xevent);
 
-  emit editingFinished ();
+  Q_EMIT editingFinished ();
 }
 
 void
@@ -49,7 +49,7 @@
   if ((xevent->key () == Qt::Key_Return
        || xevent->key () == Qt::Key_Enter)
       && xevent->modifiers () == Qt::ControlModifier)
-    emit returnPressed ();
+    Q_EMIT returnPressed ();
 }
 
 OCTAVE_END_NAMESPACE(octave)
--- a/libgui/graphics/TextEdit.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/TextEdit.h	Fri May 17 19:49:10 2024 -0400
@@ -38,7 +38,7 @@
   TextEdit (QWidget *xparent) : QTextEdit (xparent) { }
   ~TextEdit () = default;
 
-signals:
+Q_SIGNALS:
   void editingFinished ();
   void returnPressed ();
 
--- a/libgui/graphics/ToggleTool.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ToggleTool.cc	Fri May 17 19:49:10 2024 -0400
@@ -86,9 +86,9 @@
 void
 ToggleTool::triggered (bool checked)
 {
-  emit gh_set_event (m_handle, "state", checked, false);
-  emit gh_callback_event (m_handle, checked ? "oncallback" : "offcallback");
-  emit gh_callback_event (m_handle, "clickedcallback");
+  Q_EMIT gh_set_event (m_handle, "state", checked, false);
+  Q_EMIT gh_callback_event (m_handle, checked ? "oncallback" : "offcallback");
+  Q_EMIT gh_callback_event (m_handle, "clickedcallback");
 }
 
 OCTAVE_END_NAMESPACE(octave);
--- a/libgui/graphics/ToggleTool.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ToggleTool.h	Fri May 17 19:49:10 2024 -0400
@@ -49,7 +49,7 @@
 protected:
   void update (int pId);
 
-private slots:
+private Q_SLOTS:
   void triggered (bool checked);
 };
 
--- a/libgui/graphics/ToolBar.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/ToolBar.h	Fri May 17 19:49:10 2024 -0400
@@ -58,7 +58,7 @@
   void update (int pId);
   void beingDeleted ();
 
-private slots:
+private Q_SLOTS:
   void hideEmpty ();
 
 private:
--- a/libgui/graphics/annotation-dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/annotation-dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -46,7 +46,7 @@
 
   octave_value_list get_properties () const;
 
-private slots:
+private Q_SLOTS:
   // slots for dialog's buttons
   void button_clicked (QAbstractButton *button);
   void edit_string_changed (const QString& str);
--- a/libgui/graphics/qt-graphics-toolkit.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/qt-graphics-toolkit.cc	Fri May 17 19:49:10 2024 -0400
@@ -143,7 +143,7 @@
       OCTAVE_PTR_TYPE tmp (reinterpret_cast<OCTAVE_INTPTR_TYPE> (proxy));
       gObj.get_properties ().set (toolkitObjectProperty (go), tmp);
 
-      emit create_object_signal (go.get_handle ().value ());
+      Q_EMIT create_object_signal (go.get_handle ().value ());
 
       return true;
     }
--- a/libgui/graphics/qt-graphics-toolkit.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/graphics/qt-graphics-toolkit.h	Fri May 17 19:49:10 2024 -0400
@@ -89,11 +89,11 @@
 
   static ObjectProxy * toolkitObjectProxy (const graphics_object& go);
 
-signals:
+Q_SIGNALS:
 
   void create_object_signal (double handle);
 
-public slots:
+public Q_SLOTS:
 
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
--- a/libgui/qterminal/libqterminal/QTerminal.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/QTerminal.cc	Fri May 17 19:49:10 2024 -0400
@@ -169,7 +169,7 @@
                                                 QString::SkipEmptyParts);
 #endif
   for (int i = 0; i < commands.size (); i++)
-    emit execute_command_in_terminal_signal (commands.at (i));
+    Q_EMIT execute_command_in_terminal_signal (commands.at (i));
 
 }
 
@@ -180,7 +180,7 @@
   QString file = _edit_action->data ().toStringList ().at (0);
   int line = _edit_action->data ().toStringList ().at (1).toInt ();
 
-  emit edit_mfile_request (file,line);
+  Q_EMIT edit_mfile_request (file,line);
 }
 
 // slot for edit selected function names
@@ -188,7 +188,7 @@
 {
   QString file = m_edit_selected_action->data ().toString ();
 
-  emit edit_mfile_request (file,0);
+  Q_EMIT edit_mfile_request (file,0);
 }
 
 // slot for showing help on selected epxression
@@ -196,7 +196,7 @@
 {
   QString expr = m_help_selected_action->data ().toString ();
 
-  emit execute_command_in_terminal_signal ("help " + expr);
+  Q_EMIT execute_command_in_terminal_signal ("help " + expr);
 }
 
 // slot for showing documentation on selected epxression
@@ -204,7 +204,7 @@
 {
   std::string expr = m_doc_selected_action->data ().toString ().toStdString ();
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([expr] (octave::interpreter& interp)
      {
        // INTERPRETER THREAD
--- a/libgui/qterminal/libqterminal/QTerminal.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/QTerminal.h	Fri May 17 19:49:10 2024 -0400
@@ -87,7 +87,7 @@
 
   virtual void setScrollBufferSize(int value=1000) = 0;
 
-signals:
+Q_SIGNALS:
 
   void report_status_message (const QString&);
 
@@ -110,7 +110,7 @@
   void interpreter_event (const octave::fcn_callback& fcn);
   void interpreter_event (const octave::meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   virtual void copyClipboard () = 0;
 
@@ -124,7 +124,7 @@
 
   virtual void init_terminal_size () { }
 
-  void terminal_interrupt () { emit interrupt_signal (); }
+  void terminal_interrupt () { Q_EMIT interrupt_signal (); }
 
   void run_selection ();
 
--- a/libgui/qterminal/libqterminal/unix/Emulation.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Emulation.cpp	Fri May 17 19:49:10 2024 -0400
@@ -166,7 +166,7 @@
   delete _decoder;
   _decoder = _codec->makeDecoder();
 
-  emit useUtf8Request(utf8());
+  Q_EMIT useUtf8Request(utf8());
 }
 
 void Emulation::setCodec(EmulationCodec codec)
@@ -211,7 +211,7 @@
     case '\t'      : _currentScreen->Tabulate();                  break;
     case '\n'      : _currentScreen->NewLine();                   break;
     case '\r'      : _currentScreen->Return();                    break;
-    case 0x07      : emit stateSet(NOTIFYBELL);
+    case 0x07      : Q_EMIT stateSet(NOTIFYBELL);
                      break;
     default        : _currentScreen->ShowCharacter(c);            break;
   };
@@ -228,15 +228,15 @@
 
 void Emulation::sendKeyEvent( QKeyEvent* ev )
 {
-  emit stateSet(NOTIFYNORMAL);
+  Q_EMIT stateSet(NOTIFYNORMAL);
 
   if (!ev->text().isEmpty())
   { // A block of text
     // Note that the text is proper unicode.
     // We should do a conversion here, but since this
     // routine will never be used, we simply emit plain ascii.
-    //emit sendBlock(ev->text().toAscii(),ev->text().length());
-    emit sendData(ev->text().toUtf8(),ev->text().length());
+    //Q_EMIT sendBlock(ev->text().toAscii(),ev->text().length());
+    Q_EMIT sendData(ev->text().toUtf8(),ev->text().length());
   }
 }
 
@@ -259,7 +259,7 @@
 
 void Emulation::receiveData(const char* text, int length)
 {
-	emit stateSet(NOTIFYACTIVITY);
+	Q_EMIT stateSet(NOTIFYACTIVITY);
 
 	bufferedUpdate();
     	
@@ -299,7 +299,7 @@
     _bulkTimer1.stop();
     _bulkTimer2.stop();
 
-    emit outputChanged();
+    Q_EMIT outputChanged();
 
     _currentScreen->resetScrolledLines();
     _currentScreen->resetDroppedLines();
@@ -330,7 +330,7 @@
   _screen[0]->resizeImage(lines,columns);
   _screen[1]->resizeImage(lines,columns);
 
-  emit imageSizeChanged(lines,columns);
+  Q_EMIT imageSizeChanged(lines,columns);
 
   bufferedUpdate();
 }
--- a/libgui/qterminal/libqterminal/unix/Emulation.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Emulation.h	Fri May 17 19:49:10 2024 -0400
@@ -214,7 +214,7 @@
 
   bool programBracketedPasteMode() const;
 
-public slots:
+public Q_SLOTS:
 
   /** Change the size of the emulation's image */
   virtual void setImageSize(int lines, int columns);
@@ -260,7 +260,7 @@
    */
   void receiveData(const char* buffer,int len);
 
-signals:
+Q_SIGNALS:
 
   /**
    * Emitted when a buffer of data is ready to send to the
@@ -432,7 +432,7 @@
 
   const KeyboardTranslator* _keyTranslator; // the keyboard layout
 
-protected slots:
+protected Q_SLOTS:
   /**
    * Schedules an update of attached views.
    * Repeated calls to bufferedUpdate() in close succession will result in only a single update,
@@ -440,7 +440,7 @@
    */
   void bufferedUpdate();
 
-private slots:
+private Q_SLOTS:
 
   // triggered by timer, causes the emulation to send an updated screen image to each
   // view
--- a/libgui/qterminal/libqterminal/unix/Filter.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Filter.cpp	Fri May 17 19:49:10 2024 -0400
@@ -688,9 +688,9 @@
   // the function name. depending on this we have to invoke different
   // slots in main_window
   if (file_info.isAbsolute () && file_info.exists ())
-    emit request_open_file_signal (file, QString (), line);
+    Q_EMIT request_open_file_signal (file, QString (), line);
   else
-    emit request_edit_mfile_signal (file, line);
+    Q_EMIT request_edit_mfile_signal (file, line);
 }
 
 //#include "moc_Filter.cpp"
--- a/libgui/qterminal/libqterminal/unix/Filter.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Filter.h	Fri May 17 19:49:10 2024 -0400
@@ -242,7 +242,7 @@
      */
     virtual void process();
 
-signals:
+Q_SIGNALS:
 
     void request_edit_mfile_signal (const QString&, int);
     void request_open_file_signal (const QString&, const QString&, int);
@@ -308,7 +308,7 @@
 
     virtual void process();
 
-public slots:
+public Q_SLOTS:
     void request_open_file (const QString&, int);
 
 protected:
@@ -332,10 +332,10 @@
 public:
     FilterObject(Filter::HotSpot* filter) : _filter(filter) {}
     void request_open_file (const QString& file, int line)
-      { emit request_open_file_signal (file, line); }
-signals:
+      { Q_EMIT request_open_file_signal (file, line); }
+Q_SIGNALS:
     void request_open_file_signal (const QString&, int);
-private slots:
+private Q_SLOTS:
     void activated();
 private:
     Filter::HotSpot* _filter;
--- a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.cpp	Fri May 17 19:49:10 2024 -0400
@@ -146,7 +146,7 @@
     dup2 (fdstdout, STDOUT_FILENO);
     dup2 (fdstderr, STDERR_FILENO);
 
-    emit destroyed();
+    Q_EMIT destroyed();
 }
 
 void QUnixTerminalImpl::setTerminalFont(const QFont &font)
--- a/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/QUnixTerminalImpl.h	Fri May 17 19:49:10 2024 -0400
@@ -54,7 +54,7 @@
     void has_extra_interrupt (bool extra_interrupt);
     QList<QAction*> get_hotspot_actions (const QPoint& at);
 
-public slots:
+public Q_SLOTS:
     void copyClipboard();
     void pasteClipboard();
     void selectAll();
--- a/libgui/qterminal/libqterminal/unix/ScreenWindow.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/ScreenWindow.cpp	Fri May 17 19:49:10 2024 -0400
@@ -136,7 +136,7 @@
     _screen->setSelectionStart( column , qMin(line + currentLine(),endWindowLine())  , columnMode);
 	
 	_bufferNeedsUpdate = true;
-    emit selectionChanged();
+    Q_EMIT selectionChanged();
 }
 
 void ScreenWindow::setSelectionEnd( int column , int line )
@@ -144,7 +144,7 @@
     _screen->setSelectionEnd( column , qMin(line + currentLine(),endWindowLine()) );
 
 	_bufferNeedsUpdate = true;
-    emit selectionChanged();
+    Q_EMIT selectionChanged();
 }
 
 bool ScreenWindow::isSelected( int column , int line )
@@ -156,7 +156,7 @@
 {
     _screen->clearSelection();
 
-    emit selectionChanged();
+    Q_EMIT selectionChanged();
 }
 
 void ScreenWindow::setWindowLines(int lines)
@@ -230,7 +230,7 @@
 
     _bufferNeedsUpdate = true;
 
-    emit scrolled(_currentLine);
+    Q_EMIT scrolled(_currentLine);
 }
 
 void ScreenWindow::setTrackOutput(bool trackOutput)
@@ -289,5 +289,5 @@
 
 	_bufferNeedsUpdate = true;
 
-    emit outputChanged();
+    Q_EMIT outputChanged();
 }
--- a/libgui/qterminal/libqterminal/unix/ScreenWindow.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/ScreenWindow.h	Fri May 17 19:49:10 2024 -0400
@@ -207,7 +207,7 @@
      */
     QString selectedText( bool preserveLineBreaks ) const;
 
-public slots:
+public Q_SLOTS:
     /**
      * Notifies the window that the contents of the associated terminal screen have changed.
      * This moves the window to the bottom of the screen if trackOutput() is true and causes
@@ -215,7 +215,7 @@
      */
     void notifyOutputChanged();
 
-signals:
+Q_SIGNALS:
     /**
      * Emitted when the contents of the associated terminal screen ( see screen() ) changes.
      */
--- a/libgui/qterminal/libqterminal/unix/SelfListener.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/SelfListener.cpp	Fri May 17 19:49:10 2024 -0400
@@ -29,7 +29,7 @@
     while(running) {
          while((len = ::read(_a, buf, 4096)) > 0) {
             buf[len] = 0; // Just in case.
-            emit recvData(buf, len);
+            Q_EMIT recvData(buf, len);
             msleep(30);
          }
          if(len < 0)
--- a/libgui/qterminal/libqterminal/unix/SelfListener.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/SelfListener.h	Fri May 17 19:49:10 2024 -0400
@@ -27,10 +27,10 @@
 public:
     explicit SelfListener(int a, QObject *parent = nullptr);
 
-signals:
+Q_SIGNALS:
     void recvData(const char* stdOutBuffer, int stdOutlen);
 
-public slots:
+public Q_SLOTS:
 
 protected:
     void run();
--- a/libgui/qterminal/libqterminal/unix/TerminalModel.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalModel.cpp	Fri May 17 19:49:10 2024 -0400
@@ -192,7 +192,7 @@
 
 void TerminalModel::run()
 {
-    emit started();
+    Q_EMIT started();
 }
 
 void TerminalModel::monitorTimerDone()
@@ -209,11 +209,11 @@
         //    KNotification::event("Silence", ("Silence in session '%1'", _nameTitle), QPixmap(),
         //                    QApplication::activeWindow(),
         //                    KNotification::CloseWhenWidgetActivated);
-        emit stateChanged(NOTIFYSILENCE);
+        Q_EMIT stateChanged(NOTIFYSILENCE);
     }
     else
     {
-        emit stateChanged(NOTIFYNORMAL);
+        Q_EMIT stateChanged(NOTIFYNORMAL);
     }
 
     _notifiedActivity=false;
@@ -223,7 +223,7 @@
 {
     if (state==NOTIFYBELL)
     {
-        emit bellRequest("");
+        Q_EMIT bellRequest("");
     }
     else if (state==NOTIFYACTIVITY)
     {
@@ -247,7 +247,7 @@
     if ( state==NOTIFYSILENCE && !_monitorSilence )
         state = NOTIFYNORMAL;
 
-    emit stateChanged(state);
+    Q_EMIT stateChanged(state);
 }
 
 void TerminalModel::onViewSizeChange(int /*height*/, int /*width*/)
@@ -317,13 +317,13 @@
 void TerminalModel::setProfileKey(const QString& key)
 {
     _profileKey = key;
-    emit profileChanged(key);
+    Q_EMIT profileChanged(key);
 }
 QString TerminalModel::profileKey() const { return _profileKey; }
 
 void TerminalModel::done(int)
 {
-    emit finished();
+    Q_EMIT finished();
 }
 
 Emulation* TerminalModel::emulation() const
@@ -401,7 +401,7 @@
 void TerminalModel::onReceiveBlock(const char* buf, int len )
 {
     _emulation->receiveData( buf, len );
-    emit receivedData( QString::fromLatin1( buf, len ) );
+    Q_EMIT receivedData( QString::fromLatin1( buf, len ) );
 }
 
 QSize TerminalModel::size()
@@ -414,5 +414,5 @@
     if ((size.width() <= 1) || (size.height() <= 1))
         return;
 
-    emit resizeRequest(size);
+    Q_EMIT resizeRequest(size);
 }
--- a/libgui/qterminal/libqterminal/unix/TerminalModel.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalModel.h	Fri May 17 19:49:10 2024 -0400
@@ -233,7 +233,7 @@
    */
   void refresh();
 
-public slots:
+public Q_SLOTS:
 
   /**
    * Starts the terminal session.
@@ -249,7 +249,7 @@
    */
   void close();
 
-signals:
+Q_SIGNALS:
 
   /** Emitted when the terminal process starts. */
   void started();
@@ -314,7 +314,7 @@
    */
   void profileChangeCommandReceived(const QString& text);
 
-private slots:
+private Q_SLOTS:
   void done(int);
 
   void onReceiveBlock(const char* buffer, int len );
--- a/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.cpp	Fri May 17 19:49:10 2024 -0400
@@ -190,7 +190,7 @@
 
   _fontAscent = fm.ascent();
 
-  emit changedFontMetricSignal( _fontHeight, _fontWidth );
+  Q_EMIT changedFontMetricSignal( _fontHeight, _fontWidth );
   //parentWidget()->setFixedWidth(_fontWidth * 80 + _leftMargin);
   propagateSize();
   update();
@@ -1341,7 +1341,7 @@
 #if defined (SIGWINCH)
       ::raise (SIGWINCH);
 #endif
-      emit changedContentSizeSignal(_contentHeight, _contentWidth); // expose resizeEvent
+      Q_EMIT changedContentSizeSignal(_contentHeight, _contentWidth); // expose resizeEvent
     }
   //qDebug("%s %d updateImageSize", __FILE__, __LINE__);
 
@@ -1356,11 +1356,11 @@
 //the same signal as the one for a content size change
 void TerminalView::showEvent(QShowEvent*)
 {
-  emit changedContentSizeSignal(_contentHeight,_contentWidth);
+  Q_EMIT changedContentSizeSignal(_contentHeight,_contentWidth);
 }
 void TerminalView::hideEvent(QHideEvent*)
 {
-  emit changedContentSizeSignal(_contentHeight,_contentWidth);
+  Q_EMIT changedContentSizeSignal(_contentHeight,_contentWidth);
 }
 
 /* ------------------------------------------------------------------------- */
@@ -1459,13 +1459,13 @@
       _lineSelectionMode = false;
       _wordSelectionMode = false;
 
-      emit isBusySelecting(true); // Keep it steady...
+      Q_EMIT isBusySelecting(true); // Keep it steady...
       // Drag only when the Control key is hold
       bool selected = false;
 
       // The receiver of the testIsSelected() signal will adjust
       // 'selected' accordingly.
-      //emit testIsSelected(pos.x(), pos.y(), selected);
+      //Q_EMIT testIsSelected(pos.x(), pos.y(), selected);
 
       selected =  _screenWindow->isSelected(pos.x(),pos.y());
 
@@ -1485,7 +1485,7 @@
             {
               _screenWindow->clearSelection();
 
-              //emit clearSelectionSignal();
+              //Q_EMIT clearSelectionSignal();
               pos.ry() += _scrollBar->value();
               _iPntSel = _pntSel = pos;
               _actSel = 1; // left mouse button pressed but nothing selected yet.
@@ -1493,7 +1493,7 @@
             }
           else
             {
-              emit mouseSignal( 0, charColumn + 1, charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+              Q_EMIT mouseSignal( 0, charColumn + 1, charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 0);
             }
         }
     }
@@ -1502,19 +1502,19 @@
       if ( _mouseMarks || (!_mouseMarks && (ev->modifiers() & Qt::ShiftModifier)) )
         emitSelection(true,ev->modifiers() & Qt::ControlModifier);
       else
-        emit mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+        Q_EMIT mouseSignal( 1, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
     }
   else if ( ev->button() == Qt::RightButton )
     {
       if (_mouseMarks || (ev->modifiers() & Qt::ShiftModifier))
         {
-          emit configureRequest( this,
+          Q_EMIT configureRequest( this,
                                  ev->modifiers() & (Qt::ShiftModifier|Qt::ControlModifier),
                                  ev->pos()
                                  );
         }
       else
-        emit mouseSignal( 2, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
+        Q_EMIT mouseSignal( 2, charColumn +1, charLine +1 +_scrollBar->value() -_scrollBar->maximum() , 0);
     }
 
   QWidget::mousePressEvent (ev);
@@ -1590,7 +1590,7 @@
         button = 2;
 
 
-      emit mouseSignal( button,
+      Q_EMIT mouseSignal( button,
                         charColumn + 1,
                         charLine + 1 +_scrollBar->value() -_scrollBar->maximum(),
                         1 );
@@ -1610,7 +1610,7 @@
           || mouse_position.y () < dragInfo.start.y () - distance)
         {
           // we've left the drag square, we can start a real drag operation now
-          emit isBusySelecting(false); // Ok.. we can breath again.
+          Q_EMIT isBusySelecting(false); // Ok.. we can breath again.
 
           _screenWindow->clearSelection();
           doDrag();
@@ -1856,12 +1856,12 @@
 
   if ( ev->button() == Qt::LeftButton)
     {
-      emit isBusySelecting(false);
+      Q_EMIT isBusySelecting(false);
       if(dragInfo.state == diPending)
         {
           // We had a drag event pending but never confirmed.  Kill selection
           _screenWindow->clearSelection();
-          //emit clearSelectionSignal();
+          //Q_EMIT clearSelectionSignal();
         }
       else
         {
@@ -1877,7 +1877,7 @@
           //       applies here, too.
 
           if (!_mouseMarks && !(ev->modifiers() & Qt::ShiftModifier))
-            emit mouseSignal( 3, // release
+            Q_EMIT mouseSignal( 3, // release
                               charColumn + 1,
                               charLine + 1 +_scrollBar->value() -_scrollBar->maximum() , 0);
         }
@@ -1889,7 +1889,7 @@
        ((ev->button() == Qt::RightButton && !(ev->modifiers() & Qt::ShiftModifier))
         || ev->button() == Qt::MiddleButton) )
     {
-      emit mouseSignal( 3,
+      Q_EMIT mouseSignal( 3,
                         charColumn + 1,
                         charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
                         0);
@@ -1946,7 +1946,7 @@
     {
       // Send just _ONE_ click event, since the first click of the double click
       // was already sent by the click handler
-      emit mouseSignal( 0,
+      Q_EMIT mouseSignal( 0,
                         pos.x()+1,
                         pos.y()+1 +_scrollBar->value() -_scrollBar->maximum(),
                         0 ); // left button
@@ -2039,7 +2039,7 @@
 
       int delta = ev->angleDelta().y();
 
-      emit mouseSignal( delta > 0 ? 4 : 5,
+      Q_EMIT mouseSignal( delta > 0 ? 4 : 5,
                         charColumn + 1,
                         charLine + 1 +_scrollBar->value() -_scrollBar->maximum() ,
                         0);
@@ -2066,7 +2066,7 @@
   _wordSelectionMode = false;
 
   _actSel = 2; // within selection
-  emit isBusySelecting(true); // Keep it steady...
+  Q_EMIT isBusySelecting(true); // Keep it steady...
 
   while (_iPntSel.y()>0 && (_lineProperties[_iPntSel.y()-1] & LINE_WRAPPED) )
     _iPntSel.ry()--;
@@ -2109,7 +2109,7 @@
 
   _iPntSel.ry() += _scrollBar->value();
 
-  emit tripleClicked( _screenWindow->selectedText( _preserveLineBreaks ) );
+  Q_EMIT tripleClicked( _screenWindow->selectedText( _preserveLineBreaks ) );
 }
 
 
@@ -2188,7 +2188,7 @@
           text.replace ("\t", " ");
         }
       QKeyEvent e(QEvent::KeyPress, 0, Qt::NoModifier, text);
-      emit keyPressedSignal(&e); // expose as a big fat keypress event
+      Q_EMIT keyPressedSignal(&e); // expose as a big fat keypress event
 
       _screenWindow->clearSelection();
     }
@@ -2215,7 +2215,7 @@
   if (text.isEmpty ())
     {
       if (! extra_interrupt)
-        emit interrupt_signal ();
+        Q_EMIT interrupt_signal ();
     }
   else
     QApplication::clipboard()->setText(text);
@@ -2318,7 +2318,7 @@
     }
 
   if ( emitKeyPressSignal && !_readonly )
-    emit keyPressedSignal(event);
+    Q_EMIT keyPressedSignal(event);
 
   if (_readonly) {
       event->ignore();
@@ -2331,7 +2331,7 @@
 void TerminalView::inputMethodEvent( QInputMethodEvent* event )
 {
   QKeyEvent keyEvent(QEvent::KeyPress,0,Qt::NoModifier,event->commitString());
-  emit keyPressedSignal(&keyEvent);
+  Q_EMIT keyPressedSignal(&keyEvent);
 
   _inputMethodData.preeditString = event->preeditString();
   update(preeditRect() | _inputMethodData.previousPreeditRect);
@@ -2568,7 +2568,7 @@
 */
   if(event->mimeData()->hasFormat("text/plain"))
     {
-      emit sendStringToEmu(dropText.toLocal8Bit());
+      Q_EMIT sendStringToEmu(dropText.toLocal8Bit());
     }
 }
 
--- a/libgui/qterminal/libqterminal/unix/TerminalView.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/TerminalView.h	Fri May 17 19:49:10 2024 -0400
@@ -385,7 +385,7 @@
     void disableBracketedPasteMode(bool disable) { _disabledBracketedPasteMode = disable; }
     bool bracketedPasteModeIsDisabled() const { return _disabledBracketedPasteMode; }
 
-public slots:
+public Q_SLOTS:
 
     /**
      * Updates the filters in the display's filter chain.  This will cause
@@ -464,7 +464,7 @@
     void setBracketedPasteMode(bool bracketedPasteMode);
     bool bracketedPasteMode() const;
 
-signals:
+Q_SIGNALS:
 
     void interrupt_signal ();
 
@@ -541,7 +541,7 @@
     virtual void inputMethodEvent ( QInputMethodEvent* event );
     virtual QVariant inputMethodQuery( Qt::InputMethodQuery query ) const;
 
-protected slots:
+protected Q_SLOTS:
 
     void scrollBarPositionChanged(int value);
     void blinkEvent();
@@ -551,7 +551,7 @@
     //after emitting the first in a sequence of bell events.
     void enableBell();
 
-private slots:
+private Q_SLOTS:
 
     void swapColorTable();
     void tripleClickTimeout();  // resets possibleTripleClick
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.cpp	Fri May 17 19:49:10 2024 -0400
@@ -363,7 +363,7 @@
 
   // arg == 1 doesn't change the title. In XTerm it only changes the icon name
   // (btw: arg=0 changes title and icon, arg=1 only icon, arg=2 only title
-//  emit changeTitle(arg,unistr);
+//  Q_EMIT changeTitle(arg,unistr);
   _pendingTitleUpdates[arg] = unistr;
   _titleUpdateTimer->start(20);
 
@@ -375,7 +375,7 @@
     QListIterator<int> iter( _pendingTitleUpdates.keys() );
     while (iter.hasNext()) {
         int arg = iter.next();
-        emit titleChanged( arg , _pendingTitleUpdates[arg] );
+        Q_EMIT titleChanged( arg , _pendingTitleUpdates[arg] );
     }
 
     _pendingTitleUpdates.clear();
@@ -415,7 +415,7 @@
     case TY_CTL('D'      ) : /* EOT: ignored                      */ break;
     case TY_CTL('E'      ) :      reportAnswerBack     (          ); break; //VT100
     case TY_CTL('F'      ) : /* ACK: ignored                      */ break;
-    case TY_CTL('G'      ) : emit stateSet(NOTIFYBELL);
+    case TY_CTL('G'      ) : Q_EMIT stateSet(NOTIFYBELL);
                                 break; //VT100
     case TY_CTL('H'      ) : _currentScreen->BackSpace            (          ); break; //VT100
     case TY_CTL('I'      ) : _currentScreen->Tabulate             (          ); break; //VT100
@@ -501,7 +501,7 @@
     case TY_CSI_PS('t',   8) : setImageSize( q /* colums */, p /* lines */ );    break;
 
 // change tab text color : \e[28;<color>t  color: 0-16,777,215
-    case TY_CSI_PS('t',   28) : emit changeTabTextColorRequest      ( p        );          break;
+    case TY_CSI_PS('t',   28) : Q_EMIT changeTabTextColorRequest      ( p        );          break;
 
     case TY_CSI_PS('K',   0) : _currentScreen->clearToEndOfLine     (          ); break;
     case TY_CSI_PS('K',   1) : _currentScreen->clearToBeginOfLine   (          ); break;
@@ -780,9 +780,9 @@
 void Vt102Emulation::sendString(const char* s , int length)
 {
   if ( length >= 0 )
-    emit sendData(s,length);
+    Q_EMIT sendData(s,length);
   else
-    emit sendData(s,strlen(s));
+    Q_EMIT sendData(s,strlen(s));
 }
 
 // Replies ----------------------------------------------------------------- --
@@ -1127,11 +1127,11 @@
     case MODE_Mouse1001:
     case MODE_Mouse1002:
     case MODE_Mouse1003:
-        emit programUsesMouseChanged(false);
+        Q_EMIT programUsesMouseChanged(false);
     break;
 
     case MODE_BracketedPaste:
-        emit programBracketedPasteModeChanged(true);
+        Q_EMIT programBracketedPasteModeChanged(true);
     break;
 
     case MODE_AppScreen : _screen[1]->clearSelection();
@@ -1154,11 +1154,11 @@
     case MODE_Mouse1001 :
     case MODE_Mouse1002 :
     case MODE_Mouse1003 :
-        emit programUsesMouseChanged(true);
+        Q_EMIT programUsesMouseChanged(true);
     break;
 
     case MODE_BracketedPaste:
-        emit programBracketedPasteModeChanged(false);
+        Q_EMIT programBracketedPasteModeChanged(false);
     break;
 
     case MODE_AppScreen : _screen[0]->clearSelection();
--- a/libgui/qterminal/libqterminal/unix/Vt102Emulation.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/unix/Vt102Emulation.h	Fri May 17 19:49:10 2024 -0400
@@ -91,7 +91,7 @@
   // reimplemented
   virtual char getErase() const;
 
-public slots:
+public Q_SLOTS:
 
   // reimplemented
   virtual void sendString(const char*,int length = -1);
@@ -108,7 +108,7 @@
   virtual void receiveChar(int cc);
 
 
-private slots:
+private Q_SLOTS:
 		
   //causes changeTitle() to be emitted for each (int,QString) pair in pendingTitleUpdates
   //used to buffer multiple title updates
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp	Fri May 17 19:49:10 2024 -0400
@@ -1279,7 +1279,7 @@
   if (title != m_title)
     {
       q->setWindowTitle (title);
-      emit q->titleChanged (title);
+      Q_EMIT q->titleChanged (title);
     }
 
   if (GetConsoleScreenBufferInfo (hStdOut, &sbi))
@@ -1833,9 +1833,9 @@
 
 void QWinTerminalImpl::setSize (int columns, int lines)
 {
-  d->log ("emit set_screen_size_signal (%d, %d)\n", columns, lines);
+  d->log ("Q_EMIT set_screen_size_signal (%d, %d)\n", columns, lines);
 
-  emit set_screen_size_signal (columns, lines);
+  Q_EMIT set_screen_size_signal (columns, lines);
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -1856,7 +1856,7 @@
   else
     {
       clipboard->setText (selection);
-      emit report_status_message (tr ("copied selection to clipboard"));
+      Q_EMIT report_status_message (tr ("copied selection to clipboard"));
     }
 }
 
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.h	Fri May 17 19:49:10 2024 -0400
@@ -67,14 +67,14 @@
 
   void has_extra_interrupt (bool);
 
-public slots:
+public Q_SLOTS:
   void copyClipboard ();
   void pasteClipboard ();
   void selectAll ();
   void blinkCursorEvent ();
   void init_terminal_size ();
 
-signals:
+Q_SIGNALS:
   void terminated ();
   void titleChanged (const QString&);
 
@@ -99,7 +99,7 @@
   void dragEnterEvent (QDragEnterEvent *event);
   void dropEvent (QDropEvent *event);
 
-private slots:
+private Q_SLOTS:
   void horizontalScrollValueChanged (int value);
   void verticalScrollValueChanged (int value);
   void monitorConsole ();
--- a/libgui/src/color-picker.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/color-picker.h	Fri May 17 19:49:10 2024 -0400
@@ -46,7 +46,7 @@
 
   void set_color (QColor new_color);
 
-private slots:
+private Q_SLOTS:
 
   void select_color ();
 
--- a/libgui/src/command-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/command-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -125,7 +125,7 @@
 
   QPointer<command_widget> this_cw (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_cw] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -140,9 +140,9 @@
        std::string decoded_prompt
          = command_editor::decode_prompt_string (prompt);
 
-       emit update_prompt_signal (QString::fromStdString (decoded_prompt));
+       Q_EMIT update_prompt_signal (QString::fromStdString (decoded_prompt));
 
-       emit new_command_line_signal ();
+       Q_EMIT new_command_line_signal ();
      });
 }
 
@@ -173,7 +173,7 @@
 
   QPointer<command_widget> this_cw (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_cw, input_line] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -194,9 +194,9 @@
        std::string decoded_prompt
          = command_editor::decode_prompt_string (prompt);
 
-       emit update_prompt_signal (QString::fromStdString (decoded_prompt));
+       Q_EMIT update_prompt_signal (QString::fromStdString (decoded_prompt));
 
-       emit new_command_line_signal ();
+       Q_EMIT new_command_line_signal ();
      });
 
 }
--- a/libgui/src/command-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/command-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -53,12 +53,12 @@
 
   console (command_widget *p);
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void cursor_position_changed (int line, int col);
 
@@ -109,7 +109,7 @@
 
   QString prompt ();
 
-signals:
+Q_SIGNALS:
 
   void clear_line_edit ();
 
@@ -123,7 +123,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void process_input_line (const QString& input_line);
 
--- a/libgui/src/community-news.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/community-news.h	Fri May 17 19:49:10 2024 -0400
@@ -48,7 +48,7 @@
 
   ~community_news () = default;
 
-public slots:
+public Q_SLOTS:
 
   void set_news (const QString& news);
 
--- a/libgui/src/dialog.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/dialog.cc	Fri May 17 19:49:10 2024 -0400
@@ -97,7 +97,7 @@
   if (xicon.isEmpty ())
     xicon = "none";
 
-  emit create_dialog (message, title, xicon, buttons, defbutton, role);
+  Q_EMIT create_dialog (message, title, xicon, buttons, defbutton, role);
 
   // Wait while the user is responding to message box.
   wait ();
@@ -119,7 +119,7 @@
 
   QMutexLocker autolock (&m_mutex);
 
-  emit create_listview (list, mode, wd, ht, initial, name,
+  Q_EMIT create_listview (list, mode, wd, ht, initial, name,
                         prompt, ok_string, cancel_string);
 
   // Wait while the user is responding to message box.
@@ -144,7 +144,7 @@
 
   QMutexLocker autolock (&m_mutex);
 
-  emit create_inputlayout (prompt, title, nr, nc, defaults);
+  Q_EMIT create_inputlayout (prompt, title, nr, nc, defaults);
 
   // Wait while the user is responding to message box.
   wait ();
@@ -162,7 +162,7 @@
 {
   QMutexLocker autolock (&m_mutex);
 
-  emit create_filedialog (filters, title, filename, dirname, multimode);
+  Q_EMIT create_filedialog (filters, title, filename, dirname, multimode);
 
   // Wait while the user is responding to dialog.
   wait ();
@@ -499,7 +499,7 @@
   for (int i = 0; i < selected_index.size (); i++)
     selected_int << selected_index.at (i).row () + 1;
 
-  emit finish_selection (selected_int, 1);
+  Q_EMIT finish_selection (selected_int, 1);
 
   done (QDialog::Accepted);
 }
@@ -512,7 +512,7 @@
 
   QIntList empty;
 
-  emit finish_selection (empty, 0);
+  Q_EMIT finish_selection (empty, 0);
 
   done (QDialog::Rejected);
 }
@@ -605,7 +605,7 @@
   QStringList string_result;
   for (int i = 0; i < m_input_line.size (); i++)
     string_result << m_input_line.at (i)->text ();
-  emit finish_input (string_result, 1);
+  Q_EMIT finish_input (string_result, 1);
   done (QDialog::Accepted);
 }
 
@@ -616,7 +616,7 @@
   // functions can retrieve.
 
   QStringList empty;
-  emit finish_input (empty, 0);
+  Q_EMIT finish_input (empty, 0);
   done (QDialog::Rejected);
 }
 
@@ -682,7 +682,7 @@
 FileDialog::rejectSelection ()
 {
   QStringList empty;
-  emit finish_input (empty, "", 0);
+  Q_EMIT finish_input (empty, "", 0);
 }
 
 void
@@ -716,7 +716,7 @@
   idx = name_filters.indexOf (selectedNameFilter ()) + 1;
 
   // Send the selected info.
-  emit finish_input (string_result, path, idx);
+  Q_EMIT finish_input (string_result, path, idx);
 }
 
 OCTAVE_END_NAMESPACE(octave)
--- a/libgui/src/dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -94,7 +94,7 @@
   void unlock () { m_mutex.unlock (); }
   void wake_all () { m_waitcondition.wakeAll (); }
 
-signals:
+Q_SIGNALS:
 
   void create_dialog (const QString&, const QString&, const QString&,
                       const QStringList&, const QString&, const QStringList&);
@@ -110,7 +110,7 @@
   void create_filedialog (const QStringList& filters, const QString& title,
                           const QString& filename, const QString& dirname,
                           const QString& multimode);
-public slots:
+public Q_SLOTS:
 
   void handle_create_dialog (const QString& message, const QString& title,
                              const QString& icon, const QStringList& button,
@@ -185,7 +185,7 @@
   {
     // Reroute the close tab to a button click so there is only a single
     // route to waking the wait condition.
-    emit buttonClicked (nullptr);
+    Q_EMIT buttonClicked (nullptr);
   }
 };
 
@@ -203,11 +203,11 @@
 
   ~ListDialog () = default;
 
-signals:
+Q_SIGNALS:
 
   void finish_selection (const QIntList&, int);
 
-public slots:
+public Q_SLOTS:
 
   void buttonOk_clicked ();
 
@@ -235,11 +235,11 @@
 
   ~InputDialog () = default;
 
-signals:
+Q_SIGNALS:
 
   void finish_input (const QStringList&, int);
 
-public slots:
+public Q_SLOTS:
 
   void buttonOk_clicked ();
 
@@ -264,11 +264,11 @@
 
   ~FileDialog () = default;
 
-signals:
+Q_SIGNALS:
 
   void finish_input (const QStringList&, const QString&, int);
 
-private slots:
+private Q_SLOTS:
 
   void acceptSelection ();
 
--- a/libgui/src/documentation-bookmarks.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/documentation-bookmarks.h	Fri May 17 19:49:10 2024 -0400
@@ -50,13 +50,13 @@
 
   ~documentation_bookmarks () = default;
 
-public slots:
+public Q_SLOTS:
 
   void add_bookmark ();
   void add_folder (bool);
   void save_settings ();
 
-private slots:
+private Q_SLOTS:
 
   void filter_bookmarks (const QString& pattern);
   void filter_activate (bool state);
--- a/libgui/src/documentation-dock-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/documentation-dock-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -41,7 +41,7 @@
 
   ~documentation_dock_widget () = default;
 
-public slots:
+public Q_SLOTS:
 
   void notice_settings ();
   void save_settings ();
--- a/libgui/src/documentation.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/documentation.cc	Fri May 17 19:49:10 2024 -0400
@@ -548,7 +548,7 @@
                   connect (this, &documentation::show_single_result,
                            this, &documentation::handle_search_result_clicked);
 
-                  emit show_single_result (url);
+                  Q_EMIT show_single_result (url);
                 }
             }
         }
--- a/libgui/src/documentation.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/documentation.h	Fri May 17 19:49:10 2024 -0400
@@ -57,7 +57,7 @@
 
   virtual QVariant loadResource (int type, const QUrl& url);
 
-public slots:
+public Q_SLOTS:
 
   void handle_index_clicked (const QUrl& url,
                              const QString& keyword = QString ());
@@ -114,11 +114,11 @@
   */
   QString title_and_anchor (const QString& title, const QUrl& url);
 
-signals:
+Q_SIGNALS:
 
   void show_single_result (const QUrl&);
 
-public slots:
+public Q_SLOTS:
 
   void notice_settings ();
   void save_settings ();
@@ -132,7 +132,7 @@
   void registerDoc (const QString& name);
   void unregisterDoc (const QString& name);
 
-private slots:
+private Q_SLOTS:
 
   void global_search ();
   void global_search_started ();
--- a/libgui/src/dw-main-window.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/dw-main-window.h	Fri May 17 19:49:10 2024 -0400
@@ -44,17 +44,17 @@
 
   OCTAVE_DISABLE_COPY_MOVE (dw_main_window)
 
-public slots:
+public Q_SLOTS:
 
   void notice_settings ();
 
-protected slots:
+protected Q_SLOTS:
 
   virtual QMenu * createPopupMenu ();
 
   virtual bool event (QEvent *ev);
 
-private slots:
+private Q_SLOTS:
 
   void request_close ();
   void request_close_all ();
--- a/libgui/src/external-editor-interface.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/external-editor-interface.cc	Fri May 17 19:49:10 2024 -0400
@@ -125,7 +125,7 @@
       int button = msgBox->exec ();
 
       if (button == QMessageBox::Yes)
-        emit request_settings_dialog ("editor");
+        Q_EMIT request_settings_dialog ("editor");
     }
 
   return editor;
--- a/libgui/src/external-editor-interface.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/external-editor-interface.h	Fri May 17 19:49:10 2024 -0400
@@ -41,11 +41,11 @@
 
   ~external_editor_interface () = default;
 
-signals:
+Q_SIGNALS:
 
   void request_settings_dialog (const QString&);
 
-public slots:
+public Q_SLOTS:
 
   bool call_custom_editor (const QString& file = QString (), int line = -1);
 
--- a/libgui/src/files-dock-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/files-dock-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -121,7 +121,7 @@
 
     fdw->file_renamed_signal (true);
 
-    emit fileRenamed (parent_dir.absolutePath (), old_name, new_name);
+    Q_EMIT fileRenamed (parent_dir.absolutePath (), old_name, new_name);
     revert ();
 
     return true;
@@ -541,7 +541,7 @@
   QDir dir
     = QDir (m_file_system_model->filePath (m_file_tree_view->rootIndex ()));
 
-  emit displayed_directory_changed (dir.absolutePath ());
+  Q_EMIT displayed_directory_changed (dir.absolutePath ());
 }
 
 void
@@ -601,9 +601,9 @@
           if (QFile::exists (abs_fname))
             {
               if (extensions.contains (suffix))
-                emit open_file (fileInfo.absoluteFilePath ());
+                Q_EMIT open_file (fileInfo.absoluteFilePath ());
               else
-                emit open_any_signal (abs_fname);
+                Q_EMIT open_any_signal (abs_fname);
             }
         }
     }
@@ -812,7 +812,7 @@
     {
       QFileInfo file = m_file_system_model->fileInfo (it);
       if (file.exists ())
-        emit open_file (file.absoluteFilePath ());
+        Q_EMIT open_file (file.absoluteFilePath ());
     }
 }
 
@@ -857,7 +857,7 @@
 
       QFileInfo info = m_file_system_model->fileInfo (index);
 
-      emit load_file_signal (info.fileName ());
+      Q_EMIT load_file_signal (info.fileName ());
     }
 }
 
@@ -872,7 +872,7 @@
       QModelIndex index = rows[0];
 
       QFileInfo info = m_file_system_model->fileInfo (index);
-      emit run_file_signal (info, ED_RUN_FILE);
+      Q_EMIT run_file_signal (info, ED_RUN_FILE);
     }
 }
 
@@ -944,7 +944,7 @@
           else
             {
               // Close the file in the editor if open
-              emit file_remove_signal (info.filePath (), QString ());
+              Q_EMIT file_remove_signal (info.filePath (), QString ());
               // Remove the file.
               bool st = m_file_system_model->remove (index);
               if (! st)
@@ -954,7 +954,7 @@
                                         arg (info.filePath ()));
                   // Reload the old file
                 }
-              emit file_renamed_signal (st);
+              Q_EMIT file_renamed_signal (st);
             }
 
           m_file_system_model->revert ();
@@ -1039,7 +1039,7 @@
     dir_list.append (infos.at (i).absoluteFilePath ());
 
   if (infos.length () > 0)
-    emit modify_path_signal (dir_list, rm, subdirs);
+    Q_EMIT modify_path_signal (dir_list, rm, subdirs);
 }
 
 void
@@ -1229,13 +1229,13 @@
 void
 files_dock_widget::process_set_current_dir (const QString& dir)
 {
-  emit displayed_directory_changed (dir);
+  Q_EMIT displayed_directory_changed (dir);
 }
 
 void
 files_dock_widget::process_find_files (const QString& dir)
 {
-  emit find_files_signal (dir);
+  Q_EMIT find_files_signal (dir);
 }
 
 void
--- a/libgui/src/files-dock-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/files-dock-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -59,7 +59,7 @@
 
   ~files_dock_widget () = default;
 
-signals:
+Q_SIGNALS:
 
   //! Emitted, whenever the user requested to open a file.
 
@@ -98,7 +98,7 @@
   void modify_path_signal (const QStringList& dir_list, bool rm,
                            bool subdirs);
 
-public slots:
+public Q_SLOTS:
 
   //! Slot for handling a change in directory via double click.
 
@@ -134,7 +134,7 @@
 
   void save_settings ();
 
-private slots:
+private Q_SLOTS:
 
   void restore_header_state ();
   void headercontextmenu_requested (const QPoint& pos);
--- a/libgui/src/find-files-dialog.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/find-files-dialog.cc	Fri May 17 19:49:10 2024 -0400
@@ -337,15 +337,15 @@
   if (idx.column () == 1)
     {
       // clicked in directory part
-      emit dir_selected (info.absolutePath ());
+      Q_EMIT dir_selected (info.absolutePath ());
     }
   else
     {
       // clicked in filename part
       if (info.isDir ())
-        emit dir_selected (info.absoluteFilePath ());
+        Q_EMIT dir_selected (info.absoluteFilePath ());
       else
-        emit file_selected (info.absoluteFilePath ());
+        Q_EMIT file_selected (info.absoluteFilePath ());
     }
 }
 
--- a/libgui/src/find-files-dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/find-files-dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -51,16 +51,16 @@
 
   void save_settings ();
 
-signals:
+Q_SIGNALS:
 
   void file_selected (const QString& fileName);
   void dir_selected (const QString& fileName);
 
-public slots:
+public Q_SLOTS:
 
   void set_search_dir (const QString& dir);
 
-private slots:
+private Q_SLOTS:
 
   void start_find ();
   void stop_find ();
--- a/libgui/src/find-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/find-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -117,19 +117,19 @@
 void
 find_widget::find ()
 {
-  emit find_signal (m_find_line_edit->text (), false);
+  Q_EMIT find_signal (m_find_line_edit->text (), false);
 }
 
 void
 find_widget::find_backward ()
 {
-  emit find_signal (m_find_line_edit->text (), true);
+  Q_EMIT find_signal (m_find_line_edit->text (), true);
 }
 
 void
 find_widget::find_incremental ()
 {
-  emit find_incremental_signal (m_find_line_edit->text ());
+  Q_EMIT find_incremental_signal (m_find_line_edit->text ());
 }
 
 void
--- a/libgui/src/find-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/find-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -74,17 +74,17 @@
   void notice_settings (void);
   void save_settings (void);
 
-public slots:
+public Q_SLOTS:
 
   void activate_find (void);
 
-private slots:
+private Q_SLOTS:
 
   void find (void);
   void find_backward (void);
   void find_incremental (void);
 
-signals:
+Q_SIGNALS:
 
   void find_signal (const QString&, bool);
   void find_incremental_signal (const QString&);
--- a/libgui/src/history-dock-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/history-dock-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -180,7 +180,7 @@
 void
 history_dock_widget::handle_double_click (QModelIndex modelIndex)
 {
-  emit command_double_clicked (modelIndex.data ().toString ());
+  Q_EMIT command_double_clicked (modelIndex.data ().toString ());
 }
 
 void
@@ -210,7 +210,7 @@
   QModelIndexList rows = selectionModel->selectedRows ();
   for (const auto& it : rows)
     if (it.isValid ())
-      emit command_double_clicked (it.data ().toString ());
+      Q_EMIT command_double_clicked (it.data ().toString ());
 }
 
 void
@@ -233,7 +233,7 @@
     }
 
   if (text.length () > 0)
-    emit command_create_script (text);
+    Q_EMIT command_create_script (text);
 }
 
 void
--- a/libgui/src/history-dock-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/history-dock-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -47,7 +47,7 @@
 
   ~history_dock_widget () = default;
 
-signals:
+Q_SIGNALS:
 
   //! Signal emitted whenever the user double-clicks a command in the
   //! history.
@@ -59,7 +59,7 @@
 
   void command_create_script (const QString& commands);
 
-public slots:
+public Q_SLOTS:
 
   void set_history (const QStringList& hist);
   void append_history (const QString& hist_entry);
@@ -67,7 +67,7 @@
   void save_settings ();
   void notice_settings ();
 
-private slots:
+private Q_SLOTS:
 
   void update_filter_history ();
   void filter_activate (bool enable);
--- a/libgui/src/interpreter-qobject.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/interpreter-qobject.cc	Fri May 17 19:49:10 2024 -0400
@@ -79,7 +79,7 @@
 
           m_interpreter = &interp;
 
-          emit ready ();
+          Q_EMIT ready ();
 
           graphics_init (interp);
 
@@ -106,7 +106,7 @@
   // deleting it later, when the application object destructor is
   // executed.
 
-  emit shutdown_finished (exit_status);
+  Q_EMIT shutdown_finished (exit_status);
 }
 
 void
--- a/libgui/src/interpreter-qobject.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/interpreter-qobject.h	Fri May 17 19:49:10 2024 -0400
@@ -60,13 +60,13 @@
   void stop ();
   void resume ();
 
-signals:
+Q_SIGNALS:
 
   void ready ();
 
   void shutdown_finished (int);
 
-public slots:
+public Q_SLOTS:
 
   // Programming Note: With the current design of the interpreter,
   // additional signals will not be noticed because the execute
--- a/libgui/src/led-indicator.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/led-indicator.h	Fri May 17 19:49:10 2024 -0400
@@ -46,7 +46,7 @@
   led_indicator (led_state initial_state = LED_STATE_INACTIVE,
                  QWidget *parent = 0);
 
-public slots:
+public Q_SLOTS:
 
   void set_state (led_state state);
 
--- a/libgui/src/m-editor/file-editor-interface.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/file-editor-interface.h	Fri May 17 19:49:10 2024 -0400
@@ -75,12 +75,12 @@
 
   virtual void enable_menu_shortcuts (bool enable) = 0;
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   virtual void toplevel_change (bool) = 0;
 
--- a/libgui/src/m-editor/file-editor-tab.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/file-editor-tab.cc	Fri May 17 19:49:10 2024 -0400
@@ -281,8 +281,8 @@
 file_editor_tab::~file_editor_tab ()
 {
   // Tell all connected markers to self-destruct.
-  emit remove_all_breakpoints_signal ();
-  emit remove_all_positions ();
+  Q_EMIT remove_all_breakpoints_signal ();
+  Q_EMIT remove_all_positions ();
 
   // Destroy lexer attached to m_edit_area, which is not the parent
   // of lexer
@@ -321,7 +321,7 @@
   else
     {
       e->accept ();
-      emit tab_remove_request ();
+      Q_EMIT tab_remove_request ();
     }
 }
 
@@ -377,7 +377,7 @@
       return;
     }
 
-  emit edit_mfile_request (word_at_cursor, m_file_name, m_ced, -1);
+  Q_EMIT edit_mfile_request (word_at_cursor, m_file_name, m_ced, -1);
 }
 
 // If "dbstop if ..." selected from context menu, create a conditional
@@ -396,7 +396,7 @@
   // Search for previous condition.  FIXME: is there a more direct way?
   if (m_edit_area->markersAtLine (linenr) & (1 << marker::cond_break))
     {
-      emit report_marker_linenr (m_bp_lines, m_bp_conditions);
+      Q_EMIT report_marker_linenr (m_bp_lines, m_bp_conditions);
       for (int i = 0; i < m_bp_lines.length (); i++)
         if (m_bp_lines.value (i) == linenr)
           {
@@ -419,7 +419,7 @@
         cond = '(' + cond + ") || (" + m_edit_area->selectedText () + ')';
     }
 
-  emit dbstop_if ("dbstop if", linenr+1, cond);
+  Q_EMIT dbstop_if ("dbstop if", linenr+1, cond);
 }
 
 // Display dialog in GUI thread to get condition, then emit
@@ -448,7 +448,7 @@
 
       QPointer<file_editor_tab> this_fetab (this);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([this, this_fetab, line, new_cond] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -482,7 +482,7 @@
                // The condition seems OK, so set the conditional
                // breakpoint.
 
-               emit request_add_breakpoint (line, new_cond);
+               Q_EMIT request_add_breakpoint (line, new_cond);
              }
            catch (const execution_exception& ee)
              {
@@ -508,7 +508,7 @@
                                      + QString::fromStdString (msg)
                                      + "\n\ndbstop if");
 
-               emit dbstop_if (new_prompt, line, "");
+               Q_EMIT dbstop_if (new_prompt, line, "");
              }
          });
     }
@@ -538,11 +538,11 @@
   update_window_title (m_edit_area->isModified ());
 
   // update the file editor with current editing directory
-  emit editor_state_changed (m_copy_available, m_is_octave_file,
+  Q_EMIT editor_state_changed (m_copy_available, m_is_octave_file,
                              m_edit_area->isModified ());
 
   // add the new file to the most-recently-used list
-  emit mru_add_file (m_file_name, m_encoding);
+  Q_EMIT mru_add_file (m_file_name, m_encoding);
 }
 
 // valid_file_name (file): checks whether "file" names a file.
@@ -853,7 +853,7 @@
 
               QPointer<file_editor_tab> this_fetab (this);
 
-              emit interpreter_event
+              Q_EMIT interpreter_event
                 ([this, this_fetab, octave_builtins, octave_functions] (interpreter& interp)
                  {
                    // INTERPRETER THREAD
@@ -899,7 +899,7 @@
                          api_entries.append (QString::fromStdString (afl[i]));
                      }
 
-                   emit request_add_octave_apis (api_entries);
+                   Q_EMIT request_add_octave_apis (api_entries);
                  });
             }
           else
@@ -917,7 +917,7 @@
                     m_lexer_apis->add (keyword_list.at (j));
                 }
 
-              emit api_entries_added ();
+              Q_EMIT api_entries_added ();
             }
         }
     }
@@ -992,7 +992,7 @@
   for (int idx = 0; idx < api_entries.size (); idx++)
     m_lexer_apis->add (api_entries.at (idx));
 
-  emit api_entries_added ();
+  Q_EMIT api_entries_added ();
 }
 
 void
@@ -1026,7 +1026,7 @@
   if (ID != this)
     return;
   m_edit_area->setFocus ();
-  emit edit_area_changed (m_edit_area); // update the edit area in find dlg
+  Q_EMIT edit_area_changed (m_edit_area); // update the edit area in find dlg
 }
 
 void
@@ -1128,7 +1128,7 @@
     }
 
   QFileInfo info (m_file_name);
-  emit run_file_signal (info, actual_opts);
+  Q_EMIT run_file_signal (info, actual_opts);
 }
 
 void
@@ -1243,7 +1243,7 @@
 void
 file_editor_tab::handle_request_remove_breakpoint (int line)
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, line] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1325,7 +1325,7 @@
   if (ID != this)
     return;
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1445,7 +1445,7 @@
 
   QPointer<file_editor_tab> this_fetab (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_fetab, line, cond] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1467,7 +1467,7 @@
          return;
 
        if (lineno)
-         emit maybe_remove_next (lineno);
+         Q_EMIT maybe_remove_next (lineno);
      });
 }
 
@@ -1784,14 +1784,14 @@
       tooltip = m_file_name;
     }
 
-  emit file_name_changed (title, tooltip, modified);
+  Q_EMIT file_name_changed (title, tooltip, modified);
 }
 
 void
 file_editor_tab::handle_copy_available (bool enableCopy)
 {
   m_copy_available = enableCopy;
-  emit editor_state_changed (m_copy_available, m_is_octave_file,
+  Q_EMIT editor_state_changed (m_copy_available, m_is_octave_file,
                              m_edit_area->isModified ());
 }
 
@@ -1854,11 +1854,11 @@
       else if (decision == QMessageBox::Save)
         save_file (m_file_name, remove, false);
       else
-        emit tab_ready_to_close ();
+        Q_EMIT tab_ready_to_close ();
     }
   else
     {
-      emit tab_ready_to_close ();
+      Q_EMIT tab_ready_to_close ();
     }
 
   return decision;
@@ -2093,7 +2093,7 @@
           // Reload the file with new encoding but using the same tab
           QString reload_file_name = m_file_name;  // store file name
           m_file_name = "";  // force reuse of this tab when opening a new file
-          emit request_open_file (reload_file_name, m_new_encoding);
+          Q_EMIT request_open_file (reload_file_name, m_new_encoding);
         }
     }
 
@@ -2177,7 +2177,7 @@
 
   QPointer<file_editor_tab> this_fetab (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_fetab] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -2194,7 +2194,7 @@
                 this, &file_editor_tab::update_breakpoints_handler,
                 Qt::QueuedConnection);
 
-       emit update_breakpoints_signal (argout);
+       Q_EMIT update_breakpoints_signal (argout);
      });
 }
 
@@ -2255,7 +2255,7 @@
 
       QPointer<file_editor_tab> this_fetab (this);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([this, this_fetab, base_name, file_to_save, remove_on_success, restore_breakpoints] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -2279,7 +2279,7 @@
            if (this_fetab.isNull ())
              return;
 
-           emit do_save_file_signal (file_to_save, remove_on_success,
+           Q_EMIT do_save_file_signal (file_to_save, remove_on_success,
                                      restore_breakpoints);
          });
     }
@@ -2307,7 +2307,7 @@
   // Get a list of breakpoint line numbers, before exiting debug mode
   // and clearing function in interpreter_event action below.
 
-  emit report_marker_linenr (m_bp_lines, m_bp_conditions);
+  Q_EMIT report_marker_linenr (m_bp_lines, m_bp_conditions);
 
   // get the absolute path (if existing)
   QFileInfo file_info = QFileInfo (saveFileName);
@@ -2324,7 +2324,7 @@
 
       QPointer<file_editor_tab> this_fetab (this);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([this, this_fetab, base_name, file_to_save, remove_on_success, restore_breakpoints] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -2366,7 +2366,7 @@
                // Return early if this file is not loaded in the symbol table
                if (! sym.is_defined () || ! sym.is_user_code ())
                  {
-                   emit do_save_file_signal (file_to_save, remove_on_success,
+                   Q_EMIT do_save_file_signal (file_to_save, remove_on_success,
                                              restore_breakpoints);
                    return;
                  }
@@ -2378,7 +2378,7 @@
                if (sys::canonicalize_file_name (full_name)
                    != sys::canonicalize_file_name (fcn->fcn_file_name ()))
                  {
-                   emit do_save_file_signal (file_to_save, remove_on_success,
+                   Q_EMIT do_save_file_signal (file_to_save, remove_on_success,
                                              restore_breakpoints);
                    return;
                  }
@@ -2397,7 +2397,7 @@
                  {
                    if (names(i).string_value () == std_base_name)
                      {
-                       emit confirm_dbquit_and_save_signal
+                       Q_EMIT confirm_dbquit_and_save_signal
                          (file_to_save, base_name, remove_on_success,
                           restore_breakpoints);
                        return;
@@ -2407,12 +2407,12 @@
 
            symtab.clear_user_function (std_base_name);
 
-           emit do_save_file_signal (file_to_save, remove_on_success,
+           Q_EMIT do_save_file_signal (file_to_save, remove_on_success,
                                      restore_breakpoints);
          });
     }
   else
-    emit do_save_file_signal (saveFileName, remove_on_success,
+    Q_EMIT do_save_file_signal (saveFileName, remove_on_success,
                               restore_breakpoints);
 }
 
@@ -2549,11 +2549,11 @@
       // save filename after closing file as set_file_name starts watching again
       set_file_name (full_file_to_save);   // make absolute
 
-      emit tab_ready_to_close ();
+      Q_EMIT tab_ready_to_close ();
 
       if (remove_on_success)
         {
-          emit tab_remove_request ();
+          Q_EMIT tab_remove_request ();
           return;  // Don't touch member variables after removal
         }
 
@@ -2641,7 +2641,7 @@
           if (check_valid_identifier (save_file_name))
             save_file_as (true);
           else
-            emit editor_check_conflict_save (save_file_name, true);
+            Q_EMIT editor_check_conflict_save (save_file_name, true);
         }
       else
         {
@@ -2691,7 +2691,7 @@
               if (check_valid_identifier (save_file_name))
                 save_file_as (false);
               else
-                emit editor_check_conflict_save (save_file_name, false);
+                Q_EMIT editor_check_conflict_save (save_file_name, false);
             }
 
         }
@@ -2817,7 +2817,7 @@
         {
           // give editor and this tab the focus,
           // possibly making the editor visible if it is hidden
-          emit set_focus_editor_signal (this);
+          Q_EMIT set_focus_editor_signal (this);
           m_edit_area->setFocus ();
 
           // Create a WindowModal message that blocks the edit area
@@ -2849,7 +2849,7 @@
 
       // give editor and this tab the focus,
       // possibly making the editor visible if it is hidden
-      emit set_focus_editor_signal (this);
+      Q_EMIT set_focus_editor_signal (this);
       m_edit_area->setFocus ();
 
       QString modified = "";
@@ -3071,7 +3071,7 @@
   if (ID != this)
     return;
 
-  emit editor_state_changed (m_copy_available, m_is_octave_file,
+  Q_EMIT editor_state_changed (m_copy_available, m_is_octave_file,
                              m_edit_area->isModified ());
 }
 
@@ -3116,7 +3116,7 @@
   if (ID != this || ID == nullptr)
     return;
 
-  emit remove_all_positions ();  // debugger_position, unsure_debugger_position
+  Q_EMIT remove_all_positions ();  // debugger_position, unsure_debugger_position
 
   if (line > 0)
     {
@@ -3132,7 +3132,7 @@
           // number match.
           int editor_linenr = -1;
           marker *dummy;
-          emit find_translated_line_number (line, editor_linenr, dummy);
+          Q_EMIT find_translated_line_number (line, editor_linenr, dummy);
           if (editor_linenr != -1)
             {
               // Match with an existing breakpoint.
@@ -3143,7 +3143,7 @@
             {
               int original_linenr = -1;
               editor_linenr = -1;
-              emit find_linenr_just_before (line, original_linenr, editor_linenr);
+              Q_EMIT find_linenr_just_before (line, original_linenr, editor_linenr);
               if (original_linenr >= 0)
                 {
                   // Make a guess by using an offset from the breakpoint.
@@ -3192,7 +3192,7 @@
     return;
 
   if (line > 0)
-    emit remove_position_via_debugger_linenr (line);
+    Q_EMIT remove_position_via_debugger_linenr (line);
 }
 
 void
@@ -3212,13 +3212,13 @@
 
           // If comes back indicating a nonzero breakpoint marker,
           // reuse it if possible
-          emit find_translated_line_number (line, editor_linenr, bp);
+          Q_EMIT find_translated_line_number (line, editor_linenr, bp);
           if (bp != nullptr)
             {
               if ((cond == "") != (bp->get_cond () == ""))
                 {
                   // can only reuse conditional bp as conditional
-                  emit remove_breakpoint_via_debugger_linenr (line);
+                  Q_EMIT remove_breakpoint_via_debugger_linenr (line);
                   bp = nullptr;
                 }
               else
@@ -3248,7 +3248,7 @@
             }
         }
       else
-        emit remove_breakpoint_via_debugger_linenr (line);
+        Q_EMIT remove_breakpoint_via_debugger_linenr (line);
     }
 }
 
@@ -3299,7 +3299,7 @@
   else if (m_autoc_active)
     {
       m_autoc_active = false;
-      emit autoc_closed (); // Tell editor about closed list
+      Q_EMIT autoc_closed (); // Tell editor about closed list
     }
 
   // Lines changed? Take care of indentation!
--- a/libgui/src/m-editor/file-editor-tab.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/file-editor-tab.h	Fri May 17 19:49:10 2024 -0400
@@ -68,7 +68,7 @@
   QString file_name () const { return m_file_name; }
   QString encoding () const { return m_encoding; }
 
-signals:
+Q_SIGNALS:
 
   void tab_ready_to_close ();
   void file_name_changed (const QString& fileName,
@@ -128,7 +128,7 @@
   //
   // void evaluate_octave_command (const QString& command);
 
-public slots:
+public Q_SLOTS:
 
   void update_window_title (bool modified);
   void handle_copy_available (bool enableCopy);
@@ -207,7 +207,7 @@
   void update_rowcol_indicator (int line, int col);
   void update_lexer_settings (bool update_apis_only = false);
 
-private slots:
+private Q_SLOTS:
 
   // When user closes message box for decoding problems
   void handle_decode_warning_answer (QAbstractButton *btn);
--- a/libgui/src/m-editor/file-editor.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/file-editor.cc	Fri May 17 19:49:10 2024 -0400
@@ -193,7 +193,7 @@
 
   m_run_action->setToolTip (tr ("Continue"));   // update tool tip
 
-  emit enter_debug_mode_signal ();
+  Q_EMIT enter_debug_mode_signal ();
 }
 
 void
@@ -203,7 +203,7 @@
   settings.set_shortcut (m_run_action, sc_edit_run_run_file);
   m_run_action->setToolTip (tr ("Save File and Run"));  // update tool tip
 
-  emit exit_debug_mode_signal ();
+  Q_EMIT exit_debug_mode_signal ();
 }
 
 void
@@ -251,7 +251,7 @@
   m_close_others_action->setEnabled (have_tabs && m_tab_widget->count () > 1);
   m_sort_tabs_action->setEnabled (have_tabs && m_tab_widget->count () > 1);
 
-  emit editor_tabs_changed_signal (have_tabs, m_is_octave_file);
+  Q_EMIT editor_tabs_changed_signal (have_tabs, m_is_octave_file);
 }
 
 // empty_script determines whether we have to create an empty script
@@ -535,7 +535,7 @@
 
       if (fe_tab->check_file_modified (false) == QMessageBox::Cancel)
         {
-          emit fetab_recover_from_exit ();
+          Q_EMIT fetab_recover_from_exit ();
 
           m_closing_canceled = true;
 
@@ -666,51 +666,51 @@
 void
 file_editor::request_print_file (bool)
 {
-  emit fetab_print_file (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_print_file (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_redo (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_REDO);
 }
 
 void
 file_editor::request_cut (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_CUT);
 }
 
 void
 file_editor::request_context_help (bool)
 {
-  emit fetab_context_help (m_tab_widget->currentWidget (), false);
+  Q_EMIT fetab_context_help (m_tab_widget->currentWidget (), false);
 }
 
 void
 file_editor::request_context_doc (bool)
 {
-  emit fetab_context_help (m_tab_widget->currentWidget (), true);
+  Q_EMIT fetab_context_help (m_tab_widget->currentWidget (), true);
 }
 
 void
 file_editor::request_context_edit (bool)
 {
-  emit fetab_context_edit (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_context_edit (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_save_file (bool)
 {
-  emit fetab_save_file (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_save_file (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_save_file_as (bool)
 {
-  emit fetab_save_file_as (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_save_file_as (m_tab_widget->currentWidget ());
 }
 
 void
@@ -722,7 +722,7 @@
 
   QPointer<file_editor> this_fe (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_fe, opts] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -743,9 +743,9 @@
        tree_evaluator& tw = interp.get_evaluator ();
 
        if (tw.in_debug_repl ())
-         emit request_dbcont_signal ();
+         Q_EMIT request_dbcont_signal ();
        else
-         emit fetab_run_file (m_tab_widget->currentWidget (), opts);
+         Q_EMIT fetab_run_file (m_tab_widget->currentWidget (), opts);
      });
 }
 
@@ -770,208 +770,208 @@
 void
 file_editor::request_step_into_file ()
 {
-  emit fetab_run_file (m_tab_widget->currentWidget (), ED_STEP_INTO);
+  Q_EMIT fetab_run_file (m_tab_widget->currentWidget (), ED_STEP_INTO);
 }
 
 void
 file_editor::request_context_run (bool)
 {
-  emit fetab_context_run (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_context_run (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_toggle_bookmark (bool)
 {
-  emit fetab_toggle_bookmark (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_toggle_bookmark (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_next_bookmark (bool)
 {
-  emit fetab_next_bookmark (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_next_bookmark (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_previous_bookmark (bool)
 {
-  emit fetab_previous_bookmark (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_previous_bookmark (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_remove_bookmark (bool)
 {
-  emit fetab_remove_bookmark (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_remove_bookmark (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_move_match_brace (bool)
 {
-  emit fetab_move_match_brace (m_tab_widget->currentWidget (), false);
+  Q_EMIT fetab_move_match_brace (m_tab_widget->currentWidget (), false);
 }
 
 void
 file_editor::request_sel_match_brace (bool)
 {
-  emit fetab_move_match_brace (m_tab_widget->currentWidget (), true);
+  Q_EMIT fetab_move_match_brace (m_tab_widget->currentWidget (), true);
 }
 
 // FIXME: What should this do with conditional breakpoints?
 void
 file_editor::request_toggle_breakpoint (bool)
 {
-  emit fetab_toggle_breakpoint (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_toggle_breakpoint (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_next_breakpoint (bool)
 {
-  emit fetab_next_breakpoint (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_next_breakpoint (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_previous_breakpoint (bool)
 {
-  emit fetab_previous_breakpoint (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_previous_breakpoint (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_remove_breakpoint (bool)
 {
-  emit fetab_remove_all_breakpoints (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_remove_all_breakpoints (m_tab_widget->currentWidget ());
 }
 
 // slots for Edit->Commands actions
 void
 file_editor::request_delete_start_word (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_DELWORDLEFT);
 }
 
 void
 file_editor::request_delete_end_word (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_DELWORDRIGHT);
 }
 
 void
 file_editor::request_delete_start_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_DELLINELEFT);
 }
 
 void
 file_editor::request_delete_end_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_DELLINERIGHT);
 }
 
 void
 file_editor::request_delete_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_LINEDELETE);
 }
 
 void
 file_editor::request_copy_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_LINECOPY);
 }
 
 void
 file_editor::request_cut_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_LINECUT);
 }
 
 void
 file_editor::request_duplicate_selection (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_SELECTIONDUPLICATE);
 }
 
 void
 file_editor::request_transpose_line (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_LINETRANSPOSE);
 }
 
 void
 file_editor::request_comment_selected_text (bool)
 {
-  emit fetab_comment_selected_text (m_tab_widget->currentWidget (), false);
+  Q_EMIT fetab_comment_selected_text (m_tab_widget->currentWidget (), false);
 }
 
 void
 file_editor::request_uncomment_selected_text (bool)
 {
-  emit fetab_uncomment_selected_text (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_uncomment_selected_text (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_comment_var_selected_text (bool)
 {
-  emit fetab_comment_selected_text (m_tab_widget->currentWidget (), true);
+  Q_EMIT fetab_comment_selected_text (m_tab_widget->currentWidget (), true);
 }
 
 // slots for Edit->Format actions
 void
 file_editor::request_upper_case (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_UPPERCASE);
 }
 
 void
 file_editor::request_lower_case (bool)
 {
-  emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                 QsciScintillaBase::SCI_LOWERCASE);
 }
 
 void
 file_editor::request_indent_selected_text (bool)
 {
-  emit fetab_indent_selected_text (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_indent_selected_text (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_unindent_selected_text (bool)
 {
-  emit fetab_unindent_selected_text (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_unindent_selected_text (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_smart_indent_line_or_selected_text ()
 {
-  emit fetab_smart_indent_line_or_selected_text (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_smart_indent_line_or_selected_text (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_conv_eol_windows (bool)
 {
-  emit fetab_convert_eol (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_convert_eol (m_tab_widget->currentWidget (),
                           QsciScintilla::EolWindows);
 }
 void
 file_editor::request_conv_eol_unix (bool)
 {
-  emit fetab_convert_eol (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_convert_eol (m_tab_widget->currentWidget (),
                           QsciScintilla::EolUnix);
 }
 
 void
 file_editor::request_conv_eol_mac (bool)
 {
-  emit fetab_convert_eol (m_tab_widget->currentWidget (),
+  Q_EMIT fetab_convert_eol (m_tab_widget->currentWidget (),
                           QsciScintilla::EolMac);
 }
 
@@ -1061,13 +1061,13 @@
 void
 file_editor::request_goto_line (bool)
 {
-  emit fetab_goto_line (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_goto_line (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::request_completion (bool)
 {
-  emit fetab_completion (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_completion (m_tab_widget->currentWidget ());
 }
 
 void
@@ -1136,7 +1136,7 @@
 void
 file_editor::active_tab_changed (int index)
 {
-  emit fetab_change_request (m_tab_widget->widget (index));
+  Q_EMIT fetab_change_request (m_tab_widget->widget (index));
   activate ();
 }
 
@@ -1161,7 +1161,7 @@
       m_run_action->setEnabled (is_octave_file);
       m_is_octave_file = is_octave_file;
 
-      emit editor_tabs_changed_signal (true, m_is_octave_file);
+      Q_EMIT editor_tabs_changed_signal (true, m_is_octave_file);
     }
 
   m_copy_action_enabled = m_copy_action->isEnabled ();
@@ -1245,7 +1245,7 @@
     }
 
   // Can save without conflict, have the file editor tab do so.
-  emit fetab_save_file (saveFileWidget, saveFileName, remove_on_success);
+  Q_EMIT fetab_save_file (saveFileWidget, saveFileName, remove_on_success);
 }
 
 void
@@ -1269,9 +1269,9 @@
           m_tab_widget->setCurrentWidget (tab);
 
           if (line > 0)
-            emit fetab_delete_debugger_pointer (tab, line);
-
-          emit fetab_set_focus (tab);
+            Q_EMIT fetab_delete_debugger_pointer (tab, line);
+
+          Q_EMIT fetab_set_focus (tab);
         }
     }
 }
@@ -1494,7 +1494,7 @@
     m_find_dialog->setWindowIcon (windowIcon ());
 
   // Relay signal to file editor tabs.
-  emit fetab_settings_changed ();
+  Q_EMIT fetab_settings_changed ();
 }
 
 void
@@ -1634,14 +1634,14 @@
 file_editor::update_octave_directory (const QString& dir)
 {
   m_ced = dir;
-  emit fetab_set_directory (m_ced);  // for save dialog
+  Q_EMIT fetab_set_directory (m_ced);  // for save dialog
 }
 
 void
 file_editor::copyClipboard ()
 {
   if (editor_tab_has_focus ())
-    emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+    Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                   QsciScintillaBase::SCI_COPY);
 }
 
@@ -1649,7 +1649,7 @@
 file_editor::pasteClipboard ()
 {
   if (editor_tab_has_focus ())
-    emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+    Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                   QsciScintillaBase::SCI_PASTE);
 }
 
@@ -1657,7 +1657,7 @@
 file_editor::selectAll ()
 {
   if (editor_tab_has_focus ())
-    emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+    Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                   QsciScintillaBase::SCI_SELECTALL);
 }
 
@@ -1665,7 +1665,7 @@
 file_editor::do_undo ()
 {
   if (editor_tab_has_focus ())
-    emit fetab_scintilla_command (m_tab_widget->currentWidget (),
+    Q_EMIT fetab_scintilla_command (m_tab_widget->currentWidget (),
                                   QsciScintillaBase::SCI_UNDO);
 }
 
@@ -1711,19 +1711,19 @@
           if (line > 0)
             {
               if (insert)
-                emit fetab_goto_line (tab, line);
+                Q_EMIT fetab_goto_line (tab, line);
 
               if (debug_pointer)
-                emit fetab_insert_debugger_pointer (tab, line);
+                Q_EMIT fetab_insert_debugger_pointer (tab, line);
 
               if (breakpoint_marker)
-                emit fetab_do_breakpoint_marker (insert, tab, line, cond);
+                Q_EMIT fetab_do_breakpoint_marker (insert, tab, line, cond);
             }
 
           if (show_dbg_file && ! ((breakpoint_marker || debug_pointer)
                                   && is_editor_console_tabbed ()))
             {
-              emit fetab_set_focus (tab);
+              Q_EMIT fetab_set_focus (tab);
               activate ();
             }
         }
@@ -1773,13 +1773,13 @@
               if (line > 0)
                 {
                   if (insert)
-                    emit fetab_goto_line (fileEditorTab, line);
+                    Q_EMIT fetab_goto_line (fileEditorTab, line);
 
                   if (debug_pointer)
-                    emit fetab_insert_debugger_pointer (fileEditorTab,
+                    Q_EMIT fetab_insert_debugger_pointer (fileEditorTab,
                                                         line);
                   if (breakpoint_marker)
-                    emit fetab_do_breakpoint_marker (insert, fileEditorTab,
+                    Q_EMIT fetab_do_breakpoint_marker (insert, fileEditorTab,
                                                      line, cond);
                 }
             }
@@ -1877,7 +1877,7 @@
               if (fileEditorTab)
                 fileEditorTab->update_breakpoints ();
               activate ();
-              emit file_loaded_signal ();
+              Q_EMIT file_loaded_signal ();
             }
         }
     }
@@ -1886,13 +1886,13 @@
 void
 file_editor::request_preferences (bool)
 {
-  emit request_settings_dialog ("editor");
+  Q_EMIT request_settings_dialog ("editor");
 }
 
 void
 file_editor::request_styles_preferences (bool)
 {
-  emit request_settings_dialog ("editor_styles");
+  Q_EMIT request_settings_dialog ("editor_styles");
 }
 
 void
@@ -1946,19 +1946,19 @@
 void
 file_editor::zoom_in (bool)
 {
-  emit fetab_zoom_in (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_zoom_in (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::zoom_out (bool)
 {
-  emit fetab_zoom_out (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_zoom_out (m_tab_widget->currentWidget ());
 }
 
 void
 file_editor::zoom_normal (bool)
 {
-  emit fetab_zoom_normal (m_tab_widget->currentWidget ());
+  Q_EMIT fetab_zoom_normal (m_tab_widget->currentWidget ());
 }
 
 void
@@ -2600,7 +2600,7 @@
   // Reset the focus of the tab and the related edit area
   file_editor_tab *f
     = static_cast<file_editor_tab *> (m_tab_widget->currentWidget ());
-  emit fetab_set_focus (f);
+  Q_EMIT fetab_set_focus (f);
   return f;
 }
 
@@ -2869,7 +2869,7 @@
                       global_use_custom_editor.def ()).toBool ())
     {
       // use the external editor interface for handling the call
-      emit request_open_file_external (file_name, line);
+      Q_EMIT request_open_file_external (file_name, line);
 
       if (line < 0 && ! file_name.isEmpty ())
         handle_mru_add_file (QFileInfo (file_name).canonicalFilePath (),
--- a/libgui/src/m-editor/file-editor.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/file-editor.h	Fri May 17 19:49:10 2024 -0400
@@ -126,7 +126,7 @@
   void empty_script (bool startup, bool visible);
   void restore_session (bool visible = true);
 
-signals:
+Q_SIGNALS:
 
   void fetab_settings_changed ();
   void fetab_change_request (const QWidget *ID);
@@ -194,7 +194,7 @@
 
   void show_symbol_tooltip_signal (const QPoint&, const QString&);
 
-public slots:
+public Q_SLOTS:
 
   void activate ();
   void set_focus (QWidget *fet);
@@ -305,14 +305,14 @@
 
   file_editor_tab * reset_focus ();
 
-protected slots:
+protected Q_SLOTS:
 
   void copyClipboard ();
   void pasteClipboard ();
   void selectAll ();
   void do_undo ();
 
-private slots:
+private Q_SLOTS:
 
   void request_open_file (const QString& fileName,
                           const QString& encoding = QString (),
--- a/libgui/src/m-editor/find-dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/find-dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -100,7 +100,7 @@
   //! editor position
   void restore_settings (QPoint def_pos);
 
-public slots:
+public Q_SLOTS:
 
   void find_next ();
   void find_prev ();
@@ -108,7 +108,7 @@
   //! Slot for updating the edit area when the active tab has changed
   void update_edit_area (octave_qscintilla *);
 
-private slots:
+private Q_SLOTS:
 
   void handle_sel_search_changed (int);
   void handle_selection_changed (bool has_selected);
--- a/libgui/src/m-editor/marker.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/marker.cc	Fri May 17 19:49:10 2024 -0400
@@ -80,7 +80,7 @@
       // Rather than delete editor marker directly, issue command
       // to Octave core.  Octave core should signal back to remove
       // this breakpoint via debugger line number.
-      emit request_remove (m_original_linenr);
+      Q_EMIT request_remove (m_original_linenr);
     }
 }
 
--- a/libgui/src/m-editor/marker.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/marker.h	Fri May 17 19:49:10 2024 -0400
@@ -74,11 +74,11 @@
 
   void set_cond (const QString& cond) { m_condition = cond; }
 
-signals:
+Q_SIGNALS:
 
   void request_remove (int original_linenr);
 
-public slots:
+public Q_SLOTS:
 
   void handle_remove_via_original_linenr (int original_linenr);
   void handle_request_remove_via_editor_linenr (int editor_linenr);
--- a/libgui/src/m-editor/octave-qscintilla.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Fri May 17 19:49:10 2024 -0400
@@ -229,14 +229,14 @@
   markerDefine (QsciScintilla::Minus, marker::selection);
 
   // init state of undo/redo action for this tab
-  emit status_update (isUndoAvailable (), isRedoAvailable ());
+  Q_EMIT status_update (isUndoAvailable (), isRedoAvailable ());
 }
 
 void
 octave_qscintilla::setCursorPosition (int line, int col)
 {
   QsciScintilla::setCursorPosition (line, col);
-  emit update_rowcol_indicator_signal (line, col);
+  Q_EMIT update_rowcol_indicator_signal (line, col);
 }
 
 void
@@ -286,7 +286,7 @@
 #  endif
     {
       // fill context menu with editor's standard actions
-      emit create_context_menu_signal (context_menu);
+      Q_EMIT create_context_menu_signal (context_menu);
 
       // additional custom entries of the context menu
       context_menu->addSeparator ();   // separator before custom entries
@@ -343,7 +343,7 @@
     {
       std::string name = m_word_at_cursor.toStdString ();
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([name] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -352,7 +352,7 @@
          });
     }
   else
-    emit execute_command_in_terminal_signal ("help " + m_word_at_cursor);
+    Q_EMIT execute_command_in_terminal_signal ("help " + m_word_at_cursor);
 }
 
 // call edit the function related to the current word
@@ -371,7 +371,7 @@
     {
       contextmenu_run (true);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([] (interpreter&)
           { command_editor::erase_empty_line (false); });
     }
@@ -857,7 +857,7 @@
 void
 octave_qscintilla::contextmenu_edit (bool)
 {
-  emit context_menu_edit_signal (m_word_at_cursor);
+  Q_EMIT context_menu_edit_signal (m_word_at_cursor);
 }
 
 void
@@ -943,7 +943,7 @@
     }
 
   // Add commands to the history
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([tmp_hist] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -964,7 +964,7 @@
   QPointer<octave_qscintilla> this_oq (this);
 
   // Let the interpreter execute the tmp file
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_oq, tmp_file, tmp_hist] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1052,7 +1052,7 @@
              stack.pop_back ();
 
            // Clean up before throwing the modified error.
-           emit ctx_menu_run_finished_signal (err_line,
+           Q_EMIT ctx_menu_run_finished_signal (err_line,
                                               tmp_file, tmp_hist,
                                               dbg, auto_repeat);
 
@@ -1066,7 +1066,7 @@
 
        // Clean up
 
-       emit ctx_menu_run_finished_signal (err_line,
+       Q_EMIT ctx_menu_run_finished_signal (err_line,
                                           tmp_file, tmp_hist,
                                           dbg, auto_repeat);
 
@@ -1085,7 +1085,7 @@
   (int, QPointer<QTemporaryFile> tmp_file,
    QPointer<QTemporaryFile> tmp_hist, bool dbg, bool auto_repeat)
 {
-  emit focus_console_after_command_signal ();
+  Q_EMIT focus_console_after_command_signal ();
 
   // TODO: Use line nr. (int argument) of possible error for removing
   //       lines from history that were never executed. For this,
@@ -1102,7 +1102,7 @@
   if (tmp_hist && tmp_hist->exists ())
     tmp_hist->remove ();
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([dbg, auto_repeat] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1125,7 +1125,7 @@
   int margins = marginWidth (1) + marginWidth (2) + marginWidth (3);
   local_pos = QPoint (margins + 1, local_pos.y ());
 
-  emit context_menu_break_condition_signal (lineAt (local_pos));
+  Q_EMIT context_menu_break_condition_signal (lineAt (local_pos));
 #endif
 }
 
@@ -1133,7 +1133,7 @@
 octave_qscintilla::contextmenu_break_once (const QPoint& local_pos)
 {
 #if defined (HAVE_QSCI_VERSION_2_6_0)
-  emit context_menu_break_once (lineAt (local_pos));
+  Q_EMIT context_menu_break_once (lineAt (local_pos));
 #else
   octave_unused_parameter (local_pos);
 #endif
@@ -1142,7 +1142,7 @@
 void
 octave_qscintilla::text_changed ()
 {
-  emit status_update (isUndoAvailable (), isRedoAvailable ());
+  Q_EMIT status_update (isUndoAvailable (), isRedoAvailable ());
 }
 
 void
@@ -1162,7 +1162,7 @@
 void
 octave_qscintilla::focusInEvent (QFocusEvent *focusEvent)
 {
-  emit status_update (isUndoAvailable (), isRedoAvailable ());
+  Q_EMIT status_update (isUndoAvailable (), isRedoAvailable ());
 
   QsciScintilla::focusInEvent (focusEvent);
 }
@@ -1250,7 +1250,7 @@
       QHelpEvent *help_e = static_cast<QHelpEvent *> (e);
       QString symbol = wordAtPoint (help_e->pos ());
 
-      emit show_symbol_tooltip_signal (help_e->globalPos (), symbol);
+      Q_EMIT show_symbol_tooltip_signal (help_e->globalPos (), symbol);
 
       return true;
     }
--- a/libgui/src/m-editor/octave-qscintilla.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/m-editor/octave-qscintilla.h	Fri May 17 19:49:10 2024 -0400
@@ -84,7 +84,7 @@
   void replace_all (const QString& o_str, const QString& n_str,
                     bool re, bool cs, bool wo);
 
-signals:
+Q_SIGNALS:
 
   void update_rowcol_indicator_signal (int line, int col);
   void execute_command_in_terminal_signal (const QString&);
@@ -103,12 +103,12 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void handle_enter_debug_mode ();
   void handle_exit_debug_mode ();
 
-private slots:
+private Q_SLOTS:
 
   void ctx_menu_run_finished (int, QPointer<QTemporaryFile>,
                               QPointer<QTemporaryFile>, bool, bool);
--- a/libgui/src/main-window.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/main-window.cc	Fri May 17 19:49:10 2024 -0400
@@ -180,7 +180,7 @@
 
   if (connect_to_web
       && (! last_checked.isValid () || one_day_ago > last_checked))
-    emit show_community_news_signal (serial);
+    Q_EMIT show_community_news_signal (serial);
 
   construct_octave_qt_link ();
 
@@ -193,7 +193,7 @@
 
   init_terminal_size ();
 
-  emit init_window_menu ();
+  Q_EMIT init_window_menu ();
 
   focus_command_window ();
 }
@@ -588,7 +588,7 @@
   if ((dock || m_active_dock != edit_dock_widget) && (dock != m_active_dock))
     {
       // signal to all dock widgets for updating the style
-      emit active_dock_changed (m_active_dock, dock);
+      Q_EMIT active_dock_changed (m_active_dock, dock);
 
       if (dock)
         {
@@ -601,12 +601,12 @@
       int editor = 0;
       if (edit_dock_widget == dock)
         {
-          emit editor_focus_changed (true);
+          Q_EMIT editor_focus_changed (true);
           editor = 1;
         }
       else if (edit_dock_widget == m_active_dock)
         {
-          emit editor_focus_changed (false);
+          Q_EMIT editor_focus_changed (false);
           editor = -1;
         }
 
@@ -648,7 +648,7 @@
 void
 main_window::request_reload_settings ()
 {
-  emit settings_changed ();
+  Q_EMIT settings_changed ();
 }
 
 void
@@ -674,7 +674,7 @@
 
   if (! file.isEmpty ())
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([file] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -703,7 +703,7 @@
 
   if (! file.isEmpty ())
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([file] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -726,7 +726,7 @@
     {
       std::string file = file_arg.toStdString ();
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([file] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -747,7 +747,7 @@
 void
 main_window::handle_clear_workspace_request ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -759,7 +759,7 @@
 void
 main_window::handle_clear_command_window_request ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] ()
      {
        // INTERPRETER THREAD
@@ -772,7 +772,7 @@
 void
 main_window::handle_clear_history_request ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -788,7 +788,7 @@
 {
   if (command_window_has_focus ())
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([] ()
          {
            // INTERPRETER THREAD
@@ -798,14 +798,14 @@
          });
     }
   else
-    emit undo_signal ();
+    Q_EMIT undo_signal ();
 }
 
 void
 main_window::modify_path (const QStringList& dir_list,
                           bool rm, bool subdirs)
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([dir_list, subdirs, rm] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -988,7 +988,7 @@
 
   settings.update_network_settings ();
 
-  emit active_dock_changed (nullptr, m_active_dock); // update dock widget styles
+  Q_EMIT active_dock_changed (nullptr, m_active_dock); // update dock widget styles
 
   configure_shortcuts ();
 
@@ -1128,7 +1128,7 @@
 
   if (fileInfo.exists () && fileInfo.isDir ())
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([xdir] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -1168,11 +1168,11 @@
 {
   if (m_octave_qobj.experimental_terminal_widget ())
     {
-      emit execute_command_signal (command);
+      Q_EMIT execute_command_signal (command);
     }
   else
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([command] ()
          {
            // INTERPRETER THREAD
@@ -1193,7 +1193,7 @@
 void
 main_window::run_file_in_terminal (const QFileInfo& info, int opts)
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, opts, info] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1230,7 +1230,7 @@
                cmd = cmd + function_name;
 
                if (m_octave_qobj.experimental_terminal_widget ())
-                 emit execute_command_signal (cmd);
+                 Q_EMIT execute_command_signal (cmd);
                else
                  command_editor::replace_line (cmd.toStdString ());
              }
@@ -1262,7 +1262,7 @@
 void
 main_window::handle_new_figure_request ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1299,7 +1299,7 @@
 void
 main_window::debug_continue ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1314,7 +1314,7 @@
 void
 main_window::debug_step_into ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1333,7 +1333,7 @@
     {
       // We are in debug mode, just call dbstep.
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([this] (interpreter& interp)
          {
            // INTERPRETER THREAD
@@ -1348,14 +1348,14 @@
   else
     {
       // Not in debug mode: "step into" the current editor file
-      emit step_into_file_signal ();
+      Q_EMIT step_into_file_signal ();
     }
 }
 
 void
 main_window::debug_step_out ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1370,7 +1370,7 @@
 void
 main_window::debug_quit ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1422,7 +1422,7 @@
     {
       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);
+        Q_EMIT open_file_signal (open_file_names.at (i), m_file_encoding, -1);
     }
 }
 
@@ -1430,7 +1430,7 @@
 void
 main_window::request_new_script (const QString& commands)
 {
-  emit new_file_signal (commands);
+  Q_EMIT new_file_signal (commands);
 }
 
 // Create a new function and open it
@@ -1481,7 +1481,7 @@
 
   QPointer<main_window> this_mw (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_mw, fname, ffile, curr_dir, line] (interpreter& interp)
      {
        // INTERPRETER THREAD
@@ -1559,7 +1559,7 @@
 
        if (! message.isEmpty ())
          {
-           emit warning_function_not_found_signal (message.arg (fname));
+           Q_EMIT warning_function_not_found_signal (message.arg (fname));
            return;
          }
 
@@ -1567,7 +1567,7 @@
          filename.append (".m");
 
        // default encoding
-       emit open_file_signal (filename, QString (), line);
+       Q_EMIT open_file_signal (filename, QString (), line);
      });
 }
 
@@ -1588,7 +1588,7 @@
 {
   bool cmd_focus = command_window_has_focus ();
 
-  emit insert_debugger_pointer_signal (file, line);
+  Q_EMIT insert_debugger_pointer_signal (file, line);
 
   if (cmd_focus)
     focus_command_window ();
@@ -1600,7 +1600,7 @@
 {
   bool cmd_focus = command_window_has_focus ();
 
-  emit delete_debugger_pointer_signal (file, line);
+  Q_EMIT delete_debugger_pointer_signal (file, line);
 
   if (cmd_focus)
     focus_command_window ();
@@ -1614,7 +1614,7 @@
 {
   bool cmd_focus = command_window_has_focus ();
 
-  emit update_breakpoint_marker_signal (insert, file, line, cond);
+  Q_EMIT update_breakpoint_marker_signal (insert, file, line, cond);
 
   if (cmd_focus)
     focus_command_window ();
@@ -1634,13 +1634,13 @@
       m_current_directory_combo_box->addItem (curr_dirs.at (i));
     }
 
-  emit settings_changed ();
+  Q_EMIT settings_changed ();
 }
 
 void
 main_window::init_terminal_size ()
 {
-  emit init_terminal_size_signal ();
+  Q_EMIT init_terminal_size_signal ();
 }
 
 void
@@ -1771,7 +1771,7 @@
         }
     }
   else
-    emit copyClipboard_signal ();
+    Q_EMIT copyClipboard_signal ();
 }
 
 void
@@ -1788,7 +1788,7 @@
         }
     }
   else
-    emit pasteClipboard_signal ();
+    Q_EMIT pasteClipboard_signal ();
 }
 
 void
@@ -1803,7 +1803,7 @@
         }
     }
   else
-    emit selectAll_signal ();
+    Q_EMIT selectAll_signal ();
 }
 
 void
@@ -1881,7 +1881,7 @@
 
       QPointer<main_window> this_mw (this);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([this, this_mw] (interpreter& interp)
         {
           // INTERPRETER_THREAD
@@ -1898,7 +1898,7 @@
           std::string decoded_prompt
             = command_editor::decode_prompt_string (prompt);
 
-          emit update_prompt_signal (QString::fromStdString (decoded_prompt));
+          Q_EMIT update_prompt_signal (QString::fromStdString (decoded_prompt));
         });
     }
 
@@ -1977,7 +1977,7 @@
 void
 main_window::set_screen_size (int ht, int wd)
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([ht, wd] ()
      {
        // INTERPRETER THREAD
@@ -2040,7 +2040,7 @@
 void
 main_window::profiler_session ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -2051,7 +2051,7 @@
 void
 main_window::profiler_session_resume ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -2062,7 +2062,7 @@
 void
 main_window::profiler_stop ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -2111,10 +2111,10 @@
 
       if (m_octave_qobj.experimental_terminal_widget ()
           && ! m_octave_qobj.is_gui_app ())
-        emit close_gui_signal ();
+        Q_EMIT close_gui_signal ();
       else
         {
-          emit interpreter_event
+          Q_EMIT interpreter_event
             ([] (interpreter& interp)
              {
                // INTERPRETER THREAD
@@ -2689,13 +2689,13 @@
 
   m_release_notes_action
     = news_menu->addAction (QIcon (), tr ("Release Notes"),
-                            [this] () { emit show_release_notes_signal (); });
+                            [this] () { Q_EMIT show_release_notes_signal (); });
   addAction (m_release_notes_action);
   m_release_notes_action->setShortcutContext (Qt::ApplicationShortcut);
 
   m_current_news_action
     = news_menu->addAction (QIcon (), tr ("Community News"),
-                            [this] () { emit show_community_news_signal (-1); });
+                            [this] () { Q_EMIT show_community_news_signal (-1); });
   addAction (m_current_news_action);
   m_current_news_action->setShortcutContext (Qt::ApplicationShortcut);
 }
@@ -2875,7 +2875,7 @@
   if (m_default_encoding.startsWith ("SYSTEM", Qt::CaseInsensitive))
     mfile_encoding = "SYSTEM";
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([mfile_encoding] (interpreter& interp)
      {
        // INTERPRETER THREAD
--- a/libgui/src/main-window.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/main-window.h	Fri May 17 19:49:10 2024 -0400
@@ -90,7 +90,7 @@
 
   bool confirm_shutdown ();
 
-signals:
+Q_SIGNALS:
 
   // Note: CLOSE_GUI_SIGNAL is currently only used by the new
   // experimental terminal widget.
@@ -133,7 +133,7 @@
 
   void update_prompt_signal (const QString& prompt);
 
-public slots:
+public Q_SLOTS:
 
   void focus_changed (QWidget *w_old, QWidget *w_new);
   void focus_window (const QString& win_name);
@@ -242,7 +242,7 @@
     return dock_widget_list ();
   }
 
-private slots:
+private Q_SLOTS:
 
   void disable_menu_shortcuts (bool disable);
   void restore_create_file_setting ();
--- a/libgui/src/news-reader.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/news-reader.cc	Fri May 17 19:49:10 2024 -0400
@@ -138,9 +138,9 @@
        "</body>\n"
        "</html>\n");
 
-  emit display_news_signal (html_text);
+  Q_EMIT display_news_signal (html_text);
 
-  emit finished ();
+  Q_EMIT finished ();
 }
 
 OCTAVE_END_NAMESPACE(octave)
--- a/libgui/src/news-reader.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/news-reader.h	Fri May 17 19:49:10 2024 -0400
@@ -43,13 +43,13 @@
       m_page (page), m_serial (serial), m_connect_to_web (connect_to_web)
   { }
 
-signals:
+Q_SIGNALS:
 
   void display_news_signal (const QString& news);
 
   void finished ();
 
-public slots:
+public Q_SLOTS:
 
   void process ();
 
--- a/libgui/src/octave-dock-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/octave-dock-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -259,7 +259,7 @@
 void
 octave_dock_widget::init_window_menu_entry ()
 {
-  emit active_changed (isVisible ());  // emit once for init of window menu
+  Q_EMIT active_changed (isVisible ());  // emit once for init of window menu
 }
 
 // make the widget floating
@@ -331,7 +331,7 @@
       set_style (true);
     }
 
-  emit topLevelChanged (true);  // Be sure signal is emitted
+  Q_EMIT topLevelChanged (true);  // Be sure signal is emitted
 }
 
 // dock the widget
@@ -429,7 +429,7 @@
 void
 octave_dock_widget::closeEvent (QCloseEvent *e)
 {
-  emit active_changed (false);
+  Q_EMIT active_changed (false);
   set_focus_predecessor ();
   save_settings ();
 
@@ -458,7 +458,7 @@
       if (isFloating () && parent () != 0)
         {
           m_waiting_for_mouse_button_release = false;
-          emit queue_make_window (event->type () != QEvent::MouseButtonDblClick);
+          Q_EMIT queue_make_window (event->type () != QEvent::MouseButtonDblClick);
         }
       return retval;
     }
@@ -661,7 +661,7 @@
 octave_dock_widget::change_visibility (bool)
 {
   setVisible (false);
-  emit active_changed (false);
+  Q_EMIT active_changed (false);
 }
 
 void
@@ -680,7 +680,7 @@
 {
   if (visible)
     {
-      emit active_changed (true);
+      Q_EMIT active_changed (true);
       if (! isFloating ())
         setFocus ();
     }
@@ -723,7 +723,7 @@
       // Making into a widget immediately will mangle the double-click
       // status and cause problems on followup button clicks.
       if (parent () == 0)
-        emit queue_make_widget ();
+        Q_EMIT queue_make_widget ();
     }
 }
 
--- a/libgui/src/octave-dock-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/octave-dock-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -53,7 +53,7 @@
   // the default title bar (with style sheets)
   void set_title (const QString&);
 
-protected slots:
+protected Q_SLOTS:
 
   //! Slots to handle copy & paste.
   //!@{
@@ -96,7 +96,7 @@
   void set_adopted (bool adopted = true) { m_adopted = adopted; }
   bool adopted () const { return m_adopted; }
 
-signals:
+Q_SIGNALS:
 
   //! Custom signal that tells whether a user has clicked away that dock
   //! widget, i.e. the active dock widget has changed.
@@ -115,7 +115,7 @@
 
   bool event (QEvent *event);
 
-public slots:
+public Q_SLOTS:
 
   virtual void activate ();
 
@@ -141,7 +141,7 @@
 
   void default_dock (bool not_used = false);
 
-protected slots:
+protected Q_SLOTS:
 
   virtual void toplevel_change (bool);
 
@@ -149,7 +149,7 @@
 
   bool eventFilter (QObject *obj, QEvent *e);
 
-private slots:
+private Q_SLOTS:
 
   void change_visibility (bool);
 
--- a/libgui/src/octave-qobject.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/octave-qobject.cc	Fri May 17 19:49:10 2024 -0400
@@ -151,7 +151,7 @@
     }
   catch (execution_exception& ee)
     {
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([ee] ()
          {
            // INTERPRETER THREAD
@@ -583,7 +583,7 @@
       connect (qt_link (), &qt_interpreter_events::clear_history_signal,
                m_history_widget, &history_dock_widget::clear_history);
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([] (interpreter& interp) {
           // INTERPRETER THREAD
 
@@ -623,7 +623,7 @@
       connect (m_workspace_widget,
                &workspace_view::copy_variable_value_to_clipboard,
                [this] (const QString& var_name) {
-                 emit interpreter_event
+                 Q_EMIT interpreter_event
                    ([var_name] (interpreter& interp)
                     {
                       // INTERPRETER THREAD
@@ -646,7 +646,7 @@
 
       connect (m_workspace_widget, &workspace_view::rename_variable_signal,
                [this] (const QString& old_name, const QString& new_name) {
-                 emit interpreter_event
+                 Q_EMIT interpreter_event
                    ([old_name, new_name] (interpreter& interp) {
                      // INTERPRETER THREAD
 
@@ -671,7 +671,7 @@
 
       connect (m_workspace_widget, &workspace_view::edit_variable_signal,
                [this] (const QString& var_name) {
-                 emit interpreter_event
+                 Q_EMIT interpreter_event
                    ([var_name] (interpreter& interp) {
                      // INTERPRETER THREAD
 
@@ -684,7 +684,7 @@
                    });
                });
 
-      emit interpreter_event
+      Q_EMIT interpreter_event
         ([] (interpreter& interp) {
           // INTERPRETER THREAD
 
@@ -935,7 +935,7 @@
 void
 base_qobject::execute_command (const QString& command)
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([command] (interpreter& interp)
     {
       // INTERPRETER THREAD
--- a/libgui/src/octave-qobject.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/octave-qobject.h	Fri May 17 19:49:10 2024 -0400
@@ -66,7 +66,7 @@
 
   ~octave_qapplication () { };
 
-signals:
+Q_SIGNALS:
 
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
@@ -201,7 +201,7 @@
              this, qOverload<const meth_callback&> (&base_qobject::interpreter_event));
   }
 
-public slots:
+public Q_SLOTS:
 
   void execute_command (const QString& command);
 
--- a/libgui/src/qt-interpreter-events.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/qt-interpreter-events.cc	Fri May 17 19:49:10 2024 -0400
@@ -137,14 +137,14 @@
 qt_interpreter_events::start_gui (bool gui_app)
 {
   if (m_octave_qobj.experimental_terminal_widget ())
-    emit start_gui_signal (gui_app);
+    Q_EMIT start_gui_signal (gui_app);
 }
 
 void
 qt_interpreter_events::close_gui ()
 {
   if (m_octave_qobj.experimental_terminal_widget ())
-    emit close_gui_signal ();
+    Q_EMIT close_gui_signal ();
 }
 
 std::list<std::string>
@@ -251,31 +251,31 @@
 void
 qt_interpreter_events::update_path_dialog ()
 {
-  emit update_path_dialog_signal ();
+  Q_EMIT update_path_dialog_signal ();
 }
 
 void
 qt_interpreter_events::show_preferences ()
 {
-  emit show_preferences_signal ();
+  Q_EMIT show_preferences_signal ();
 }
 
 void
 qt_interpreter_events::apply_preferences ()
 {
-  emit apply_new_settings ();
+  Q_EMIT apply_new_settings ();
 }
 
 void
 qt_interpreter_events::show_terminal_window ()
 {
-  emit show_terminal_window_signal ();
+  Q_EMIT show_terminal_window_signal ();
 }
 
 bool
 qt_interpreter_events::show_documentation (const std::string& file)
 {
-  emit show_documentation_signal (QString::fromStdString (file));
+  Q_EMIT show_documentation_signal (QString::fromStdString (file));
 
   return true;
 }
@@ -283,37 +283,37 @@
 void
 qt_interpreter_events::show_file_browser ()
 {
-  emit show_file_browser_signal ();
+  Q_EMIT show_file_browser_signal ();
 }
 
 void
 qt_interpreter_events::show_command_history ()
 {
-  emit show_command_history_signal ();
+  Q_EMIT show_command_history_signal ();
 }
 
 void
 qt_interpreter_events::show_workspace ()
 {
-  emit show_workspace_signal ();
+  Q_EMIT show_workspace_signal ();
 }
 
 void
 qt_interpreter_events::show_community_news (int serial)
 {
-  emit show_community_news_signal (serial);
+  Q_EMIT show_community_news_signal (serial);
 }
 
 void
 qt_interpreter_events::show_release_notes ()
 {
-  emit show_release_notes_signal ();
+  Q_EMIT show_release_notes_signal ();
 }
 
 bool
 qt_interpreter_events::edit_file (const std::string& file)
 {
-  emit edit_file_signal (QString::fromStdString (file));
+  Q_EMIT edit_file_signal (QString::fromStdString (file));
 
   return true;
 }
@@ -322,7 +322,7 @@
 qt_interpreter_events::edit_variable (const std::string& expr,
                                       const octave_value& val)
 {
-  emit edit_variable_signal (QString::fromStdString (expr), val);
+  Q_EMIT edit_variable_signal (QString::fromStdString (expr), val);
 }
 
 bool
@@ -330,7 +330,7 @@
 {
   QMutexLocker autolock (&m_mutex);
 
-  emit confirm_shutdown_signal ();
+  Q_EMIT confirm_shutdown_signal ();
 
   // Wait for result.
   wait ();
@@ -413,7 +413,7 @@
 {
   QMutexLocker autolock (&m_mutex);
 
-  emit get_named_icon_signal (QString::fromStdString (name));
+  Q_EMIT get_named_icon_signal (QString::fromStdString (name));
 
   // Wait for result.
   wait ();
@@ -473,7 +473,7 @@
   QMutexLocker autolock (&m_mutex);
 
   // Emit the signal for changing or getting a preference
-  emit gui_preference_signal (QString::fromStdString (key),
+  Q_EMIT gui_preference_signal (QString::fromStdString (key),
                               QString::fromStdString (value));
 
   // Wait for response (pref_value).
@@ -487,7 +487,7 @@
 bool
 qt_interpreter_events::copy_image_to_clipboard (const std::string& file)
 {
-  emit copy_image_to_clipboard_signal (QString::fromStdString (file), true);
+  Q_EMIT copy_image_to_clipboard_signal (QString::fromStdString (file), true);
 
   return true;
 }
@@ -495,25 +495,25 @@
 void
 qt_interpreter_events::focus_window (const std::string win_name)
 {
-  emit focus_window_signal (QString::fromStdString (win_name));
+  Q_EMIT focus_window_signal (QString::fromStdString (win_name));
 }
 
 void qt_interpreter_events::execute_command_in_terminal
 (const std::string& command)
 {
-  emit execute_command_in_terminal_signal (QString::fromStdString (command));
+  Q_EMIT execute_command_in_terminal_signal (QString::fromStdString (command));
 }
 
 void
 qt_interpreter_events::register_documentation (const std::string& file)
 {
-  emit register_documentation_signal (QString::fromStdString (file));
+  Q_EMIT register_documentation_signal (QString::fromStdString (file));
 }
 
 void
 qt_interpreter_events::unregister_documentation (const std::string& file)
 {
-  emit unregister_documentation_signal (QString::fromStdString (file));
+  Q_EMIT unregister_documentation_signal (QString::fromStdString (file));
 }
 
 void
@@ -521,7 +521,7 @@
 {
   if (m_octave_qobj.experimental_terminal_widget ()
       && m_octave_qobj.have_terminal_window ())
-    emit interpreter_output_signal (QString::fromStdString (msg));
+    Q_EMIT interpreter_output_signal (QString::fromStdString (msg));
   else
     {
       // FIXME: is this the correct thing to do?
@@ -539,9 +539,9 @@
       // Output the exception message
       std::ostringstream buf;
       ee.display (buf);
-      emit interpreter_output_signal (QString::fromStdString (buf.str ()));
+      Q_EMIT interpreter_output_signal (QString::fromStdString (buf.str ()));
       // Create w new command line
-      emit new_command_line_signal ();
+      Q_EMIT new_command_line_signal ();
     }
   else
     {
@@ -556,20 +556,20 @@
 qt_interpreter_events::gui_status_update (const std::string& feature,
     const std::string& status)
 {
-  emit gui_status_update_signal (QString::fromStdString (feature),
+  Q_EMIT gui_status_update_signal (QString::fromStdString (feature),
                                  QString::fromStdString (status));
 }
 
 void
 qt_interpreter_events::update_gui_lexer ()
 {
-  emit update_gui_lexer_signal (true);
+  Q_EMIT update_gui_lexer_signal (true);
 }
 
 void
 qt_interpreter_events::directory_changed (const std::string& dir)
 {
-  emit directory_changed_signal (QString::fromStdString (dir));
+  Q_EMIT directory_changed_signal (QString::fromStdString (dir));
 }
 
 void
@@ -579,7 +579,7 @@
   QMutexLocker autolock (&m_mutex);
 
   // Emit the signal for the editor for closing the file if it is open
-  emit file_remove_signal (QString::fromStdString (old_name),
+  Q_EMIT file_remove_signal (QString::fromStdString (old_name),
                            QString::fromStdString (new_name));
 
   // Wait for file removal to complete before continuing.
@@ -589,7 +589,7 @@
 void
 qt_interpreter_events::file_renamed (bool load_new)
 {
-  emit file_renamed_signal (load_new);
+  Q_EMIT file_renamed_signal (load_new);
 }
 
 void
@@ -600,22 +600,22 @@
   if (! top_level && ! debug)
     return;
 
-  emit set_workspace_signal (top_level, debug, syminfo);
+  Q_EMIT set_workspace_signal (top_level, debug, syminfo);
 
   if (update_variable_editor)
-    emit refresh_variable_editor_signal ();
+    Q_EMIT refresh_variable_editor_signal ();
 }
 
 void
 qt_interpreter_events::clear_workspace ()
 {
-  emit clear_workspace_signal ();
+  Q_EMIT clear_workspace_signal ();
 }
 
 void
 qt_interpreter_events::update_prompt (const std::string& prompt)
 {
-  emit update_prompt_signal (QString::fromStdString (prompt));
+  Q_EMIT update_prompt_signal (QString::fromStdString (prompt));
 }
 
 void
@@ -626,19 +626,19 @@
   for (octave_idx_type i = 0; i < hist.numel (); i++)
     qt_hist.append (QString::fromStdString (hist[i]));
 
-  emit set_history_signal (qt_hist);
+  Q_EMIT set_history_signal (qt_hist);
 }
 
 void
 qt_interpreter_events::append_history (const std::string& hist_entry)
 {
-  emit append_history_signal (QString::fromStdString (hist_entry));
+  Q_EMIT append_history_signal (QString::fromStdString (hist_entry));
 }
 
 void
 qt_interpreter_events::clear_history ()
 {
-  emit clear_history_signal ();
+  Q_EMIT clear_history_signal ();
 }
 
 void
@@ -659,7 +659,7 @@
 
   insert_debugger_pointer (fcn_file_name, line);
 
-  emit enter_debugger_signal ();
+  Q_EMIT enter_debugger_signal ();
 }
 
 void
@@ -672,7 +672,7 @@
 void
 qt_interpreter_events::exit_debugger_event ()
 {
-  emit exit_debugger_signal ();
+  Q_EMIT exit_debugger_signal ();
 }
 
 //! Display (if @c insert true) or remove the appropriate symbol for a
@@ -684,7 +684,7 @@
                                           int line,
                                           const std::string& cond)
 {
-  emit update_breakpoint_marker_signal (insert, QString::fromStdString (file),
+  Q_EMIT update_breakpoint_marker_signal (insert, QString::fromStdString (file),
                                         line, QString::fromStdString (cond));
 }
 
@@ -692,14 +692,14 @@
 qt_interpreter_events::insert_debugger_pointer (const std::string& file,
                                                 int line)
 {
-  emit insert_debugger_pointer_signal (QString::fromStdString (file), line);
+  Q_EMIT insert_debugger_pointer_signal (QString::fromStdString (file), line);
 }
 
 void
 qt_interpreter_events::delete_debugger_pointer (const std::string& file,
                                                 int line)
 {
-  emit delete_debugger_pointer_signal (QString::fromStdString (file), line);
+  Q_EMIT delete_debugger_pointer_signal (QString::fromStdString (file), line);
 }
 
 void
@@ -740,7 +740,7 @@
       // Change settings only for new, non-empty values
       settings.setValue (key, QVariant (adjusted_value));
 
-      emit settings_changed (true);   // true: changed by worker
+      Q_EMIT settings_changed (true);   // true: changed by worker
     }
 
   m_result = read_value;
--- a/libgui/src/qt-interpreter-events.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/qt-interpreter-events.h	Fri May 17 19:49:10 2024 -0400
@@ -209,7 +209,7 @@
 
   void wake_all () { m_waitcondition.wakeAll (); }
 
-public slots:
+public Q_SLOTS:
 
   void confirm_shutdown_octave ();
 
@@ -217,7 +217,7 @@
 
   void gui_preference_slot (const QString& key, const QString& value);
 
-signals:
+Q_SIGNALS:
 
   // Note: these signals are not currently used by the old terminal widget.
   void start_gui_signal (bool gui_app);
--- a/libgui/src/release-notes.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/release-notes.h	Fri May 17 19:49:10 2024 -0400
@@ -43,7 +43,7 @@
 
   ~release_notes () = default;
 
-public slots:
+public Q_SLOTS:
 
   void display ();
 
--- a/libgui/src/set-path-dialog.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/set-path-dialog.cc	Fri May 17 19:49:10 2024 -0400
@@ -194,7 +194,7 @@
         {
           // Use existing method mofifying load path and updating dialog
           // instead of adding string and updating load path
-          emit modify_path_signal (QStringList (dir), false, true);
+          Q_EMIT modify_path_signal (QStringList (dir), false, true);
         }
       else
         {
--- a/libgui/src/set-path-dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/set-path-dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -57,7 +57,7 @@
 
   void save_settings ();
 
-signals:
+Q_SIGNALS:
 
   //! Emitted, when the path has to be modified
 
@@ -67,7 +67,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void update_model ();
 
@@ -75,7 +75,7 @@
 
   void closeEvent (QCloseEvent *e);
 
-private slots:
+private Q_SLOTS:
 
   void add_dir ();
   void add_dir_subdirs ();
--- a/libgui/src/set-path-model.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/set-path-model.cc	Fri May 17 19:49:10 2024 -0400
@@ -79,7 +79,7 @@
 {
   std::string path_str = to_string ();
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([path_str] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -105,7 +105,7 @@
 {
   model_to_path ();
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -304,7 +304,7 @@
 
   QPointer<set_path_model> this_spm (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_spm] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -324,7 +324,7 @@
       for (const auto& dir : dir_list)
         qs_dir_list << QString::fromStdString (dir);
 
-      emit update_data_signal (qs_dir_list);
+      Q_EMIT update_data_signal (qs_dir_list);
     });
 
   m_revertible = false;
@@ -348,7 +348,7 @@
 
   int numel = m_dirs.size ();
 
-  emit dataChanged (QAbstractListModel::index (0, 0),
+  Q_EMIT dataChanged (QAbstractListModel::index (0, 0),
                     QAbstractListModel::index (numel-1, 0));
 }
 
--- a/libgui/src/set-path-model.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/set-path-model.h	Fri May 17 19:49:10 2024 -0400
@@ -70,14 +70,14 @@
 
   QVariant data (const QModelIndex& idx, int role) const;
 
-signals:
+Q_SIGNALS:
 
   void update_data_signal (const QStringList& dirs);
 
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void path_to_model ();
 
@@ -87,7 +87,7 @@
 
   void revert_last ();
 
-private slots:
+private Q_SLOTS:
 
   void update_data (const QStringList& dirs);
 
--- a/libgui/src/settings-dialog.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/settings-dialog.cc	Fri May 17 19:49:10 2024 -0400
@@ -664,7 +664,7 @@
         hide ();  // already hide here, reloading settings takes some time
 
       QMessageBox *info = wait_message_box (tr ("Applying preferences ... "), this);
-      emit apply_new_settings ();
+      Q_EMIT apply_new_settings ();
       close_wait_message_box (info);
     }
 
--- a/libgui/src/settings-dialog.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/settings-dialog.h	Fri May 17 19:49:10 2024 -0400
@@ -55,11 +55,11 @@
 
   void show_tab (const QString&);
 
-signals:
+Q_SIGNALS:
 
   void apply_new_settings ();
 
-private slots:
+private Q_SLOTS:
 
   void get_octave_dir ();
   void get_file_browser_dir ();
--- a/libgui/src/shortcuts-tree-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/shortcuts-tree-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -347,7 +347,7 @@
                                       QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
 
       if (ret == QMessageBox::Yes)
-        emit set_shortcut (other_settings_key, "");
+        Q_EMIT set_shortcut (other_settings_key, "");
       else
         return;
     }
--- a/libgui/src/shortcuts-tree-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/shortcuts-tree-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -51,7 +51,7 @@
 
   virtual void keyPressEvent (QKeyEvent *e);
 
-public slots:
+public Q_SLOTS:
 
   void handle_direct_shortcut (int);
   void handle_shift_modifier (int);
@@ -101,11 +101,11 @@
   shortcut_edit_dialog (tree_widget_shortcut_item *shortcut_item,
                         QWidget *parent = nullptr);
 
-public slots:
+public Q_SLOTS:
 
   void finished (int result);
 
-signals:
+Q_SIGNALS:
 
   void set_shortcut (const QString& settings_key,
                      const QString& settings_value);
@@ -136,7 +136,7 @@
 
   void write_settings ();
 
-public slots:
+public Q_SLOTS:
 
   void edit_selection (QTreeWidgetItem *item, int col);
 
--- a/libgui/src/tab-bar.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/tab-bar.cc	Fri May 17 19:49:10 2024 -0400
@@ -216,7 +216,7 @@
           // Middle click or double click -> close the tab
           // Make the clicked tab the current one and close it
           setCurrentIndex (clicked_idx);
-          emit close_current_tab_signal (true);
+          Q_EMIT close_current_tab_signal (true);
           // Was the closed tab before or after the previously current tab?
           // According to the result, use previous index or reduce it by one
           if (current_idx - clicked_idx > 0)
--- a/libgui/src/tab-bar.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/tab-bar.h	Fri May 17 19:49:10 2024 -0400
@@ -55,11 +55,11 @@
   QMenu * get_context_menu () { return m_context_menu; };
   QSize tabSizeHint (int idx) const;
 
-signals:
+Q_SIGNALS:
 
   void close_current_tab_signal (bool);
 
-public slots:
+public Q_SLOTS:
 
   void switch_left_tab ();
   void switch_right_tab ();
@@ -67,7 +67,7 @@
   void move_tab_right ();
   void sort_tabs_alph ();
 
-private slots:
+private Q_SLOTS:
 
   void ctx_menu_activated (QAction *a);
 
--- a/libgui/src/terminal-dock-widget.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/terminal-dock-widget.cc	Fri May 17 19:49:10 2024 -0400
@@ -167,7 +167,7 @@
 void
 terminal_dock_widget::notice_settings ()
 {
-  emit settings_changed ();
+  Q_EMIT settings_changed ();
 }
 
 void
--- a/libgui/src/terminal-dock-widget.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/terminal-dock-widget.h	Fri May 17 19:49:10 2024 -0400
@@ -65,7 +65,7 @@
   command_widget * get_command_widget ();
 #endif
 
-signals:
+Q_SIGNALS:
 
   void settings_changed ();
 
@@ -83,7 +83,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void notice_settings ();
 
--- a/libgui/src/variable-editor-model.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/variable-editor-model.cc	Fri May 17 19:49:10 2024 -0400
@@ -1007,7 +1007,7 @@
 
   QPointer<variable_editor_model> this_vem (this);
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_vem, expr, nm, idx] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -1025,7 +1025,7 @@
 
           octave_value val = retrieve_variable (interp, nm);
 
-          emit update_data_signal (val);
+          Q_EMIT update_data_signal (val);
         }
       catch (const execution_exception&)
         {
@@ -1036,7 +1036,7 @@
           // This will cause the data in the cell to be reset
           // from the cached octave_value object.
 
-          emit dataChanged (idx, idx);
+          Q_EMIT dataChanged (idx, idx);
         }
     });
 
@@ -1146,14 +1146,14 @@
     {
       octave_value val = retrieve_variable (interp, nm);
 
-      emit update_data_signal (val);
+      Q_EMIT update_data_signal (val);
     }
   catch (const execution_exception&)
     {
       QString msg = (QString ("variable '%1' is invalid or undefined")
                      .arg (QString::fromStdString (nm)));
 
-      emit data_error_signal (msg);
+      Q_EMIT data_error_signal (msg);
     }
 }
 
@@ -1162,7 +1162,7 @@
 {
   std::string expr = expr_arg.toStdString ();
 
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, expr] (interpreter& interp)
     {
       // INTERPRETER THREAD
@@ -1220,7 +1220,7 @@
 void
 variable_editor_model::evaluation_error (const std::string& expr) const
 {
-  emit user_error_signal ("Evaluation failed",
+  Q_EMIT user_error_signal ("Evaluation failed",
                           QString ("failed to evaluate expression: '%1' or result can't be edited")
                           .arg (QString::fromStdString (expr)));
 }
@@ -1234,7 +1234,7 @@
 void
 variable_editor_model::update_data_cache ()
 {
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this] (interpreter& interp)
     {
       // INTERPRETER_THREAD
@@ -1251,7 +1251,7 @@
       QString msg = (QString ("variable '%1' is invalid or undefined")
                      .arg (QString::fromStdString (name ())));
 
-      emit data_error_signal (msg);
+      Q_EMIT data_error_signal (msg);
 
       return;
     }
@@ -1274,7 +1274,7 @@
   // to display.
 
   if (new_rows > 0 && new_cols > 0)
-    emit dataChanged (QAbstractTableModel::index (0, 0),
+    Q_EMIT dataChanged (QAbstractTableModel::index (0, 0),
                       QAbstractTableModel::index (new_rows-1, new_cols-1));
 
   clear_update_pending ();
@@ -1356,7 +1356,7 @@
 
   update_description ();
 
-  emit set_editable_signal (is_editable ());
+  Q_EMIT set_editable_signal (is_editable ());
 }
 
 void
@@ -1372,7 +1372,7 @@
 void
 variable_editor_model::update_description (const QString& description)
 {
-  emit description_changed (description.isEmpty ()
+  Q_EMIT description_changed (description.isEmpty ()
                             ? make_description_text () : description);
 }
 
@@ -1382,7 +1382,7 @@
   if (requires_sub_editor (idx))
     {
       QString name = QString::fromStdString (m_rep->name ());
-      emit edit_variable_signal (name + subscript_expression (idx),
+      Q_EMIT edit_variable_signal (name + subscript_expression (idx),
                                  value_at (idx));
     }
 }
--- a/libgui/src/variable-editor-model.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/variable-editor-model.h	Fri May 17 19:49:10 2024 -0400
@@ -276,7 +276,7 @@
 
   void maybe_resize_columns (int cols);
 
-signals:
+Q_SIGNALS:
 
   void update_data_signal (const octave_value& val);
 
@@ -293,7 +293,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void update_data (const octave_value& val);
 
@@ -301,7 +301,7 @@
 
   void double_click (const QModelIndex& idx);
 
-private slots:
+private Q_SLOTS:
 
   void data_error (const QString& msg);
 
--- a/libgui/src/variable-editor.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/variable-editor.cc	Fri May 17 19:49:10 2024 -0400
@@ -275,7 +275,7 @@
             }
         }
 
-      emit variable_focused_signal (objectName ());
+      Q_EMIT variable_focused_signal (objectName ());
     }
   else if (old == focusWidget ())
     {
@@ -322,7 +322,7 @@
       m_waiting_for_mouse_button_release = false;
       bool retval = QDockWidget::event (event);
       if (isFloating ())
-        emit queue_unfloat_float ();
+        Q_EMIT queue_unfloat_float ();
       return retval;
     }
 
@@ -335,7 +335,7 @@
   hide ();
   setFloating (false);
   // Avoid a Ubunty Unity issue by queuing this rather than direct.
-  emit queue_float ();
+  Q_EMIT queue_float ();
   m_waiting_for_mouse_move = false;
   m_waiting_for_mouse_button_release = false;
 }
@@ -437,7 +437,7 @@
   if (name.endsWith (')') || name.endsWith ('}'))
     {
       name.remove (QRegularExpression {"[({][^({]*[)}]$)"});
-      emit edit_variable_signal (name, octave_value ());
+      Q_EMIT edit_variable_signal (name, octave_value ());
     }
 }
 
@@ -464,7 +464,7 @@
   QPointer<variable_editor_stack> this_ves (this);
 
   // No format given, test save default options
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([this, this_ves, format_string] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -482,7 +482,7 @@
         connect (this, &variable_editor_stack::do_save_signal,
                  this, &variable_editor_stack::do_save);
 
-        emit do_save_signal (format_string, save_opts);
+        Q_EMIT do_save_signal (format_string, save_opts);
       });
 }
 
@@ -519,7 +519,7 @@
     return; // No file selected: Just return
 
   // Let the interpreter thread do the saving
-  emit interpreter_event
+  Q_EMIT interpreter_event
     ([file, name, format] (interpreter& interp)
       {
         // INTERPRETER THREAD
@@ -643,7 +643,7 @@
     command = QString ("figure (); %1 (%2); title ('%2');")
                         .arg (cmd).arg (variable);
 
-  emit command_signal (command);
+  Q_EMIT command_signal (command);
 }
 
 void
@@ -842,7 +842,7 @@
   if (! hasFocus ())
     return;
 
-  emit command_signal (QString ("%1 = %1';").arg (objectName ()));
+  Q_EMIT command_signal (QString ("%1 = %1';").arg (objectName ()));
 }
 
 void
@@ -1068,9 +1068,9 @@
 HoverToolButton::eventFilter (QObject *obj, QEvent *ev)
 {
   if (ev->type () == QEvent::HoverEnter)
-    emit hovered_signal ();
+    Q_EMIT hovered_signal ();
   else if (ev->type () == QEvent::MouseButtonPress)
-    emit popup_shown_signal ();
+    Q_EMIT popup_shown_signal ();
 
   return QToolButton::eventFilter (obj, ev);
 }
@@ -1087,7 +1087,7 @@
 
   if (ev->type () == QEvent::MouseButtonRelease && isDown ())
     {
-      emit about_to_activate ();
+      Q_EMIT about_to_activate ();
 
       setDown (false);
       QAction *action = defaultAction ();
@@ -1111,7 +1111,7 @@
 {
   if (ev->type () == QEvent::MouseButtonRelease && underMouse ())
     {
-      emit about_to_activate ();
+      Q_EMIT about_to_activate ();
     }
 
   return QMenu::eventFilter (obj, ev);
@@ -1440,13 +1440,13 @@
 void
 variable_editor::refresh ()
 {
-  emit refresh_signal ();
+  Q_EMIT refresh_signal ();
 }
 
 void
 variable_editor::callUpdate (const QModelIndex&, const QModelIndex&)
 {
-  emit updated ();
+  Q_EMIT updated ();
 }
 
 void
@@ -1514,7 +1514,7 @@
 void
 variable_editor::closeEvent (QCloseEvent *e)
 {
-  emit finished ();
+  Q_EMIT finished ();
 
   octave_dock_widget::closeEvent (e);
 }
@@ -1592,7 +1592,7 @@
 void
 variable_editor::save ()
 {
-  emit save_signal ();
+  Q_EMIT save_signal ();
 }
 
 void
@@ -1600,27 +1600,27 @@
 {
   copyClipboard ();
 
-  emit clear_content_signal ();
+  Q_EMIT clear_content_signal ();
 }
 
 void
 variable_editor::copyClipboard ()
 {
-  emit copy_clipboard_signal ();
+  Q_EMIT copy_clipboard_signal ();
 }
 
 void
 variable_editor::pasteClipboard ()
 {
-  emit paste_clipboard_signal ();
+  Q_EMIT paste_clipboard_signal ();
 
-  emit updated ();
+  Q_EMIT updated ();
 }
 
 void
 variable_editor::levelUp ()
 {
-  emit level_up_signal ();
+  Q_EMIT level_up_signal ();
 }
 
 // Also updates the font.
--- a/libgui/src/variable-editor.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/variable-editor.h	Fri May 17 19:49:10 2024 -0400
@@ -61,7 +61,7 @@
 
   ~variable_dock_widget () = default;
 
-signals:
+Q_SIGNALS:
 
   void variable_focused_signal (const QString& name);
 
@@ -71,11 +71,11 @@
 
   void resizeEvent (QResizeEvent *event);
 
-public slots:
+public Q_SLOTS:
 
   void handle_focus_change (QWidget *old, QWidget *now);
 
-private slots:
+private Q_SLOTS:
 
   void change_floating (bool);
 
@@ -99,13 +99,13 @@
 
 // See Octave bug #53807 and https://bugreports.qt.io/browse/QTBUG-44813
 #define QTBUG_44813_FIX_VERSION 0x999999
-signals:
+Q_SIGNALS:
 
   void queue_unfloat_float ();
 
   void queue_float ();
 
-protected slots:
+protected Q_SLOTS:
 
   void unfloat_float ();
 
@@ -138,7 +138,7 @@
 
   QTextEdit * disp_view () {return m_disp_view;};
 
-signals:
+Q_SIGNALS:
 
   void edit_variable_signal (const QString& name, const octave_value& val);
 
@@ -147,7 +147,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void set_editable (bool editable);
 
@@ -178,13 +178,13 @@
 
   void setModel (QAbstractItemModel *model);
 
-signals:
+Q_SIGNALS:
 
   void command_signal (const QString& cmd);
 
   void add_edit_actions_signal (QMenu *menu, const QString& qualifier_string);
 
-public slots:
+public Q_SLOTS:
 
   void createVariable ();
 
@@ -234,7 +234,7 @@
 
   ~HoverToolButton () = default;
 
-signals:
+Q_SIGNALS:
 
   void hovered_signal ();
 
@@ -255,7 +255,7 @@
 
   ~ReturnFocusToolButton () = default;
 
-signals:
+Q_SIGNALS:
 
   void about_to_activate ();
 
@@ -274,7 +274,7 @@
 
   ~ReturnFocusMenu () = default;
 
-signals:
+Q_SIGNALS:
 
   void about_to_activate ();
 
@@ -301,7 +301,7 @@
 
   void tab_to_front ();
 
-signals:
+Q_SIGNALS:
 
   void updated ();
 
@@ -326,7 +326,7 @@
   void interpreter_event (const fcn_callback& fcn);
   void interpreter_event (const meth_callback& meth);
 
-public slots:
+public Q_SLOTS:
 
   void callUpdate (const QModelIndex&, const QModelIndex&);
 
@@ -342,7 +342,7 @@
 
   void restore_hovered_focus_variable ();
 
-protected slots:
+protected Q_SLOTS:
 
   void closeEvent (QCloseEvent *);
 
--- a/libgui/src/welcome-wizard.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/welcome-wizard.h	Fri May 17 19:49:10 2024 -0400
@@ -55,7 +55,7 @@
   int m_max_height;
   int m_max_width;
 
-public slots:
+public Q_SLOTS:
 
   void handle_web_connect_option (int state);
 
--- a/libgui/src/workspace-model.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/workspace-model.cc	Fri May 17 19:49:10 2024 -0400
@@ -283,7 +283,7 @@
 
   endResetModel ();
 
-  emit model_changed ();
+  Q_EMIT model_changed ();
 }
 
 OCTAVE_END_NAMESPACE(octave)
--- a/libgui/src/workspace-model.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/workspace-model.h	Fri May 17 19:49:10 2024 -0400
@@ -74,12 +74,12 @@
   QStringList get_symbol_names () const { return m_symbols; }
   QStringList get_symbol_values () const { return m_values; }
 
-signals:
+Q_SIGNALS:
 
   void model_changed ();
   void prompt_variable_editor ();
 
-public slots:
+public Q_SLOTS:
 
   void set_workspace (bool top_level, bool debug,
                       const symbol_info_list& syminfo);
--- a/libgui/src/workspace-view.cc	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/workspace-view.cc	Fri May 17 19:49:10 2024 -0400
@@ -422,7 +422,7 @@
   QModelIndex index = m_view->currentIndex ();
 
   if (index.isValid ())
-    emit copy_variable_value_to_clipboard (get_var_name (index));
+    Q_EMIT copy_variable_value_to_clipboard (get_var_name (index));
 }
 
 void
@@ -445,7 +445,7 @@
                                 QLineEdit::Normal, var_name, &ok);
 
       if (ok && ! new_name.isEmpty ())
-        emit rename_variable_signal (var_name, new_name);
+        Q_EMIT rename_variable_signal (var_name, new_name);
     }
 }
 
@@ -455,7 +455,7 @@
   QModelIndex index = m_view->currentIndex ();
 
   if (index.isValid ())
-    emit edit_variable_signal (get_var_name (index));
+    Q_EMIT edit_variable_signal (get_var_name (index));
 }
 
 void
@@ -533,7 +533,7 @@
       else
         var_name = get_var_name (index);
 
-      emit command_requested (cmdname + " (" + var_name + ");");
+      Q_EMIT command_requested (cmdname + " (" + var_name + ");");
     }
 }
 
--- a/libgui/src/workspace-view.h	Sat May 18 10:41:40 2024 -0400
+++ b/libgui/src/workspace-view.h	Fri May 17 19:49:10 2024 -0400
@@ -49,7 +49,7 @@
 
   ~workspace_view () = default;
 
-signals:
+Q_SIGNALS:
 
   //! Signal that user had requested a command on a variable.
 
@@ -68,7 +68,7 @@
 
   void edit_variable_signal (const QString&);
 
-public slots:
+public Q_SLOTS:
 
   void setModel (workspace_model *model);
 
@@ -76,7 +76,7 @@
 
   void save_settings ();
 
-protected slots:
+protected Q_SLOTS:
 
   void restore_header_state ();
   void filter_update (const QString& expression);
@@ -99,7 +99,7 @@
   void handle_contextmenu_stem ();
   void handle_contextmenu_filter ();
 
-public slots:
+public Q_SLOTS:
 
   void handle_model_changed ();