Android: read SDK configuration from user editable path

By default, copy the sdk_definitions.json to Qt Creator user resource
path. The user can use that to make any updates if desired.

Add SdkDownloader instance as a member of AndroidSettingsWidget.

Change-Id: Ieabc9c6ddecbe63586f750b26bcf4ca990caee26
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-03-16 20:14:56 +02:00
parent 76c2208bac
commit 41dd8dc8ef
4 changed files with 65 additions and 50 deletions

View File

@@ -26,6 +26,8 @@
#ifndef ANDROIDSDKDOWNLOADER_H
#define ANDROIDSDKDOWNLOADER_H
#include "androidconfigurations.h"
#include <QNetworkReply>
#include <QObject>
#include <QProgressDialog>
@@ -38,7 +40,7 @@ class AndroidSdkDownloader : public QObject
Q_OBJECT
public:
AndroidSdkDownloader(const QUrl &sdkUrl, const QByteArray &sha256);
AndroidSdkDownloader();
void downloadAndExtractSdk(const QString &jdkPath, const QString &sdkExtractPath);
static QString dialogTitle();
@@ -68,8 +70,7 @@ private:
QNetworkReply *m_reply = nullptr;
QString m_sdkFilename;
QProgressDialog *m_progressDialog = nullptr;
QUrl m_sdkUrl;
QByteArray m_sha256;
AndroidConfig m_androidConfig;
};
} // Internal