summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppsourceprocessor.cpp
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2021-05-18 07:57:14 +0200
committerDavid Schulz <david.schulz@qt.io>2021-05-18 12:35:49 +0000
commit8b7a90ac5152823b8561cb471eeb1e023b434fb9 (patch)
treea409f506783bc809ef918e0195458f210f63a95d /src/plugins/cpptools/cppsourceprocessor.cpp
parentf8ca730121b1266a452019a0272684dec63d1ab8 (diff)
downloadqt-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.cpp7
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;