Quasi-periodic pulsations with periods that change depending on whether the pulsations have thermal or nonthermal components