Lemma 1. All preimages of affine open subschemes are affine (Inverse of open affine subscheme is affine).
Lemma 2. All affine schemes are quasi-compact (Proof that an affine scheme is quasi compact).
The definition of a quasi-compact morphism between schemes is the following (Hartshorne, excercise II.3.2): A morphism $f: X \rightarrow Y$ of schemes is quasi-compact if there is a cover of $Y$ by open affines $V_i$ such that $f^{-1}(V_i)$ is quasi-compact for each $i$.
By the two lemmas above, however, the preimages $f^{-1}(V_i)$ are all affine, hence quasi-compact.
What am I missing? Which definition am I misunderstanding?