repair badly scoped usage of QMutexLocker