| Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The following class members are part of the Qt 3 compatibility layer. They are provided to help you port old code to Qt 4. We strongly advise against using them in new code.
QAbstractSocket class reference
Use Qt::SocketError instead.
| QAbstractSocket::ErrConnectionRefused | Use Qt::ConnectionRefusedError instead. |
| QAbstractSocket::ErrHostNotFound | Use Qt::HostNotFoundError instead. |
| QAbstractSocket::ErrSocketRead | Use Qt::UnknownSocketError instead. |
Use Qt::SocketState instead.
| QAbstractSocket::Idle | Use Qt::UnconnectedState instead. |
| QAbstractSocket::HostLookup | Use Qt::HostLookupState instead. |
| QAbstractSocket::Connecting | Use Qt::ConnectingState instead. |
| QAbstractSocket::Connected | Use Qt::ConnectedState instead. |
| QAbstractSocket::Closing | Use Qt::ClosingState instead. |
| QAbstractSocket::Connection | Use Qt::ConnectedState instead. |
Use closing() instead.
Use closed() instead.
Use setSocketDescriptor() instead.
Use socketDescriptor() instead.
Use socketState() instead.
Use waitForReadyRead() instead.
For example, if you have code like
bool timeout;
Q_ULONG numBytes = socket->waitForMore(30000, &timeout);
you can rewrite it as
Q_LONGLONG numBytes = 0;
if (socket->waitForReadyRead(msecs))
numBytes = socket->bytesAvailable();
bool timeout = (socketError() == Qt::SocketTimeoutError);
See also waitForReadyRead(), bytesAvailable(), socketError(), and Qt::SocketTimeoutError.
| Copyright © 2004 Trolltech | Trademarks | Qt 4.0.0-b1 |