Remove QT3_SUPPORT from network
Change-Id: I962bece24c958c053a3edc0e49a594b61a3725ae Reviewed-on: http://codereview.qt.nokia.com/1093 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
This commit is contained in:
parent
1da4753bd9
commit
f45ad0eeb3
@ -1434,36 +1434,6 @@ QFtp::QFtp(QObject *parent)
|
||||
SIGNAL(listInfo(QUrlInfo)));
|
||||
}
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
/*!
|
||||
Use one of the constructors that doesn't take the \a name
|
||||
argument and then use setObjectName() instead.
|
||||
*/
|
||||
QFtp::QFtp(QObject *parent, const char *name)
|
||||
: QObject(*new QFtpPrivate, parent)
|
||||
{
|
||||
Q_D(QFtp);
|
||||
setObjectName(QLatin1String(name));
|
||||
d->errorString = tr("Unknown error");
|
||||
|
||||
connect(&d->pi, SIGNAL(connectState(int)),
|
||||
SLOT(_q_piConnectState(int)));
|
||||
connect(&d->pi, SIGNAL(finished(QString)),
|
||||
SLOT(_q_piFinished(QString)));
|
||||
connect(&d->pi, SIGNAL(error(int,QString)),
|
||||
SLOT(_q_piError(int,QString)));
|
||||
connect(&d->pi, SIGNAL(rawFtpReply(int,QString)),
|
||||
SLOT(_q_piFtpReply(int,QString)));
|
||||
|
||||
connect(&d->pi.dtp, SIGNAL(readyRead()),
|
||||
SIGNAL(readyRead()));
|
||||
connect(&d->pi.dtp, SIGNAL(dataTransferProgress(qint64,qint64)),
|
||||
SIGNAL(dataTransferProgress(qint64,qint64)));
|
||||
connect(&d->pi.dtp, SIGNAL(listInfo(QUrlInfo)),
|
||||
SIGNAL(listInfo(QUrlInfo)));
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
\enum QFtp::State
|
||||
|
||||
|
@ -124,10 +124,6 @@ public:
|
||||
|
||||
qint64 bytesAvailable() const;
|
||||
qint64 read(char *data, qint64 maxlen);
|
||||
#ifdef QT3_SUPPORT
|
||||
inline QT3_SUPPORT qint64 readBlock(char *data, quint64 maxlen)
|
||||
{ return read(data, qint64(maxlen)); }
|
||||
#endif
|
||||
QByteArray readAll();
|
||||
|
||||
int currentId() const;
|
||||
@ -155,11 +151,6 @@ Q_SIGNALS:
|
||||
void commandFinished(int, bool);
|
||||
void done(bool);
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
public:
|
||||
QT3_SUPPORT_CONSTRUCTOR QFtp(QObject *parent, const char *name);
|
||||
#endif
|
||||
|
||||
private:
|
||||
Q_DISABLE_COPY(QFtp)
|
||||
Q_DECLARE_PRIVATE(QFtp)
|
||||
|
@ -232,10 +232,6 @@ public:
|
||||
|
||||
qint64 bytesAvailable() const;
|
||||
qint64 read(char *data, qint64 maxlen);
|
||||
#ifdef QT3_SUPPORT
|
||||
inline QT3_SUPPORT qint64 readBlock(char *data, quint64 maxlen)
|
||||
{ return read(data, qint64(maxlen)); }
|
||||
#endif
|
||||
QByteArray readAll();
|
||||
|
||||
int currentId() const;
|
||||
|
@ -117,15 +117,6 @@ public:
|
||||
bool isNull() const;
|
||||
void clear();
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
inline QT3_SUPPORT quint32 ip4Addr() const { return toIPv4Address(); }
|
||||
inline QT3_SUPPORT bool isIPv4Address() const { return protocol() == QAbstractSocket::IPv4Protocol
|
||||
|| protocol() == QAbstractSocket::UnknownNetworkLayerProtocol; }
|
||||
inline QT3_SUPPORT bool isIp4Addr() const { return protocol() == QAbstractSocket::IPv4Protocol
|
||||
|| protocol() == QAbstractSocket::UnknownNetworkLayerProtocol; }
|
||||
inline QT3_SUPPORT bool isIPv6Address() const { return protocol() == QAbstractSocket::IPv6Protocol; }
|
||||
#endif
|
||||
|
||||
bool isInSubnet(const QHostAddress &subnet, int netmask) const;
|
||||
bool isInSubnet(const QPair<QHostAddress, int> &subnet) const;
|
||||
|
||||
|
@ -2504,10 +2504,6 @@ void QAbstractSocket::disconnectFromHostImplementation()
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
emit connectionClosed(); // compat signal
|
||||
#endif
|
||||
|
||||
// Disable and delete read notification
|
||||
if (d->socketEngine)
|
||||
d->socketEngine->setReadNotificationEnabled(false);
|
||||
@ -2570,9 +2566,6 @@ void QAbstractSocket::disconnectFromHostImplementation()
|
||||
emit stateChanged(d->state);
|
||||
emit readChannelFinished(); // we got an EOF
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
emit delayedCloseFinished(); // compat signal
|
||||
#endif
|
||||
// only emit disconnected if we were connected before
|
||||
if (previousState == ConnectedState || previousState == ClosingState)
|
||||
emit disconnected();
|
||||
@ -2750,78 +2743,6 @@ QNetworkProxy QAbstractSocket::proxy() const
|
||||
}
|
||||
#endif // QT_NO_NETWORKPROXY
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
/*!
|
||||
\enum QAbstractSocket::Error
|
||||
\compat
|
||||
|
||||
Use QAbstractSocket::SocketError instead.
|
||||
|
||||
\value ErrConnectionRefused Use QAbstractSocket::ConnectionRefusedError instead.
|
||||
\value ErrHostNotFound Use QAbstractSocket::HostNotFoundError instead.
|
||||
\value ErrSocketRead Use QAbstractSocket::UnknownSocketError instead.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\typedef QAbstractSocket::State
|
||||
\compat
|
||||
|
||||
Use QAbstractSocket::SocketState instead.
|
||||
|
||||
\table
|
||||
\header \o Qt 3 enum value \o Qt 4 enum value
|
||||
\row \o \c Idle \o \l UnconnectedState
|
||||
\row \o \c HostLookup \o \l HostLookupState
|
||||
\row \o \c Connecting \o \l ConnectingState
|
||||
\row \o \c Connected \o \l ConnectedState
|
||||
\row \o \c Closing \o \l ClosingState
|
||||
\row \o \c Connection \o \l ConnectedState
|
||||
\endtable
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn int QAbstractSocket::socket() const
|
||||
|
||||
Use socketDescriptor() instead.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QAbstractSocket::setSocket(int socket)
|
||||
|
||||
Use setSocketDescriptor() instead.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn Q_ULONG QAbstractSocket::waitForMore(int msecs, bool *timeout = 0) const
|
||||
|
||||
Use waitForReadyRead() instead.
|
||||
|
||||
\oldcode
|
||||
bool timeout;
|
||||
Q_ULONG numBytes = socket->waitForMore(30000, &timeout);
|
||||
\newcode
|
||||
qint64 numBytes = 0;
|
||||
if (socket->waitForReadyRead(msecs))
|
||||
numBytes = socket->bytesAvailable();
|
||||
bool timeout = (error() == QAbstractSocket::SocketTimeoutError);
|
||||
\endcode
|
||||
|
||||
\sa waitForReadyRead(), bytesAvailable(), error(), SocketTimeoutError
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QAbstractSocket::connectionClosed()
|
||||
|
||||
Use disconnected() instead.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\fn void QAbstractSocket::delayedCloseFinished()
|
||||
|
||||
Use disconnected() instead.
|
||||
*/
|
||||
#endif // QT3_SUPPORT
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
Q_NETWORK_EXPORT QDebug operator<<(QDebug debug, QAbstractSocket::SocketError error)
|
||||
{
|
||||
|
@ -108,15 +108,6 @@ public:
|
||||
BoundState,
|
||||
ListeningState,
|
||||
ClosingState
|
||||
#ifdef QT3_SUPPORT
|
||||
,
|
||||
Idle = UnconnectedState,
|
||||
HostLookup = HostLookupState,
|
||||
Connecting = ConnectingState,
|
||||
Connected = ConnectedState,
|
||||
Closing = ClosingState,
|
||||
Connection = ConnectedState
|
||||
#endif
|
||||
};
|
||||
enum SocketOption {
|
||||
LowDelayOption, // TCP_NODELAY
|
||||
@ -221,32 +212,6 @@ private:
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_abortConnectionAttempt())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_testConnection())
|
||||
Q_PRIVATE_SLOT(d_func(), void _q_forceDisconnect())
|
||||
|
||||
#ifdef QT3_SUPPORT
|
||||
public:
|
||||
enum Error {
|
||||
ErrConnectionRefused = ConnectionRefusedError,
|
||||
ErrHostNotFound = HostNotFoundError,
|
||||
ErrSocketRead = UnknownSocketError
|
||||
};
|
||||
inline QT3_SUPPORT int socket() const { return socketDescriptor(); }
|
||||
inline QT3_SUPPORT void setSocket(int socket) { setSocketDescriptor(socket); }
|
||||
inline QT3_SUPPORT qulonglong waitForMore(int msecs, bool *timeout = 0) const
|
||||
{
|
||||
QAbstractSocket *that = const_cast<QAbstractSocket *>(this);
|
||||
if (that->waitForReadyRead(msecs))
|
||||
return qulonglong(bytesAvailable());
|
||||
if (error() == SocketTimeoutError && timeout)
|
||||
*timeout = true;
|
||||
return 0;
|
||||
}
|
||||
typedef SocketState State;
|
||||
Q_SIGNALS:
|
||||
QT_MOC_COMPAT void connectionClosed(); // same as disconnected()
|
||||
QT_MOC_COMPAT void delayedCloseFinished(); // same as disconnected()
|
||||
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
Loading…
Reference in New Issue
Block a user