Utils: Do not add extra space for user display of command lines

... that do not have parameters.

Change-Id: I2ea20267bc18826e4017a356f6bc13f4b0172f3c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
hjk
2021-03-15 15:46:25 +01:00
parent 92da864a86
commit ef25cfac59

View File

@@ -121,7 +121,10 @@ void CommandLine::addArgs(const QString &inArgs, RawType)
QString CommandLine::toUserOutput() const
{
return m_executable.toUserOutput() + ' ' + m_arguments;
QString res = m_executable.toUserOutput();
if (!m_arguments.isEmpty())
res += ' ' + m_arguments;
return res;
}
QStringList CommandLine::splitArguments(OsType osType) const