Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101731

QLocalServer and QLocalSocket use different types for socketDescriptor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.2.3
    • Network: Sockets
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            manordheim Mårten Nordheim
            rthompson Richard Thompson
            Vladimir Minenko Vladimir Minenko
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes