- 
    Bug 
- 
    Resolution: Done
- 
    P2: Important 
- 
    5.0.0
- 
    None
- 
    Qt 5.0.0 X-compiled on Gentoo Linux for mingw64, Windows Vista 64Bit as test environment.
- 
        e3bd06426afce9773fa64afe1a9946647cdec181
The broadcast receiver example is not able to bind the socket.
This is the original code:
    udpSocket = new QUdpSocket(this);
    udpSocket->bind(45454, QUdpSocket::ShareAddress);
To show the problem, I changed the source like this:
    udpSocket = new QUdpSocket(this);
    if(!udpSocket->bind(45454, QUdpSocket::ShareAddress))
        qDebug() << "cannot bind !!!";
This variant is working:
    udpSocket = new QUdpSocket(this);
    if(!udpSocket->bind(QHostAddress::AnyIPv4, 45454, QUdpSocket::ShareAddress))
        qDebug() << "cannot bind !!!";
It seems that the problem is related to the changed behavior of the QHostAddress::Any enum.
- relates to
- 
                    QTBUG-28787 QTcpServer fails to start listening with Windows 7 + 8 & mingw -         
- Closed
 
-