Skip to content

Instantly share code, notes, and snippets.

@mkrautz
Created March 19, 2015 13:44
Show Gist options
  • Save mkrautz/75ad5460014c919c9fe0 to your computer and use it in GitHub Desktop.
Save mkrautz/75ad5460014c919c9fe0 to your computer and use it in GitHub Desktop.
Build fix
diff --git a/src/mumble/ServerHandler.cpp b/src/mumble/ServerHandler.cpp
index 485c462..1fffa82 100644
--- a/src/mumble/ServerHandler.cpp
+++ b/src/mumble/ServerHandler.cpp
@@ -295,10 +295,12 @@ void ServerHandler::run() {
#if QT_VERSION >= 0x050500
qtsSock->setProtocol(QSsl::TlsV1_0OrLater);
-#elif QT_VERSION == 0x050400
+#elif QT_VERSION >= 0x050400
// In Qt 5.4, QSsl::SecureProtocols is equivalent
// to "TLSv1.0 or later", which we require.
qtsSock->setProtocol(QSsl::SecureProtocols);
+#elif QT_VERSION >= 0x050000
+ qtsSock->setProtocol(QSsl::TlsV1_0);
#else
qtsSock->setProtocol(QSsl::TlsV1);
#endif
diff --git a/src/murmur/Server.cpp b/src/murmur/Server.cpp
index eb185c0..7485c88 100644
--- a/src/murmur/Server.cpp
+++ b/src/murmur/Server.cpp
@@ -1154,10 +1154,12 @@ void Server::newClient() {
#if QT_VERSION >= 0x050500
sock->setProtocol(QSsl::TlsV1_0OrLater);
-#elif QT_VERSION == 0x050400
+#elif QT_VERSION >= 0x050400
// In Qt 5.4, QSsl::SecureProtocols is equivalent
// to "TLSv1.0 or later", which we require.
sock->setProtocol(QSsl::SecureProtocols);
+#elif QT_VERSION >= 0x050000
+ sock->setProtocol(QSsl::TlsV1_0);
#else
sock->setProtocol(QSsl::TlsV1);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment