summaryrefslogtreecommitdiffstats
path: root/src/network/kernel
diff options
context:
space:
mode:
authorQt CI Bot <qt_ci_bot@qt-project.org>2021-04-12 18:06:39 +0000
committerQt CI Bot <qt_ci_bot@qt-project.org>2021-04-12 18:06:39 +0000
commita91728b4e8541bd9747de8c2178a5a7cbddbe9c9 (patch)
tree297cb9787b9b69c8808fe1ac9003b087a7b1b6d6 /src/network/kernel
parente5d8e2ae6eb7966a3589d2b71d38d16f7b9d2606 (diff)
parent3fa778142a8e7de2e3cb74dcef812469aa4bd5af (diff)
Merge integration refs/builds/qtci/dev/1618240808
Diffstat (limited to 'src/network/kernel')
-rw-r--r--src/network/kernel/qnetworkinformation.cpp7
-rw-r--r--src/network/kernel/qnetworkinformation.h5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/network/kernel/qnetworkinformation.cpp b/src/network/kernel/qnetworkinformation.cpp
index 1ebe2f6045..6ce572d408 100644
--- a/src/network/kernel/qnetworkinformation.cpp
+++ b/src/network/kernel/qnetworkinformation.cpp
@@ -56,6 +56,11 @@ QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcNetInfo)
Q_LOGGING_CATEGORY(lcNetInfo, "qt.network.info");
+struct QNetworkInformationDeleter
+{
+ void operator()(QNetworkInformation *information) { delete information; }
+};
+
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QNetworkInformationBackendFactory_iid,
QStringLiteral("/networkinformationbackends")))
@@ -63,7 +68,7 @@ Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
struct QStaticNetworkInformationDataHolder
{
QMutex instanceMutex;
- std::unique_ptr<QNetworkInformation> instanceHolder;
+ std::unique_ptr<QNetworkInformation, QNetworkInformationDeleter> instanceHolder;
QList<QNetworkInformationBackendFactory *> factories;
};
Q_GLOBAL_STATIC(QStaticNetworkInformationDataHolder, dataHolder);
diff --git a/src/network/kernel/qnetworkinformation.h b/src/network/kernel/qnetworkinformation.h
index 84d29c8a41..07f4fe873d 100644
--- a/src/network/kernel/qnetworkinformation.h
+++ b/src/network/kernel/qnetworkinformation.h
@@ -49,6 +49,7 @@ QT_BEGIN_NAMESPACE
class QNetworkInformationBackend;
class QNetworkInformationPrivate;
+struct QNetworkInformationDeleter;
class Q_NETWORK_EXPORT QNetworkInformation : public QObject
{
Q_OBJECT
@@ -70,8 +71,6 @@ public:
Q_DECLARE_FLAGS(Features, Feature)
Q_FLAG(Features)
- ~QNetworkInformation() override;
-
Reachability reachability() const;
QString backendName() const;
@@ -87,8 +86,10 @@ Q_SIGNALS:
void reachabilityChanged(Reachability newReachability);
private:
+ friend struct QNetworkInformationDeleter;
friend class QNetworkInformationPrivate;
QNetworkInformation(QNetworkInformationBackend *backend);
+ ~QNetworkInformation() override;
Q_DISABLE_COPY_MOVE(QNetworkInformation)
};