QCs don't make the law, or decide what is legal
Fancy lawyers often forget that they don't make the law. Judges (through their delivered opinions in Common Law cases), and parliamentarians (by passing bills through parliament) make the law. (As I didn't study any law in England, there might be some practical differences, but that was the theory in a legal system based on English law).
A Prime Minister can instruct the Civil Service and the security organs NOT to rifle through parliamentarian's emails, texts etc. I imagine an incoming Prime Minister will reissue Wilson's instruction to the organs, just as he, or she, rewrites the letter to the Trident armed submarines.
I can see this being the basis for an entire episode of Yes, Prime Minister, or even House of Cards.
Incidentally, in my experience, in a friendly nation far away, the intelligence service and the comms boyos are allowed to spy on parliamentarians , but they can only tell the PM. It all went into a particular filing cabinet, which the PM would dip into when needing cheering up.