Port to Qt5

You might want to write additional tests to test the ifdefs :-)