add forgotten function + use QMutexLocker