Display full name if executable has no path markers

* Most likely this executable is an android app and we should display the full
  thing
This commit is contained in:
baldurk
2019-02-08 19:14:14 +00:00
parent ca54a910f5
commit dad5d6e074
+6 -2
View File
@@ -108,8 +108,12 @@ void CaptureDialog::PopulateMostRecent()
if(!settings.executable.isEmpty())
{
ui->loadLastCapture->setEnabled(true);
ui->loadLastCapture->setText(
tr("Load Last Settings - %1").arg(QFileInfo(QString(settings.executable)).completeBaseName()));
if(settings.executable.indexOf('/') < 0 && settings.executable.indexOf('\\') < 0)
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(QString(settings.executable)));
else
ui->loadLastCapture->setText(
tr("Load Last Settings - %1")
.arg(QFileInfo(QString(settings.executable)).completeBaseName()));
return;
}
}