Fix for dock handler on Qt5