McDonald’s was the only one of four fast-food restaurant giants to beat quarterly earnings and revenue estimates.