Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals.

This commit is contained in:
Mat Sutcliffe
2018-12-20 19:26:39 +00:00
parent 5443701e09
commit ace7650ebe
67 changed files with 394 additions and 398 deletions

View File

@@ -39,7 +39,7 @@ namespace BlackMisc
{
if (hasValidRealName())
{
return m_realname % QStringLiteral(" ") % getDbKeyAsStringInParentheses();
return m_realname % u' ' % getDbKeyAsStringInParentheses();
}
else
{

View File

@@ -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);
}

View File

@@ -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(" ");
}

View File

@@ -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;
}

View File

@@ -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;
}