[qt5] organize drawPrimitive