qtui: Don't create parented dialogs on the stack
authorManuel Nickschas <sputnick@quassel-irc.org>
Wed, 26 Sep 2018 22:09:26 +0000 (00:09 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 1 Oct 2018 17:06:49 +0000 (19:06 +0200)
commit4e452ee828fdb411e6b1db07c18e02681a30ff27
treeda79c677da55f1ac26702c02f9f14439b1e0e290
parent16a42dff7db80813c69527e7f44ec1ca6e6371cb
qtui: Don't create parented dialogs on the stack

Create dialogs in MainWin on the heap, rather than on the stack.
This avoids crashes when MainWin is destroyed while a dialog is
open (in which case a double free would happen).

Set the WA_DeleteOnClose attribute on affected dialogs so they will
be deleted upon close, rather than hanging around in memory until
shutdown.
src/qtui/mainwin.cpp
src/uisupport/settingspage.cpp