forked from qt-creator/qt-creator
Android: Fix parameters for the Ant script file dialog
Making sure that the file name field has "ant.bat" set, and that the filtering really works. This patch also ensures that native file separators are shown. Task-Number: QTCREATORBUG-11628 Change-Id: Ibab8c145d0b832e5ad2e2ff62a81818e4044f13e Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
@@ -414,19 +414,19 @@ void AndroidSettingsWidget::browseNDKLocation()
|
||||
void AndroidSettingsWidget::browseAntLocation()
|
||||
{
|
||||
QString dir;
|
||||
QString antApp;
|
||||
QString filter;
|
||||
if (Utils::HostOsInfo::isWindowsHost()) {
|
||||
dir = QDir::homePath();
|
||||
antApp = QLatin1String("ant.bat");
|
||||
dir = QDir::homePath() + QLatin1String("/ant.bat");
|
||||
filter = QLatin1String("ant (ant.bat)");
|
||||
} else {
|
||||
dir = QLatin1String("/usr/bin/ant");
|
||||
antApp = QLatin1String("ant");
|
||||
filter = QLatin1String("ant (ant)");
|
||||
}
|
||||
const QString file =
|
||||
QFileDialog::getOpenFileName(this, tr("Select ant Script"), dir, antApp);
|
||||
QFileDialog::getOpenFileName(this, tr("Select ant Script"), dir, filter);
|
||||
if (!file.length())
|
||||
return;
|
||||
m_ui->AntLocationLineEdit->setText(file);
|
||||
m_ui->AntLocationLineEdit->setText(QDir::toNativeSeparators(file));
|
||||
antLocationEditingFinished();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user