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

[SelectiveMasking] install masks for QgsTemplatedLineSymbolLayer #57694

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

troopa81
Copy link
Contributor

@troopa81 troopa81 commented Jun 6, 2024

Fixes #57564

@github-actions github-actions bot added this to the 3.38.0 milestone Jun 6, 2024
@troopa81 troopa81 changed the title fix(SelectiveMasking): install masks for QgsTemplatedLineSymbolLayer [SelectiveMasking] install masks for QgsTemplatedLineSymbolLayer Jun 6, 2024
Copy link

github-actions bot commented Jun 6, 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 bcea99e)

@troopa81 troopa81 added Symbology Related to vector layer symbology or renderers Bug Either a bug report, or a bug fix. Let's hope for the latter! backport queued_ltr_backports Queued Backports labels Jun 6, 2024
@nyalldawson
Copy link
Collaborator

@troopa81 to fix the test/segfault here i'd suggest using the SafePainter class from https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgsgeometrypaintdevice.py#L45 instead of raw painters throughout the selective masking test class. That should allow the test to exit gracefully and write out the full test report instead of just crashing when a failure occurs.

@troopa81
Copy link
Contributor Author

@troopa81 to fix the test/segfault here i'd suggest using the SafePainter class from https://github.com/qgis/QGIS/blob/master/tests/src/python/test_qgsgeometrypaintdevice.py#L45 instead of raw painters throughout the selective masking test class. That should allow the test to exit gracefully and write out the full test report instead of just crashing when a failure occurs.

this test (and almost all selective masking tests) don't use QPainter directly and use QgsLayoutExporter to generate PDF.
I forgot to remove masks, I think this is the reason of segfaut. I fixed it, let's see if it's better this way (I don't reproduce the seg fault on my machine)

@troopa81
Copy link
Contributor Author

unrelated test failure, segmentation faut has been fixed.

@nyalldawson Do you mind merging?

@qgis qgis deleted a comment from github-actions bot Jun 18, 2024
@troopa81 troopa81 merged commit e3d36d9 into qgis:master Jun 19, 2024
30 checks passed
@qgis-bot
Copy link
Collaborator

The backport to queued_ltr_backports failed:

The process '/usr/bin/git' failed with exit code 1
stderr
error: could not apply c73f4ff1ef1... fix(SelectiveMasking): install masks for QgsTemplatedLineSymbolLayer
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
hint: Disable this message with "git config advice.mergeConflict false"

stdout
Auto-merging src/core/symbology/qgslinesymbollayer.cpp
CONFLICT (content): Merge conflict in src/core/symbology/qgslinesymbollayer.cpp
Auto-merging tests/src/python/test_selective_masking.py

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-queued_ltr_backports queued_ltr_backports
# Navigate to the new working tree
cd .worktrees/backport-queued_ltr_backports
# Create a new branch
git switch --create backport-57694-to-queued_ltr_backports
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick c73f4ff1ef18b46151ace919617e75d04862f2d6,ece791c24d69b5db69f78417702ac3e12dcdedb0,6d60df04abf479b8ed4bc5d2894fd5f2d1b689a6,58a8b3634e79cc7b95287dc6818545b38b38e9c0,bcea99e3309676ae96720316ab5618bd6a7bb6af
# Push it to GitHub
git push --set-upstream origin backport-57694-to-queued_ltr_backports
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-queued_ltr_backports

Then, create a pull request where the base branch is queued_ltr_backports and the compare/head branch is backport-57694-to-queued_ltr_backports.

@qgis-bot qgis-bot added the failed backport The automated backport attempt failed, needs a manual backport label Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport queued_ltr_backports Queued Backports Bug Either a bug report, or a bug fix. Let's hope for the latter! failed backport The automated backport attempt failed, needs a manual backport Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Marker Line masking not working for layout prints or PDF exports
3 participants