Remove wrapper lambda from SchedulePage signal connection #2321
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This should fix #2320 - after digging in a bit and comparing object addresses, it appeared that this was caused by a
schedule_changedsignal being sent to theSchedulePagefrom the MainWindow that is deleted ininit_db.Manually disconnecting that signal before deleting the old
MainWindowresolved the error, and after trying some better options, found that simply removing the lambda and connecting the method directly (and adding an optional parameter to make it compatible with the signal's signature) also fixed the test.I'm not very familiar with Qt6 specifically, but I suspect the lambda was causing some sort of lifetime issues, maybe the lambda itself was somehow outliving
SchedulePageand preventing the signal from being deleted?In any case, this seems like a pretty simple change that makes the tests happy on my machine.
Related Issue
#2320
Motivation and Context
I want to run the tests, still :)
How Has This Been Tested?
Ran the tests. They still succeeded.
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.