QNetworkInformation: Request all supported feature when loading by name

When we load by name we used to pass an empty QList to the backend as
the list of requested features. That's not ideal if a backend were to
selectively initialize components, so let's just pass the list of
supported features.
Not a problem in any current backend but it looks weird.

Pick-to: 6.2
Change-Id: Ib022778b08d32e4057103a86bfdda9e17e6ebdaf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2021-09-17 15:26:07 +02:00
parent 0728e88be6
commit 9e770e3572

View File

@ -235,7 +235,7 @@ QNetworkInformation *QNetworkInformationPrivate::create(QStringView name)
#ifdef DEBUG_LOADING
qDebug() << "Creating instance using loader named " << (*it)->name();
#endif
QNetworkInformationBackend *backend = (*it)->create({});
QNetworkInformationBackend *backend = (*it)->create((*it)->featuresSupported());
if (!backend)
return nullptr;
dataHolder->instanceHolder.reset(new QNetworkInformation(backend));