Move Q_D underneath any thread guards