Skip to content
Permalink
Browse files
add comment
  • Loading branch information
3nids committed Jun 1, 2021
1 parent 084a2b8 commit 76ddb599d28c89b8feaa38c45e4394342867dc92
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/core/editform/qgsattributeeditorrelation.cpp
@@ -67,6 +67,10 @@ void QgsAttributeEditorRelation::loadConfiguration( const QDomElement &element,
if ( element.hasAttribute( "buttons" ) )
{
Q_NOWARN_DEPRECATED_PUSH
// QgsAttributeEditorRelation::Button has been deprecated in favor of QgsRelationEditorWidget::Button
// we cannot use it here since the new flags are in gui, while the current code is in core
// TODO: remove this compatibility code in QGIS 4
// or make the enum private if we really want to keep the backward compatibility (but not worth it!)
QString buttonString = element.attribute( QStringLiteral( "buttons" ), qgsFlagValueToKeys( QgsAttributeEditorRelation::Button::AllButtons ) );
config.insert( "buttons", qgsFlagValueToKeys( qgsFlagKeysToValue( buttonString, QgsAttributeEditorRelation::Button::AllButtons ) ) );
Q_NOWARN_DEPRECATED_POP

0 comments on commit 76ddb59

Please sign in to comment.