Fix wrong usage of QString::arg()

QString::arg() does not change the object itself, but returns a copy
with the place marker replaced.
This commit is contained in:
Roland Winklmeier
2015-08-16 17:11:09 +02:00
committed by Mathew Sutcliffe
parent e9c362f8ac
commit 04b84295c8

View File

@@ -62,8 +62,7 @@ namespace BlackMisc
QString CDistributor::convertToQString(bool i18n) const
{
Q_UNUSED(i18n);
QString s("Id: %1");
s.arg(m_dbKey);
QString s = QString("Id: %1").arg(m_dbKey);
if (this->hasAlias1()) { s.append(" ").append(m_alias1); }
if (this->hasAlias2()) { s.append(" ").append(m_alias2); }
return s;