Fix build on Qt >= 5.8

Authored by dantti on Jan 25 2018, 12:29 PM.