Allow compilation with Qt < 5.10

Authored by johanneszarl on Sep 9 2018, 6:52 PM.