diff options
author | Markus Goetz <Markus.Goetz@nokia.com> | 2011-07-01 14:09:46 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-04 14:32:41 +0200 |
commit | 85869920bb9a4ee45cf4a89e74b1bd3d4ce67eaa (patch) | |
tree | 1dad7fd8061b8b254833873ed8de35b1a2f8f07d /src/network/socket/qnativesocketengine.cpp | |
parent | 3d5d8b6c4ff08806934a07df77f9387edc4243df (diff) |
Always assume IPv6 support
It's 2011 baby! And until Qt5 is released probably 2012 :-)
Change-Id: I397aabf25e93c8afb5f562636710985cf0c7acfa
Reviewed-on: http://codereview.qt.nokia.com/1008
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
Reviewed-by: Markus Goetz
Diffstat (limited to 'src/network/socket/qnativesocketengine.cpp')
-rw-r--r-- | src/network/socket/qnativesocketengine.cpp | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/src/network/socket/qnativesocketengine.cpp b/src/network/socket/qnativesocketengine.cpp index 875852265e..2dc6a40d99 100644 --- a/src/network/socket/qnativesocketengine.cpp +++ b/src/network/socket/qnativesocketengine.cpp @@ -203,6 +203,7 @@ void QNativeSocketEnginePrivate::setError(QAbstractSocket::SocketError error, Er case BroadcastingInitFailedErrorString: socketErrorString = QNativeSocketEngine::tr("Unable to initialize broadcast socket"); break; + // should not happen anymore case NoIpV6ErrorString: socketErrorString = QNativeSocketEngine::tr("Attempt to use IPv6 socket on a platform with no IPv6 support"); break; @@ -345,14 +346,6 @@ bool QNativeSocketEngine::initialize(QAbstractSocket::SocketType socketType, QAb if (isValid()) close(); -#if defined(QT_NO_IPV6) - if (protocol == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif - // Create the socket if (!d->createNewSocket(socketType, protocol)) { #if defined (QNATIVESOCKETENGINE_DEBUG) @@ -511,13 +504,6 @@ bool QNativeSocketEngine::connectToHost(const QHostAddress &address, quint16 por Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::connectToHost(), false); -#if defined (QT_NO_IPV6) - if (address.protocol() == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif if (!d->checkProxy(address)) return false; @@ -581,13 +567,6 @@ bool QNativeSocketEngine::bind(const QHostAddress &address, quint16 port) Q_D(QNativeSocketEngine); Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::bind(), false); -#if defined (QT_NO_IPV6) - if (address.protocol() == QAbstractSocket::IPv6Protocol) { - d->setError(QAbstractSocket::UnsupportedSocketOperationError, - QNativeSocketEnginePrivate::NoIpV6ErrorString); - return false; - } -#endif if (!d->checkProxy(address)) return false; |