Library migration #36

Merged
dorian merged 62 commits from library_migration into master 2024-10-17 17:52:36 +02:00
3 changed files with 14 additions and 2 deletions
Showing only changes of commit 7e64d166ab - Show all commits

View file

@ -35,6 +35,18 @@ public:
return QMetaEnum::fromType<AppInternalSetting>().valueToKey(key); return QMetaEnum::fromType<AppInternalSetting>().valueToKey(key);
} }
static QVariant::Type keyToType(int key) {
QMap<AppInternalSetting, QVariant::Type> types = {
{AppThemeSetting, QVariant::String},
{BaseStationIpSetting, QVariant::String}
};
if(types.contains(AppInternalSetting(key)))
return types[AppInternalSetting(key)];
return QVariant::Invalid;
}
signals: signals:
public slots: public slots:

@ -1 +1 @@
Subproject commit 150b33b483547b1e8df49eb9bb5b149da0b29a0e Subproject commit d982bafab14b45e407b30efdaa6c1acdcbe6b781

View file

@ -22,7 +22,7 @@ ScStwAppSettings * pGlobalAppSettings = nullptr;
ScStwAppSettings::ScStwAppSettings(ScStwClient * client, QObject* parent) ScStwAppSettings::ScStwAppSettings(ScStwClient * client, QObject* parent)
:ScStwRemoteSettings(client, parent) :ScStwRemoteSettings(client, parent)
{ {
this->registerKeyLevelHandler(ScStwAppSettings::KeyLevel, &ScStwAppSettings::keyToString); this->registerKeyLevelConverters(ScStwAppSettings::KeyLevel, &ScStwAppSettings::keyToString, &ScStwAppSettings::keyToType);
} }
QVariant ScStwAppSettings::readSetting(AppInternalSetting key) { QVariant ScStwAppSettings::readSetting(AppInternalSetting key) {