From 5b1aa26e47f1c97e7a5f295bb5dbd3a35ece0fb5 Mon Sep 17 00:00:00 2001 From: Semih Yavuz Date: Thu, 9 Nov 2023 13:44:32 +0100 Subject: [PATCH] Do not use QDir::separator() in QML reformatter test That created a mix of / and \\ while building the path. Qt promises to build paths that conforms to underlying OS if we always use /. Amends ffcbbecf271d23830dbe0515586044ffc05f2fc2 Change-Id: Iebcb739cc02f0a2d6dd8953943ecfa9cf8fc9aea Reviewed-by: hjk --- tests/auto/qml/reformatter/tst_reformatter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auto/qml/reformatter/tst_reformatter.cpp b/tests/auto/qml/reformatter/tst_reformatter.cpp index 748b8b81263..d3fb69cd859 100644 --- a/tests/auto/qml/reformatter/tst_reformatter.cpp +++ b/tests/auto/qml/reformatter/tst_reformatter.cpp @@ -50,8 +50,8 @@ void tst_Reformatter::test_data() // makes a change inline, for example whitespace removal. We omit // those files in this test. QSet excludedFiles; - excludedFiles << QString::fromLatin1(TESTSRCDIR) + QDir::separator() + "typeAnnotations.qml"; - excludedFiles << QString::fromLatin1(TESTSRCDIR) + QDir::separator() + "typeAnnotations.formatted.qml"; + excludedFiles << QString::fromLatin1(TESTSRCDIR) + "/typeAnnotations.qml"; + excludedFiles << QString::fromLatin1(TESTSRCDIR) + "/typeAnnotations.formatted.qml"; QDirIterator it(TESTSRCDIR, QStringList() << QLatin1String("*.qml") << QLatin1String("*.js"), QDir::Files); while (it.hasNext()) { @@ -103,8 +103,8 @@ void tst_Reformatter::reformatter_data() QTest::addColumn("formattedFilePath"); QTest::newRow("typeAnnotations") - << QString::fromLatin1(TESTSRCDIR) + QDir::separator() + "typeAnnotations.qml" - << QString::fromLatin1(TESTSRCDIR) + QDir::separator() + "typeAnnotations.formatted.qml"; + << QString::fromLatin1(TESTSRCDIR) + "/typeAnnotations.qml" + << QString::fromLatin1(TESTSRCDIR) +"/typeAnnotations.formatted.qml"; } void tst_Reformatter::reformatter()