On generalized convexity of quadratic functions