do not ignore the return value of system(cmd) anymore.

This commit is contained in:
2022-04-11 16:10:00 +02:00
parent 9cc1957b2d
commit 17a31dfcc4
6 changed files with 45 additions and 11 deletions

View File

@@ -123,7 +123,14 @@ PDumpOutputHandler::~PDumpOutputHandler()
#else
qDebug() << msg << Qt::endl;
#endif
system(cmd.toLatin1());
if (system(cmd.toLatin1()) == -1) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
qDebug() << "**ERROR** " << msg << " failed." << endl;
#else
qDebug() << "**ERROR** " << msg << " failed." << Qt::endl;
#endif
}
}
if (fProc) {
delete fProc;

View File

@@ -126,7 +126,13 @@ PFitOutputHandler::~PFitOutputHandler()
#else
qDebug() << msg << Qt::endl;
#endif
system(cmd.toLatin1());
if (system(cmd.toLatin1()) == -1) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
qDebug() << "**ERROR** " << msg << " - failed!" << endl;
#else
qDebug() << "**ERROR** " << msg << " - failed!" << Qt::endl;
#endif
}
}
if (fProc) {
delete fProc;