Remove unused imports.
Add Qt 4.8.4 compatibility.