mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Fixed warnings as mentioned in
https://dev.vatsim-germany.org/boards/22/topics/2587?r=2598#message-2598 and found by +win32-msvc*:QMAKE_CXXFLAGS_WARN_ON *= /Wall /W3 /wd4640 /wd4619 /wd4350 /wd4351
This commit is contained in:
@@ -69,7 +69,7 @@ namespace BlackMisc
|
||||
/*
|
||||
* Can connect to IP/port?
|
||||
*/
|
||||
bool CNetworkUtils::canConnect(const QString &hostAddress, quint16 port, QString &message, int timeoutMs)
|
||||
bool CNetworkUtils::canConnect(const QString &hostAddress, int port, QString &message, int timeoutMs)
|
||||
{
|
||||
if (!CNetworkUtils::hasConnectedInterface(false))
|
||||
{
|
||||
@@ -80,7 +80,7 @@ namespace BlackMisc
|
||||
// http://qt-project.org/forums/viewthread/9346
|
||||
QTcpSocket socket;
|
||||
bool connected = false;
|
||||
socket.connectToHost(hostAddress, port);
|
||||
socket.connectToHost(hostAddress, static_cast<quint16>(port));
|
||||
if (!socket.waitForConnected(timeoutMs))
|
||||
{
|
||||
message = QObject::tr("Connection failed : %1", "BlackMisc").arg(socket.errorString());
|
||||
|
||||
Reference in New Issue
Block a user