mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
refs #336 Using the new CLogMessage syntax to log messages.
This commit is contained in:
@@ -93,7 +93,7 @@ namespace BlackGui
|
||||
}
|
||||
else
|
||||
{
|
||||
emit this->displayInInfoWindow(CLogMessage().info(this, "SELCAL received"), 3 * 1000);
|
||||
emit this->displayInInfoWindow(CLogMessage(this).info("SELCAL received"), 3 * 1000);
|
||||
}
|
||||
}
|
||||
continue; // not displayed
|
||||
@@ -382,12 +382,12 @@ namespace BlackGui
|
||||
{
|
||||
if (!this->getIContextNetwork() || !this->getIContextNetwork()->isConnected())
|
||||
{
|
||||
CLogMessage().error(this, "network needs to be connected");
|
||||
CLogMessage(this).error("network needs to be connected");
|
||||
return;
|
||||
}
|
||||
if (parts.length() < 3)
|
||||
{
|
||||
CLogMessage().error(this, "incorrect message");
|
||||
CLogMessage(this).error("incorrect message");
|
||||
return;
|
||||
}
|
||||
QString p = parts[1].trimmed(); // receiver
|
||||
@@ -416,7 +416,7 @@ namespace BlackGui
|
||||
int index = cmdLine.indexOf(tm.getRecipientCallsign().getStringAsSet(), 0, Qt::CaseInsensitive);
|
||||
if (index < 0)
|
||||
{
|
||||
CLogMessage().error(this, "incomplete message");
|
||||
CLogMessage(this).error("incomplete message");
|
||||
return;
|
||||
}
|
||||
QString msg(cmdLine.mid(index + tm.getRecipientCallsign().asString().length() + 1));
|
||||
@@ -438,20 +438,20 @@ namespace BlackGui
|
||||
// line is considered to be a message to the selected channel, send
|
||||
if (!this->isNetworkConnected())
|
||||
{
|
||||
CLogMessage().error(this, "network needs to be connected");
|
||||
CLogMessage(this).error("network needs to be connected");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this->isVisible())
|
||||
{
|
||||
CLogMessage().error(this, "text messages can only be sent from corresponding page");
|
||||
CLogMessage(this).error("text messages can only be sent from corresponding page");
|
||||
return;
|
||||
}
|
||||
|
||||
int index = this->currentIndex();
|
||||
if (index < 0 || index == this->indexOf(this->ui->tb_TextMessagesAll))
|
||||
{
|
||||
CLogMessage().error(this, "incorrect channel");
|
||||
CLogMessage(this).error("incorrect channel");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user