Allow configured adb path to be empty, look for adb in shipped path

* On windows we ship adb.exe under android/ so that there's no configure
  needed. Look for that file if there isn't an override path.
This commit is contained in:
baldurk
2017-06-14 17:09:22 +01:00
committed by Baldur Karlsson
parent 6423a82d18
commit e0104e8fe0
5 changed files with 22 additions and 14 deletions
@@ -347,7 +347,10 @@ void SettingsDialog::on_browseAdbPath_clicked()
QFileInfo(m_Ctx.Config().Android_AdbExecutablePath).absoluteDir().path());
if(!adb.isEmpty())
{
ui->Android_AdbExecutablePath->setText(adb);
m_Ctx.Config().Android_AdbExecutablePath = adb;
}
m_Ctx.Config().Save();
}
@@ -361,7 +364,7 @@ void SettingsDialog::on_Android_MaxConnectTimeout_valueChanged(double timeout)
void SettingsDialog::on_Android_AdbExecutablePath_textEdited(const QString &adb)
{
if(QFileInfo::exists(adb))
if(QFileInfo::exists(adb) || adb.isEmpty())
m_Ctx.Config().Android_AdbExecutablePath = adb;
m_Ctx.Config().Save();