Skip to content

Commit 12fd51e

Browse files
committed
Deprecate refreshLegend
1 parent 56149ff commit 12fd51e

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

src/app/qgsrasterlayerproperties.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,8 +1054,10 @@ void QgsRasterLayerProperties::apply()
10541054
mRasterLayer->setCustomProperty( "WMSBackgroundLayer", mBackgroundLayerCheckBox->isChecked() );
10551055

10561056

1057-
// update symbology (this is now disconnected)
1057+
// update symbology (this is now deprecated and disconnected)
1058+
Q_NOWARN_DEPRECATED_PUSH
10581059
emit refreshLegend( mRasterLayer->id(), false );
1060+
Q_NOWARN_DEPRECATED_POP
10591061

10601062
// Force a redraw of the legend
10611063
mRasterLayer->setLegend( QgsMapLayerLegend::defaultRasterLegend( mRasterLayer ) );

src/app/qgsrasterlayerproperties.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
141141

142142
signals:
143143
//! Emitted when changes to layer were saved to update legend
144-
void refreshLegend( const QString &layerID, bool expandItem );
144+
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;
145145

146146
private:
147147
QPushButton *mBtnStyle = nullptr;

src/app/qgsvectorlayerproperties.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,8 +754,10 @@ void QgsVectorLayerProperties::apply()
754754
mLayer->geometryOptions()->setRemoveDuplicateNodes( mRemoveDuplicateNodesCheckbox->isChecked() );
755755
mLayer->geometryOptions()->setGeometryPrecision( mGeometryPrecisionSpinBox->value() );
756756

757-
// update symbology
757+
// update symbology (this is now deprecated and disconnected)
758+
Q_NOWARN_DEPRECATED_PUSH
758759
emit refreshLegend( mLayer->id() );
760+
Q_NOWARN_DEPRECATED_POP
759761

760762
mLayer->triggerRepaint();
761763
// notify the project we've made a change

src/app/qgsvectorlayerproperties.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
133133
signals:
134134

135135
//! Emitted when changes to layer were saved to update legend
136-
void refreshLegend( const QString &layerID, bool expandItem );
137-
void refreshLegend( const QString &layerID );
136+
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;
137+
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID ) SIP_DEPRECATED;
138138

139139
void toggleEditing( QgsMapLayer * );
140140

0 commit comments

Comments
 (0)