Skip to content

Commit

Permalink
Merge pull request #44294 from domi4484/jsonEditWidgetDefault
Browse files Browse the repository at this point in the history
JSON widget as default for json and jsonb type names
  • Loading branch information
m-kuhn committed Jul 23, 2021
2 parents 48b9ff0 + 849d8cc commit b52d37e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/editorwidgets/qgsjsoneditwidgetfactory.cpp
Expand Up @@ -40,8 +40,13 @@ unsigned int QgsJsonEditWidgetFactory::fieldScore( const QgsVectorLayer *vl, int
switch ( type )
{
case QVariant::Map:
{
const QString typeName = vl->fields().field( fieldIdx ).typeName();
if ( typeName == QLatin1String( "json" ) || typeName == QLatin1String( "jsonb" ) )
return 21;
return 15;
break;
}
break;
case QVariant::List:
return 10;
break;
Expand Down

0 comments on commit b52d37e

Please sign in to comment.