Skip to content
Permalink
Browse files

Add @brief, @see to banned keywords list

  • Loading branch information
nyalldawson committed Jul 6, 2020
1 parent 3263211 commit b883c14f21f6c8c41ba1d23b23e0bb9388d8a43c
Showing with 14 additions and 8 deletions.
  1. +8 −8 src/core/layout/qgslayoutitemlegend.cpp
  2. +6 −0 tests/code_layout/test_banned_keywords.sh
@@ -394,22 +394,22 @@ void QgsLayoutItemLegend::setSymbolWidth( double w )

double QgsLayoutItemLegend::maximumSymbolSize() const
{
return mSettings.maxSymbolSize();
return mSettings.maximumSymbolSize();
}

void QgsLayoutItemLegend::setMaximumSymbolSize( double size )
{
mSettings.setMaxSymbolSize( size );
mSettings.setMaximumSymbolSize( size );
}

double QgsLayoutItemLegend::minimumSymbolSize() const
{
return mSettings.minSymbolSize();
return mSettings.minimumSymbolSize();
}

void QgsLayoutItemLegend::setMinimumSymbolSize( double size )
{
mSettings.setMinSymbolSize( size );
mSettings.setMinimumSymbolSize( size );
}

void QgsLayoutItemLegend::setSymbolAlignment( Qt::AlignmentFlag alignment )
@@ -544,8 +544,8 @@ bool QgsLayoutItemLegend::writePropertiesToElement( QDomElement &legendElem, QDo

legendElem.setAttribute( QStringLiteral( "symbolWidth" ), QString::number( mSettings.symbolSize().width() ) );
legendElem.setAttribute( QStringLiteral( "symbolHeight" ), QString::number( mSettings.symbolSize().height() ) );
legendElem.setAttribute( QStringLiteral( "maxSymbolSize" ), QString::number( mSettings.maxSymbolSize() ) );
legendElem.setAttribute( QStringLiteral( "minSymbolSize" ), QString::number( mSettings.minSymbolSize() ) );
legendElem.setAttribute( QStringLiteral( "maxSymbolSize" ), QString::number( mSettings.maximumSymbolSize() ) );
legendElem.setAttribute( QStringLiteral( "minSymbolSize" ), QString::number( mSettings.minimumSymbolSize() ) );

legendElem.setAttribute( QStringLiteral( "symbolAlignment" ), mSettings.symbolAlignment() );

@@ -641,8 +641,8 @@ bool QgsLayoutItemLegend::readPropertiesFromElement( const QDomElement &itemElem
mSettings.setSymbolSize( QSizeF( itemElem.attribute( QStringLiteral( "symbolWidth" ), QStringLiteral( "7.0" ) ).toDouble(), itemElem.attribute( QStringLiteral( "symbolHeight" ), QStringLiteral( "14.0" ) ).toDouble() ) );
mSettings.setSymbolAlignment( static_cast< Qt::AlignmentFlag >( itemElem.attribute( QStringLiteral( "symbolAlignment" ), QString::number( Qt::AlignLeft ) ).toInt() ) );

mSettings.setMaxSymbolSize( itemElem.attribute( QStringLiteral( "maxSymbolSize" ), QStringLiteral( "0.0" ) ).toDouble() );
mSettings.setMinSymbolSize( itemElem.attribute( QStringLiteral( "minSymbolSize" ), QStringLiteral( "0.0" ) ).toDouble() );
mSettings.setMaximumSymbolSize( itemElem.attribute( QStringLiteral( "maxSymbolSize" ), QStringLiteral( "0.0" ) ).toDouble() );
mSettings.setMinimumSymbolSize( itemElem.attribute( QStringLiteral( "minSymbolSize" ), QStringLiteral( "0.0" ) ).toDouble() );

mSettings.setWmsLegendSize( QSizeF( itemElem.attribute( QStringLiteral( "wmsLegendWidth" ), QStringLiteral( "50" ) ).toDouble(), itemElem.attribute( QStringLiteral( "wmsLegendHeight" ), QStringLiteral( "25" ) ).toDouble() ) );
mSettings.setLineSpacing( itemElem.attribute( QStringLiteral( "lineSpacing" ), QStringLiteral( "1.0" ) ).toDouble() );
@@ -125,6 +125,12 @@ HINTS[33]="Use QString() instead"
KEYWORDS[34]="QLatin1String( \"\" )"
HINTS[34]="Use QString() instead"

KEYWORDS[35]="@see"
HINTS[35]="Use \see instead (works correct with Python docstrings)"

KEYWORDS[36]="@brief"
HINTS[36]="Use \brief instead (works correct with Python docstrings)"

RES=
DIR=$(git rev-parse --show-toplevel)

0 comments on commit b883c14

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