I am considering flying from United Kingdom to Australia via Doha, with a three hour layover each way. My (United Kingdom) passport would have <6 month validity so I would not be able to enter Qatar according to the U.K. government. However, I would just stay at the airport and so wouldn't need a transit visa. No problem.
However... if my connection was severely delayed for some reason then might there be an issue? According to the U.K. government, travellers cannot stay more than 24 hours in the transit area, so what would actually happen if I was forced to wait longer than that? Seems very unlikely but not impossible.