diff options
author | Daniel Teske <daniel.teske@digia.com> | 2013-10-30 13:23:11 +0100 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2013-10-31 12:48:30 +0100 |
commit | c07f6d3c8271b4e1b48cc740a428d073da185590 (patch) | |
tree | f4e1faf9ed9f56971940470aae9b76e550bf1ffa /src/plugins/android/androidsettingswidget.cpp | |
parent | a2eba90b2389076e0060955ea0aaffe63bc0d709 (diff) | |
download | qt-creator-c07f6d3c8271b4e1b48cc740a428d073da185590.tar.gz |
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>
Diffstat (limited to 'src/plugins/android/androidsettingswidget.cpp')
-rw-r--r-- | src/plugins/android/androidsettingswidget.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/android/androidsettingswidget.cpp b/src/plugins/android/androidsettingswidget.cpp index 7949c050f6..f2e7a5dc66 100644 --- a/src/plugins/android/androidsettingswidget.cpp +++ b/src/plugins/android/androidsettingswidget.cpp @@ -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()); } } } |