[users] hostname.X takes precedence over legacy settings

This commit is contained in:
Adriaan de Groot 2022-04-11 10:49:16 +02:00
parent b653b13002
commit 6a6aa8867b

View File

@ -832,9 +832,16 @@ copyLegacy( const QVariantMap& source, const QString& sourceKey, QVariantMap& ta
{ {
if ( source.contains( sourceKey ) ) if ( source.contains( sourceKey ) )
{ {
const QVariant legacyValue = source.value( sourceKey ); if ( target.contains( targetKey ) )
cWarning() << "Legacy *users* key" << sourceKey << "overrides hostname-settings."; {
target.insert( targetKey, legacyValue ); cWarning() << "Legacy *users* key" << sourceKey << "ignored.";
}
else
{
const QVariant legacyValue = source.value( sourceKey );
cWarning() << "Legacy *users* key" << sourceKey << "overrides hostname-settings.";
target.insert( targetKey, legacyValue );
}
} }
} }