diff options
author | David Schulz <david.schulz@qt.io> | 2021-05-18 07:57:14 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2021-05-18 12:35:49 +0000 |
commit | 8b7a90ac5152823b8561cb471eeb1e023b434fb9 (patch) | |
tree | a409f506783bc809ef918e0195458f210f63a95d /src/plugins/cpptools/cppsourceprocessor.cpp | |
parent | f8ca730121b1266a452019a0272684dec63d1ab8 (diff) | |
download | qt-creator-8b7a90ac5152823b8561cb471eeb1e023b434fb9.tar.gz |
Utils: filepathify TextFileFormat
Change-Id: I6a4e2d38b0bbdec661a4a492901d9182a9f2e502
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp')
-rw-r--r-- | src/plugins/cpptools/cppsourceprocessor.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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; |