The qgamma function returns the value on the x axis below which the given fraction of the probability density lies. By setting the first argument to one, you are asking for the point on the x axis below which all of the probability density lies. But the gamma distribution has no upper bound. The returned value of Inf just shows that there is no value above which the probability density is exactly zero.
What question are you trying to answer by entering one as the first argument?