The Supreme Court has ruled a lot of things that we would not allow to stand today. For instance, the Dred Scott Case [1] "In a landmark case, the United States Supreme Court decided 7–2 against Scott, finding that neither he nor any other person of African ancestry could claim citizenship in the United States, and therefore Scott could not bring suit in federal court under diversity of citizenship rules. Moreover, Scott's temporary residence outside Missouri did not bring about his emancipation under the Missouri Compromise, as the court ruled this to have been unconstitutional, as it would "improperly deprive Scott's owner of his legal property".
Qualified immunity doesn’t rest on nearly as solid a ground.