summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-27 11:46:12 +0100
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-01-31 18:42:15 +0100
commit25537f5fdc9a19e54ad639bdec80e8a1b5805fdd (patch)
tree74543e4574704740baba825744c8728aef48ba1d
parentdc678299c8d38c11d1aa3f531e5d62dc2685bfa7 (diff)
QtNetwork: Disambiguate static variables
They causes clashes in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ifd0539c3b56dc395a860de927736f60ad766224a Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp8
-rw-r--r--src/network/kernel/qnetworkinformation.cpp8
-rw-r--r--src/network/ssl/qtlsbackend.cpp8
3 files changed, 12 insertions, 12 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 2e3a3d81f1..e6fea590bd 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -77,7 +77,7 @@ Q_APPLICATION_STATIC(QNetworkAccessFileBackendFactory, fileBackend)
Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend)
#endif
-Q_APPLICATION_STATIC(QFactoryLoader, loader, QNetworkAccessBackendFactory_iid, "/networkaccess"_L1)
+Q_APPLICATION_STATIC(QFactoryLoader, qnabfLoader, QNetworkAccessBackendFactory_iid, "/networkaccess"_L1)
#if defined(Q_OS_MACOS)
bool getProxyAuth(const QString& proxyHostname, const QString &scheme, QString& username, QString& password)
@@ -1703,13 +1703,13 @@ void QNetworkAccessManagerPrivate::ensureBackendPluginsLoaded()
{
Q_CONSTINIT static QBasicMutex mutex;
std::unique_lock locker(mutex);
- if (!loader())
+ if (!qnabfLoader())
return;
#if QT_CONFIG(library)
- loader->update();
+ qnabfLoader->update();
#endif
int index = 0;
- while (loader->instance(index))
+ while (qnabfLoader->instance(index))
++index;
}
diff --git a/src/network/kernel/qnetworkinformation.cpp b/src/network/kernel/qnetworkinformation.cpp
index 16d8e4d040..fc40787067 100644
--- a/src/network/kernel/qnetworkinformation.cpp
+++ b/src/network/kernel/qnetworkinformation.cpp
@@ -26,7 +26,7 @@ struct QNetworkInformationDeleter
void operator()(QNetworkInformation *information) { delete information; }
};
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, qniLoader,
(QNetworkInformationBackendFactory_iid,
QStringLiteral("/networkinformation")))
@@ -84,7 +84,7 @@ private:
bool QNetworkInformationPrivate::initializeList()
{
- if (!loader())
+ if (!qniLoader())
return false;
if (!dataHolder())
return false;
@@ -92,11 +92,11 @@ bool QNetworkInformationPrivate::initializeList()
QMutexLocker initLocker(&mutex);
#if QT_CONFIG(library)
- loader->update();
+ qniLoader->update();
#endif
// Instantiates the plugins (and registers the factories)
int index = 0;
- while (loader->instance(index))
+ while (qniLoader->instance(index))
++index;
initLocker.unlock();
diff --git a/src/network/ssl/qtlsbackend.cpp b/src/network/ssl/qtlsbackend.cpp
index d1157e5838..8ef82a8a8e 100644
--- a/src/network/ssl/qtlsbackend.cpp
+++ b/src/network/ssl/qtlsbackend.cpp
@@ -27,7 +27,7 @@ QT_BEGIN_NAMESPACE
using namespace Qt::StringLiterals;
-Q_APPLICATION_STATIC(QFactoryLoader, loader, QTlsBackend_iid,
+Q_APPLICATION_STATIC(QFactoryLoader, qtlsbLoader, QTlsBackend_iid,
QStringLiteral("/tls"))
namespace {
@@ -54,7 +54,7 @@ public:
bool tryPopulateCollection()
{
- if (!loader())
+ if (!qtlsbLoader())
return false;
Q_CONSTINIT static QBasicMutex mutex;
@@ -63,10 +63,10 @@ public:
return true;
#if QT_CONFIG(library)
- loader->update();
+ qtlsbLoader->update();
#endif
int index = 0;
- while (loader->instance(index))
+ while (qtlsbLoader->instance(index))
++index;
return true;