compile without foreach
It's bad enough that we need to give things names because Qt keeps detaching on foreach, I'd be giving at least more semantic names to these temporary variables.
maybe call it containments? naming variables with a typename is bad (we even are using auto to not mention it's a list!)
It already is const.
shouldn't it be const?
Please always annotate auto with e.g. asterisk or ampersand depending on type
why not make the container const?
While at it const QDate &
Yes, please change it to iterators