-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace connect to 'layerWillBeRemoved' by 'layersWillbeRemoved' in Q… #3189
Conversation
@@ -327,14 +327,16 @@ void QgsEditorWidgetRegistry::writeMapLayer( QgsMapLayer* mapLayer, QDomElement& | |||
layerElem.appendChild( editTypesNode ); | |||
} | |||
|
|||
void QgsEditorWidgetRegistry::mapLayerWillBeRemoved( QgsMapLayer* mapLayer ) | |||
void QgsEditorWidgetRegistry::mapLayersWillBeRemoved( const QList<QgsMapLayer*>& layers ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you run scripts/prepare-commit.sh
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, I didn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fixing my PR branch
348bde5
to
73bfe93
Compare
…gsEditorWidgetRegistry. QgsEditorWidgetRegistry record every layer added to the QgsMapLayerRegistry by listening to signal 'layerWasAdded'. But layerWillBeRemoved is emitted only for layers owned by QgsMapLayerRegistry while layersWillBeRemoved is emitted for all layers added to QgsMapLayerRegistry.
Am I wrong or it seems that the travis build for QT5 python 3.3 fails for something not related to this PR ? |
Isn't this a bug? Logically, why should layersWillBeRemoved be emitted but not layerWillBeRemoved for non-owned layers. I think we should fix the API here instead. |
On 10/06/16 01:36, Nyall Dawson wrote:
|
Yes, the test ogcutils test seems to be flaky. Maybe @rouault knows what could potentially be going wrong there? |
@rouault yes, it's only occasionally, I'll ping you if I see this happen again with more debug output. |
@nyalldawson @m-kuhn @dmarteau I have created a new PR to update the QgsMapLayerRegistry. We can probably close this one ? |
…gsEditorWidgetRegistry.
QgsEditorWidgetRegistry record every layer added to the QgsMapLayerRegistry by listening to signal 'layerWasAdded'. But layerWillBeRemoved is emitted only for layers owned by
QgsMapLayerRegistry while layersWillBeRemoved is emitted for all layers added to QgsMapLayerRegistry.
In the context of qgi server the layers are not owned by QgsMapLayerRegistry and thus layerWillBeRemoved is never called and connections to layers never released.