QtNetwork: port remaining uses of QMutex::Recursive to QRecursiveMutex
In one case, added NSDMI to avoid churning the ctor-init-list. Change-Id: I5587d5cb7e393f60ad29cb5186127304d27d1d46 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
aadf64f084
commit
619b92385e
|
|
@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
|
|||
class QNetworkAccessBackendFactoryData: public QList<QNetworkAccessBackendFactory *>
|
||||
{
|
||||
public:
|
||||
QNetworkAccessBackendFactoryData() : mutex(QMutex::Recursive)
|
||||
QNetworkAccessBackendFactoryData()
|
||||
{
|
||||
valid.ref();
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public:
|
|||
valid.deref();
|
||||
}
|
||||
|
||||
QMutex mutex;
|
||||
QRecursiveMutex mutex;
|
||||
//this is used to avoid (re)constructing factory data from destructors of other global classes
|
||||
static QBasicAtomicInt valid;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -891,7 +891,7 @@ void QHostInfoRunnable::run()
|
|||
// thread goes back to QThreadPool
|
||||
}
|
||||
|
||||
QHostInfoLookupManager::QHostInfoLookupManager() : mutex(QMutex::Recursive), wasDeleted(false)
|
||||
QHostInfoLookupManager::QHostInfoLookupManager() : wasDeleted(false)
|
||||
{
|
||||
moveToThread(QCoreApplicationPrivate::mainThread());
|
||||
#if QT_CONFIG(thread)
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ protected:
|
|||
#if QT_CONFIG(thread)
|
||||
QThreadPool threadPool;
|
||||
#endif
|
||||
QMutex mutex;
|
||||
QRecursiveMutex mutex;
|
||||
|
||||
bool wasDeleted;
|
||||
|
||||
|
|
|
|||
|
|
@ -254,8 +254,7 @@ class QGlobalNetworkProxy
|
|||
{
|
||||
public:
|
||||
QGlobalNetworkProxy()
|
||||
: mutex(QMutex::Recursive)
|
||||
, applicationLevelProxy(0)
|
||||
: applicationLevelProxy(0)
|
||||
, applicationLevelProxyFactory(0)
|
||||
#if QT_CONFIG(socks5)
|
||||
, socks5SocketEngineHandler(0)
|
||||
|
|
@ -338,7 +337,7 @@ public:
|
|||
QList<QNetworkProxy> proxyForQuery(const QNetworkProxyQuery &query);
|
||||
|
||||
private:
|
||||
QMutex mutex;
|
||||
QRecursiveMutex mutex;
|
||||
QNetworkProxy *applicationLevelProxy;
|
||||
QNetworkProxyFactory *applicationLevelProxyFactory;
|
||||
#if QT_CONFIG(socks5)
|
||||
|
|
|
|||
|
|
@ -322,8 +322,8 @@ public:
|
|||
protected:
|
||||
void timerEvent(QTimerEvent * event) override;
|
||||
|
||||
QMutex mutex;
|
||||
int sweepTimerId;
|
||||
QRecursiveMutex mutex;
|
||||
int sweepTimerId = -1;
|
||||
//socket descriptor, data, timestamp
|
||||
QHash<int, QSocks5BindData *> store;
|
||||
};
|
||||
|
|
@ -331,8 +331,6 @@ protected:
|
|||
Q_GLOBAL_STATIC(QSocks5BindStore, socks5BindStore)
|
||||
|
||||
QSocks5BindStore::QSocks5BindStore()
|
||||
: mutex(QMutex::Recursive)
|
||||
, sweepTimerId(-1)
|
||||
{
|
||||
QCoreApplication *app = QCoreApplication::instance();
|
||||
if (app && app->thread() != thread())
|
||||
|
|
|
|||
Loading…
Reference in New Issue