QLocalSocket: make socket descriptor qintptr

This is consistent with the other socket classes.

Also see commit bf7f170607.

Change-Id: Ic4bf01bd4abf778e21fe575c5304f86c9bee82fc
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Joerg Bornemann 2012-01-09 12:33:17 +01:00 committed by Qt by Nokia
parent 4c66ab91a9
commit b03fa845a7
5 changed files with 12 additions and 12 deletions

View File

@ -94,7 +94,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
\fn bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
Initializes QLocalSocket with the native socket descriptor
@ -110,7 +110,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
\fn quintptr QLocalSocket::socketDescriptor() const
\fn qintptr QLocalSocket::socketDescriptor() const
Returns the native socket descriptor of the QLocalSocket object if
this is available; otherwise returns -1.

View File

@ -105,10 +105,10 @@ public:
qint64 readBufferSize() const;
void setReadBufferSize(qint64 size);
bool setSocketDescriptor(quintptr socketDescriptor,
bool setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState = ConnectedState,
OpenMode openMode = ReadWrite);
quintptr socketDescriptor() const;
qintptr socketDescriptor() const;
LocalSocketState state() const;
bool waitForBytesWritten(int msecs = 30000);

View File

@ -250,7 +250,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
QIODevice::open(openMode);
}
bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
@ -290,7 +290,7 @@ bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
newSocketState, openMode);
}
quintptr QLocalSocket::socketDescriptor() const
qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
return d->tcpSocket->socketDescriptor();

View File

@ -349,7 +349,7 @@ void QLocalSocketPrivate::_q_connectToSocket()
connectingOpenMode = 0;
}
bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
@ -392,7 +392,7 @@ void QLocalSocketPrivate::cancelDelayedConnect()
}
}
quintptr QLocalSocket::socketDescriptor() const
qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
return d->unixSocket.socketDescriptor();

View File

@ -189,7 +189,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
// we have a valid handle
d->serverName = name;
if (setSocketDescriptor((quintptr)localSocket, ConnectedState, openMode)) {
if (setSocketDescriptor((qintptr)localSocket, ConnectedState, openMode)) {
d->handle = localSocket;
emit connected();
}
@ -327,7 +327,7 @@ QLocalSocket::LocalSocketError QLocalSocket::error() const
return d->error;
}
bool QLocalSocket::setSocketDescriptor(quintptr socketDescriptor,
bool QLocalSocket::setSocketDescriptor(qintptr socketDescriptor,
LocalSocketState socketState, OpenMode openMode)
{
Q_D(QLocalSocket);
@ -349,10 +349,10 @@ void QLocalSocketPrivate::_q_canWrite()
q->close();
}
quintptr QLocalSocket::socketDescriptor() const
qintptr QLocalSocket::socketDescriptor() const
{
Q_D(const QLocalSocket);
return (quintptr)d->handle;
return (qintptr)d->handle;
}
qint64 QLocalSocket::readBufferSize() const