From 8b7a90ac5152823b8561cb471eeb1e023b434fb9 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 18 May 2021 07:57:14 +0200 Subject: Utils: filepathify TextFileFormat Change-Id: I6a4e2d38b0bbdec661a4a492901d9182a9f2e502 Reviewed-by: Qt CI Bot Reviewed-by: Eike Ziller --- src/plugins/cpptools/cppsourceprocessor.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp') diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index 7f232c1ad7..b9585f7aca 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -220,8 +220,11 @@ bool CppSourceProcessor::getFileContents(const QString &absoluteFilePath, // Get from file *revision = 0; QString error; - if (Utils::TextFileFormat::readFileUTF8(absoluteFilePath, m_defaultCodec, contents, &error) - != Utils::TextFileFormat::ReadSuccess) { + if (Utils::TextFileFormat::readFileUTF8(Utils::FilePath::fromString(absoluteFilePath), + m_defaultCodec, + contents, + &error) + != Utils::TextFileFormat::ReadSuccess) { qWarning("Error reading file \"%s\": \"%s\".", qPrintable(absoluteFilePath), qPrintable(error)); return false; -- cgit v1.2.1