[qtcurve] add helper functions and macros to remove dirty condition compile