QNetworkInformation: Rename parameter-less load() to loadDefaultBackend

To clarify its purpose and separate it from the others

Pick-to: 6.3
Change-Id: Id9efcf474ac0cd8777393380bb85c83780454005
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Mårten Nordheim 2022-02-02 15:27:08 +01:00
parent af7e5c78d9
commit 9ec94f31b0
4 changed files with 5 additions and 5 deletions

View File

@ -662,9 +662,9 @@ QNetworkInformation::Features QNetworkInformation::supportedFeatures() const
Returns \c true if it managed to load the backend or if it was already
loaded. Returns \c false otherwise.
\sa instance
\sa instance(), load()
*/
bool QNetworkInformation::load()
bool QNetworkInformation::loadDefaultBackend()
{
int index = -1;
#ifdef Q_OS_WIN

View File

@ -100,7 +100,7 @@ public:
bool supports(Features features) const;
Features supportedFeatures() const;
static bool load();
static bool loadDefaultBackend();
static bool load(QStringView backend);
static bool load(Features features);
static QStringList availableBackends();

View File

@ -105,7 +105,7 @@ void testDetectRouteDisrupted()
QTextStream writer(stdout);
{
if (!QNetworkInformation::load()) {
if (!QNetworkInformation::loadDefaultBackend()) {
writer << "Error: Failed to start";
return;
}

View File

@ -47,7 +47,7 @@ int main(int argc, char **argv)
#endif
// Use the platform-default:
if (!QNetworkInformation::load()) {
if (!QNetworkInformation::loadDefaultBackend()) {
qWarning("Failed to load any backend");
qDebug() << "Backends available:" << QNetworkInformation::availableBackends().join(", ");
return -1;