forked from qt-creator/qt-creator
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user