QNetworkInfo: Simplify flags check

Change-Id: I5e369b9cd2b3abc6c0ac1e632e495b05c506980b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Mårten Nordheim 2023-09-25 13:57:31 +02:00
parent af195c4463
commit 5863568c53

View File

@ -238,7 +238,7 @@ QNetworkInformation *QNetworkInformationPrivate::create(QNetworkInformation::Fea
return dataHolder->instanceHolder.get();
const auto supportsRequestedFeatures = [features](QNetworkInformationBackendFactory *factory) {
return factory && (factory->featuresSupported() & features) == features;
return factory && factory->featuresSupported().testFlags(features);
};
for (auto it = dataHolder->factories.cbegin(), end = dataHolder->factories.cend(); it != end;