From 2c146f492cee07bd1eb8e7a5bcf21b3619291718 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 2 Dec 2018 00:22:41 +0900 Subject: Removed TQStringToGString, which is fundamentally wrong. Signed-off-by: Michele Calgaro --- kpdf/core/generator_pdf/generator_pdf.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp index 12e7fd0b..5c0046d3 100644 --- a/kpdf/core/generator_pdf/generator_pdf.cpp +++ b/kpdf/core/generator_pdf/generator_pdf.cpp @@ -524,14 +524,6 @@ bool PDFGenerator::print( KPrinter& printer ) } } -static GString *TQStringToGString(const TQString &s) { - int len = s.length(); - char *cstring = (char *)gmallocn(s.length(), sizeof(char)); - for (int i = 0; i < len; ++i) - cstring[i] = s.at(i).unicode(); - return new GString(cstring, len); -} - static TQString unicodeToTQString(Unicode* u, int len) { TQString ret; ret.setLength(len); @@ -586,7 +578,7 @@ TQString PDFGenerator::getMetaData( const TQString & key, const TQString & optio // asking for the page related to a 'named link destination'. the // option is the link name. @see addSynopsisChildren. DocumentViewport viewport; - GString * namedDest = TQStringToGString(option); + GString * namedDest = new GString( option.utf8() ); docLock.lock(); LinkDest * destination = pdfdoc->findDest( namedDest ); if ( destination ) -- cgit v1.2.3