Implement settings schema filtering

* Filter settings that have a registered schema so that only keys matching the schema get saved
  * Allow settings that do not have a registered schema (manually added devices, device-specific, plugins, client)
  * Update schema registration to allow marking a settings group as local only, which means it modifies the local instance's settings, not the remote
  * Deny setting local only settings when the update comes from the network server
This commit is contained in:
Adam Honse committed 2026-08-15 17:41:29 -05:00
1 parent 5c1a2c4d13
commit f9897ef99a
6 files changed
+223 -43

No files matched your search

+2 -2
View File
@@ -118,7 +118,7 @@ static void ResourceManagerNetworkClientCallback(void* this_ptr, unsigned int up
case NETWORKCLIENT_UPDATE_REASON_PROFILEMANAGER_ACTIVE_PROFILE_CHANGED:
this_obj->GetProfileManager()->SignalProfileManagerUpdate(PROFILEMANAGER_UPDATE_REASON_ACTIVE_PROFILE_CHANGED);
break;
case NETWORKCLIENT_UPDATE_REASON_SERVER_FLAGS_RECEIVED:
if(this_obj->IsLocalClient())
{
@@ -263,7 +263,7 @@ ResourceManager::ResourceManager()
server_settings_schema["legacy_workaround"]["type"] = "bool";
server_settings_schema["legacy_workaround"]["description"] = QT_TRANSLATE_NOOP("Settings", "Workaround for some older SDK implementations that sent incorrect packet size for certain packets");
settings_manager->RegisterSettingsSchema("Server", QT_TRANSLATE_NOOP("Settings", "Server"), server_settings_schema);
settings_manager->RegisterSettingsSchemaLocalOnly("Server", QT_TRANSLATE_NOOP("Settings", "Server"), server_settings_schema);
/*-----------------------------------------------------*\
| Configure the log manager |