Dom IV, Portugal