summaryrefslogtreecommitdiffstats
path: root/src/network/bearer/qnetworkconfiguration_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/bearer/qnetworkconfiguration_p.h')
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 6b40946..6908277 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -54,7 +54,9 @@
//
#include "qnetworkconfiguration.h"
+
#include <QtCore/qshareddata.h>
+#include <QtCore/qmutex.h>
#include <QtNetwork/QNetworkInterface>
QT_BEGIN_NAMESPACE
@@ -64,8 +66,9 @@ class QNetworkConfigurationPrivate : public QSharedData
{
public:
QNetworkConfigurationPrivate ()
- : isValid(false), type(QNetworkConfiguration::Invalid),
- roamingSupported(false), purpose(QNetworkConfiguration::UnknownPurpose), internet(false)
+ : mutex(QMutex::Recursive), type(QNetworkConfiguration::Invalid),
+ purpose(QNetworkConfiguration::UnknownPurpose),
+ isValid(false), roamingSupported(false)
{
}
@@ -77,26 +80,27 @@ public:
virtual QString bearerName() const
{
+ QMutexLocker locker(&mutex);
+
return bearer;
}
- QString bearer;
+ mutable QMutex mutex;
+ QString bearer;
QString name;
-
- bool isValid;
QString id;
+
QNetworkConfiguration::StateFlags state;
QNetworkConfiguration::Type type;
- bool roamingSupported;
QNetworkConfiguration::Purpose purpose;
- bool internet;
-
QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
-private:
+ bool isValid;
+ bool roamingSupported;
+private:
// disallow detaching
QNetworkConfigurationPrivate &operator=(const QNetworkConfigurationPrivate &other);
QNetworkConfigurationPrivate(const QNetworkConfigurationPrivate &other);