Commit 41d3f0f2 authored by Daniel Teske's avatar Daniel Teske
Browse files

AndroidSettingsDialog: Warn the user that spaces in the ndk path are bad



Task-number: QTCREATORBUG-11629
Change-Id: I576940fa5ac3fd47376cf3fc700689e1046387b0
Reviewed-by: default avatarAlessandro Portale <alessandro.portale@digia.com>
parent c751e2d6
......@@ -172,6 +172,11 @@ void AndroidSettingsWidget::check(AndroidSettingsWidget::Mode mode)
|| !toolChainPath.appendPath(QLatin1String("toolchains")).toFileInfo().exists()
|| !sourcesPath.appendPath(QLatin1String("sources/cxx-stl")).toFileInfo().exists()) {
m_ndkState = Error;
m_ndkErrorMessage = tr("\"%1\" does not seem to be an Android NDK top folder.")
.arg(m_androidConfig.ndkLocation().toUserOutput());
} else if (platformPath.toString().contains(QLatin1String(" "))) {
m_ndkState = Error;
m_ndkErrorMessage = tr("The Android NDK cannot be installed into a path with spaces.");
} else {
QList<AndroidToolChainFactory::AndroidToolChainInformation> compilerPaths
= AndroidToolChainFactory::toolchainPathsForNdk(m_androidConfig.ndkLocation());
......@@ -242,14 +247,13 @@ void AndroidSettingsWidget::applyToUi(AndroidSettingsWidget::Mode mode)
}
if (mode & Ndk) {
Utils::FileName location = Utils::FileName::fromUserInput(m_ui->NDKLocationLineEdit->text());
if (m_ndkState == NotSet) {
m_ui->ndkWarningIconLabel->setVisible(false);
m_ui->toolchainFoundLabel->setVisible(false);
m_ui->kitWarningIconLabel->setVisible(false);
m_ui->kitWarningLabel->setVisible(false);
} else if (m_ndkState == Error) {
m_ui->toolchainFoundLabel->setText(tr("\"%1\" does not seem to be an Android NDK top folder.").arg(location.toUserOutput()));
m_ui->toolchainFoundLabel->setText(m_ndkErrorMessage);
m_ui->toolchainFoundLabel->setVisible(true);
m_ui->ndkWarningIconLabel->setVisible(true);
m_ui->kitWarningIconLabel->setVisible(false);
......
......@@ -103,6 +103,7 @@ private:
State m_sdkState;
State m_ndkState;
QString m_ndkErrorMessage;
int m_ndkCompilerCount;
QString m_ndkMissingQtArchs;
State m_javaState;
......
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