Switch tests to automoc (Qt5 compatibility)