Fixes to various issues with QtQuick and integer truncation.