changeset 33033:7de59b26cf79

Backed out changeset 489026b7257b Changeset 489026b7257b was intended to fix bug #65318 but accidentally included some unrelated changes for bug #65312. It seems best to back out and start over.
author John W. Eaton <jwe@octave.org>
date Fri, 16 Feb 2024 03:09:40 -0500
parents ef4ad50ca70f
children 49128bdb9eb2
files libgui/graphics/Canvas.cc libgui/graphics/GLCanvas.cc libgui/src/command-widget.cc libgui/src/documentation.cc libgui/src/files-dock-widget.cc libgui/src/files-dock-widget.h libgui/src/m-editor/file-editor-tab.cc libgui/src/m-editor/file-editor.cc libgui/src/m-editor/octave-qscintilla.cc libgui/src/main-window.cc libgui/src/octave-dock-widget.cc libgui/src/octave-qobject.cc libgui/src/set-path-model.cc libgui/src/settings-dialog.cc libgui/src/variable-editor-model.cc libgui/src/variable-editor.cc libinterp/corefcn/call-stack.cc libinterp/corefcn/graphics.cc libinterp/corefcn/interpreter.cc libinterp/corefcn/load-path.cc libinterp/corefcn/mex.cc libinterp/dldfcn/audiodevinfo.cc libinterp/parse-tree/pt-eval.cc liboctave/array/Range.h
diffstat 24 files changed, 70 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/graphics/Canvas.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/graphics/Canvas.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -902,7 +902,7 @@
                   props.prepend (figObj.get_handle ().as_octave_value ());
 
                   emit interpreter_event
-                    ([=, this] (octave::interpreter& interp)
+                    ([=] (octave::interpreter& interp)
                      {
                        // INTERPRETER THREAD
 
--- a/libgui/graphics/GLCanvas.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/graphics/GLCanvas.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -69,7 +69,7 @@
     {
       begin_rendering ();
 
-      unwind_action reset_current ([this] () { end_rendering (); });
+      unwind_action reset_current ([=] () { end_rendering (); });
 
       graphics_object fig = go.get_ancestor ("figure");
       double dpr = fig.get ("__device_pixel_ratio__").double_value ();
@@ -94,7 +94,7 @@
 
       begin_rendering ();
 
-      unwind_action reset_current ([this] () { end_rendering (); });
+      unwind_action reset_current ([=] () { end_rendering (); });
 
       // When the figure is not visible or its size is frozen for printing,
       // we use a framebuffer object to make sure we are rendering on a
@@ -137,7 +137,7 @@
     {
       begin_rendering ();
 
-      unwind_action reset_current ([this] () { end_rendering (); });
+      unwind_action reset_current ([=] () { end_rendering (); });
 
       graphics_object fig (go.get_ancestor ("figure"));
 
@@ -174,7 +174,7 @@
     {
       begin_rendering ();
 
-      unwind_action reset_current ([this] () { end_rendering (); });
+      unwind_action reset_current ([=] () { end_rendering (); });
 
       octave::opengl_selector s (m_glfcns);
 
@@ -201,7 +201,7 @@
 
   begin_rendering ();
 
-  unwind_action reset_current ([this] () { end_rendering (); });
+  unwind_action reset_current ([=] () { end_rendering (); });
 
   m_renderer.draw_zoom_box (width (), height (),
                             p1.x (), p1.y (), p2.x (), p2.y (),
--- a/libgui/src/command-widget.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/command-widget.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -110,7 +110,7 @@
   QPointer<command_widget> this_cw (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -158,7 +158,7 @@
   QPointer<command_widget> this_cw (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
--- a/libgui/src/documentation.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/documentation.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -184,7 +184,7 @@
   QLabel *find_label = new QLabel (tr ("Find:"), find_footer);
   m_find_line_edit = new QLineEdit (find_footer);
   connect (m_find_line_edit, &QLineEdit::returnPressed,
-           this, [this] () { find (); });
+           this, [=] () { find (); });
   connect (m_find_line_edit, &QLineEdit::textEdited,
            this, &documentation::find_forward_from_anchor);
   QToolButton *forward_button = new QToolButton (find_footer);
@@ -195,7 +195,7 @@
 
   forward_button->setIcon (settings.icon ("go-down"));
   connect (forward_button, &QToolButton::pressed,
-           this, [this] () { find (); });
+           this, [=] () { find (); });
   QToolButton *backward_button = new QToolButton (find_footer);
   backward_button->setText (tr ("Search backward"));
   backward_button->setToolTip (tr ("Search backward"));
@@ -220,7 +220,7 @@
 
   m_findnext_shortcut->setContext (Qt::WidgetWithChildrenShortcut);
   connect (m_findnext_shortcut, &QShortcut::activated,
-           this, [this] () { find (); });
+           this, [=] () { find (); });
   m_findprev_shortcut->setContext (Qt::WidgetWithChildrenShortcut);
   connect (m_findprev_shortcut, &QShortcut::activated,
            this, &documentation::find_backward);
@@ -246,7 +246,7 @@
 
       connect (m_help_engine->contentWidget (),
                &QHelpContentWidget::linkActivated,
-               m_doc_browser, [this] (const QUrl& url) {
+               m_doc_browser, [=] (const QUrl& url) {
                  m_doc_browser->handle_index_clicked (url); });
 
       // Index
@@ -283,7 +283,7 @@
 #if defined (HAVE_NEW_QHELPINDEXWIDGET_API)
       connect (m_help_engine->indexWidget (),
                &QHelpIndexWidget::documentActivated,
-               this, [this] (const QHelpLink &link) {
+               this, [=] (const QHelpLink &link) {
                  m_doc_browser->handle_index_clicked (link.url); });
 #else
       connect (m_help_engine->indexWidget (),
@@ -302,7 +302,7 @@
       navi->addTab (m_bookmarks, tr ("Bookmarks"));
 
       connect (m_action_bookmark, &QAction::triggered,
-               m_bookmarks, [this] () { m_bookmarks->add_bookmark (); });
+               m_bookmarks, [=] () { m_bookmarks->add_bookmark (); });
 
       // Search
       QHelpSearchEngine *search_engine = m_help_engine->searchEngine ();
@@ -1060,7 +1060,7 @@
 {
   setOpenLinks (false);
   connect (this, &documentation_browser::anchorClicked,
-           this, [this] (const QUrl& url) { handle_index_clicked (url); });
+           this, [=] (const QUrl& url) { handle_index_clicked (url); });
 
   // Make sure we have access to one of the monospace fonts listed in
   // octave.css for rendering formated code blocks
--- a/libgui/src/files-dock-widget.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/files-dock-widget.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -315,9 +315,6 @@
   QModelIndex rootPathIndex
     = m_file_system_model->setRootPath (startup_dir.absolutePath ());
 
-  m_file_icon_provider = new QFileIconProvider ();
-  m_file_system_model->setIconProvider (m_file_icon_provider);
-
   // Attach the model to the QTreeView and set the root index
   m_file_tree_view = new FileTreeViewer (container);
   m_file_tree_view->setSelectionMode (QAbstractItemView::ExtendedSelection);
@@ -680,7 +677,7 @@
           QMenu *add_path_menu = menu.addMenu (tr ("Add to Path"));
 
           add_path_menu->addAction (tr ("Selected Directories"),
-                                    this, [this] (bool checked) { contextmenu_add_to_path (checked); });
+                                    this, [=] (bool checked) { contextmenu_add_to_path (checked); });
           add_path_menu->addAction (tr ("Selected Directories and Subdirectories"),
                                     this, &files_dock_widget::contextmenu_add_to_path_subdirs);
 
--- a/libgui/src/files-dock-widget.h	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/files-dock-widget.h	Fri Feb 16 03:09:40 2024 -0500
@@ -29,7 +29,6 @@
 #include <QAction>
 #include <QComboBox>
 #include <QDate>
-#include <QFileIconProvider>
 #include <QFileSystemModel>
 #include <QList>
 #include <QListView>
@@ -211,7 +210,6 @@
   //! The file system model.
 
   QFileSystemModel *m_file_system_model;
-  QFileIconProvider *m_file_icon_provider;
 
   //! The file system view.
   //!@{
--- a/libgui/src/m-editor/file-editor-tab.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/m-editor/file-editor-tab.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -246,7 +246,7 @@
            this, SLOT (handle_copy_available (bool)));
 
   connect (&m_file_system_watcher, &QFileSystemWatcher::fileChanged,
-           this, [this] (const QString& path) { file_has_changed (path); });
+           this, [=] (const QString& path) { file_has_changed (path); });
 
   connect (this, &file_editor_tab::maybe_remove_next,
            this, &file_editor_tab::handle_remove_next);
@@ -448,7 +448,7 @@
       QPointer<file_editor_tab> this_fetab (this);
 
       emit interpreter_event
-        ([=, this] (interpreter& interp)
+        ([=] (interpreter& interp)
          {
            // INTERPRETER THREAD
 
@@ -853,7 +853,7 @@
               QPointer<file_editor_tab> this_fetab (this);
 
               emit interpreter_event
-                ([=, this] (interpreter& interp)
+                ([=] (interpreter& interp)
                  {
                    // INTERPRETER THREAD
 
@@ -1240,7 +1240,7 @@
 file_editor_tab::handle_request_remove_breakpoint (int line)
 {
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1322,7 +1322,7 @@
     return;
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1442,7 +1442,7 @@
   QPointer<file_editor_tab> this_fetab (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -2173,7 +2173,7 @@
   QPointer<file_editor_tab> this_fetab (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -2251,7 +2251,7 @@
       QPointer<file_editor_tab> this_fetab (this);
 
       emit interpreter_event
-        ([=, this] (interpreter& interp)
+        ([=] (interpreter& interp)
          {
            // INTERPRETER THREAD
 
@@ -2320,7 +2320,7 @@
       QPointer<file_editor_tab> this_fetab (this);
 
       emit interpreter_event
-        ([=, this] (interpreter& interp)
+        ([=] (interpreter& interp)
          {
            // INTERPRETER THREAD
 
--- a/libgui/src/m-editor/file-editor.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/m-editor/file-editor.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -723,7 +723,7 @@
   QPointer<file_editor> this_fe (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -2614,7 +2614,7 @@
            this, &file_editor::handle_mru_add_file);
 
   connect (f, &file_editor_tab::request_open_file,
-           this, [this] (const QString& fname, const QString& encoding) { request_open_file (fname, encoding); });
+           this, [=] (const QString& fname, const QString& encoding) { request_open_file (fname, encoding); });
 
   connect (f, &file_editor_tab::edit_area_changed,
            this, &file_editor::edit_area_changed);
--- a/libgui/src/m-editor/octave-qscintilla.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/m-editor/octave-qscintilla.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -965,7 +965,7 @@
 
   // Let the interpreter execute the tmp file
   emit interpreter_event
-  ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
--- a/libgui/src/main-window.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/main-window.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1276,7 +1276,7 @@
 main_window::debug_continue ()
 {
   emit interpreter_event
-    ([this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1291,7 +1291,7 @@
 main_window::debug_step_into ()
 {
   emit interpreter_event
-    ([this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1310,7 +1310,7 @@
       // We are in debug mode, just call dbstep.
 
       emit interpreter_event
-        ([this] (interpreter& interp)
+        ([=] (interpreter& interp)
          {
            // INTERPRETER THREAD
 
@@ -1332,7 +1332,7 @@
 main_window::debug_step_out ()
 {
   emit interpreter_event
-    ([this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1455,7 +1455,7 @@
   QPointer<main_window> this_mw (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
      {
        // INTERPRETER THREAD
 
@@ -1855,7 +1855,7 @@
       QPointer<main_window> this_mw (this);
 
       emit interpreter_event
-        ([=, this] (interpreter& interp)
+        ([=] (interpreter& interp)
         {
           // INTERPRETER_THREAD
 
@@ -2150,7 +2150,7 @@
 
   // Default argument requires wrapper.
   connect (this, &main_window::settings_changed,
-           this, [this] () { notice_settings (); });
+           this, [=] () { notice_settings (); });
 
   // Connections for signals from the interpreter thread where the slot
   // should be executed by the gui thread
@@ -2201,7 +2201,7 @@
            this, &main_window::handle_exit_debugger);
 
   connect (qt_link, &qt_interpreter_events::show_preferences_signal,
-           this, [this] () { process_settings_dialog_request (); });
+           this, [=] () { process_settings_dialog_request (); });
 
   connect (qt_link, &qt_interpreter_events::insert_debugger_pointer_signal,
            this, &main_window::handle_insert_debugger_pointer_request);
@@ -2419,7 +2419,7 @@
                             tr ("Preferences..."));
 
   connect (m_find_files_action, &QAction::triggered,
-           this, [this] () { find_files (); });
+           this, [=] () { find_files (); });
 
   connect (m_clear_command_window_action, &QAction::triggered,
            this, &main_window::handle_clear_command_window_request);
@@ -2442,7 +2442,7 @@
 #endif
 
   connect (m_preferences_action, &QAction::triggered,
-           this, [this] () { process_settings_dialog_request (); });
+           this, [=] () { process_settings_dialog_request (); });
 
   connect (m_set_path_action, &QAction::triggered,
            this, &main_window::handle_set_path_dialog_request);
@@ -2672,7 +2672,7 @@
 
   m_release_notes_action
     = news_menu->addAction (QIcon (), tr ("Release Notes"),
-                            [this] () {
+                            [=] () {
                               emit show_release_notes_signal ();
                             });
   addAction (m_release_notes_action);
@@ -2680,7 +2680,7 @@
 
   m_current_news_action
     = news_menu->addAction (QIcon (), tr ("Community News"),
-                            [this] () {
+                            [=] () {
                               emit show_community_news_signal (-1);
                             });
   addAction (m_current_news_action);
@@ -2910,7 +2910,7 @@
   // connections so that the event loop can do what it needs to do.
   // But I haven't been able to find the magic sequence.
 
-  QTimer::singleShot (250, this, [this] () { do_reset_windows (true, true, true); });
+  QTimer::singleShot (250, this, [=] () { do_reset_windows (true, true, true); });
 }
 
 // Create the default layout of the main window. Do not use
--- a/libgui/src/octave-dock-widget.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/octave-dock-widget.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -215,7 +215,7 @@
   connect (this, &octave_dock_widget::queue_make_window,
            this, &octave_dock_widget::make_window, Qt::QueuedConnection);
   connect (this, &octave_dock_widget::queue_make_widget,
-           this, [this] () { make_widget (); }, Qt::QueuedConnection);
+           this, [=] () { make_widget (); }, Qt::QueuedConnection);
 
   gui_settings settings;
 
--- a/libgui/src/octave-qobject.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/octave-qobject.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -622,7 +622,7 @@
 
       connect (m_workspace_widget,
                &workspace_view::copy_variable_value_to_clipboard,
-               [=, this] (const QString& var_name) {
+               [=] (const QString& var_name) {
                  emit interpreter_event
                    ([=] (interpreter& interp)
                     {
@@ -645,7 +645,7 @@
                });
 
       connect (m_workspace_widget, &workspace_view::rename_variable_signal,
-               [=, this] (const QString& old_name, const QString& new_name) {
+               [=] (const QString& old_name, const QString& new_name) {
                  emit interpreter_event
                    ([=] (interpreter& interp) {
                      // INTERPRETER THREAD
@@ -670,7 +670,7 @@
                });
 
       connect (m_workspace_widget, &workspace_view::edit_variable_signal,
-               [=, this] (const QString& var_name) {
+               [=] (const QString& var_name) {
                  emit interpreter_event
                    ([=] (interpreter& interp) {
                      // INTERPRETER THREAD
--- a/libgui/src/set-path-model.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/set-path-model.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -305,7 +305,7 @@
   QPointer<set_path_model> this_spm (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
     {
       // INTERPRETER THREAD
 
--- a/libgui/src/settings-dialog.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/settings-dialog.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -579,7 +579,7 @@
       connect (cb_color_mode, &QCheckBox::stateChanged,
                this, &settings_dialog::update_editor_lexers);
       connect (pb_reload_default_colors, &QPushButton::clicked,
-               [=, this] () { update_editor_lexers (settings_reload_default_colors_flag); });
+               [=] () { update_editor_lexers (settings_reload_default_colors_flag); });
 
       // finally read the lexer colors using the update slot
       update_editor_lexers ();
@@ -1489,7 +1489,7 @@
   connect (cb_color_mode, &QCheckBox::stateChanged,
            this, &settings_dialog::update_workspace_colors);
   connect (pb_reload_default_colors, &QPushButton::clicked,
-           [=, this] () { update_workspace_colors (settings_reload_default_colors_flag); });
+           [=] () { update_workspace_colors (settings_reload_default_colors_flag); });
 }
 
 void
@@ -1604,7 +1604,7 @@
   connect (cb_color_mode, &QCheckBox::stateChanged,
            this, &settings_dialog::update_terminal_colors);
   connect (pb_reload_default_colors, &QPushButton::clicked,
-           [=, this] () { update_terminal_colors (settings_reload_default_colors_flag); });
+           [=] () { update_terminal_colors (settings_reload_default_colors_flag); });
 }
 
 void
@@ -1717,7 +1717,7 @@
   connect (cb_color_mode, &QCheckBox::stateChanged,
            this, &settings_dialog::update_varedit_colors);
   connect (pb_reload_default_colors, &QPushButton::clicked,
-           [=, this] () { update_varedit_colors (settings_reload_default_colors_flag); });
+           [=] () { update_varedit_colors (settings_reload_default_colors_flag); });
 }
 
 void
--- a/libgui/src/variable-editor-model.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/variable-editor-model.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1008,7 +1008,7 @@
   QPointer<variable_editor_model> this_vem (this);
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
     {
       // INTERPRETER THREAD
 
@@ -1163,7 +1163,7 @@
   std::string expr = expr_arg.toStdString ();
 
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
     {
       // INTERPRETER THREAD
 
@@ -1235,7 +1235,7 @@
 variable_editor_model::update_data_cache ()
 {
   emit interpreter_event
-    ([this] (interpreter& interp)
+    ([=] (interpreter& interp)
     {
       // INTERPRETER_THREAD
 
--- a/libgui/src/variable-editor.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libgui/src/variable-editor.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -465,7 +465,7 @@
 
   // No format given, test save default options
   emit interpreter_event
-    ([=, this] (interpreter& interp)
+    ([=] (interpreter& interp)
       {
         // INTERPRETER THREAD
 
--- a/libinterp/corefcn/call-stack.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/corefcn/call-stack.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1054,7 +1054,7 @@
 
       push (tmp_scope);
 
-      unwind_action restore_scope ([this] () { pop (); });
+      unwind_action restore_scope ([=] () { pop (); });
 
       interpreter& interp = m_evaluator.get_interpreter ();
 
--- a/libinterp/corefcn/graphics.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/corefcn/graphics.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -2190,7 +2190,7 @@
   // their handlevisibility property set to "callback" to be visible.
 
   octave::unwind_action executing_callbacks_cleanup
-    ([=, this] () { executing_callbacks.erase (this); });
+  ([=] () { executing_callbacks.erase (this); });
 
   if (! executing_callbacks.contains (this))
     {
--- a/libinterp/corefcn/interpreter.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/corefcn/interpreter.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -705,7 +705,8 @@
       unwind_action restore_add_hook (&load_path::set_add_hook, &m_load_path,
                                       m_load_path.get_add_hook ());
 
-      m_load_path.set_add_hook ([=, this] (const std::string& dir) { this->execute_pkg_add (dir); });
+      m_load_path.set_add_hook ([=] (const std::string& dir)
+      { this->execute_pkg_add (dir); });
 
       m_load_path.initialize (set_initial_path);
 
--- a/libinterp/corefcn/load-path.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/corefcn/load-path.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -245,8 +245,8 @@
 load_path::abs_dir_cache_type load_path::s_abs_dir_cache;
 
 load_path::load_path (interpreter& interp)
-  : m_add_hook ([this] (const std::string& dir) { this->execute_pkg_add (dir); }),
-m_remove_hook ([this] (const std::string& dir) { this->execute_pkg_del (dir); }),
+  : m_add_hook ([=] (const std::string& dir) { this->execute_pkg_add (dir); }),
+m_remove_hook ([=] (const std::string& dir) { this->execute_pkg_del (dir); }),
 m_interpreter (interp), m_package_map (), m_top_level_package (),
 m_dir_info_list (), m_init_dirs (), m_command_line_path ()
 { }
--- a/libinterp/corefcn/mex.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/corefcn/mex.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1940,7 +1940,7 @@
 
     if (current_mx_memory_resource == &the_mx_deleting_memory_resource)
       {
-        octave::unwind_action act ([this] () { maybe_disown_ptr (m_pr); });
+        octave::unwind_action act ([=] () { maybe_disown_ptr (m_pr); });
 
         return octave_value (Array<ELT_T> (ppr, dv, current_mx_memory_resource));
       }
@@ -2392,7 +2392,7 @@
 
     if (current_mx_memory_resource == &the_mx_deleting_memory_resource)
       {
-        octave::unwind_action act ([this] ()
+        octave::unwind_action act ([=] ()
         {
           maybe_disown_ptr (m_pr);
           maybe_disown_ptr (m_ir);
--- a/libinterp/dldfcn/audiodevinfo.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/dldfcn/audiodevinfo.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1136,7 +1136,7 @@
   start = get_sample_number ();
   end = get_end_sample ();
 
-  unwind_action stop_audioplayer ([this] () { stop (); });
+  unwind_action stop_audioplayer ([=] () { stop (); });
 
   for (unsigned int i = start; i < end; i += buffer_size)
     {
@@ -1816,7 +1816,7 @@
 
   unsigned int frames = seconds * get_fs ();
 
-  unwind_action stop_audiorecorder ([this] () { stop (); });
+  unwind_action stop_audiorecorder ([=] () { stop (); });
 
   for (unsigned int i = 0; i < frames; i += buffer_size)
     {
--- a/libinterp/parse-tree/pt-eval.cc	Fri Feb 16 00:58:01 2024 -0500
+++ b/libinterp/parse-tree/pt-eval.cc	Fri Feb 16 03:09:40 2024 -0500
@@ -1177,7 +1177,7 @@
                         const std::string& try_code,
                         int nargout)
 {
-  unwind_action act ([this] (std::size_t frm)
+  unwind_action act ([=] (std::size_t frm)
                      {
                        m_call_stack.restore_frame (frm);
                      }, m_call_stack.current_frame ());
@@ -1202,7 +1202,7 @@
 {
   octave_value_list retval;
 
-  unwind_action act1 ([this] (std::size_t frm)
+  unwind_action act1 ([=] (std::size_t frm)
                       {
                         m_call_stack.restore_frame (frm);
                       }, m_call_stack.current_frame ());
@@ -1429,7 +1429,7 @@
 
   m_debugger_stack.push (dbgr);
 
-  frame.add ([this] ()
+  frame.add ([=] ()
              {
                delete m_debugger_stack.top ();
                m_debugger_stack.pop ();
@@ -2017,7 +2017,7 @@
   // by getting a reference to the caller or base stack frame and
   // calling assign on that?
 
-  unwind_action act ([this] (std::size_t frm)
+  unwind_action act ([=] (std::size_t frm)
                      {
                        m_call_stack.restore_frame (frm);
                      }, m_call_stack.current_frame ());
@@ -5134,7 +5134,7 @@
           // evaluate the partial expression that the special "end"
           // token applies to in the calling stack frame.
 
-          unwind_action act ([this] (std::size_t frm)
+          unwind_action act ([=] (std::size_t frm)
                              {
                                m_call_stack.restore_frame (frm);
                              }, m_call_stack.current_frame ());
--- a/liboctave/array/Range.h	Fri Feb 16 00:58:01 2024 -0500
+++ b/liboctave/array/Range.h	Fri Feb 16 03:09:40 2024 -0500
@@ -251,7 +251,7 @@
 
         T *array = retval.rwdata ();
 
-        idx.loop (n, [=, this, &array] (octave_idx_type i)
+        idx.loop (n, [=, &array] (octave_idx_type i)
         {
           if (i == 0)
             // Required for proper NaN handling.