Don't worry, quantum computers will not affect the blockchain, and it may take dozens of years to be able to affect, until we reach that time.
Bitcoin will have updated its algorithms in order to make decoding difficult or impossible.
Unfortunately, I don't think it's that straightforward.
The issue is that if bitcoin is upgraded to be quantum-resistant, then all coins will then need to be moved to new quantum-resistant addresses.
What happens to coins that aren't moved (or can't be moved, because either the key has been lost or the owner is deceased)?
Coins that aren't moved would remain vulnerable and could be stolen by anyone with a sufficiently powerful QC.
Do we leave them to be stolen? Or do we put in place say a 3 month deadline to move, and anything not moved by that time is burnt?
Both options are contentious, both bring their own problems.