change QMutex to QReadWriteLock.