diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2013-06-29 12:56:53 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2013-07-04 03:11:35 +0200 |
commit | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch) | |
tree | c8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/xsltransform.cpp | |
parent | 251c9a439759c830d34c70683d0fc9454d703010 (diff) | |
download | kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip |
Initial TQt conversion
Diffstat (limited to 'src/xsltransform.cpp')
-rw-r--r-- | src/xsltransform.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/xsltransform.cpp b/src/xsltransform.cpp index fbb4fce..bae027b 100644 --- a/src/xsltransform.cpp +++ b/src/xsltransform.cpp @@ -23,19 +23,19 @@ #include <libxslt/transform.h> #include <libxslt/xsltutils.h> -#include <qfile.h> -#include <qstring.h> +#include <ntqfile.h> +#include <ntqstring.h> #include "xsltransform.h" namespace BibTeX { - XSLTransform::XSLTransform( const QString& xsltFilename ) + XSLTransform::XSLTransform( const TQString& xsltFilename ) { m_xlstStylesheet = xsltParseStylesheetFile(( const xmlChar* ) xsltFilename.latin1() ); if ( m_xlstStylesheet == NULL ) - qDebug( "Could not load XSLT file '%s'.", xsltFilename.latin1() ); + tqDebug( "Could not load XSLT file '%s'.", xsltFilename.latin1() ); } XSLTransform::~XSLTransform() @@ -43,10 +43,10 @@ namespace BibTeX xsltFreeStylesheet( m_xlstStylesheet ); } - QString XSLTransform::transform( const QString& xmlText ) + TQString XSLTransform::transform( const TQString& xmlText ) { - QString result = QString::null; - QCString xmlCText = xmlText.utf8(); + TQString result = TQString::null; + TQCString xmlCText = xmlText.utf8(); xmlDocPtr document = xmlParseMemory( xmlCText, xmlCText.length() ); if ( document ) { @@ -55,25 +55,25 @@ namespace BibTeX xmlDocPtr resultDocument = xsltApplyStylesheet( m_xlstStylesheet, document, NULL ); if ( resultDocument ) { - // Save the result into the QString + // Save the result into the TQString xmlChar * mem; int size; xmlDocDumpMemoryEnc( resultDocument, &mem, &size, "UTF-8" ); - result = QString::fromUtf8( QCString(( char * )( mem ), size + 1 ) ); + result = TQString::fromUtf8( TQCString(( char * )( mem ), size + 1 ) ); xmlFree( mem ); xmlFreeDoc( resultDocument ); } else - qDebug( "Applying XSLT stylesheet to XML document failed" ); + tqDebug( "Applying XSLT stylesheet to XML document failed" ); } else - qDebug( "XSLT stylesheet is not available or not valid" ); + tqDebug( "XSLT stylesheet is not available or not valid" ); xmlFreeDoc( document ); } else - qDebug( "XML document is not available or not valid" ); + tqDebug( "XML document is not available or not valid" ); return result; } |