diff options
author | Marc Mutz <[email protected]> | 2025-02-10 21:54:07 +0100 |
---|---|---|
committer | Marc Mutz <[email protected]> | 2025-02-11 08:07:33 +0100 |
commit | 5b52814d643e2a38581850293610acc2d0ee4c69 (patch) | |
tree | 0f4ebec964076c51031f446de86ca62b72050991 /tests/benchmarks | |
parent | 8113a50d71cb9ea320e69c2b10452972e3310f4d (diff) |
BenchmarkQtJson: print errorString() on QFile::open() failure
Amends 1c3ee86f183d46709c070ccd44970e05dc70f83d.
Pick-to: 6.9 6.8 6.5
Change-Id: Iaffdbd43fc182a46e1280bc7e023083bbea4a285
Reviewed-by: Thiago Macieira <[email protected]>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/corelib/json/tst_bench_qtjson.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/benchmarks/corelib/json/tst_bench_qtjson.cpp b/tests/benchmarks/corelib/json/tst_bench_qtjson.cpp index c3eae3f2896..5a28281edf4 100644 --- a/tests/benchmarks/corelib/json/tst_bench_qtjson.cpp +++ b/tests/benchmarks/corelib/json/tst_bench_qtjson.cpp @@ -56,7 +56,7 @@ void BenchmarkQtJson::parseNumbers() QString testFile = QFINDTESTDATA("numbers.json"); QVERIFY2(!testFile.isEmpty(), "cannot find test file numbers.json!"); QFile file(testFile); - QVERIFY2(file.open(QFile::ReadOnly), "cannot open test file number.json!"); + QVERIFY2(file.open(QFile::ReadOnly), qPrintable(file.errorString())); QByteArray testJson = file.readAll(); QBENCHMARK { @@ -70,7 +70,7 @@ void BenchmarkQtJson::parseJson() QString testFile = QFINDTESTDATA("test.json"); QVERIFY2(!testFile.isEmpty(), "cannot find test file test.json!"); QFile file(testFile); - QVERIFY2(file.open(QFile::ReadOnly), "cannot open test file test.json!"); + QVERIFY2(file.open(QFile::ReadOnly), qPrintable(file.errorString())); QByteArray testJson = file.readAll(); QBENCHMARK { @@ -84,7 +84,7 @@ void BenchmarkQtJson::parseJsonToVariant() QString testFile = QFINDTESTDATA("test.json"); QVERIFY2(!testFile.isEmpty(), "cannot find test file test.json!"); QFile file(testFile); - QVERIFY2(file.open(QFile::ReadOnly), "cannot open test file test.json!"); + QVERIFY2(file.open(QFile::ReadOnly), qPrintable(file.errorString())); QByteArray testJson = file.readAll(); QBENCHMARK { |