Merge "Add safety checks on KEY_INTENT mismatch." into qt-dev