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

[core] Introduce QgsProfileSourceRegistry #41

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

gacarrillor
Copy link
Owner

To store profile sources other than map layers, e.g., based on web services

Copy link

github-actions bot commented Apr 24, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 1986f12)

@gacarrillor gacarrillor reopened this Apr 24, 2024

QList< QgsAbstractProfileSource * > QgsProfileSourceRegistry::profileSources() const
{
return mSources;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if the registry should return all the sources.
Shouldn't it return a clone of a source if you ask for a given id?

That's the way other registries are working

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took QgsExternalStorageRegistry as a basis, but I guess I should've had a look at other registries as well.

The rationale behind this is that we need to get the full list in order to iterate the sources in QgsElevationProfileCanvas, see https://github.com/gacarrillor/QGIS/pull/41/files#diff-7858eaf011cbfda84a6f705b8e0c0f64b95b113bf9a602d2fe6aa51548495862R848

Copy link

github-actions bot commented May 6, 2024

Tests failed for Qt 5

One or more tests failed using the build from commit 625fdee

custom_profile

custom_profile

Test failed at test_layout_item_profile_custom_source at tests/src/python/test_qgsprofilesourceregistry.py:403

Rendered image did not match tests/testdata/control_images/expected_custom_profile/expected_custom_profile.png (found 130 pixels different)

The full test report (included comparison of rendered vs expected images) can be found here.

Further documentation on the QGIS test infrastructure can be found in the Developer's Guide.

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.

2 participants