Fix tests using Qt4