Use autonegotiation to choose an SSL protocol.
[quassel.git] / src / core / corenetwork.cpp
index 206b019..798f27c 100644 (file)
@@ -185,7 +185,6 @@ void CoreNetwork::connectToIrc(bool reconnecting)
     enablePingTimeout();
 
 #ifdef HAVE_SSL
-    socket.setProtocol((QSsl::SslProtocol)server.sslVersion);
     if (server.useSsl) {
         CoreIdentity *identity = identityPtr();
         if (identity) {
@@ -438,9 +437,9 @@ void CoreNetwork::socketInitialized()
     if (server.useSsl && !socket.isEncrypted())
         return;
 #endif
-
+#if QT_VERSION >= 0x040600
     socket.setSocketOption(QAbstractSocket::KeepAliveOption, true);
-
+#endif
     CoreIdentity *identity = identityPtr();
     if (!identity) {
         qCritical() << "Identity invalid!";