GODT-1843: Wait for the currently running application on restart even while updating

This commit is contained in:
Romain LE JEUNE
2022-09-05 19:47:06 +02:00
parent 4e47e7ac2a
commit 5ae50047e0
16 changed files with 951 additions and 634 deletions

View File

@ -332,6 +332,7 @@ int main(int argc, char *argv[])
else
{
app().log().debug(QString("Monitoring Bridge PID : %1").arg(status.pid));
connection = QObject::connect(bridgeMonitor, &ProcessMonitor::processExited, [&](int returnCode) {
bridgeExited = true;// clazy:exclude=lambda-in-connect
qGuiApp->exit(returnCode);
@ -341,7 +342,11 @@ int main(int argc, char *argv[])
int result = 0;
if (!startError)
{
// we succeed to run the bridge so we can be set as mainExecutable.
app().grpc().setMainExecutable(QString::fromLocal8Bit(argv[0]));
result = QGuiApplication::exec();
}
QObject::disconnect(connection);
app().grpc().stopEventStreamReader();