summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2021-05-31 16:25:21 +0200
committerKarsten Heimrich <karsten.heimrich@qt.io>2021-06-05 01:16:06 +0200
commitded82d1b073adb769afd28104515d240e8e1dd3f (patch)
tree933acea7f79e2e21af71e9e38c37868974a87d7e /tests/benchmarks/corelib
parent0564ebdb3641d7325f73dbbf2cbb04e6dca92d83 (diff)
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 <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/benchmarks/corelib')
-rw-r--r--tests/benchmarks/corelib/io/qfileinfo/main.cpp10
1 files changed, 5 insertions, 5 deletions
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));
}