Remove unused function

This commit is contained in:
Simon Walton 2018-11-13 10:18:30 -08:00
parent 6ee837d47c
commit df2bc6ba5c

View file

@ -19,34 +19,6 @@
#include <QJsonDocument>
#include <QFile>
namespace {
// Reads octree file and parses it into a QJsonDocument. Handles both gzipped and non-gzipped files.
// Returns true if the file was successfully opened and parsed, otherwise false.
// Example failures: file does not exist, gzipped file cannot be unzipped, invalid JSON.
bool readOctreeFile(QString path, QJsonDocument* doc) {
QFile file(path);
if (!file.open(QIODevice::ReadOnly)) {
qCritical() << "Cannot open json file for reading: " << path;
return false;
}
QByteArray data = file.readAll();
QByteArray jsonData;
if (!gunzip(data, jsonData)) {
jsonData = data;
}
QJsonParseError parserError;
*doc = QJsonDocument::fromJson(jsonData, &parserError);
if (parserError.error != QJsonParseError::NoError) {
qWarning() << "Error reading JSON file" << path << "-" << parserError.errorString();
}
return !doc->isNull();
}
} // Anon namespace.
bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromMap(const QVariantMap& map) {
if (map.contains("Id") && map.contains("DataVersion") && map.contains("Version")) {
id = map["Id"].toUuid();