mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:43:45 +02:00
Fix mysterious UUID issue
Turned out to be a remainant of previous code that stopped working correctly due to the changes
This commit is contained in:
parent
24d4f87341
commit
20548b7b24
2 changed files with 14 additions and 7 deletions
|
@ -136,14 +136,23 @@ namespace Setting {
|
||||||
|
|
||||||
void Manager::saveSetting(Interface* handle) {
|
void Manager::saveSetting(Interface* handle) {
|
||||||
const auto& key = handle->getKey();
|
const auto& key = handle->getKey();
|
||||||
QVariant handleValue = UNSET_VALUE;
|
|
||||||
if (handle->isSet()) {
|
if (handle->isSet()) {
|
||||||
handleValue = handle->getVariant();
|
QVariant handleValue = handle->getVariant();
|
||||||
|
|
||||||
|
withWriteLock([&] {
|
||||||
|
_settings[key] = handleValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
emit valueChanged(key, handleValue);
|
||||||
|
} else {
|
||||||
|
withWriteLock([&] {
|
||||||
|
_settings.remove(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
emit keyRemoved(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
withWriteLock([&] {
|
|
||||||
_settings[key] = handleValue;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -210,8 +210,6 @@ namespace Setting {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QHash<QString, Interface*> _handles;
|
QHash<QString, Interface*> _handles;
|
||||||
const QVariant UNSET_VALUE { QUuid::createUuid() };
|
|
||||||
|
|
||||||
|
|
||||||
friend class Interface;
|
friend class Interface;
|
||||||
friend class ::SettingsTests;
|
friend class ::SettingsTests;
|
||||||
|
|
Loading…
Reference in a new issue