Handle signals in the registered object's thread


Do not call `sender()` from a different thread. As the API documentation
indicates, that is not supported and can lead to crashes as experienced
on the CI frequently.

Instead, we now have per-thread SignalHandlers and use those to get
notified about signals and metacall events.

Moving a registered object into a different thread isn't supported once
it was registered. But the object can be deregistered, moved, and then
re-registered.

[ChangeLog] Signals from objects living in a different thread than the
QWebChannel are now handled correctly.

Task-number: QTBUG-51366
Change-Id: I1edb0694b946a494b6c0d4a8a6dc6b452dcb2c7a
Reviewed-by: Arno Rehn <a.rehn@menlosystems.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
commit28455e59c0b940200fe0223472a80104ce1a02dd
parente4c7122d78e4f8dccc246a027cde1bf43a87841d
authorMilian Wolff <milian.wolff@kdab.com>
committerArno Rehn <a.rehn@menlosystems.com>
commit timeFri, 16 Apr 2021 14:04:38 +0200