Skip to content
Permalink
Browse files

Fix deprecation warnings

  • Loading branch information
nyalldawson committed Jan 9, 2021
1 parent e0c0c06 commit 24aa545754b596feb26351668e939f65b5c838c3
Showing with 12 additions and 0 deletions.
  1. +12 −0 src/gui/editorwidgets/qgsrelationwidgetwrapper.cpp
@@ -117,17 +117,23 @@ void QgsRelationWidgetWrapper::widgetValueChanged( const QString &attribute, con

bool QgsRelationWidgetWrapper::showUnlinkButton() const
{
Q_NOWARN_DEPRECATED_PUSH
return visibleButtons().testFlag( QgsAttributeEditorRelation::Button::Unlink );
Q_NOWARN_DEPRECATED_POP
}

void QgsRelationWidgetWrapper::setShowUnlinkButton( bool showUnlinkButton )
{
Q_NOWARN_DEPRECATED_PUSH
setVisibleButtons( visibleButtons().setFlag( QgsAttributeEditorRelation::Unlink, showUnlinkButton ) );
Q_NOWARN_DEPRECATED_POP
}

void QgsRelationWidgetWrapper::setShowSaveChildEditsButton( bool showSaveChildEditsButton )
{
Q_NOWARN_DEPRECATED_PUSH
setVisibleButtons( visibleButtons().setFlag( QgsAttributeEditorRelation::SaveChildEdits, showSaveChildEditsButton ) );
Q_NOWARN_DEPRECATED_POP
}

bool QgsRelationWidgetWrapper::showLabel() const
@@ -203,17 +209,23 @@ bool QgsRelationWidgetWrapper::valid() const

bool QgsRelationWidgetWrapper::showLinkButton() const
{
Q_NOWARN_DEPRECATED_PUSH
return visibleButtons().testFlag( QgsAttributeEditorRelation::Button::Link );
Q_NOWARN_DEPRECATED_POP
}

void QgsRelationWidgetWrapper::setShowLinkButton( bool showLinkButton )
{
Q_NOWARN_DEPRECATED_PUSH
setVisibleButtons( visibleButtons().setFlag( QgsAttributeEditorRelation::Link, showLinkButton ) );
Q_NOWARN_DEPRECATED_POP
}

bool QgsRelationWidgetWrapper::showSaveChildEditsButton() const
{
Q_NOWARN_DEPRECATED_PUSH
return visibleButtons().testFlag( QgsAttributeEditorRelation::Button::SaveChildEdits );
Q_NOWARN_DEPRECATED_POP
}

void QgsRelationWidgetWrapper::setVisibleButtons( const QgsAttributeEditorRelation::Buttons &buttons )

0 comments on commit 24aa545

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