while technically you can get in trouble, most people don't give a shit and fewer still know the law. you could even just claim that you don't post them anywhere, or that you're doing a series about anonymity in the city, and that you blur out all faces in photoshop (friend pulled this off one time much to my surprise).
the only time in my 5 years there that i got called out was taking a picture of a city counsellor putting up an art instillation, and frankly he was just calling me out for jokes (and we ended up having a really good converstaion about it).
if someone yells at you in quebecois just say 'oh im sorry, tourist, i'll erase, uhhh... effacer' (pronounced ay-fas-ay and is french for erase). then fiddle with your camera for a second, look at them, nod, smile, and give them a little apologetic wave as you walk away.
at the end of the day it's a touristy city, and the people there are in general pretty chill and open to the arts, so somebody walking around taking pictures isn't a target for their anger.