Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.3
-
None
Description
QAbstractSocket, QLocalSocket and QLocalServer all use the qintptr type for the native socket descriptor:
qintptr QLocalServer::socketDescriptor() const
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor, QLocalSocket::LocalSocketState socketState = ConnectedState, QIODevice::OpenMode openMode = ReadWrite)
Yet QLocalServer uses quintptr for the incomingConnection method, and only incomingConnection:
virtual void QLocalServer::incomingConnection(quintptr socketDescriptor)
I believe this is an API bug as it forces us to cast the socketDescriptor in order to use it with the associated QLocalSocket class.
While we'd obviously need to cast it to use it with 'native' OS functions, it feels very wrong that we also need to cast it when using pure Qt.