Fixes for Qt4