summaryrefslogtreecommitdiffstats
path: root/src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h')
-rw-r--r--src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h b/src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h
index cf9a08ca84..8480940110 100644
--- a/src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h
+++ b/src/plugins/networkinformation/networklistmanager/qnetworklistmanagerevents.h
@@ -1,6 +1,9 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+#ifndef QNETWORKLISTMANAGEREVENTS_H
+#define QNETWORKLISTMANAGEREVENTS_H
+
#include <QtNetwork/private/qtnetworkglobal_p.h>
#include <QtNetwork/qnetworkinformation.h>
@@ -8,6 +11,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qobject.h>
#include <QtCore/qloggingcategory.h>
+#include <QtCore/qmutex.h>
#include <objbase.h>
#include <netlistmgr.h>
@@ -20,7 +24,7 @@
#endif
#ifdef SUPPORTS_WINRT
-#include <winrt/base.h>
+#include <QtCore/private/qt_winrtbase_p.h>
#endif
using namespace Microsoft::WRL;
@@ -56,7 +60,7 @@ public:
HRESULT STDMETHODCALLTYPE ConnectivityChanged(NLM_CONNECTIVITY newConnectivity) override;
[[nodiscard]] bool start();
- bool stop();
+ void stop();
[[nodiscard]] bool checkBehindCaptivePortal();
@@ -73,6 +77,7 @@ private:
void emitWinRTUpdates();
winrt::event_token token;
+ QMutex winrtLock;
#endif
QAtomicInteger<ULONG> ref = 0;
@@ -80,3 +85,5 @@ private:
};
QT_END_NAMESPACE
+
+#endif // QNETWORKLISTMANAGEREVENTS_H