I transited in Doha last week as I switched flights from Qatar Airways to Cathay Pacific and vice versa. If you already have your boarding pass prior to landing in Doha, then you should be fine. However, if you do NOT have a boarding pass, and will do another check-in transaction in Doha, then I doubt 2 hours will be sufficient, as the airport is extremely huge and you can easily get lost. My recommendations is to allow 3 - 4 hours for transiting just in case if you do not have a boarding pass.