Mercurial > octave
changeset 29749:710c2cb73c2d
allow WM to give title bar to release notes and news windows (bug #60752)
* main-window.cc (main_window::~main_window): Explicitly delete
m_release_notes_window and m_community_news_window.
(main_window::display_release_notes): Don't set main_window as parent
of m_release_notes_window widget.
(main_window::display_community_news): Don't set main_window as parent
of m_community_news_window widget.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 09 Jun 2021 09:14:43 -0400 |
parents | c9eaf405f691 |
children | 534ee1093a54 |
files | libgui/src/main-window.cc |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/main-window.cc Wed Jun 09 00:34:42 2021 -0400 +++ b/libgui/src/main-window.cc Wed Jun 09 09:14:43 2021 -0400 @@ -323,6 +323,13 @@ main_window::~main_window (void) { + // These must be explicitly deleted because they are not + // intentionally not children of main_window. See the comments in + // the functions where they are constructed. + + delete m_release_notes_window; + delete m_community_news_window; + // Prevent floating dock widgets from being deleted. if (m_history_window->isFloating ()) @@ -794,7 +801,7 @@ // a title bar, so don't its parent to main_window. Do remember // to delete in the main_window destructor. - m_release_notes_window = new QWidget (this); + m_release_notes_window = new QWidget (); QTextBrowser *browser = new QTextBrowser (m_release_notes_window); browser->setText (news); @@ -869,7 +876,7 @@ // a title bar, so don't its parent to main_window. Do remember // to delete in the main_window destructor. - m_community_news_window = new QWidget (this); + m_community_news_window = new QWidget (); QTextBrowser *browser = new QTextBrowser (m_community_news_window);