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

Don't silently close QGIS with unsaved changes in the console script #39191

Merged
merged 3 commits into from Oct 6, 2020

Conversation

nyalldawson
Copy link
Collaborator

This leads to data loss, so instead prompt the user what to do with the unsaved changes before exiting

Also adds an interface for plugins and scripts to register custom logic to prevent the QGIS application from exiting, so that plugins can implement custom logic to determine whether it is safe for the application to exit, e.g. by checking whether the plugin or script has any unsaved changes which should be saved or discarded before allowing QGIS to exit.

the QGIS application from exiting

This interface allows plugins to implement custom logic to determine whether it is safe
for the application to exit, e.g. by checking whether the plugin or script has any
unsaved changes which should be saved or discarded before allowing QGIS to exit.
editors

Instead prompt the user what to do with these changes

Fixes qgis#38529
@github-actions github-actions bot added this to the 3.16.0 milestone Oct 6, 2020
@nyalldawson nyalldawson merged commit 31dba54 into qgis:master Oct 6, 2020
@nyalldawson nyalldawson deleted the fix_38529_warn_close branch October 6, 2020 07:04
@zacharlie zacharlie added Changelog Items that are queued to appear in the visual changelog - remove after harvesting ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants