Android: Fix double slash in ndk's ant autodetection

Just use Utils::FileName, it magically does the right thing. :)

Task-number: QTCREATORBUG-10542
Change-Id: Id0d508c1e7d9317fa2e4a56ae9389e909c0c3834
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Daniel Teske
2013-10-30 13:23:11 +01:00
parent a2eba90b23
commit c07f6d3c82

View File

@@ -313,10 +313,11 @@ void AndroidSettingsWidget::searchForAnt(const QString &location)
QDir parentFolder = QFileInfo(location).absoluteDir();
foreach (const QString &file, parentFolder.entryList()) {
if (file.startsWith(QLatin1String("apache-ant"))) {
QString ant = parentFolder.absolutePath() + QLatin1Char('/') + file + QLatin1String("/bin/ant.bat");
if (QFileInfo(ant).exists()) {
m_androidConfig.antLocation = Utils::FileName::fromString(ant);
m_ui->AntLocationLineEdit->setText(ant);
Utils::FileName ant = Utils::FileName::fromString(parentFolder.absolutePath());
ant.appendPath(file).appendPath(QLatin1String("bin")).appendPath(QLatin1String("ant.bat"));
if (ant.toFileInfo().exists()) {
m_androidConfig.antLocation = ant;
m_ui->AntLocationLineEdit->setText(ant.toUserOutput());
}
}
}