Add missing includes and replace methods deprecated in Qt 5.3.