summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorMarkus Goetz <Markus.Goetz@nokia.com>2009-10-19 08:42:42 (GMT)
committerMarkus Goetz <Markus.Goetz@nokia.com>2009-10-19 08:50:28 (GMT)
commit2e575432f1e1fd90e1f973791f2ee8df33b6e45e (patch)
treea2d626031741276f33ed925f67c10f2165db4fd7 /src/network/socket
parent8472e256280f683f69fd5d9db5c2ed645dab6c92 (diff)
downloadQt-2e575432f1e1fd90e1f973791f2ee8df33b6e45e.zip
Qt-2e575432f1e1fd90e1f973791f2ee8df33b6e45e.tar.gz
Qt-2e575432f1e1fd90e1f973791f2ee8df33b6e45e.tar.bz2
QSslSocket: Also handle setSocketOption
Handle setSocketOption and forward it to the plainSocket that QSslSocket is using internally. Reviewed-by: Thiago
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qabstractsocket.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 86ccef2..9fb0b47 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1578,6 +1578,13 @@ bool QAbstractSocket::setSocketDescriptor(int socketDescriptor, SocketState sock
*/
void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, const QVariant &value)
{
+#ifndef QT_NO_OPENSSL
+ if (QSslSocket *sslSocket = qobject_cast<QSslSocket*>(this)) {
+ sslSocket->setSocketOption(option, value);
+ return;
+ }
+#endif
+
if (!d_func()->socketEngine)
return;
@@ -1600,6 +1607,12 @@ void QAbstractSocket::setSocketOption(QAbstractSocket::SocketOption option, cons
*/
QVariant QAbstractSocket::socketOption(QAbstractSocket::SocketOption option)
{
+#ifndef QT_NO_OPENSSL
+ if (QSslSocket *sslSocket = qobject_cast<QSslSocket*>(this)) {
+ return sslSocket->socketOption(option);
+ }
+#endif
+
if (!d_func()->socketEngine)
return QVariant();