mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -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
|
// Hence - putting this code in a code block so the scope of the socket
|
||||||
// variable vanishes to make that socket available.
|
// variable vanishes to make that socket available.
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
QTcpSocket socket;
|
QTcpSocket socket;
|
||||||
socket.bind(0, QTcpSocket::ShareAddress);
|
socket.bind(0, QTcpSocket::ShareAddress);
|
||||||
|
#else
|
||||||
|
QUdpSocket socket;
|
||||||
|
socket.bind(0, QUdpSocket::ShareAddress);
|
||||||
|
#endif
|
||||||
port = socket.localPort();
|
port = socket.localPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user