Mark a couple of variables as Q_UNUSED to fix -Wunused-but-set-variable warnings