mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Ref T401, utility functions info for crashpad
This commit is contained in:
@@ -177,8 +177,8 @@ namespace BlackMisc
|
|||||||
QString CServer::getServerSessionId() const
|
QString CServer::getServerSessionId() const
|
||||||
{
|
{
|
||||||
if (!this->isConnected()) { return ""; }
|
if (!this->isConnected()) { return ""; }
|
||||||
static const QString session("%1 %2:%3 %4 %5");
|
static const QString session("%1 %2:%3 [%4] %5 %6");
|
||||||
return session.arg(this->getName(), this->getAddress()).arg(this->getPort()).arg(this->getUser().getRealName(), this->getFormattedUtcTimestampHms());
|
return session.arg(this->getName(), this->getAddress()).arg(this->getPort()).arg(this->getEcosystem().getSystemString(), this->getUser().getRealName(), this->getFormattedUtcTimestampHms());
|
||||||
}
|
}
|
||||||
|
|
||||||
CVariant CServer::propertyByIndex(const CPropertyIndex &index) const
|
CVariant CServer::propertyByIndex(const CPropertyIndex &index) const
|
||||||
|
|||||||
@@ -55,6 +55,16 @@ namespace BlackMisc
|
|||||||
return this->getRealName() % separator % this->getHomeBase().asString();
|
return this->getRealName() % separator % this->getHomeBase().asString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString CUser::getRealNameAndId() const
|
||||||
|
{
|
||||||
|
if (this->hasRealName())
|
||||||
|
{
|
||||||
|
if (this->hasId()) { return this->getRealName() % QStringLiteral(" (") % this->getId() % QStringLiteral(")"); }
|
||||||
|
return this->getRealName();
|
||||||
|
}
|
||||||
|
return this->getId();
|
||||||
|
}
|
||||||
|
|
||||||
void CUser::setCallsign(const CCallsign &callsign)
|
void CUser::setCallsign(const CCallsign &callsign)
|
||||||
{
|
{
|
||||||
m_callsign = callsign;
|
m_callsign = callsign;
|
||||||
|
|||||||
@@ -107,6 +107,9 @@ namespace BlackMisc
|
|||||||
//! Real name + homebase
|
//! Real name + homebase
|
||||||
QString getRealNameAndHomeBase(const QString &separator = QString(" ")) const;
|
QString getRealNameAndHomeBase(const QString &separator = QString(" ")) const;
|
||||||
|
|
||||||
|
//! Real name and id
|
||||||
|
QString getRealNameAndId() const;
|
||||||
|
|
||||||
//! Validate, provide details about issues
|
//! Validate, provide details about issues
|
||||||
CStatusMessageList validate() const;
|
CStatusMessageList validate() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user