summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-12-02 00:22:41 +0900
committerSlávek Banko <slavek.banko@axis.cz>2018-12-01 17:26:11 +0100
commit3122f6c7dc4a7733266b3a6a7b3d70563b70158a (patch)
tree926a045e96519cf48502f2e0f485092f30c93aec
parent6cbd70ecc6cbd4ea8965d59eb9ed1e90512da752 (diff)
downloadtdegraphics-3122f6c7dc4a7733266b3a6a7b3d70563b70158a.tar.gz
tdegraphics-3122f6c7dc4a7733266b3a6a7b3d70563b70158a.zip
Removed TQStringToGString, which is fundamentally wrong.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it> (cherry picked from commit 2c146f492cee07bd1eb8e7a5bcf21b3619291718) Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--kpdf/core/generator_pdf/generator_pdf.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/kpdf/core/generator_pdf/generator_pdf.cpp b/kpdf/core/generator_pdf/generator_pdf.cpp
index 3e309fc5..4af2c1a4 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 )