sign: Delete streamStats docks before saving state
Although streamStats docks are set to delete on close, this doesn't happen immediately, so save layout state still sees them which leads to a crash next time when application is started, state is restored and docks are moved - so instead of close, delete them directly
This commit is contained in:
parent
60be43006f
commit
a6274e559e
@ -133,11 +133,12 @@ MainWindow::~MainWindow()
|
||||
|
||||
delete pgl;
|
||||
|
||||
// We don't want to save state for Stream Stats Docks - so close them
|
||||
// We don't want to save state for Stream Stats Docks - so delete them
|
||||
QList<QDockWidget*> streamStatsDocks
|
||||
= findChildren<QDockWidget*>("streamStatsDock");
|
||||
foreach(QDockWidget *dock, streamStatsDocks)
|
||||
dock->close(); // this dock is already set to delete on close
|
||||
delete dock;
|
||||
Q_ASSERT(findChildren<QDockWidget*>("streamStatsDock").size() == 0);
|
||||
|
||||
QByteArray layout = saveState(0);
|
||||
appSettings->setValue(kApplicationWindowLayout, layout);
|
||||
|
Loading…
Reference in New Issue
Block a user