Android: drop const from AndroidConfigurations::currentConfig()

Since the config can be expected to modify configuration values
(e.g. setEmulatorArgs()) it shouldn't be const, but can be set
to const whenever creating a reference that is not meant for
modifying the config.

Change-Id: I8c816a5422d4d57afa158c723d908e3a9a9a0db8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Assam Boudjelthia
2021-10-25 15:58:02 +03:00
parent 73fb9d7002
commit d5a3435798
11 changed files with 16 additions and 16 deletions

View File

@@ -116,7 +116,7 @@ bool AndroidToolChain::isValid() const
void AndroidToolChain::addToEnvironment(Environment &env) const
{
AndroidConfig config = AndroidConfigurations::currentConfig();
const AndroidConfig &config = AndroidConfigurations::currentConfig();
env.set(QLatin1String("ANDROID_NDK_HOST"), config.toolchainHostFromNdk(m_ndkLocation));
const Utils::FilePath javaHome = config.openJDKLocation();
if (javaHome.exists()) {
@@ -178,7 +178,7 @@ static FilePath clangPlusPlusPath(const FilePath &clangPath)
static QList<FilePath> uniqueNdksForCurrentQtVersions()
{
AndroidConfig config = AndroidConfigurations::currentConfig();
const AndroidConfig &config = AndroidConfigurations::currentConfig();
auto androidQtVersions = QtSupport::QtVersionManager::versions(
[](const QtSupport::BaseQtVersion *v) {