QBenchmark: abort if we can't open the output file

Change-Id: I6391bb8e6fb0a336d1df82c30eb07ec931cfc053
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
bb10
Giuseppe D'Angelo 2024-03-22 17:32:44 +01:00
parent 3c6598c359
commit 62e91d0025
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@ bool QBenchmarkValgrindUtils::rerunThroughCallgrind(const QStringList &origAppAr
static void dumpOutput(const QByteArray &data, FILE *fh)
{
QFile file;
file.open(fh, QIODevice::WriteOnly);
if (!file.open(fh, QIODevice::WriteOnly)) {
qFatal("Could not open filehandle for dumping output: %s",
qPrintable(file.errorString()));
}
file.write(data);
}