From ded82d1b073adb769afd28104515d240e8e1dd3f Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Mon, 31 May 2021 16:25:21 +0200 Subject: Implement QFileInfo::junctionTarget(), adjust auto-test The change in 004e3e0dc2cab4a4534d2ed3ace41aad6bfbe45d introduces Windows junction awareness, though users were still unable to resolve the junction target. This change adds the ability to solve this. Fixes: QTBUG-93869 Change-Id: I9f4d4ed87b92e757f7b6d8739e2a61b58c096f63 Reviewed-by: Volker Hilsheimer Reviewed-by: Edward Welbourne Reviewed-by: Qt CI Bot --- tests/benchmarks/corelib/io/qfileinfo/main.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/benchmarks/corelib') diff --git a/tests/benchmarks/corelib/io/qfileinfo/main.cpp b/tests/benchmarks/corelib/io/qfileinfo/main.cpp index 65b712898b..2cd06eef27 100644 --- a/tests/benchmarks/corelib/io/qfileinfo/main.cpp +++ b/tests/benchmarks/corelib/io/qfileinfo/main.cpp @@ -43,7 +43,7 @@ private slots: void existsStatic(); #if defined(Q_OS_WIN) void symLinkTargetPerformanceLNK(); - void symLinkTargetPerformanceMounpoint(); + void junctionTargetPerformanceMountpoint(); #endif void initTestCase(); void cleanupTestCase(); @@ -86,7 +86,7 @@ void qfileinfo::symLinkTargetPerformanceLNK() QVERIFY(QFile::remove("link.lnk")); } -void qfileinfo::symLinkTargetPerformanceMounpoint() +void qfileinfo::junctionTargetPerformanceMountpoint() { wchar_t buffer[MAX_PATH]; QString rootPath = QDir::toNativeSeparators(QDir::rootPath()); @@ -99,11 +99,11 @@ void qfileinfo::symLinkTargetPerformanceMounpoint() QFileInfo info(mountpoint); info.setCaching(false); - QVERIFY(info.isSymLink()); - QString linkTarget; + QVERIFY(info.isJunction()); + QString junctionTarget; QBENCHMARK { for(int i=0; i<100; i++) - linkTarget = info.symLinkTarget(); + junctionTarget = info.junctionTarget(); } QVERIFY(QDir().rmdir(mountpoint)); } -- cgit v1.2.3