Skip to content
Permalink
Browse files

Rename the "basic" widget to "relation_editor" widget

  • Loading branch information
suricactus committed Jan 6, 2021
1 parent ca56fe6 commit 415ecc4e7f0f79c09a96c08515288ceab60706ff
@@ -24,7 +24,7 @@
#include <QWidget>

QgsRelationWidgetWrapper::QgsRelationWidgetWrapper( QgsVectorLayer *vl, const QgsRelation &relation, QWidget *editor, QWidget *parent )
: QgsRelationWidgetWrapper( QStringLiteral( "basic" ), vl, relation, editor, parent )
: QgsRelationWidgetWrapper( QStringLiteral( "relation_editor" ), vl, relation, editor, parent )
{
}

@@ -46,7 +46,7 @@ QWidget *QgsRelationWidgetWrapper::createWidget( QWidget *parent )
if ( !widget )
{
QgsLogger::warning( QStringLiteral( "Failed to create relation widget \"%1\", fallback to \"basic\" relation widget" ).arg( mRelationEditorId ) );
widget = QgsGui::instance()->relationWidgetRegistry()->create( QStringLiteral( "basic" ), widgetConfig(), parent );
widget = QgsGui::instance()->relationWidgetRegistry()->create( QStringLiteral( "relation_editor" ), widgetConfig(), parent );
}

return widget;
@@ -1644,7 +1644,7 @@ void QgsAttributeForm::init()
const QList<QgsRelation> relations = QgsProject::instance()->relationManager()->referencedRelations( mLayer );
for ( const QgsRelation &rel : relations )
{
QgsRelationWidgetWrapper *rww = setupRelationWidgetWrapper( QStringLiteral( "basic" ), rel, mContext );
QgsRelationWidgetWrapper *rww = setupRelationWidgetWrapper( QStringLiteral( "relation_editor" ), rel, mContext );

QgsAttributeFormRelationEditorWidget *formWidget = new QgsAttributeFormRelationEditorWidget( rww, this );
formWidget->createSearchWidgetWrappers( mContext );
@@ -25,7 +25,7 @@ QgsBasicRelationWidgetFactory::QgsBasicRelationWidgetFactory()

QString QgsBasicRelationWidgetFactory::type() const
{
return QStringLiteral( "basic" );
return QStringLiteral( "relation_editor" );
}

QString QgsBasicRelationWidgetFactory::name() const

0 comments on commit 415ecc4

Please sign in to comment.
You can’t perform that action at this time.