for (PRUint32 i = 0; i < len; i++) buf[i] = QChar(strBuf[i]); buf[len] = QChar(); QString qStr(buf,len);
for (PRUint32 i = 0; i < aLength; i++) { buf[i] = QChar(*aString++); } QString qStr(buf,aLength);
nsFontQTNormal::DrawString(nsRenderingContextQT *aContext,                           nsDrawingSurfaceQT *aSurface,                           nscoord aX,nscoord aY,                           const PRUnichar *aString,PRUint32 aLength){  int result = 0;   if (mFontMetrics) {    char strBuf[1024];    PRUint32 len = mCharSetInfo->Convert(mCharSetInfo,mFontMetrics,aString,                                         aLength,strBuf,sizeof(strBuf));    QChar *buf = new QChar[len + 1];     for (PRUint32 i = 0; i < len; i++)      buf[i] = QChar(strBuf[i]);     buf[len] = QChar();    QString qStr(buf,len);    aContext->MyDrawString(aSurface->GetGC(),aX,aY,qStr);    result = mFontMetrics->width(qStr);    delete [] buf;  }  return result;}