Commit 3652ca52 authored by Tobias Hunger's avatar Tobias Hunger

ShellCommand: Do not crash when no binary is given

Task-number: QTCREATORBUG-14643
Change-Id: I9c62904c271e2c2a94785dd8223b60d588da822b
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@theqtcompany.com>
parent 0b31635a
......@@ -159,7 +159,10 @@ QString ShellCommand::displayName() const
if (!d->m_jobs.isEmpty()) {
const Internal::ShellCommandPrivate::Job &job = d->m_jobs.at(0);
QString result = job.binary.toFileInfo().baseName();
result[0] = result.at(0).toTitleCase();
if (!result.isEmpty())
result[0] = result.at(0).toTitleCase();
else
result = tr("UNKNOWN");
if (!job.arguments.isEmpty())
result += QLatin1Char(' ') + job.arguments.at(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment