Skip to content

Commit a176bad

Browse files
committed
Kill refreshLegend (not used since a long time)
1 parent c8577c7 commit a176bad

5 files changed

+0
-45
lines changed

src/app/qgisapp.cpp

-26
Original file line numberDiff line numberDiff line change
@@ -13424,20 +13424,7 @@ void QgisApp::showLayerProperties( QgsMapLayer *mapLayer )
1342413424

1342513425
if ( mapLayer->type() == QgsMapLayer::RasterLayer )
1342613426
{
13427-
#if 0 // See note above about reusing this
13428-
QgsRasterLayerProperties *rlp = nullptr;
13429-
if ( rlp )
13430-
{
13431-
rlp->sync();
13432-
}
13433-
else
13434-
{
13435-
rlp = new QgsRasterLayerProperties( ml, mMapCanvas, this );
13436-
// handled by rendererChanged() connect( rlp, SIGNAL( refreshLegend( QString, bool ) ), mLayerTreeView, SLOT( refreshLayerSymbology( QString ) ) );
13437-
}
13438-
#else
1343913427
QgsRasterLayerProperties *rasterLayerPropertiesDialog = new QgsRasterLayerProperties( mapLayer, mMapCanvas, this );
13440-
#endif
1344113428
// Cannot use exec here due to raster transparency map tool:
1344213429
// in order to pass focus to the canvas, the dialog needs to
1344313430
// be hidden and shown in non-modal mode.
@@ -13469,20 +13456,7 @@ void QgisApp::showLayerProperties( QgsMapLayer *mapLayer )
1346913456
{
1347013457
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( mapLayer );
1347113458

13472-
#if 0 // See note above about reusing this
13473-
QgsVectorLayerProperties *vlp = nullptr;
13474-
if ( vlp )
13475-
{
13476-
vlp->syncToLayer();
13477-
}
13478-
else
13479-
{
13480-
vlp = new QgsVectorLayerProperties( vlayer, this );
13481-
// handled by rendererChanged() connect( vlp, SIGNAL( refreshLegend( QString ) ), mLayerTreeView, SLOT( refreshLayerSymbology( QString ) ) );
13482-
}
13483-
#else
1348413459
QgsVectorLayerProperties *vectorLayerPropertiesDialog = new QgsVectorLayerProperties( vlayer, this );
13485-
#endif
1348613460
Q_FOREACH ( QgsMapLayerConfigWidgetFactory *factory, mMapLayerPanelFactories )
1348713461
{
1348813462
vectorLayerPropertiesDialog->addPropertiesPageFactory( factory );

src/app/qgsrasterlayerproperties.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -1053,12 +1053,6 @@ void QgsRasterLayerProperties::apply()
10531053
mRasterLayer->setCustomProperty( "WMSPublishDataSourceUrl", mPublishDataSourceUrlCheckBox->isChecked() );
10541054
mRasterLayer->setCustomProperty( "WMSBackgroundLayer", mBackgroundLayerCheckBox->isChecked() );
10551055

1056-
1057-
// update symbology (this is now deprecated and disconnected)
1058-
Q_NOWARN_DEPRECATED_PUSH
1059-
emit refreshLegend( mRasterLayer->id(), false );
1060-
Q_NOWARN_DEPRECATED_POP
1061-
10621056
// Force a redraw of the legend
10631057
mRasterLayer->setLegend( QgsMapLayerLegend::defaultRasterLegend( mRasterLayer ) );
10641058

src/app/qgsrasterlayerproperties.h

-4
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,6 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
139139

140140
void urlClicked( const QUrl &url );
141141

142-
signals:
143-
//! Emitted when changes to layer were saved to update legend
144-
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;
145-
146142
private:
147143
QPushButton *mBtnStyle = nullptr;
148144
QPushButton *mBtnMetadata = nullptr;

src/app/qgsvectorlayerproperties.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -754,11 +754,6 @@ void QgsVectorLayerProperties::apply()
754754
mLayer->geometryOptions()->setRemoveDuplicateNodes( mRemoveDuplicateNodesCheckbox->isChecked() );
755755
mLayer->geometryOptions()->setGeometryPrecision( mGeometryPrecisionSpinBox->value() );
756756

757-
// update symbology (this is now deprecated and disconnected)
758-
Q_NOWARN_DEPRECATED_PUSH
759-
emit refreshLegend( mLayer->id() );
760-
Q_NOWARN_DEPRECATED_POP
761-
762757
mLayer->triggerRepaint();
763758
// notify the project we've made a change
764759
QgsProject::instance()->setDirty( true );

src/app/qgsvectorlayerproperties.h

-4
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@ class APP_EXPORT QgsVectorLayerProperties : public QgsOptionsDialogBase, private
132132

133133
signals:
134134

135-
//! Emitted when changes to layer were saved to update legend
136-
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID, bool expandItem ) SIP_DEPRECATED;
137-
Q_DECL_DEPRECATED void refreshLegend( const QString &layerID ) SIP_DEPRECATED;
138-
139135
void toggleEditing( QgsMapLayer * );
140136

141137
private slots:

0 commit comments

Comments
 (0)