From 5f5e7c5455d52826b0bd50f64fcffb7695ce970d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 29 Jun 2013 12:56:53 +0200 Subject: Initial TQt conversion --- src/fileexporterxml.cpp | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'src/fileexporterxml.cpp') diff --git a/src/fileexporterxml.cpp b/src/fileexporterxml.cpp index 4dcbee4..ff2814e 100644 --- a/src/fileexporterxml.cpp +++ b/src/fileexporterxml.cpp @@ -17,8 +17,8 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include -#include +#include +#include #include #include @@ -42,13 +42,13 @@ namespace BibTeX // nothing } - bool FileExporterXML::save( QIODevice* iodevice, const File* bibtexfile, QStringList * /*errorLog*/ ) + bool FileExporterXML::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList * /*errorLog*/ ) { m_mutex.lock(); bool result = TRUE; m_cancelFlag = FALSE; - QTextStream stream( iodevice ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( iodevice ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << "" << endl; stream << "" << endl; @@ -68,10 +68,10 @@ namespace BibTeX return result && !m_cancelFlag; } - bool FileExporterXML::save( QIODevice* iodevice, const Element* element, QStringList * /*errorLog*/ ) + bool FileExporterXML::save( TQIODevice* iodevice, const Element* element, TQStringList * /*errorLog*/ ) { - QTextStream stream( iodevice ); - stream.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream stream( iodevice ); + stream.setEncoding( TQTextStream::UnicodeUTF8 ); stream << "" << endl; return write( stream, element ); @@ -82,7 +82,7 @@ namespace BibTeX m_cancelFlag = TRUE; } - bool FileExporterXML::write( QTextStream&stream, const Element *element, const File* bibtexfile ) + bool FileExporterXML::write( TQTextStream&stream, const Element *element, const File* bibtexfile ) { bool result = FALSE; @@ -117,7 +117,7 @@ namespace BibTeX return result; } - bool FileExporterXML::writeEntry( QTextStream &stream, const Entry* entry ) + bool FileExporterXML::writeEntry( TQTextStream &stream, const Entry* entry ) { stream << " encode( entry->id() ) << "\" type=\"" << entry->entryTypeString().lower() << "\">" << endl; for ( Entry::EntryFields::const_iterator it = entry->begin(); it != entry->end(); it++ ) @@ -128,10 +128,10 @@ namespace BibTeX case EntryField::ftAuthor: case EntryField::ftEditor: { - QString tag = field->fieldTypeName().lower(); + TQString tag = field->fieldTypeName().lower(); stream << " <" << tag << "s>" << endl; - QStringList persons = QStringList::split( QRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) ); - for ( QStringList::Iterator it = persons.begin(); it != persons.end(); it++ ) + TQStringList persons = TQStringList::split( TQRegExp( "\\s+(,|and|&)+\\s+", FALSE ), EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) ); + for ( TQStringList::Iterator it = persons.begin(); it != persons.end(); it++ ) stream << " " << *it << "" << endl; stream << " " << endl; } @@ -142,14 +142,14 @@ namespace BibTeX bool ok = FALSE; int month = -1; - QString tag = ""; - QString content = ""; - for ( QValueList::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it ) + TQString tag = ""; + TQString content = ""; + for ( TQValueList::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it ) { if ( dynamic_cast( *it ) != NULL ) { for ( int i = 0; i < 12; i++ ) - if ( QString::compare(( *it )->text(), MonthsTriple[ i ] ) == 0 ) + if ( TQString::compare(( *it )->text(), MonthsTriple[ i ] ) == 0 ) { if ( month < 1 ) { @@ -177,7 +177,7 @@ namespace BibTeX break; default: { - QString tag = field->fieldTypeName().lower(); + TQString tag = field->fieldTypeName().lower(); stream << " <" << tag << ">" << EncoderXML::currentEncoderXML() ->encode( valueToString( field->value() ) ) << "" << endl; } break; @@ -189,7 +189,7 @@ namespace BibTeX return TRUE; } - bool FileExporterXML::writeMacro( QTextStream &stream, const Macro *macro ) + bool FileExporterXML::writeMacro( TQTextStream &stream, const Macro *macro ) { stream << " key() << "\">"; stream << EncoderXML::currentEncoderXML() ->encode( valueToString( macro->value() ) ); @@ -198,7 +198,7 @@ namespace BibTeX return TRUE; } - bool FileExporterXML::writeComment( QTextStream &stream, const Comment *comment ) + bool FileExporterXML::writeComment( TQTextStream &stream, const Comment *comment ) { stream << " " ; stream << EncoderXML::currentEncoderXML() ->encode( comment->text() ); @@ -207,12 +207,12 @@ namespace BibTeX return TRUE; } - QString FileExporterXML::valueToString( Value *value ) + TQString FileExporterXML::valueToString( Value *value ) { - QString result; + TQString result; bool isFirst = TRUE; - for ( QValueList::ConstIterator it = value->items.begin(); it != value->items.end(); it++ ) + for ( TQValueList::ConstIterator it = value->items.begin(); it != value->items.end(); it++ ) { if ( !isFirst ) result.append( ' ' ); -- cgit v1.2.3