Cast to return type in qcompare to prevent machine depend compile error