-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.8
-
None
It looks like on macOS the Native Dialogs keep running even when the parent Qt dialog is already destroyed. The error was found by following code
tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp:
void tst_QColorDialog::noCrashWhenParentIsDeleted()
{
QPointer<QWidget> mainWindow = new QWidget();
QTimer::singleShot(1000, mainWindow, [mainWindow]
{ if (mainWindow.get()) mainWindow->deleteLater(); });
const QColor color = QColorDialog::getColor(QColor::fromRgba(0xffffffff), mainWindow.get(),
QString(), QColorDialog::ShowAlphaChannel);
QVERIFY(!color.isValid());
QVERIFY(!mainWindow.get());
}
Actual test-case result:
agent:2024/09/12 07:57:10 build.go:404: 515: === End of stack trace === agent:2024/09/12 07:57:10 build.go:404: 515: QFATAL : tst_QColorDialog::noCrashWhenParentIsDeleted() Test function timed out agent:2024/09/12 07:57:10 build.go:404: 515: FAIL! : tst_QColorDialog::noCrashWhenParentIsDeleted() Received a fatal error. agent:2024/09/12 07:57:10 build.go:404: 515: Totals: 5 passed, 1 failed, 0 skipped, 0 blacklisted, 309598ms
NOTE:
To prevent current problem we are setting the QColorDialog::DontUseNativeDialog option for noCrashWhenParentIsDeleted() test-cases.