mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-24 07:55:35 +08:00
Ref T401, utility functions info for crashpad
This commit is contained in:
@@ -177,8 +177,8 @@ namespace BlackMisc
|
||||
QString CServer::getServerSessionId() const
|
||||
{
|
||||
if (!this->isConnected()) { return ""; }
|
||||
static const QString session("%1 %2:%3 %4 %5");
|
||||
return session.arg(this->getName(), this->getAddress()).arg(this->getPort()).arg(this->getUser().getRealName(), this->getFormattedUtcTimestampHms());
|
||||
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());
|
||||
}
|
||||
|
||||
CVariant CServer::propertyByIndex(const CPropertyIndex &index) const
|
||||
|
||||
@@ -55,6 +55,16 @@ namespace BlackMisc
|
||||
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)
|
||||
{
|
||||
m_callsign = callsign;
|
||||
|
||||
@@ -107,6 +107,9 @@ namespace BlackMisc
|
||||
//! Real name + homebase
|
||||
QString getRealNameAndHomeBase(const QString &separator = QString(" ")) const;
|
||||
|
||||
//! Real name and id
|
||||
QString getRealNameAndId() const;
|
||||
|
||||
//! Validate, provide details about issues
|
||||
CStatusMessageList validate() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user