Create a separate receiver object for each signal/callable connect - #365
Open
usiems wants to merge 2 commits into
Open
Create a separate receiver object for each signal/callable connect#365usiems wants to merge 2 commits into
usiems wants to merge 2 commits into
Conversation
This way we can't run out of slot IDs. This fixes #362 This also enables us to associate the receiver with the instance object of the callable (if it is a method of a QObject-derived class) instead of the sender, so that it is associated with the correct thread, which is important for the AutoConnection used. In a way this also fixes the problem in #363 [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci
usiems
force-pushed
the
fix_signal_to_callable_connects_2
branch
from
August 28, 2026 14:31
f78e9bf to
3390891
Compare
mrbean-bremen
approved these changes
Aug 28, 2026
mrbean-bremen
left a comment
Contributor
There was a problem hiding this comment.
Looks good as far as I can see (though I may miss some possible implications)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 way we can't run out of slot IDs.
This fixes #362
This also enables us to associate the receiver with the instance object of the callable (if it is a method of a QObject-derived class) instead of the sender, so that it is associated with the correct thread, which is important for the AutoConnection used.
In a way this also fixes the problem in #363, because now the receiver object should always live in the same thread as the self object of the callable. The connection to a callable doesn't use the actual slot defined by a slot decorator, but the effect should be largely the same.
Note that this might change the behavior of signal/callable connections when threads are used, so users need to test if their uses still work for them.