From 335a74353f46f5e31fc94c38cee3abcd51ed9a4d Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 9 Sep 2021 12:29:22 +0200 Subject: [PATCH] CMake: parse remote json files Change-Id: I2dd8e160140e6eba35b9968d5afb0953c5cfa43c Reviewed-by: Cristian Adam --- src/plugins/cmakeprojectmanager/fileapiparser.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index 1215ef1ff79..44a8d92ba33 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -96,11 +96,7 @@ static QJsonDocument readJsonFile(const FilePath &filePath) qCDebug(cmakeFileApi) << "readJsonFile:" << filePath; QTC_ASSERT(!filePath.isEmpty(), return {}); - QTC_CHECK(!filePath.needsDevice()); - - QFile file(filePath.path()); - file.open(QIODevice::ReadOnly | QIODevice::Text); - const QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); + const QJsonDocument doc = QJsonDocument::fromJson(filePath.fileContents()); return doc; }