Android: Fix UNINIT_CTOR and PASS_BY_VALUE issues

Change-Id: Ie77e69226769d9ea0440611f2f5985c5ec08beaa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2020-02-10 16:02:24 +02:00
parent 159c82802b
commit 2555f4b8dd
3 changed files with 5 additions and 5 deletions

View File

@@ -71,7 +71,7 @@ const int avdCreateTimeoutMs = 30000;
\c true if the command is successfully executed. Output is copied into \a output. The function
blocks the calling thread.
*/
bool AndroidAvdManager::avdManagerCommand(const AndroidConfig config, const QStringList &args, QString *output)
bool AndroidAvdManager::avdManagerCommand(const AndroidConfig &config, const QStringList &args, QString *output)
{
CommandLine cmd(config.avdManagerToolPath(), args);
Utils::SynchronousProcess proc;
@@ -112,7 +112,7 @@ static bool checkForTimeout(const chrono::steady_clock::time_point &start,
return timedOut;
}
static CreateAvdInfo createAvdCommand(const AndroidConfig config, const CreateAvdInfo &info)
static CreateAvdInfo createAvdCommand(const AndroidConfig &config, const CreateAvdInfo &info)
{
CreateAvdInfo result = info;

View File

@@ -54,7 +54,7 @@ public:
QString waitForAvd(const QString &avdName,
const std::function<bool()> &cancelChecker = {}) const;
bool isAvdBooted(const QString &device) const;
static bool avdManagerCommand(const AndroidConfig config,
static bool avdManagerCommand(const AndroidConfig &config,
const QStringList &args,
QString *output);

View File

@@ -65,9 +65,9 @@ private:
#endif
QNetworkAccessManager m_manager;
QNetworkReply *m_reply;
QNetworkReply *m_reply = nullptr;
QString m_sdkFilename;
QProgressDialog *m_progressDialog;
QProgressDialog *m_progressDialog = nullptr;
QUrl m_sdkUrl;
QByteArray m_sha256;
};