mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-26 22:57:00 +02:00
startExecutable(): Restore error handling
This commit is contained in:
parent
875a8cc11a
commit
f9de3b2ffd
@ -115,6 +115,13 @@ void startExecutable(QString name, const QStringList & args)
|
|||||||
QProcess process;
|
QProcess process;
|
||||||
process.start(name, args);
|
process.start(name, args);
|
||||||
process.waitForFinished(-1);
|
process.waitForFinished(-1);
|
||||||
|
|
||||||
|
if (process.exitStatus() != QProcess::NormalExit || process.exitCode() != 0) {
|
||||||
|
QMessageBox::critical(qApp->activeWindow(),
|
||||||
|
QObject::tr("Error starting executable"),
|
||||||
|
QObject::tr("Failed to start %1\nReason: %2").arg(name, process.errorString()));
|
||||||
|
}
|
||||||
|
|
||||||
qApp->quit();
|
qApp->quit();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user