mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 16:55:07 +02:00
fix bug which caused getValue for a non-existent key to return the integer 2
This commit is contained in:
parent
a1dc9beddb
commit
4c258b9568
2 changed files with 4 additions and 5 deletions
|
@ -70,11 +70,10 @@ namespace Setting {
|
|||
QVariant handleValue = UNSET_VALUE;
|
||||
if (handle->isSet()) {
|
||||
handleValue = handle->getVariant();
|
||||
withWriteLock([&] {
|
||||
_pendingChanges[key] = handleValue;
|
||||
});
|
||||
}
|
||||
|
||||
withWriteLock([&] {
|
||||
_pendingChanges[key] = handleValue;
|
||||
});
|
||||
}
|
||||
|
||||
static const int SAVE_INTERVAL_MSEC = 5 * 1000; // 5 sec
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace Setting {
|
|||
private:
|
||||
QHash<QString, Interface*> _handles;
|
||||
QPointer<QTimer> _saveTimer = nullptr;
|
||||
const QVariant UNSET_VALUE { QUuid::createUuid().variant() };
|
||||
const QVariant UNSET_VALUE { QUuid::createUuid() };
|
||||
QHash<QString, QVariant> _pendingChanges;
|
||||
|
||||
friend class Interface;
|
||||
|
|
Loading…
Reference in a new issue