Fix MainWindow not propagating close events to docked widgets
Nested FloatingWindows already supported it, so make it consistent. Personal take: In a non-docking world, users can override their main window close event and prevent a close, to save a document or such. However, in a docking world, the main window developer won't know which widgets are docked, so forwarding needs to happen, as some might have documents to save.
This commit is contained in:
@@ -2989,8 +2989,11 @@ void TestDocks::tst_preventClose()
|
||||
fw->close();
|
||||
QVERIFY(dock1->isVisible());
|
||||
|
||||
dock1->deleteLater();
|
||||
QVERIFY(Testing::waitForDeleted(dock1));
|
||||
// Put into a main window
|
||||
auto m = createMainWindow();
|
||||
m->addDockWidget(dock1, KDDockWidgets::Location_OnRight);
|
||||
m->close();
|
||||
QVERIFY(dock1->isVisible());
|
||||
}
|
||||
|
||||
void TestDocks::tst_propagateMinSize()
|
||||
|
||||
Reference in New Issue
Block a user