Reverted macros to use both Qt4 and Qt5

Change-Id: Ibf7b9d492b170232d3f5649ac6a0a14f4da95dd4