From 69dd9b4ef427a697dc04a329917cdfba62c5b145 Mon Sep 17 00:00:00 2001 From: Méven Car Date: Tue, 10 Mar 2026 13:37:11 +0100 Subject: tests: prevent warnings open not checked in createFile --- src/tests/testdir.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/tests/testdir.cpp b/src/tests/testdir.cpp index 30ca6632e..453a29784 100644 --- a/src/tests/testdir.cpp +++ b/src/tests/testdir.cpp @@ -48,7 +48,9 @@ void TestDir::createFile(const QString &path, const QByteArray &data, const QDat makePathAbsoluteAndCreateParents(absolutePath); QFile f(absolutePath); - f.open(QIODevice::WriteOnly); + if (!f.open(QIODevice::WriteOnly)) { + qFatal() << "could not open" << absolutePath; + } f.write(data); f.close(); -- cgit v1.3