mirror of
https://github.com/QuasarApp/QuasarAppLib.git
synced 2025-04-26 01:34:39 +00:00
33 lines
826 B
C++
33 lines
826 B
C++
/*
|
|
* Copyright (C) 2018-2025 QuasarApp.
|
|
* Distributed under the lgplv3 software license, see the accompanying
|
|
* Everyone is permitted to copy and distribute verbatim copies
|
|
* of this license document, but changing it is not allowed.
|
|
*/
|
|
|
|
#include "isettings.h"
|
|
#include "settingslistner.h"
|
|
|
|
namespace QuasarAppUtils {
|
|
|
|
SettingsListner::SettingsListner() {
|
|
|
|
auto settings = ISettings::instance();
|
|
if (settings) {
|
|
|
|
auto listner = [this](QString key, QVariant val){
|
|
this->handleSettingsChanged(key, val);
|
|
};
|
|
|
|
_listnerConnection = QObject::connect(settings,
|
|
&ISettings::valueChanged,
|
|
listner);
|
|
}
|
|
}
|
|
|
|
SettingsListner::~SettingsListner() {
|
|
QObject::disconnect(_listnerConnection);
|
|
}
|
|
|
|
}
|