Legislation = Legislation (or statutory law) is law which has been promulgated (or "enacted") by a legislature or other governing body or the process of making it
Qualified Immunity = Qualified immunity is a legal doctrine in United States federal law
Legal doctrine = A legal doctrine is a framework, set of rules, procedural steps, or test, often established through precedent in the common law, through which judgments can be determined in a given legal case
So it's a bit of a grey area, but I think the greater point stands that this is how court cases are decided vs. a law in the traditional sense that people think about laws.
This may not be true in other areas, I know that many countries (and Quebec) have civil law, where legislation is more extensive.
Common law, which is to say law that is not codified but defined by judicial decision making, is law "in the traditional sense that people think about laws" just as much as statute law.
In Michigan, for example, murder is a common law offense: no legislation exists that defines what murder is, although penalties etc. are legislated.
Common law is common in the English speaking world because it is derived from common law as practiced in England. However both Quebec and Louisiana were acquired from France and kept the French legal system. (OK, Quebec lost French law, and then was given it back so that they wouldn't rebel and become part of the USA.)
In Europe broadly, civil law is more common.