diff options
Diffstat (limited to 'sigscript')
-rw-r--r-- | sigscript/Config.cpp | 9 | ||||
-rw-r--r-- | sigscript/Config.h | 4 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sigscript/Config.cpp b/sigscript/Config.cpp index fd8fe069..c591285f 100644 --- a/sigscript/Config.cpp +++ b/sigscript/Config.cpp @@ -40,25 +40,22 @@ void Sigscript::Config::addValue(const QString& name, const QVariant& value, con void Sigscript::Config::setValue(const QString& name, const QVariant& value, const Options options) { QWriteLocker locker(&m_lock); - QVariant oldValue = m_values[name].first; m_values[name] = Value(value, options); - emit(valueChanged(name, oldValue, value)); + emit(valueChanged(name, value)); } void Sigscript::Config::setOptions(const QString& name, const Options options) { QWriteLocker locker(&m_lock); - const Options oldOptions = m_values[name].second; m_values[name].second |= options; - emit(optionsChanged(name, oldOptions, options)); + emit(optionsChanged(name, options)); } void Sigscript::Config::unsetOptions(const QString& name, const Options options) { QWriteLocker locker(&m_lock); - const Options oldOptions = m_values[name].second; m_values[name].second |= ~options; - emit(optionsChanged(name, oldOptions, options)); + emit(optionsChanged(name, options)); } void Sigscript::Config::removeValue(const QString& name, const bool shadow) diff --git a/sigscript/Config.h b/sigscript/Config.h index 49e83c2d..d102777e 100644 --- a/sigscript/Config.h +++ b/sigscript/Config.h @@ -67,8 +67,8 @@ class SIGSCRIPT_EXPORT Config : public QObject Q_SCRIPTABLE QStringList values(const bool recursive = false) const; signals: void valueAdded(const QString& name, const QVariant& value); - void valueChanged(const QString& name, const QVariant& oldValue, const QVariant& newValue); - void optionsChanged(const QString& name, const Options oldOptions, const Options newOptions); + void valueChanged(const QString& name, const QVariant& newValue); + void optionsChanged(const QString& name, const Options newOptions); void valueRemoved(const QString& name); public slots: void addValue(const QString& name, const QVariant& value, const Options options = 0); |