Skip to content

Commit

Permalink
Remove unused argument (always set to false)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Sep 28, 2021
1 parent b30c17f commit 5660e70
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/app/labeling/qgsmaptoolchangelabelproperties.cpp
Expand Up @@ -76,7 +76,7 @@ void QgsMapToolChangeLabelProperties::canvasPressEvent( QgsMapMouseEvent *e )
if ( !mCurrentLabel.layer->isEditable() )
{
QgsPalIndexes indexes;
const bool newAuxiliaryLayer = createAuxiliaryFields( indexes, false );
const bool newAuxiliaryLayer = createAuxiliaryFields( indexes );

if ( !newAuxiliaryLayer && !mCurrentLabel.layer->auxiliaryLayer() )
{
Expand Down
24 changes: 12 additions & 12 deletions src/app/labeling/qgsmaptoollabel.cpp
Expand Up @@ -848,12 +848,12 @@ QgsMapToolLabel::LabelDetails::LabelDetails( const QgsLabelPosition &p )
}
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsPalIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsPalIndexes &indexes )
{
return createAuxiliaryFields( mCurrentLabel, indexes, overwriteExpression );
return createAuxiliaryFields( mCurrentLabel, indexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &indexes, bool overwriteExpression ) const
bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &indexes ) const
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = details.layer;
Expand Down Expand Up @@ -886,7 +886,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
}
else
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer, overwriteExpression );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}

Expand All @@ -900,12 +900,12 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsPalIndexe
return newAuxiliaryLayer;
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsDiagramIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsDiagramIndexes &indexes )
{
return createAuxiliaryFields( mCurrentLabel, indexes, overwriteExpression );
return createAuxiliaryFields( mCurrentLabel, indexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &indexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &indexes )
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = details.layer;
Expand Down Expand Up @@ -937,7 +937,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
}
else
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer, overwriteExpression );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}

Expand All @@ -949,12 +949,12 @@ bool QgsMapToolLabel::createAuxiliaryFields( LabelDetails &details, QgsDiagramIn
return newAuxiliaryLayer;
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes )
{
return createAuxiliaryFields( mCurrentCallout, calloutIndexes, overwriteExpression );
return createAuxiliaryFields( mCurrentCallout, calloutIndexes );
}

bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes, bool overwriteExpression )
bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes )
{
bool newAuxiliaryLayer = false;
QgsVectorLayer *vlayer = QgsProject::instance()->mapLayer<QgsVectorLayer *>( details.layerID );
Expand Down Expand Up @@ -987,7 +987,7 @@ bool QgsMapToolLabel::createAuxiliaryFields( QgsCalloutPosition &details, QgsCal
}
else
{
index = QgsAuxiliaryLayer::createProperty( p, vlayer, overwriteExpression );
index = QgsAuxiliaryLayer::createProperty( p, vlayer, false );
changed = true;
}
calloutIndexes[p] = index;
Expand Down
12 changes: 6 additions & 6 deletions src/app/labeling/qgsmaptoollabel.h
Expand Up @@ -219,12 +219,12 @@ class APP_EXPORT QgsMapToolLabel: public QgsMapToolAdvancedDigitizing
*/
bool isPinned();

bool createAuxiliaryFields( QgsPalIndexes &palIndexes, bool overwriteExpression = true );
bool createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &palIndexes, bool overwriteExpression = true ) const;
bool createAuxiliaryFields( QgsDiagramIndexes &diagIndexes, bool overwriteExpression = true );
bool createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &diagIndexes, bool overwriteExpression = true );
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes, bool overwriteExpression = true );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes, bool overwriteExpression = true );
bool createAuxiliaryFields( QgsPalIndexes &palIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsPalIndexes &palIndexes ) const;
bool createAuxiliaryFields( QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( LabelDetails &details, QgsDiagramIndexes &diagIndexes );
bool createAuxiliaryFields( QgsCalloutIndexes &calloutIndexes );
bool createAuxiliaryFields( QgsCalloutPosition &details, QgsCalloutIndexes &calloutIndexes );

void updateHoveredLabel( QgsMapMouseEvent *e );
void clearHoveredLabel();
Expand Down
6 changes: 3 additions & 3 deletions src/app/labeling/qgsmaptoolmovelabel.cpp
Expand Up @@ -111,7 +111,7 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
{
QgsCalloutIndexes indexes;

if ( createAuxiliaryFields( calloutPosition, indexes, false ) )
if ( createAuxiliaryFields( calloutPosition, indexes ) )
return;

if ( !canModifyCallout( calloutPosition, mCurrentCalloutMoveOrigin, xCol, yCol ) )
Expand Down Expand Up @@ -188,7 +188,7 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
{
QgsPalIndexes indexes;

if ( createAuxiliaryFields( indexes, false ) )
if ( createAuxiliaryFields( indexes ) )
return;

if ( !labelMoveable( vlayer, mCurrentLabel.settings, xCol, yCol ) )
Expand All @@ -211,7 +211,7 @@ void QgsMapToolMoveLabel::cadCanvasPressEvent( QgsMapMouseEvent *e )
{
QgsDiagramIndexes indexes;

if ( createAuxiliaryFields( indexes, false ) )
if ( createAuxiliaryFields( indexes ) )
return;

if ( !diagramMoveable( vlayer, xCol, yCol ) )
Expand Down
2 changes: 1 addition & 1 deletion src/app/labeling/qgsmaptoolrotatelabel.cpp
Expand Up @@ -117,7 +117,7 @@ void QgsMapToolRotateLabel::canvasPressEvent( QgsMapMouseEvent *e )
if ( !labelIsRotatable( mCurrentLabel.layer, mCurrentLabel.settings, rotationCol ) )
{
QgsPalIndexes indexes;
if ( createAuxiliaryFields( indexes, false ) )
if ( createAuxiliaryFields( indexes ) )
return;

if ( !labelIsRotatable( mCurrentLabel.layer, mCurrentLabel.settings, rotationCol ) )
Expand Down
4 changes: 2 additions & 2 deletions src/app/labeling/qgsmaptoolshowhidelabels.cpp
Expand Up @@ -331,7 +331,7 @@ bool QgsMapToolShowHideLabels::showHide( const QgsLabelPosition &pos, bool show
if ( !diagramCanShowHide( vlayer, showCol ) )
{
QgsDiagramIndexes indexes;
createAuxiliaryFields( details, indexes, false );
createAuxiliaryFields( details, indexes );

showCol = indexes[ QgsDiagramLayerSettings::Show ];
}
Expand All @@ -341,7 +341,7 @@ bool QgsMapToolShowHideLabels::showHide( const QgsLabelPosition &pos, bool show
if ( !labelCanShowHide( vlayer, showCol ) )
{
QgsPalIndexes indexes;
createAuxiliaryFields( details, indexes, false );
createAuxiliaryFields( details, indexes );

showCol = indexes[ QgsPalLayerSettings::Show ];
}
Expand Down

0 comments on commit 5660e70

Please sign in to comment.