Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 1, 2021
1 parent 084a2b8 commit 76ddb59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/editform/qgsattributeeditorrelation.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 76ddb59

Please sign in to comment.