diff options
author | Jake Petroules <jake.petroules@qt.io> | 2017-03-14 20:30:04 -0700 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2017-03-22 00:57:30 +0000 |
commit | c411f577f9febc42d5a26827257526700b771ede (patch) | |
tree | 41c8b1797d0329534f8b1b4de0e7959bcb3d07d4 /src/lib/corelib/api | |
parent | 0d1d1fc00cc6ce7864243b8b7997158b0fa42f10 (diff) |
Replace all uses of QMutex/QMutexLocker with std::mutex/std::lock_guard
Change-Id: I5b4518cb241d556f062f85cadd6c8f61887c8ae6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/api')
-rw-r--r-- | src/lib/corelib/api/project.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/corelib/api/project.cpp b/src/lib/corelib/api/project.cpp index b83ea7411..547aa5fa8 100644 --- a/src/lib/corelib/api/project.cpp +++ b/src/lib/corelib/api/project.cpp @@ -78,10 +78,11 @@ #include <tools/qttools.h> #include <QtCore/qdir.h> -#include <QtCore/qmutex.h> #include <QtCore/qregexp.h> #include <QtCore/qshareddata.h> +#include <mutex> + #ifdef QBS_STATIC_LIB extern "C" ScannerPlugin *cppScanners[]; extern "C" ScannerPlugin *qtScanners[]; @@ -91,11 +92,11 @@ namespace qbs { namespace Internal { static bool pluginsLoaded = false; -static QMutex pluginsLoadedMutex; +static std::mutex pluginsLoadedMutex; static void loadPlugins(const QStringList &_pluginPaths, const Logger &logger) { - QMutexLocker locker(&pluginsLoadedMutex); + std::lock_guard<std::mutex> locker(pluginsLoadedMutex); if (pluginsLoaded) return; |