Fix functions and macros using to support both Qt4 and Qt5.