Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API.

This commit is contained in:
Mat Sutcliffe
2018-12-23 20:12:49 +00:00
parent cba820cbce
commit 225ff81252
118 changed files with 724 additions and 721 deletions

View File

@@ -132,7 +132,7 @@ namespace BlackSimPlugin
// Copy the Host Address
if (FAILED(hr = enumHostsResponseMsg->pAddressSender->Duplicate(hostNode.getHostAddressPtr())))
{
CLogMessage(this).warning("Failed to duplicate host address!");
CLogMessage(this).warning(u"Failed to duplicate host address!");
return hr;
}
@@ -176,14 +176,14 @@ namespace BlackSimPlugin
IID_IDirectPlay8Peer,
reinterpret_cast<void **>(&m_directPlayPeer))))
{
CLogMessage(this).warning("Failed to create DirectPlay8Peer object!");
CLogMessage(this).warning(u"Failed to create DirectPlay8Peer object!");
return hr;
}
// Init DirectPlay
if (FAILED(hr = m_directPlayPeer->Initialize(&m_callbackWrapper, m_callbackWrapper.messageHandler, 0)))
{
CLogMessage(this).warning("Failed to initialize directplay peer!");
CLogMessage(this).warning(u"Failed to initialize directplay peer!");
return hr;
}
@@ -191,7 +191,7 @@ namespace BlackSimPlugin
if (!isServiceProviderValid(&CLSID_DP8SP_TCPIP))
{
hr = E_FAIL;
CLogMessage(this).warning("Service provider is invalid!");
CLogMessage(this).warning(u"Service provider is invalid!");
return hr;
}
@@ -208,7 +208,7 @@ namespace BlackSimPlugin
if (hr != DPNERR_BUFFERTOOSMALL)
{
CLogMessage(this).warning("Failed to enumerate service providers!");
CLogMessage(this).warning(u"Failed to enumerate service providers!");
return false;
}
@@ -219,7 +219,7 @@ namespace BlackSimPlugin
if (FAILED(hr = m_directPlayPeer->EnumServiceProviders(&CLSID_DP8SP_TCPIP, nullptr, dpnSPInfo, &dwSize, &dwItems, 0)))
{
CLogMessage(this).warning("Failed to enumerate service providers!");
CLogMessage(this).warning(u"Failed to enumerate service providers!");
return false;
}
@@ -240,14 +240,14 @@ namespace BlackSimPlugin
IID_IDirectPlay8Address,
reinterpret_cast<void **>(&m_deviceAddress))))
{
CLogMessage(this).warning("Failed to create DirectPlay8Address instance!");
CLogMessage(this).warning(u"Failed to create DirectPlay8Address instance!");
return hr;
}
// Set the SP for our Device Address
if (FAILED(hr = m_deviceAddress->SetSP(&CLSID_DP8SP_TCPIP)))
{
CLogMessage(this).warning("Failed to set SP!");
CLogMessage(this).warning(u"Failed to set SP!");
return hr;
}
@@ -292,7 +292,7 @@ namespace BlackSimPlugin
DPNSEND_SYNC | DPNSEND_NOLOOPBACK)))
{
const QString m(message);
CLogMessage(this).warning("DirectPlay: Failed to send message!");
CLogMessage(this).warning(u"DirectPlay: Failed to send message!");
CLogMessage(this).debug() << m;
}
return hr;

View File

@@ -141,7 +141,7 @@ namespace BlackSimPlugin
}
else
{
CLogMessage(this).info("Hosting successfully started");
CLogMessage(this).info(u"Hosting successfully started");
m_hostStatus = Hosting;
}
@@ -171,7 +171,7 @@ namespace BlackSimPlugin
if (m_hostStatus == Terminated) return hr;
CLogMessage(this).info("Hosting terminated!");
CLogMessage(this).info(u"Hosting terminated!");
if (FAILED(hr = m_directPlayPeer->TerminateSession(nullptr, 0, 0)))
{
return logDirectPlayError(hr);

View File

@@ -87,7 +87,7 @@ namespace BlackSimPlugin
FS_PBH pbhstrct;
pbhstrct.pbh = positionVelocity.pbh;
int pitch = qRound(std::floor(pbhstrct.pitch / CFs9Sdk::pitchMultiplier()));
if (pitch < -90 || pitch > 89) { CLogMessage().warning("FS9: Pitch value out of limits: %1") << pitch; }
if (pitch < -90 || pitch > 89) { CLogMessage().warning(u"FS9: Pitch value out of limits: %1") << pitch; }
int bank = qRound(std::floor(pbhstrct.bank / CFs9Sdk::bankMultiplier()));
// MSFS has inverted pitch and bank angles
@@ -187,7 +187,7 @@ namespace BlackSimPlugin
{
emit aircraftRenderingChanged(remoteAircraftCopy);
}
CLogMessage(this).info("FS9: Added aircraft %1") << callsign.toQString();
CLogMessage(this).info(u"FS9: Added aircraft %1") << callsign.toQString();
return true;
}
@@ -199,7 +199,7 @@ namespace BlackSimPlugin
fs9Client->quit();
m_hashFs9Clients.remove(callsign);
updateAircraftRendered(callsign, false);
CLogMessage(this).info("FS9: Removed aircraft %1") << callsign.toQString();
CLogMessage(this).info(u"FS9: Removed aircraft %1") << callsign.toQString();
return true;
}
@@ -453,7 +453,7 @@ namespace BlackSimPlugin
if (m_isConnecting || isOk(m_lobbyClient->connectFs9ToHost(m_fs9Host->getHostAddress())))
{
m_isConnecting = true;
CLogMessage(this).info("swift is joining FS9 to the multiplayer session...");
CLogMessage(this).info(u"swift is joining FS9 to the multiplayer session...");
}
}