keep the QCString around, otherwise the const char * contents get lost

svn path=/branches/KDE/3.5/kdegraphics/kpdf/; revision=639350
remotes/origin/kpdf-3.5
Albert Astals Cid 19 years ago
parent f7c90d0ecb
commit a0623d2097
  1. 3
      core/generator_pdf/generator_pdf.cpp

@ -445,7 +445,8 @@ bool PDFGenerator::print( KPrinter& printer )
{
pstitle = m_document->currentDocument().fileName( false );
}
const char* pstitlechar = !pstitle.isEmpty() ? (const char *)pstitle.local8Bit() : 0;
QCString pstitle8Bit = pstitle.local8Bit();
const char* pstitlechar = !pstitle.isEmpty() ? pstitle8Bit.data() : 0;
PSOutputDev *psOut = new PSOutputDev(tf.name().latin1(), pstitlechar, pdfdoc->getXRef(), pdfdoc->getCatalog(), 1, pdfdoc->getNumPages(), psModePS, marginRight, marginBottom, paperWidth - marginLeft, paperHeight - marginTop);
if (psOut->isOk())

Loading…
Cancel
Save