issue #19606: Fix problem with lock for qt users.