mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
parent
dd19eb8e94
commit
d06f2d8188
@ -161,11 +161,15 @@ QDomElement QgsXmlUtils::writeVariant( const QVariant &value, QDomDocument &doc
|
||||
case QVariant::LongLong:
|
||||
case QVariant::ULongLong:
|
||||
case QVariant::String:
|
||||
case QVariant::Char:
|
||||
element.setAttribute( QStringLiteral( "type" ), QVariant::typeToName( value.type() ) );
|
||||
element.setAttribute( QStringLiteral( "value" ), value.toString() );
|
||||
break;
|
||||
|
||||
case QVariant::Char:
|
||||
element.setAttribute( QStringLiteral( "type" ), QVariant::typeToName( value.type() ) );
|
||||
element.setAttribute( QStringLiteral( "value" ), value.isNull() ? QString() : value.toString() );
|
||||
break;
|
||||
|
||||
case QVariant::Color:
|
||||
element.setAttribute( QStringLiteral( "type" ), QStringLiteral( "color" ) );
|
||||
element.setAttribute( QStringLiteral( "value" ), value.value< QColor >().isValid() ? QgsSymbolLayerUtils::encodeColor( value.value< QColor >() ) : QString() );
|
||||
|
Loading…
x
Reference in New Issue
Block a user