Add Qt Mutex locking on config and database interactions. Prevents segfaults on multiple recalculations