diff options
| author | Méven Car <[email protected]> | 2026-03-10 13:37:11 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-03-11 09:53:28 +0000 |
| commit | 69dd9b4ef427a697dc04a329917cdfba62c5b145 (patch) | |
| tree | 1c9a84aaa7cc0fa728e6f2878cfeb4551dc27160 | |
| parent | 4fcf838b4610b700c8d1524dcbe7a9c2f49829fe (diff) | |
tests: prevent warnings open not checked in createFile
| -rw-r--r-- | src/tests/testdir.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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(); |
