Skip to content

Draft: Attempt to eliminate deprecated QMutex::Recursive

Compiling KDevelop produces lots of QMutex::Recursive warnings, which makes finding other warnings and even errors much more difficult.

Unfortunately RepositoryManager calls ItemRepository::setMutex() both when Mutex == QRecursiveMutex and when Mutex == QMutex. Adding Mutex template parameter to RepositoryManager doesn't work, because RepositoryManager::repositoryMutex() overrides the virtual function in AbstractRepositoryManager. Turning class AbstractRepositoryManager into a class template causes lots of compilation errors, which are not easy to fix.

Prefer std::scoped_lock over QMutexLocker because the latter has unneeded functionality and consequently overhead.

Merge request reports