From 87bbb5ef2cf6a39c589642989d2f3aea2d8bc9a2 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Wed, 29 Mar 2017 11:33:55 -0400 Subject: [PATCH] Revert to the old, arguably broken code for QT4 port selection, as QT4 doesn't support TCP socket binding as QT5 does. --- runtime/pgAdmin4.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/pgAdmin4.cpp b/runtime/pgAdmin4.cpp index a9ab02f79..b4a551f8b 100644 --- a/runtime/pgAdmin4.cpp +++ b/runtime/pgAdmin4.cpp @@ -68,8 +68,13 @@ int main(int argc, char * argv[]) // Hence - putting this code in a code block so the scope of the socket // variable vanishes to make that socket available. { +#if QT_VERSION >= 0x050000 QTcpSocket socket; socket.bind(0, QTcpSocket::ShareAddress); +#else + QUdpSocket socket; + socket.bind(0, QUdpSocket::ShareAddress); +#endif port = socket.localPort(); }