diff options
| -rw-r--r-- | src/CRSMConfig.cpp | 9 | ||||
| -rw-r--r-- | src/CRSMConfig.hpp | 7 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/CRSMConfig.cpp b/src/CRSMConfig.cpp index 25f8bd1..8fe5995 100644 --- a/src/CRSMConfig.cpp +++ b/src/CRSMConfig.cpp @@ -142,14 +142,9 @@ bool CRSMConfig::write(const QString &fileName) } } -void CRSMConfig::operator()(CRSMConfig &&other) +void CRSMConfig::clear() { auto curConfigValues(configValues); - *this = other; + (*this) = CRSMConfig(); configValues = curConfigValues; } - -void CRSMConfig::clear() -{ - (*this)(CRSMConfig()); -} diff --git a/src/CRSMConfig.hpp b/src/CRSMConfig.hpp index ef77716..2d0c2e4 100644 --- a/src/CRSMConfig.hpp +++ b/src/CRSMConfig.hpp @@ -128,7 +128,10 @@ public: Type val; CRSMConfigValue<Type> configValue(val); configValue.setValue(entry); - config.append(val); + if(!config.contains(val)) + { + config.append(val); + } } virtual QStringList getValues() @@ -268,8 +271,6 @@ public: explicit CRSMConfig(); - void operator()(CRSMConfig&& other); - void setConfigValue(const QString& name, const QString& value); void addConfigListEntry(const QString& name, const QString& value); void setConfigMapValue(const QString& name, const QString& key, const QString& value); |
