mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-16 10:25:36 +08:00
Fixed clazy warnings: empty QStringLiteral.
This commit is contained in:
@@ -51,7 +51,7 @@ namespace BlackMisc
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
if (m_realname.isEmpty()) { return QStringLiteral("<no realname>"); }
|
||||
return m_realname % (this->hasValidDbKey() ? this->getDbKeyAsStringInParentheses(" ") : QStringLiteral(""));
|
||||
return m_realname % (this->hasValidDbKey() ? this->getDbKeyAsStringInParentheses(" ") : QString());
|
||||
}
|
||||
|
||||
CAuthenticatedUser CAuthenticatedUser::fromDatabaseJson(const QJsonObject &json)
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace BlackMisc
|
||||
if (cap.testFlag(FsdWithAircraftConfig)) sl << "aircraft config";
|
||||
if (cap.testFlag(FsdWithGroundFlag)) sl << "gnd.flag";
|
||||
if (cap.testFlag(FsdModelString)) sl << "modelstring";
|
||||
if (sl.isEmpty()) { return QStringLiteral(""); }
|
||||
if (sl.isEmpty()) { return {}; }
|
||||
return sl.join(", ");
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace BlackMisc
|
||||
|
||||
QString CRemoteFile::getNameAndSize() const
|
||||
{
|
||||
if (!this->hasName()) { return QStringLiteral(""); }
|
||||
if (!this->hasName()) { return {}; }
|
||||
static const QString s("%1 (%2)");
|
||||
return s.arg(this->getName(), this->getSizeHumanReadable());
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace BlackMisc
|
||||
|
||||
QString CServer::getServerSessionId() const
|
||||
{
|
||||
if (!this->isConnected()) { return ""; }
|
||||
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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user