Don't crash when using LayoutSaver with MDI
It's not supported but it shouldn't crash. For #352, leaving it open still, as the reporter actually experiences an assert, not a segfault. To be investigated further
This commit is contained in:
@@ -7797,6 +7797,11 @@ void TestDocks::tst_addMDIDockWidget()
|
||||
auto m = createMainWindow(QSize(800, 500), MainWindowOption_MDI);
|
||||
auto dock0 = createDockWidget("dock0", new MyWidget2(QSize(400, 400)));
|
||||
qobject_cast<MDILayoutWidget *>(m->layoutWidget())->addDockWidget(dock0, QPoint(0, 0), {});
|
||||
|
||||
// MDI doesn't support LayoutSaver yet, but it was crashing, so add a test
|
||||
// to catch further crashes
|
||||
LayoutSaver saver;
|
||||
const QByteArray saved = saver.serializeLayout();
|
||||
}
|
||||
|
||||
void TestDocks::tst_redockToMDIRestoresPosition()
|
||||
|
||||
Reference in New Issue
Block a user