summaryrefslogtreecommitdiffstats
path: root/src/network/access/qnetworkaccessmanager.cpp
diff options
context:
space:
mode:
authorMike Achtelik <mike.achtelik@gmail.com>2021-12-06 14:29:33 +0100
committerMike Achtelik <mike.achtelik@gmail.com>2021-12-13 16:18:06 +0100
commit3f6041fb82be5b60d0ac572f157b9e621efeb825 (patch)
tree5471aeca951598066b716fa5b81c5ebba084dd49 /src/network/access/qnetworkaccessmanager.cpp
parent80a76df1784a135fa1d86ac88f8c4d2dc6bf8c35 (diff)
QNetworkAccessBackend: Fix living QObjects after QCoreApplication shutdown
Since switching to the plugin bases system for the network backends, Qt again retains some QObjects after QCoreApplication shutdown. This was previously fixed in QTBUG-84234, so make sure we destroy the newly introduced QObjects as well. Task-number: QTBUG-84234 Change-Id: Ibb411c2dfb716b8f2aea2a3e366253fbd9dd8f64 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/access/qnetworkaccessmanager.cpp')
-rw-r--r--src/network/access/qnetworkaccessmanager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/network/access/qnetworkaccessmanager.cpp b/src/network/access/qnetworkaccessmanager.cpp
index 1af2547f3e..230aa40af6 100644
--- a/src/network/access/qnetworkaccessmanager.cpp
+++ b/src/network/access/qnetworkaccessmanager.cpp
@@ -80,6 +80,7 @@
#include <QHostInfo>
+#include "QtCore/qapplicationstatic.h"
#include <QtCore/private/qfactoryloader_p.h>
#if defined(Q_OS_MACOS)
@@ -99,13 +100,13 @@
QT_BEGIN_NAMESPACE
-Q_GLOBAL_STATIC(QNetworkAccessFileBackendFactory, fileBackend)
+Q_APPLICATION_STATIC(QNetworkAccessFileBackendFactory, fileBackend)
#ifdef QT_BUILD_INTERNAL
Q_GLOBAL_STATIC(QNetworkAccessDebugPipeBackendFactory, debugpipeBackend)
#endif
-Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
+Q_APPLICATION_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QNetworkAccessBackendFactory_iid,
QLatin1String("/networkaccess")))
#if defined(Q_OS_MACOS)