forked from qt-creator/qt-creator
ShellCommand: Do not crash when no binary is given
Task-number: QTCREATORBUG-14643 Change-Id: I9c62904c271e2c2a94785dd8223b60d588da822b Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user