Added spline, converted to qreal and fixed warnings