From a3a1350dc78a6c87e05c967ca6a1c8107255d919 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 15 Mar 2021 21:18:10 +0100 Subject: [PATCH] [libcalamares] Don't complain if there isn't a preset - If the module knows about a preset, then it should be registered even if there is not a value set for it specifically; this avoids complaints from isEditable() for fields that are known, but do not have a preset. (Reported by Anke) --- src/libcalamares/modulesystem/Config.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libcalamares/modulesystem/Config.cpp b/src/libcalamares/modulesystem/Config.cpp index eece2f185..68d7b6514 100644 --- a/src/libcalamares/modulesystem/Config.cpp +++ b/src/libcalamares/modulesystem/Config.cpp @@ -123,6 +123,13 @@ Config::ApplyPresets::apply( const char* fieldName ) } m_c.d->m_presets->append( PresetField { key, value, editable } ); } + else + { + // There is no setting, but since we apply() this field, + // we do know about it; put in a preset so that looking + // it up won't complani. + m_c.d->m_presets->append( PresetField { key, QVariant(), true } ); + } return *this; }