mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-12 15:25:34 +08:00
refs #246 passing c++11 brace-initialized QStringList to CRuntime::logSlot
This commit is contained in:
@@ -331,7 +331,7 @@ namespace BlackCore
|
||||
*/
|
||||
void CContextNetwork::psFsdConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to, const QString &message)
|
||||
{
|
||||
if (this->getRuntime()->isSlotLogForNetworkEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, QString::number(from), QString::number(to));
|
||||
if (this->getRuntime()->isSlotLogForNetworkEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, { QString::number(from), QString::number(to) });
|
||||
CStatusMessageList msgs;
|
||||
// send 1st position
|
||||
if (to == INetwork::Connected)
|
||||
@@ -358,7 +358,7 @@ namespace BlackCore
|
||||
*/
|
||||
void CContextNetwork::psFsdRealNameReplyReceived(const CCallsign &callsign, const QString &realname)
|
||||
{
|
||||
if (this->getRuntime()->isSlotLogForNetworkEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, callsign.toQString(), realname);
|
||||
if (this->getRuntime()->isSlotLogForNetworkEnabled()) this->getRuntime()->logSlot(Q_FUNC_INFO, { callsign.toQString(), realname });
|
||||
if (realname.isEmpty()) return;
|
||||
CIndexVariantMap vm(CAtcStation::IndexControllerRealName, realname);
|
||||
this->m_atcStationsOnline.applyIf(&CAtcStation::getCallsign, callsign, vm);
|
||||
|
||||
@@ -250,6 +250,16 @@ namespace BlackCore
|
||||
qDebug() << func << p1 << p2 << p3 << p4;
|
||||
}
|
||||
|
||||
void CRuntime::logSlot(const char *func, const QString ¶m) const
|
||||
{
|
||||
qDebug() << func << param;
|
||||
}
|
||||
|
||||
void CRuntime::logSlot(const char *func, const QStringList ¶ms) const
|
||||
{
|
||||
qDebug() << func << params;
|
||||
}
|
||||
|
||||
void CRuntime::logSlot(const char *func, bool boolValue) const
|
||||
{
|
||||
qDebug() << func << boolValue;
|
||||
|
||||
@@ -103,8 +103,14 @@ namespace BlackCore
|
||||
bool isSlotLogForSimulatorEnabled() const { return this->m_slotLogSimulator; }
|
||||
|
||||
//! Slot logging
|
||||
//! \todo to be replace if initializer lists becomes available
|
||||
void logSlot(const char *func, const QString &p1 = "", const QString &p2 = "", const QString &p3 = "", const QString &p4 = "") const;
|
||||
//! \deprecated Use a brace-initialized QStringList
|
||||
void logSlot(const char *func, const QString ¶m, const QString &p2, const QString &p3 = "", const QString &p4 = "") const;
|
||||
|
||||
//! Slot logging
|
||||
void logSlot(const char *func, const QString ¶m = "") const;
|
||||
|
||||
//! Slot logging
|
||||
void logSlot(const char *func, const QStringList ¶ms) const;
|
||||
|
||||
//! Slot logging for bool value
|
||||
void logSlot(const char *func, bool boolValue) const;
|
||||
|
||||
Reference in New Issue
Block a user