patched to compile with QT 4.6.x