Keep in mind that the 'integrand' must be "created" beforehand: see the 'CreateIntegrand' model and the 'integrand_setup' function. Note that here f is to be defined without the sin or cos part:
function qawo
extends Modelica.Icons.Function;
input Integer n_par;
input Real par[n_par], a, b, omega, rel_err;
input Integer isine, limit;
output Real y, err;
end qawo;