Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.1
-
None
Description
If one overrides QLocalServer::incomingConnection() to accept the incoming connection by creating their own socket derived from QLocalSocket, and when QLocalSocket::setSocketDescriptor() is called in the override, then stateChanged(QLocalSocket::ConnectedState) is never emitted in Linux. It is always emitted in Windows. It appears that in the Linux implementation, a QAbstractSocket is used as the backend implementation. However, it also appears that the state of the that socket is already set to Connected by the time the backend QAbstractSocket gets into QAbstractSocket::setSocketDescriptor and thus the signal is not emitted (since it doesn't think the state has changed). On Windows, the backend is not a QAbstractSocket (since it's a named pipe) and the signal is unconditionally always emitted. For code that relies on this signal, it does not work correctly in Linux.