octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60646] launching qt doc browser with doc func


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #60646] launching qt doc browser with doc function leaves temporary files
Date: Tue, 15 Jun 2021 15:04:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #23, bug #60646 (project octave):

Another question:  Do we really need the following signal/slot connections now
(from main_window::construct in libgui/src/main-window.cc)?


    connect (qApp, &QApplication::aboutToQuit,
             m_command_window, &terminal_dock_widget::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_history_window, &history_dock_widget::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_file_browser_window, &files_dock_widget::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_doc_browser_window,
&documentation_dock_widget::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_workspace_window, &workspace_view::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_editor_window, &file_editor_interface::save_settings);

    connect (qApp, &QApplication::aboutToQuit,
             m_variable_editor_window, &variable_editor::save_settings);


It seems to me that now that we are able to close the main window without
exiting the application, saving the settings should be linked to something
other than the QApplication::aboutToQuit signal.

If I start Octave in command line mode with the new terminal widget enabled
and

* execute the "desktop" command
* close the desktop and return to the command line
* exit Octave

then, the only save_settings functions that are executed are for dock widgets
that remain open when Octave exits and they appear to be called twice: first
because of the connection to the QApplication::aboutToQuit signal and then
again from the base_qobject destructor when we now explicitly close them.

Now that the dock widgets and the resource manager object are both owned by
the base_qobject, it should be safe to save the settings from the dock widget
destructors because we can ensure that the resource manager object is deleted
after all the dock widgets and the main window have been deleted.

So it seems like the attached patch should work.  With it, I do see that the
settings are saved when the objects are deleted, but if I start the desktop
from the command line multiple times, the window layout seems to be lost and I
end up with only the command window open, or the command window and any dock
widgets that were undocked when the desktop was last closed (they do remain
undocked, as expected).

Is the geometry and layout info wiped out before the destructor is called? 
How?


(file #51566)
    _______________________________________________________

Additional Item Attachment:

File name: save-settings-diff.txt         Size:5 KB
    <https://file.savannah.gnu.org/file/save-settings-diff.txt?file_id=51566>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60646>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]