From 2d9d6aa315976dc8937381e453f57263950d8841 Mon Sep 17 00:00:00 2001 From: hjk Date: Thu, 9 Jan 2025 11:58:40 +0100 Subject: Utils: Rename FilePath::toString() into toUrlishString() toString() is almost always the wrong conversion, but unfortunately too easy to find and often even working at least for local setup. This here raises the bar as the non-availability of the "obvious" toString() hopefully helps people to think about the semantics of the needed conversion and choose the right toXXX() function. The chosen new name is intentional ugly to reduce the likelihood that this (still almost always wrong) function is used out of convenience. Change-Id: I57f1618dd95ef2629d7d978688d130275e096c0f Reviewed-by: Eike Ziller --- src/plugins/squish/squishxmloutputhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/squish/squishxmloutputhandler.cpp') diff --git a/src/plugins/squish/squishxmloutputhandler.cpp b/src/plugins/squish/squishxmloutputhandler.cpp index d41e4bccc8d..7a6c92beb91 100644 --- a/src/plugins/squish/squishxmloutputhandler.cpp +++ b/src/plugins/squish/squishxmloutputhandler.cpp @@ -38,7 +38,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile const QString &suiteName, QString *error) { - QFile resultsXML(resultsDirectory.pathAppended("results.xml").toString()); + QFile resultsXML(resultsDirectory.pathAppended("results.xml").toUrlishString()); if (resultsXML.exists()) { if (error) *error = Tr::tr("Could not merge results into single results.xml.\n" @@ -61,7 +61,7 @@ void SquishXmlOutputHandler::mergeResultFiles(const Utils::FilePaths &reportFile bool isFirstTest = true; QString lastEpilogTime; for (const Utils::FilePath &caseResult : reportFiles) { - QFile currentResultsFile(caseResult.toString()); + QFile currentResultsFile(caseResult.toUrlishString()); if (!currentResultsFile.exists()) continue; if (!currentResultsFile.open(QFile::ReadOnly)) -- cgit v1.2.3