From a2b0602c5351924bf2b3d71a2d985daa26c2a762 Mon Sep 17 00:00:00 2001 From: Mathew Sutcliffe Date: Sun, 5 Jun 2016 16:22:17 +0100 Subject: [PATCH] refs #659 Fixed minor mistakes. --- src/blackmisc/datacache.h | 9 ++++++++- src/blackmisc/settingscache.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/blackmisc/datacache.h b/src/blackmisc/datacache.h index 083a3b416..06f97f5a9 100644 --- a/src/blackmisc/datacache.h +++ b/src/blackmisc/datacache.h @@ -306,8 +306,15 @@ namespace BlackMisc return CCached::set(value, timestamp); } + //! \copydoc BlackMisc::CCached::setProperty + CStatusMessage setProperty(const CPropertyIndex &index, const CVariant &value, qint64 timestamp = 0) + { + CDataCache::instance()->admitValue(Trait::key(), false); + return CCached::setProperty(index, value, timestamp); + } + //! Reset the data to its default value. - void setDefault() { this->set(Trait::defaultValue()); } + CStatusMessage setDefault() { return this->set(Trait::defaultValue()); } //! Return the file that is used for persistence for this value. QString getFilename() const { return CDataCache::filenameForKey(this->getKey()); } diff --git a/src/blackmisc/settingscache.h b/src/blackmisc/settingscache.h index 41003cd71..bff6ee737 100644 --- a/src/blackmisc/settingscache.h +++ b/src/blackmisc/settingscache.h @@ -80,7 +80,7 @@ namespace BlackMisc {} //! Reset the setting to its default value. - void setDefault() { this->set(Trait::defaultValue()); } + CStatusMessage setDefault() { return this->set(Trait::defaultValue()); } //! Return the file that is used for persistence for this value. QString getFilename() const { return CSettingsCache::filenameForKey(this->getKey()); }