diff libgui/src/main-window.cc @ 27039:32d9f57d7245 stable

fix missing unlock of mutex when gui editor is not present (bug #56097) * main-window.cc (file_remove_proxy): call editor methods only if editor is available; (construct): connect file_remove_signal of octave_qt_link with the related slot in main_window with the required unlock also if editor is not present
author Torsten Lilge <ttl-octave@mailbox.org>
date Wed, 10 Apr 2019 23:53:01 +0200
parents 5d1f413ff746
children 6caf75200854
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Mon Apr 08 08:22:15 2019 -0700
+++ b/libgui/src/main-window.cc	Wed Apr 10 23:53:01 2019 +0200
@@ -499,7 +499,9 @@
     m_octave_qt_link->lock ();
 
     // Close the file if opened
+#if defined (HAVE_QSCINTILLA)
     m_editor_window->handle_file_remove (o, n);
+#endif
 
     // We are done: Unlock and wake the worker thread
     m_octave_qt_link->unlock ();
@@ -1857,12 +1859,14 @@
              m_editor_window, SLOT (handle_file_renamed (bool)));
 
     // Signals for removing/renaming files/dirs in the temrinal window
+    connect (m_octave_qt_link, SIGNAL (file_renamed_signal (bool)),
+             m_editor_window, SLOT (handle_file_renamed (bool)));
+#endif
+
+    // Signals for removing/renaming files/dirs in the temrinal window
     connect (m_octave_qt_link,
              SIGNAL (file_remove_signal (const QString&, const QString&)),
              this, SLOT (file_remove_proxy (const QString&, const QString&)));
-    connect (m_octave_qt_link, SIGNAL (file_renamed_signal (bool)),
-             m_editor_window, SLOT (handle_file_renamed (bool)));
-#endif
 
     octave_link::post_event (this,
                              &main_window::resize_command_window_callback);