Improved "kicked" message handling, make sure it goes in the log too

This commit is contained in:
Klaus Basan
2019-08-06 13:33:07 +02:00
committed by Mat Sutcliffe
parent 86db7f18d8
commit 4e9bf35cfc

View File

@@ -295,7 +295,12 @@ void SwiftGuiStd::displayStatusMessageInGui(const CStatusMessage &statusMessage)
void SwiftGuiStd::onKickedFromNetwork(const QString &kickMessage)
{
this->updateGuiStatusInformation();
this->displayInOverlayWindow(CStatusMessage(this, CStatusMessage::SeverityError, kickMessage.isEmpty() ? QStringLiteral("You have been kicked from the network") : kickMessage));
const QString msgText = kickMessage.isEmpty() ?
QStringLiteral("You have been kicked from the network") :
QStringLiteral("You have been kicked: '%1'").arg(kickMessage);
CLogMessage(this).error(msgText);
// this->displayInOverlayWindow(CStatusMessage(this, CStatusMessage::SeverityError, msgText));
}
void SwiftGuiStd::onConnectionStatusChanged(INetwork::ConnectionStatus from, INetwork::ConnectionStatus to)