Adapting to be Qt5 compatible