I am looking for a villa in Doha, and some of my friends have already rented apartments and villas. Common to them all is the principle that if you are leaving Qatar then you have to pay one months penalty and lose your deposit (one month). However if you are moving and intend to remain in Qatar you are due for the remaining value of the rental period.
I went through a similar situation in Bahrain, but negotiated with my Londlord so that I found him a replacement tenant at no cost to him. (but not all landlords may be as ccommodating!)