forked from qt-creator/qt-creator
CMake: parse remote json files
Change-Id: I2dd8e160140e6eba35b9968d5afb0953c5cfa43c Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -96,11 +96,7 @@ static QJsonDocument readJsonFile(const FilePath &filePath)
|
|||||||
qCDebug(cmakeFileApi) << "readJsonFile:" << filePath;
|
qCDebug(cmakeFileApi) << "readJsonFile:" << filePath;
|
||||||
QTC_ASSERT(!filePath.isEmpty(), return {});
|
QTC_ASSERT(!filePath.isEmpty(), return {});
|
||||||
|
|
||||||
QTC_CHECK(!filePath.needsDevice());
|
const QJsonDocument doc = QJsonDocument::fromJson(filePath.fileContents());
|
||||||
|
|
||||||
QFile file(filePath.path());
|
|
||||||
file.open(QIODevice::ReadOnly | QIODevice::Text);
|
|
||||||
const QJsonDocument doc = QJsonDocument::fromJson(file.readAll());
|
|
||||||
|
|
||||||
return doc;
|
return doc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user