diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-27 15:47:16 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-06 11:22:37 +0200 |
commit | cd113d0dcb5e6ff71300ed67af5e296dc6f5dccf (patch) | |
tree | 347e746f096079896fa3869838e6c111ff999b2e /src/corelib | |
parent | 95310aac6d38f222da5ce0ca2bd52b4afa261f13 (diff) |
Port some trivial cases from QMutex to QRecursiveMutex
In all of these cases, the effect of the change is local to one file.
Change-Id: I3bda3aadee3b42e7797183c2330183390b92d1f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qresource.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qcoreapplication.cpp | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qfactoryloader.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp index d143f7fda3..fcc5b69179 100644 --- a/src/corelib/io/qresource.cpp +++ b/src/corelib/io/qresource.cpp @@ -197,13 +197,13 @@ Q_DECLARE_TYPEINFO(QResourceRoot, Q_MOVABLE_TYPE); typedef QList<QResourceRoot*> ResourceList; struct QResourceGlobalData { - QMutex resourceMutex{QMutex::Recursive}; + QRecursiveMutex resourceMutex; ResourceList resourceList; QStringList resourceSearchPaths; }; Q_GLOBAL_STATIC(QResourceGlobalData, resourceGlobalData) -static inline QMutex *resourceMutex() +static inline QRecursiveMutex *resourceMutex() { return &resourceGlobalData->resourceMutex; } static inline ResourceList *resourceList() diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 9d8da70e47..87dae896fa 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2657,7 +2657,7 @@ QString QCoreApplication::applicationVersion() #if QT_CONFIG(library) -Q_GLOBAL_STATIC_WITH_ARGS(QMutex, libraryPathMutex, (QMutex::Recursive)) +Q_GLOBAL_STATIC(QRecursiveMutex, libraryPathMutex) /*! Returns a list of paths that the application will search when diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 8e349f23ce..6737aeccd2 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -170,7 +170,7 @@ public: Q_GLOBAL_STATIC(QList<QFactoryLoader *>, qt_factory_loaders) -Q_GLOBAL_STATIC_WITH_ARGS(QMutex, qt_factoryloader_mutex, (QMutex::Recursive)) +Q_GLOBAL_STATIC(QRecursiveMutex, qt_factoryloader_mutex) QFactoryLoaderPrivate::~QFactoryLoaderPrivate() { |