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>bb10
parent
dc678299c8
commit
25537f5fdc
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue