From a0623d2097deda673362afcba7d3b4ab49aa8bd4 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Sun, 4 Mar 2007 22:45:21 +0000 Subject: [PATCH] keep the QCString around, otherwise the const char * contents get lost svn path=/branches/KDE/3.5/kdegraphics/kpdf/; revision=639350 --- core/generator_pdf/generator_pdf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/generator_pdf/generator_pdf.cpp b/core/generator_pdf/generator_pdf.cpp index 88a51c36c..00f128d70 100644 --- a/core/generator_pdf/generator_pdf.cpp +++ b/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())