Skip to content

Commit

Permalink
Don't use reserved identifier in global namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Oct 9, 2024
1 parent 9dd742f commit 09a1ac0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gui/labeling/qgsrulebasedlabelingwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

const double ICON_PADDING_FACTOR = 0.16;

static QgsExpressionContext _createExpressionContext( QgsMapCanvas *mapCanvas, const QgsMapLayer *layer )
QgsExpressionContext QgsLabelingRulePropsWidget::createExpressionContext( QgsMapCanvas *mapCanvas, const QgsMapLayer *layer )
{
QgsExpressionContext context;
if ( mapCanvas )
Expand Down Expand Up @@ -738,7 +738,7 @@ void QgsLabelingRulePropsWidget::testFilter()
return;
}

QgsExpressionContext context( _createExpressionContext( mMapCanvas, mLayer ) );
QgsExpressionContext context( createExpressionContext( mMapCanvas, mLayer ) );

if ( !filter.prepare( &context ) )
{
Expand Down Expand Up @@ -771,7 +771,7 @@ void QgsLabelingRulePropsWidget::testFilter()

void QgsLabelingRulePropsWidget::buildExpression()
{
const QgsExpressionContext context( _createExpressionContext( mMapCanvas, mLayer ) );
const QgsExpressionContext context( createExpressionContext( mMapCanvas, mLayer ) );

QgsExpressionBuilderDialog dlg( mLayer, editFilter->text(), this, QStringLiteral( "generic" ), context );

Expand Down
2 changes: 2 additions & 0 deletions src/gui/labeling/qgsrulebasedlabelingwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ class GUI_EXPORT QgsLabelingRulePropsWidget : public QgsPanelWidget, private Ui:
void buildExpression();

private:
static QgsExpressionContext createExpressionContext( QgsMapCanvas *mapCanvas, const QgsMapLayer *layer );

QgsRuleBasedLabeling::Rule *mRule; // borrowed
QgsVectorLayer *mLayer = nullptr;

Expand Down

0 comments on commit 09a1ac0

Please sign in to comment.