Cleanups.

This commit is contained in:
2026-01-12 23:06:36 +01:00
parent c0ce6a81e3
commit beae1c1b3d
3 changed files with 67 additions and 68 deletions

View File

@@ -212,20 +212,20 @@ std::optional<BCValuePtr> BCXmlLoader::makeValue( BCDevice::ID deviceID, const B
if( !s_valueTypes.contains( params.ValueType ) )
throw BCException( "Fehler", QString("ValueType %1 existiert nicht.").arg(params.ValueType) );
newValue.valueType = s_valueTypes[params.ValueType];
newValue._valueType = s_valueTypes[params.ValueType];
newValue.label = params.Label;
newValue.unitLabel = params.UnitLabel;
newValue._label = params.Label;
newValue._unitLabel = params.UnitLabel;
setIfExists( newValue.factor, params.Factor );
setIfExists( newValue.optMin, params.Min );
setIfExists( newValue.optMax, params.Max );
setIfExists( newValue._factor, params.Factor );
setIfExists( newValue._optMin, params.Min );
setIfExists( newValue._optMax, params.Max );
if( params.IsWord == "true")
newValue.valueFlags.setFlag( BCValue::Flag::IsWord, true );
newValue._valueFlags.setFlag( BCValue::Flag::IsWord, true );
if( params.ReadOnly == "true")
newValue.valueFlags.setFlag( BCValue::Flag::ReadOnly, true );
newValue._valueFlags.setFlag( BCValue::Flag::ReadOnly, true );
//newValue.dumpValue();