Unimportant changes

Signals were made non-references for debugging, but that shouldn't
actually matter since Qt copies the parameters anyway.
This commit is contained in:
Dale Glass 2022-11-01 17:13:30 +01:00
parent 51e1df5e4c
commit f7ab2be173
3 changed files with 10 additions and 9 deletions

View file

@ -28,11 +28,11 @@ namespace Setting {
class Interface {
public:
const QString& getKey() const { return _key; }
bool isSet() const { return _isSet; }
bool isSet() const { return _isSet; }
virtual void setVariant(const QVariant& variant) = 0;
virtual QVariant getVariant() = 0;
protected:
Interface(const QString& key) : _key(key) {}
virtual ~Interface() = default;

View file

@ -29,13 +29,14 @@ namespace Setting {
init();
}
void WriteWorker::setValue(const QString &key, const QVariant &value) {
//qDebug() << "Setting config " << key << "to" << value;
void WriteWorker::setValue(const QString key, const QVariant value) {
//qCDebug(settings_writer) << "Setting config " << key << "to" << value;
init();
_qSettings->setValue(key, value);
}
void WriteWorker::removeKey(const QString &key) {
void WriteWorker::removeKey(const QString key) {
init();
_qSettings->remove(key);
}

View file

@ -65,14 +65,14 @@ namespace Setting {
* @param key Configuration key
* @param value Configuration value
*/
void setValue(const QString &key, const QVariant &value);
void setValue(const QString key, const QVariant value);
/**
* @brief Remove a value from the configuration
*
* @param key Key to remove
*/
void removeKey(const QString &key);
void removeKey(const QString key);
/**
* @brief Force writing the config to disk
@ -191,8 +191,8 @@ namespace Setting {
void terminateThread();
signals:
void valueChanged(const QString &key, const QVariant &value);
void keyRemoved(const QString &key);
void valueChanged(const QString key, QVariant value);
void keyRemoved(const QString key);
void syncRequested();
private: