mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals.
This commit is contained in:
@@ -39,7 +39,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (hasValidRealName())
|
||||
{
|
||||
return m_realname % QStringLiteral(" ") % getDbKeyAsStringInParentheses();
|
||||
return m_realname % u' ' % getDbKeyAsStringInParentheses();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -441,7 +441,7 @@ namespace BlackMisc
|
||||
|
||||
report +=
|
||||
(report.isEmpty() ? empty : separator) %
|
||||
QString::number(++c) % QStringLiteral(": ") %
|
||||
QString::number(++c) % u": " %
|
||||
CNetworkUtils::networkConfigurationToString(config);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ namespace BlackMisc
|
||||
{
|
||||
report +=
|
||||
(report.isEmpty() ? empty : separator) %
|
||||
QStringLiteral("QAM: ") %
|
||||
u"QAM: " %
|
||||
CNetworkUtils::createNetworkAccessManagerReport(qam);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ namespace BlackMisc
|
||||
QString CRole::convertToQString(bool i18n) const
|
||||
{
|
||||
Q_UNUSED(i18n);
|
||||
return "Role: " % m_name %
|
||||
" description: " % m_description %
|
||||
return u"Role: " % m_name %
|
||||
u" description: " % m_description %
|
||||
this->getDbKeyAsStringInParentheses(" ");
|
||||
}
|
||||
|
||||
|
||||
@@ -41,10 +41,10 @@ namespace BlackMisc
|
||||
if (this->isPrivateMessage())
|
||||
{
|
||||
return m_message %
|
||||
QStringLiteral(" ") % m_senderCallsign.toQString(i18n) %
|
||||
QStringLiteral(" ") % m_recipientCallsign.toQString(i18n);
|
||||
u' ' % m_senderCallsign.toQString(i18n) %
|
||||
u' ' % m_recipientCallsign.toQString(i18n);
|
||||
}
|
||||
return m_message % QStringLiteral(" ") % m_frequency.toQString(i18n);
|
||||
return m_message % u' ' % m_frequency.toQString(i18n);
|
||||
}
|
||||
|
||||
bool CTextMessage::isPrivateMessage() const
|
||||
@@ -87,7 +87,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (textMessage.isEmpty()) { return false; }
|
||||
if (!this->canBeAppended(textMessage)) { return false; }
|
||||
m_message += QStringLiteral(" ") % textMessage.getMessage();
|
||||
m_message += u' ' % textMessage.getMessage();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace BlackMisc
|
||||
{
|
||||
if (this->hasRealName())
|
||||
{
|
||||
if (this->hasId()) { return this->getRealName() % QStringLiteral(" (") % this->getId() % QStringLiteral(")"); }
|
||||
if (this->hasId()) { return this->getRealName() % u" (" % this->getId() % QStringLiteral(")"); }
|
||||
return this->getRealName();
|
||||
}
|
||||
return this->getId();
|
||||
@@ -78,11 +78,11 @@ namespace BlackMisc
|
||||
QString s = m_realname;
|
||||
if (this->hasId())
|
||||
{
|
||||
s += QStringLiteral(" (") % m_id % QStringLiteral(")");
|
||||
s += u" (" % m_id % u')';
|
||||
}
|
||||
if (this->hasCallsign())
|
||||
{
|
||||
s += QStringLiteral(" ") % this->getCallsign().getStringAsSet();
|
||||
s += u' ' % this->getCallsign().getStringAsSet();
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user