mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-28 01:41:13 -06:00
Revert to the old, arguably broken code for QT4 port selection, as QT4 doesn't support TCP socket binding as QT5 does.
This commit is contained in:
parent
1d27341e21
commit
87bbb5ef2c
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user