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

Make plugin watchdog considering timestamp of last run. Fixes #59370 #59371

Merged

Conversation

borysiasty
Copy link
Member

Description

When you quickly run two QGIS instances one by one, it often wakes the plugin watchdog up: one instance sets the QgsSettings entry, and then the another sees it and thinks it's a crash leftover.

This PR contains a proposed solution: switching the settings entry from boolean value to timestamp. Entries older then 5 seconds are considered crash leftovers, while newer are considered to come from a parallel instance.

Backward compatibility is ensured:

  1. Older QGIS versions only check if the entry exists, so the new datatype doesn't hurt them.
  2. Settings written by older QGIS versions (true) are converted to integer 1, thus are recognized as a very old timestamp.

Copy link

github-actions bot commented Nov 7, 2024

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit d5966a4)

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit d5966a4)

@borysiasty borysiasty added the Squash! Remember to squash this PR, instead of merging or rebasing label Nov 7, 2024
@nyalldawson nyalldawson merged commit 00eccb4 into qgis:master Nov 11, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release-3_40 Bug Either a bug report, or a bug fix. Let's hope for the latter! Plugins Squash! Remember to squash this PR, instead of merging or rebasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants