Squish: Avoid crash

The SquishControlBar becomes unexpectedly parent of the
critical error message box.
If the runner stops e.g. with a broken connection to the
server due to license issues the stop triggers a shutdown
of the server which in turn destructs the control bar, but
this crashes due to the message box.
Use the "real" main window instead which also corrects the
positioning of the message box.

Change-Id: I8ec3a100a51761169d8820175196dfc84b092410
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2022-09-12 13:43:15 +02:00
parent cc3ec2dab8
commit 0d7bbb8480

View File

@@ -338,7 +338,7 @@ void SquishTools::setState(SquishTools::State state)
QDir(m_suitePath).dirName(),
&error);
if (!error.isEmpty())
QMessageBox::critical(Core::ICore::dialogParent(), Tr::tr("Error"), error);
QMessageBox::critical(Core::ICore::mainWindow(), Tr::tr("Error"), error);
logrotateTestResults();
} else {
m_xmlOutputHandler->clearForNextRun();