Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[offline editing] Handle list of strings and numbers in offline spati…
…alite too
  • Loading branch information
nirvn authored and nyalldawson committed May 10, 2021
1 parent 10380c9 commit 40ad1cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/qgsofflineediting.cpp
Expand Up @@ -588,6 +588,11 @@ QgsVectorLayer *QgsOfflineEditing::copyVectorLayer( QgsVectorLayer *layer, sqlit
{
dataType = QStringLiteral( "TEXT" );
}
else if ( type == QVariant::StringList || type == QVariant::List )
{
dataType = QStringLiteral( "TEXT" );
showWarning( tr( "Field '%1' from layer %2 has been converted from a list to a string of comma-separated values." ).arg( field.name(), layer->name() ) );
}
else
{
showWarning( tr( "%1: Unknown data type %2. Not using type affinity for the field." ).arg( field.name(), QVariant::typeToName( type ) ) );
Expand Down

0 comments on commit 40ad1cb

Please sign in to comment.