mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
Ref T401, server info also when not connected
This commit is contained in:
committed by
Mat Sutcliffe
parent
16dd6d7451
commit
bae7680e59
@@ -186,11 +186,12 @@ namespace BlackMisc
|
||||
return msgs;
|
||||
}
|
||||
|
||||
QString CServer::getServerSessionId() const
|
||||
QString CServer::getServerSessionId(bool onlyConnected) const
|
||||
{
|
||||
if (!this->isConnected()) { return {}; }
|
||||
static const QString session("%1 %2:%3 [%4] %5 %6");
|
||||
return session.arg(this->getName(), this->getAddress()).arg(this->getPort()).arg(this->getEcosystem().getSystemString(), this->getUser().getRealName(), this->getFormattedUtcTimestampHms());
|
||||
const bool isConnected = this->isConnected();
|
||||
if (onlyConnected && !isConnected) { return {}; }
|
||||
static const QString session("%1 %2 %3:%4 [%5] %6 %7");
|
||||
return session.arg(isConnected ? u"connected" : u"disconnected").arg(this->getName(), this->getAddress()).arg(this->getPort()).arg(this->getEcosystem().getSystemString(), this->getUser().getRealName(), this->getFormattedUtcTimestampHms());
|
||||
}
|
||||
|
||||
CVariant CServer::propertyByIndex(const CPropertyIndex &index) const
|
||||
|
||||
Reference in New Issue
Block a user