Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
4.6.0
-
None
-
Windows 7, Qt 4.6.0
Description
The QTcpServer Fortune Server example isnt working on Windows 7. It doesnt bind itself to a valid port.
in server.cpp
tcpServer = new QTcpServer(this); if (!tcpServer->listen()) { QMessageBox::critical(.....); close(); return; } statusLabel->setText(tr("The server is running on port %1.\n" "Run the Fortune Client example now.") .arg(tcpServer->serverPort()));
tcpServer->serverPort() returns 0, which means the server isnt listening for conenctions.
tcpServer->listen() is called without a port parameter. So it should choose a port automatically which it doesnt. The call however returns true
Under Windows XP the example works fine, starts up and automatically chooses a port.
Other Examples using QTcpServer in the same way, without specifying a port explicitly, are failing too.
Attachments
Issue Links
- relates to
-
QTBUG-11870 The fortune client example doesn't work
- Closed
-
QTBUG-13121 Fortune Client hanging on misconfigured ip address
- Closed