mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +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:
@@ -28,7 +28,7 @@ namespace BlackMisc
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
QString s(m_number);
|
||||
s += m_on;
|
||||
s += BlackMisc::boolToOnOff(m_on);
|
||||
return s;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -18,15 +18,15 @@ namespace BlackMisc
|
||||
QString s;
|
||||
s += m_lights.toQString(i18n);
|
||||
s += " gear down: ";
|
||||
s += m_gearDown;
|
||||
s += BlackMisc::boolToYesNo(m_gearDown);
|
||||
s += " flaps pct: ";
|
||||
s += m_flapsPercentage;
|
||||
s += QString::number(m_flapsPercentage);
|
||||
s += " spoilers out: ";
|
||||
s += m_spoilersOut;
|
||||
s += BlackMisc::boolToYesNo(m_spoilersOut);
|
||||
s += " engines on: ";
|
||||
s += m_engines.toQString(i18n);
|
||||
s += " on ground: ";
|
||||
s += m_isOnGround;
|
||||
s += BlackMisc::boolToYesNo(m_isOnGround);
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackMisc
|
||||
* \param message human readable message
|
||||
* \return
|
||||
*/
|
||||
static bool canConnect(const QString &hostAddress, quint16 port, QString &message, int timeoutMs = 1500);
|
||||
static bool canConnect(const QString &hostAddress, int port, QString &message, int timeoutMs = 1500);
|
||||
|
||||
/*!
|
||||
* Can connect to server?
|
||||
|
||||
@@ -69,10 +69,10 @@ namespace BlackMisc
|
||||
void setDescription(const QString &description) { m_description = description.trimmed().simplified(); }
|
||||
|
||||
//! Get port
|
||||
qint32 getPort() const { return m_port; }
|
||||
int getPort() const { return m_port; }
|
||||
|
||||
//! Set port
|
||||
void setPort(qint32 port) { m_port = port; }
|
||||
void setPort(int port) { m_port = port; }
|
||||
|
||||
//! Server is accepting connections
|
||||
bool isAcceptingConnections() const { return m_isAcceptingConnections; }
|
||||
@@ -101,9 +101,9 @@ namespace BlackMisc
|
||||
QString m_name;
|
||||
QString m_description;
|
||||
QString m_address;
|
||||
qint32 m_port;
|
||||
CUser m_user;
|
||||
bool m_isAcceptingConnections;
|
||||
int m_port;
|
||||
CUser m_user;
|
||||
bool m_isAcceptingConnections;
|
||||
};
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
@@ -57,8 +57,6 @@ namespace BlackMisc
|
||||
return u;
|
||||
}
|
||||
}
|
||||
Q_ASSERT("Wrong index");
|
||||
return QString(""); // never reached
|
||||
}
|
||||
|
||||
void CVoiceCapabilities::setFromFlightPlanRemarks(const QString &flightPlanRemarks)
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace BlackMisc
|
||||
class IOwnAircraftProvider : public IOwnAircraftProviderReadOnly
|
||||
{
|
||||
public:
|
||||
|
||||
using IOwnAircraftProviderReadOnly::ownAircraft;
|
||||
|
||||
//! Own aircraft
|
||||
virtual CSimulatedAircraft &ownAircraft() = 0;
|
||||
|
||||
|
||||
@@ -63,6 +63,11 @@ namespace BlackMisc
|
||||
class IRemoteAircraftProvider : public IRemoteAircraftProviderReadOnly
|
||||
{
|
||||
public:
|
||||
|
||||
using IRemoteAircraftProviderReadOnly::remoteAircraft;
|
||||
using IRemoteAircraftProviderReadOnly::remoteAircraftParts;
|
||||
using IRemoteAircraftProviderReadOnly::remoteAircraftSituations;
|
||||
|
||||
//! All rendered aircraft
|
||||
//! \note in memory reference, not thread safe
|
||||
virtual CSimulatedAircraftList &remoteAircraft() = 0;
|
||||
|
||||
Reference in New Issue
Block a user