AndroidSettingsWidget: Don't show a message box for wrong settings

I believe this is responsible for the crash reported in
Task-number: QTCREATORBUG-9724

Change-Id: Id5721e46b9dc9587ff8423cd3d5e6aa9107e7dba
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
Daniel Teske
2013-07-05 13:09:06 +02:00
parent b830444e24
commit 5948bcf328
2 changed files with 104 additions and 59 deletions

View File

@@ -186,8 +186,13 @@ bool AndroidSettingsWidget::checkSDK(const Utils::FileName &location)
|| (!androidExe.appendPath(QLatin1String("/tools/android" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists()
&& !androidBat.appendPath(QLatin1String("/tools/android" ANDROID_BAT_SUFFIX)).toFileInfo().exists())
|| !emulator.appendPath(QLatin1String("/tools/emulator" QTC_HOST_EXE_SUFFIX)).toFileInfo().exists()) {
QMessageBox::critical(this, tr("Android SDK Folder"), tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput()));
m_ui->sdkWarningIconLabel->setVisible(true);
m_ui->sdkWarningLabel->setVisible(true);
m_ui->sdkWarningLabel->setText(tr("\"%1\" does not seem to be an Android SDK top folder.").arg(location.toUserOutput()));
return false;
} else {
m_ui->sdkWarningIconLabel->setVisible(false);
m_ui->sdkWarningLabel->setVisible(false);
}
return true;
}