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: Torsten Lilge
Subject: [Octave-bug-tracker] [bug #60646] launching qt doc browser with doc function leaves temporary files
Date: Fri, 11 Jun 2021 16:28:17 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

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

[comment #14 comment #14:]
> @ttl:  So deleting a window/widget doesn't trigger a close signal?  If
closing causes other signals to be emitted, do we need to use deleteLater for
the widgets that are closed or is it safe to just delete them immediately
after calling close?

I think this is only necessary when the 'close' and 'delete' are executed in
another thread than the closeEvent. But maybe deleteLater would be the more
robust way.  


> I suppose we need to do the same for all the dock widgets that are now owned
by base_qobject?

Yes, the documentation widget was just an example I have chosen for the test.

> Is it safe to call close on a widget that is already closed?  Maybe we could
use
> 
> if (m_main_window)
>   delete m_main_window;
> else
>   {
>     if (m_documentation_widget)
>       m_documentation_widget->close ();
> 
>     if (...)
>       ...->close ();
> 
>     ...
>   }
> 
> // Or just delete?
> m_documentation_widget->deleteLater ();
> ...
> 

Since we are not setting the property Qt::WA_DeleteOnClose we have to delete
the widgets after closing (or better deleteLater). deleteLater () does not
trigger close. So we have to use to upper code but with deleting the widgets
afterwards.

There is also the destroyed signal triggered just before the widget is deleted
but I am reluctant to use this for any required actions like saving the
settings.

    _______________________________________________________

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]