Commit 024d1a36 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Fix KMainWindow saving incorrect widget settings

In certain cases KMainWindow::saveMainWindowSettings() could have been
called after mainwindow started destroying itself. Window settings would
be saved with incorrect child widget states. e.g. some widgets would be
saved as hidden even if they were visible before destroying.

Port of
parent 869dbdc9
......@@ -453,6 +453,10 @@ void KMainWindow::closeEvent(QCloseEvent *e)
if (queryClose()) {
// widgets will start destroying themselves at this point and we don't
// want to save state anymore after this as it might be incorrect
d->autoSaveSettings = false;
d->letDirtySettings = false;
} else {
e->ignore(); //if the window should not be closed, don't close it
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment