Don't concatenate QStrings if concatenating string literals is fine

Change-Id: Ia0aac2f09e9245339951ffff13c81b3d3ea0987e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Thiago Macieira
2015-03-03 13:45:59 -08:00
committed by Orgad Shaneh
parent 7f20035881
commit 3e54ec22e5

View File

@@ -415,8 +415,8 @@ QString VcsManager::msgAddToVcsFailedTitle()
QString VcsManager::msgToAddToVcsFailed(const QStringList &files, const IVersionControl *vc)
{
return files.size() == 1
? tr("Could not add the file\n%1\nto version control (%2)")
.arg(files.front(), vc->displayName()) + QLatin1Char('\n')
? tr("Could not add the file\n%1\nto version control (%2)\n")
.arg(files.front(), vc->displayName())
: tr("Could not add the following files to version control (%1)\n%2")
.arg(vc->displayName(), files.join(QString(QLatin1Char('\n'))));
}