mirror of
https://github.com/overte-org/overte.git
synced 2025-04-12 18:42:12 +02:00
convert old created to quint
This commit is contained in:
parent
4210d4a7cd
commit
791257bd0a
1 changed files with 7 additions and 0 deletions
|
@ -2830,6 +2830,13 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
|||
properties.setColorSpread({0, 0, 0});
|
||||
}
|
||||
|
||||
if (contentVersion < (int)EntityVersion::FixPropertiesFromCleanup) {
|
||||
if (entityMap.contains("created")) {
|
||||
quint64 created = QDateTime::fromString(entityMap["created"].toString().trimmed(), Qt::ISODate).toMSecsSinceEpoch() * 1000;
|
||||
properties.setCreated(created);
|
||||
}
|
||||
}
|
||||
|
||||
EntityItemPointer entity = addEntity(entityItemID, properties);
|
||||
if (!entity) {
|
||||
qCDebug(entities) << "adding Entity failed:" << entityItemID << properties.getType();
|
||||
|
|
Loading…
Reference in a new issue