Ported to QT 5.4.0