mirror of
https://github.com/overte-org/overte.git
synced 2025-07-26 07:00:09 +02:00
Remove unused function
This commit is contained in:
parent
6ee837d47c
commit
df2bc6ba5c
1 changed files with 0 additions and 28 deletions
|
@ -19,34 +19,6 @@
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QFile>
|
#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) {
|
bool OctreeUtils::RawOctreeData::readOctreeDataInfoFromMap(const QVariantMap& map) {
|
||||||
if (map.contains("Id") && map.contains("DataVersion") && map.contains("Version")) {
|
if (map.contains("Id") && map.contains("DataVersion") && map.contains("Version")) {
|
||||||
id = map["Id"].toUuid();
|
id = map["Id"].toUuid();
|
||||||
|
|
Loading…
Reference in a new issue