Remove some lambdas from Utils::transform calls

It is often possible to user (member) functions or members directly.
That improves readablility and potentially reduces the total number of
symbols.
Also use qobject_container_cast at places where it is appropriate.

Change-Id: Ia2591bca356591e001e2c53eeebcf753e5bc3c37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2018-05-28 11:05:37 +02:00
parent 8d9942300f
commit 6e66b2a078
19 changed files with 24 additions and 39 deletions

View File

@@ -313,9 +313,7 @@ SdkPlatformList AndroidSdkManager::installedSdkPlatforms()
{
AndroidSdkPackageList list = m_d->filteredPackages(AndroidSdkPackage::Installed,
AndroidSdkPackage::SdkPlatformPackage);
return Utils::transform(list, [](AndroidSdkPackage *p) {
return static_cast<SdkPlatform *>(p);
});
return Utils::qobject_container_cast<SdkPlatform *>(list);
}
const AndroidSdkPackageList &AndroidSdkManager::allSdkPackages()