aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrolstestutils/dialogstestutils_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrolstestutils/dialogstestutils_p.h')
-rw-r--r--src/quickcontrolstestutils/dialogstestutils_p.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/quickcontrolstestutils/dialogstestutils_p.h b/src/quickcontrolstestutils/dialogstestutils_p.h
index 963eb4d764..53665327e4 100644
--- a/src/quickcontrolstestutils/dialogstestutils_p.h
+++ b/src/quickcontrolstestutils/dialogstestutils_p.h
@@ -23,7 +23,7 @@
// We need these for Windows, because FolderListModel returns a lowercase drive letter; e.g.:
// "file:///c:/blah.txt", whereas other API returns "file:///C:/blah.txt".
#define COMPARE_URL(url1, url2) \
- QCOMPARE(QFileInfo(url1.toLocalFile()).absoluteFilePath(), QFileInfo(url2.toLocalFile()).absoluteFilePath());
+ QCOMPARE(QFileInfo(url1.toLocalFile()).canonicalFilePath(), QFileInfo(url2.toLocalFile()).canonicalFilePath());
// Store a copy of the arguments in case { ... } list initializer syntax is used as an argument,
// which could result in two different lists being created and passed to std::transform()
@@ -33,11 +33,11 @@
const QList<QUrl> actualUrlsCopy = actualUrls; \
QList<QString> actualPaths; \
std::transform(actualUrlsCopy.begin(), actualUrlsCopy.end(), std::back_insert_iterator(actualPaths), \
- [](const QUrl &url) { return QFileInfo(url.toLocalFile()).absoluteFilePath(); }); \
+ [](const QUrl &url) { return QFileInfo(url.toLocalFile()).canonicalFilePath(); }); \
const QList<QUrl> expectedUrlsCopy = expectedUrls; \
QList<QString> expectedPaths; \
std::transform(expectedUrlsCopy.begin(), expectedUrlsCopy.end(), std::back_insert_iterator(expectedPaths), \
- [](const QUrl &url) { return QFileInfo(url.toLocalFile()).absoluteFilePath(); }); \
+ [](const QUrl &url) { return QFileInfo(url.toLocalFile()).canonicalFilePath(); }); \
QCOMPARE(actualPaths, expectedPaths); \
}