Qt 5.2.1 support added.
Minor formatting/refactoring done.