Commit 2e5b5046 authored by Eike Ziller's avatar Eike Ziller
Browse files

Select executable when selecting app bundle with path chooser



Task-number: QTCREATORBUG-9152

Change-Id: I7e665d5b713b81c9af58b4d9b93f722fc6abceee
Reviewed-by: default avatarFriedemann Kleint <Friedemann.Kleint@digia.com>
parent 9ad57119
......@@ -387,6 +387,15 @@ void PathChooser::slotBrowse()
newPath = QFileDialog::getOpenFileName(this,
makeDialogTitle(tr("Choose Executable")), predefined,
d->m_dialogFilter);
if (HostOsInfo::hostOs() == OsTypeMac && newPath.endsWith(QLatin1String(".app"))) {
// possibly expand to Foo.app/Contents/MacOS/Foo
QFileInfo info(newPath);
if (info.isDir()) {
QString exePath = newPath + QLatin1String("/Contents/MacOS/") + info.completeBaseName();
if (QFileInfo(exePath).isExecutable())
newPath = exePath;
}
}
break;
case PathChooser::File: // fall through
newPath = QFileDialog::getOpenFileName(this,
......
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