diff options
author | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-05-31 15:50:35 +0200 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@qt.io> | 2021-06-02 23:02:45 +0200 |
commit | 01f003f0aa4b7856932d81d6308c4183d6f374bc (patch) | |
tree | 636c6197f09fce60176627679e67f91ff333ac92 /tests/benchmarks/corelib | |
parent | ebacf425614ffd2c38e4902a122ff4a63e277706 (diff) |
Refactor createSymbolicLink() and createNtfsJunction()
Both functions now return a result object. Eliminates the need
to pass the errorMessage out-parameter. Adapt auto-tests.
Change-Id: I110b68fedc67b01f76796c44fa55383b2cc03460
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r-- | tests/benchmarks/corelib/io/qfileinfo/main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp index 3cf9709d09..65b712898b 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp +++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp @@ -94,9 +94,8 @@ void qfileinfo::symLinkTargetPerformanceMounpoint() QString rootVolume = QString::fromWCharArray(buffer); QString mountpoint = "mountpoint"; rootVolume.replace("\\\\?\\","\\??\\"); - QString errorMessage; - QVERIFY2(FileSystem::createNtfsJunction(rootVolume, mountpoint, &errorMessage) == ERROR_SUCCESS, - qPrintable(errorMessage)); + const auto result = FileSystem::createNtfsJunction(rootVolume, mountpoint); + QVERIFY2(result.dwErr == ERROR_SUCCESS, qPrintable(result.errorMessage)); QFileInfo info(mountpoint); info.setCaching(false); |