The displayLabel still exists in qtpim, but it isn't part of the QContactName anymore - you access it via detail<QContactDisplayLabel>().label().  Also, we're still using a customLabel field to store the customized displayLabel in n-q-p-c, so you could perhaps check for that before re-formulating the contactName below.