Deprecated vtkUnstructuredGrid::SetCells

Can I use this form and omit cellLocations ?

Yes. The information that was in cellLocations is now directly embedded in the vtkCellArray, so it no longer needs to be specified here.