Skip to content
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

Add a minimal data provider for plugin layers #6643

Merged
merged 1 commit into from Mar 20, 2018
Merged

Add a minimal data provider for plugin layers #6643

merged 1 commit into from Mar 20, 2018

Conversation

manisandro
Copy link
Member

Throughout the codebase, there is a general assumption that layer->dataProvider() is not null. This wasn't the case for plugin layers.

I don't think there is actually a real use for data providers in the case of plugin layers, so such a minimal, non-exposed implementation should suffice.

@wonder-sk
Copy link
Member

Just curious, where do you get problems in QGIS code due to data provider being null? In Crayfish plugin layer there is no data provider assigned and I haven't encountered any issues coming out of that...

@manisandro
Copy link
Member Author

Just grep throughout the codebase for dataProvider()-> and you'll see many cases where the code operates on QgsMapLayer types without checking whether dataProvider() is null or not.

Throughout the codebase, there is a general assumption that layer->dataProvider() is not null. This wasn't the case for plugin layers.
@manisandro manisandro merged commit 40da51c into qgis:master Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants