forked from qt-creator/qt-creator
Update openSslPath when we change the android sdk path
Change-Id: I39bd02d4f5bba8d03d4606b0de89b50778c7aa01 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
committed by
BogDan Vatra
parent
f671d46c1d
commit
fdb0cf0f6b
@@ -57,6 +57,7 @@
|
|||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QList>
|
#include <QList>
|
||||||
|
#include <QLoggingCategory>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
@@ -67,6 +68,10 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
static Q_LOGGING_CATEGORY(androidsettingswidget, "qtc.android.androidsettingswidget", QtWarningMsg);
|
||||||
|
}
|
||||||
|
|
||||||
namespace Android {
|
namespace Android {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
@@ -719,6 +724,10 @@ void AndroidSettingsWidget::onSdkPathChanged()
|
|||||||
{
|
{
|
||||||
auto sdkPath = Utils::FilePath::fromUserInput(m_ui->SDKLocationPathChooser->rawPath());
|
auto sdkPath = Utils::FilePath::fromUserInput(m_ui->SDKLocationPathChooser->rawPath());
|
||||||
m_androidConfig.setSdkLocation(sdkPath);
|
m_androidConfig.setSdkLocation(sdkPath);
|
||||||
|
Utils::FilePath currentOpenSslPath = m_androidConfig.openSslLocation();
|
||||||
|
if (currentOpenSslPath.isEmpty() || !currentOpenSslPath.exists())
|
||||||
|
currentOpenSslPath = sdkPath.pathAppended("android_openssl");
|
||||||
|
m_ui->openSslPathChooser->setFileName(currentOpenSslPath);
|
||||||
// Package reload will trigger validateSdk.
|
// Package reload will trigger validateSdk.
|
||||||
m_sdkManager->reloadPackages();
|
m_sdkManager->reloadPackages();
|
||||||
}
|
}
|
||||||
@@ -800,8 +809,12 @@ void AndroidSettingsWidget::downloadOpenSslRepo(const bool silent)
|
|||||||
|
|
||||||
const QString openSslRepo("https://github.com/KDAB/android_openssl.git");
|
const QString openSslRepo("https://github.com/KDAB/android_openssl.git");
|
||||||
Utils::QtcProcess *gitCloner = new Utils::QtcProcess(this);
|
Utils::QtcProcess *gitCloner = new Utils::QtcProcess(this);
|
||||||
gitCloner->setCommand(Utils::CommandLine("git", {"clone", "--depth=1", openSslRepo, openSslPath.fileName()}));
|
Utils::CommandLine gitCloneCommand("git",
|
||||||
gitCloner->setWorkingDirectory(openSslPath.parentDir().toString());
|
{"clone", "--depth=1", openSslRepo, openSslPath.toString()});
|
||||||
|
gitCloner->setCommand(gitCloneCommand);
|
||||||
|
|
||||||
|
qCDebug(androidsettingswidget) << "Cloning OpenSSL repo: " <<
|
||||||
|
gitCloneCommand.toUserOutput();
|
||||||
|
|
||||||
QDir openSslDir(openSslPath.toString());
|
QDir openSslDir(openSslPath.toString());
|
||||||
if (openSslDir.exists()) {
|
if (openSslDir.exists()) {
|
||||||
|
Reference in New Issue
Block a user