QMngHandler: Prevent division by zero.

Task-number: QTBUG-42321
Change-Id: I1d0762782e71fb13f96d0f42c4661b708e02051d
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>