add missing "#undef Q_TMPL"

Added the missing undef-statements