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>
This commit is contained in:
David Schulz
2021-05-18 07:57:14 +02:00
parent f8ca730121
commit 8b7a90ac51
18 changed files with 94 additions and 69 deletions

View File

@@ -3836,8 +3836,11 @@ IEditor *GitClient::openShowEditor(const QString &workingDirectory, const QStrin
if (content.isEmpty())
return nullptr;
QByteArray fileContent;
if (TextFileFormat::readFileUTF8(path, nullptr, &fileContent, nullptr)
== TextFileFormat::ReadSuccess) {
if (TextFileFormat::readFileUTF8(Utils::FilePath::fromString(path),
nullptr,
&fileContent,
nullptr)
== TextFileFormat::ReadSuccess) {
if (fileContent == content)
return nullptr; // open the file for read/write
}