Details
Description
The documentation suggests that "The socket identifier is passed in the socket parameter"
but, unlike in v<5.15, I'm running into issues connecting slots that take the socket ID as their argument.
This example code worked in 5.14.2.2
import os from PySide2.QtCore import QSocketNotifier, QTimer from PySide2.QtWidgets import QApplication app = QApplication([]) reader, writer = os.pipe() notifier = QSocketNotifier(reader, QSocketNotifier.Read) notifier.activated.connect(lambda x: print(x)) # works on < 5.15 os.close(writer) QTimer().singleShot(1000, app.exit) app.exec_()
but in 5.15.0 will throw
TypeError: Can't call meta function because I have no idea how to handle QSocketDescriptor
I see that QSocketNotifier.activated is now an overloaded signal in 5.15... but there doesn't seem to be any way (in PySide at least) to specify the overload with something like:
notifier.activated[socket_descriptor].connect # ... IndexError: Signature activated() not found for signal: activated
Is this an intentional breaking change and backwards incompatibility of the slot signature for QSocketNotifier.activated? And is it no longer possible to get the socket id in the slot?
for external reference, this issue came up in IPython in issue #12355
Thanks!