Migrate code for Qt4 -> Qt5