GIT_SILENT: minor qstring optimization

This commit is contained in:
Laurent Montel
2019-09-07 13:33:09 +02:00
parent 569305e014
commit f96deb39aa
17 changed files with 35 additions and 35 deletions

View File

@@ -141,7 +141,7 @@ QSet<QString> ProcessInfo::commonDirNames()
QString ProcessInfo::formatShortDir(const QString &input) const
{
if(input == QStringLiteral("/")) {
if(input == QLatin1String("/")) {
return QStringLiteral("/");
}
@@ -1151,7 +1151,7 @@ QString SSHProcessInfo::format(const QString &input) const
// Depending on whether -l was passed to ssh (which is mostly not the
// case due to ~/.ssh/config).
if (_user.isEmpty()) {
output.replace(QLatin1String("%U"), QString());
output.remove(QLatin1String("%U"));
} else {
output.replace(QLatin1String("%U"), _user + QLatin1Char('@'));
}