Skip to content

Commit

Permalink
Remove duplicate QgsDataProvider::dataChanged( int ) signal
Browse files Browse the repository at this point in the history
Was not needed and not emitted anywhere
  • Loading branch information
nyalldawson committed Nov 14, 2016
1 parent 4a5faa0 commit 5d78d60
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 20 deletions.
6 changes: 6 additions & 0 deletions doc/api_break.dox
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,12 @@ QgsDataItem {#qgis_api_break_3_0_QgsDataItem}
- emitBeginInsertItems(), emitEndInsertItems(), emitBeginRemoveItems(), emitEndRemoveItems(), emitDataChanged(), emitStateChanged() have been removed.
- Favourites was renamed to Favorites

QgsDataProvider {#qgis_api_break_3_0_QgsDataProvider}
---------------

- The duplicate (and unused) dataChanged( int ) signal was removed. Use dataChanged() instead.


QgsDataSourceURI {#qgis_api_break_3_0_QgsDatasourceUri}
----------------

Expand Down
6 changes: 0 additions & 6 deletions python/core/qgsdataprovider.sip
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,6 @@ class QgsDataProvider : QObject
*/
void dataChanged();

/**
* This is emitted whenever data or metadata (e.g. color table, extent) has changed
* @param changed binary combination of changes
*/
void dataChanged( int changed );

protected:

/** Add error message */
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgisapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10258,8 +10258,8 @@ void QgisApp::layersWereAdded( const QList<QgsMapLayer *>& theLayers )

if ( provider )
{
connect( provider, SIGNAL( dataChanged() ), layer, SLOT( triggerRepaint() ) );
connect( provider, SIGNAL( dataChanged() ), mMapCanvas, SLOT( refresh() ) );
connect( provider, &QgsDataProvider::dataChanged, layer, &QgsMapLayer::triggerRepaint );
connect( provider, &QgsDataProvider::dataChanged, mMapCanvas, &QgsMapCanvas::refresh );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/browser/qgsbrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ void QgsBrowser::updateCurrentTab()
QgsRasterLayer *rlayer = qobject_cast< QgsRasterLayer * >( mLayer );
if ( rlayer )
{
connect( rlayer->dataProvider(), SIGNAL( dataChanged() ), rlayer, SLOT( triggerRepaint() ) );
connect( rlayer->dataProvider(), SIGNAL( dataChanged() ), mapCanvas, SLOT( refresh() ) );
connect( rlayer->dataProvider(), &QgsRasterDataProvider::dataChanged, rlayer, &QgsRasterLayer::triggerRepaint );
connect( rlayer->dataProvider(), &QgsRasterDataProvider::dataChanged, mapCanvas, &QgsMapCanvas::refresh );
}
}
mDirtyPreview = false;
Expand Down
6 changes: 0 additions & 6 deletions src/core/qgsdataprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -415,12 +415,6 @@ class CORE_EXPORT QgsDataProvider : public QObject
*/
void dataChanged();

/**
* This is emitted whenever data or metadata (e.g. color table, extent) has changed
* @param changed binary combination of changes
*/
void dataChanged( int changed );

protected:

/**
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgspointlocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ QgsPointLocator::QgsPointLocator( QgsVectorLayer* layer, const QgsCoordinateRefe
connect( mLayer, SIGNAL( featureAdded( QgsFeatureId ) ), this, SLOT( onFeatureAdded( QgsFeatureId ) ) );
connect( mLayer, SIGNAL( featureDeleted( QgsFeatureId ) ), this, SLOT( onFeatureDeleted( QgsFeatureId ) ) );
connect( mLayer, SIGNAL( geometryChanged( QgsFeatureId, const QgsGeometry& ) ), this, SLOT( onGeometryChanged( QgsFeatureId, const QgsGeometry& ) ) );
connect( mLayer, SIGNAL( dataChanged() ), this, SLOT( destroyIndex() ) );
connect( mLayer, &QgsVectorLayer::dataChanged, this, &QgsPointLocator::destroyIndex );
}


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgstransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool QgsTransaction::addLayer( QgsVectorLayer* layer )
return false;
}

connect( this, SIGNAL( afterRollback() ), layer->dataProvider(), SIGNAL( dataChanged() ) );
connect( this, &QgsTransaction::afterRollback, layer->dataProvider(), &QgsVectorDataProvider::dataChanged );
connect( QgsMapLayerRegistry::instance(), SIGNAL( layersWillBeRemoved( QStringList ) ), this, SLOT( onLayersDeleted( QStringList ) ) );
mLayers.insert( layer );

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1628,8 +1628,8 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
mDataSource.chop( 10 );
}

connect( mDataProvider, SIGNAL( dataChanged() ), this, SIGNAL( dataChanged() ) );
connect( mDataProvider, SIGNAL( dataChanged() ), this, SLOT( removeSelection() ) );
connect( mDataProvider, &QgsVectorDataProvider::dataChanged, this, &QgsVectorLayer::dataChanged );
connect( mDataProvider, &QgsVectorDataProvider::dataChanged, this, &QgsVectorLayer::removeSelection );

return true;
} // QgsVectorLayer:: setDataProvider
Expand Down

0 comments on commit 5d78d60

Please sign in to comment.