Global economies will be affected if the war on Iran continues for weeks, according to Qatar's energy minister.