summaryrefslogtreecommitdiffstats
path: root/src/fileexporterxml.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileexporterxml.cpp')
-rw-r--r--src/fileexporterxml.cpp46
1 files changed, 23 insertions, 23 deletions
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 <qregexp.h>
-#include <qstringlist.h>
+#include <ntqregexp.h>
+#include <ntqstringlist.h>
#include <file.h>
#include <element.h>
@@ -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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << endl;
stream << "<bibliography>" << 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 << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" << 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 << " <entry id=\"" << EncoderXML::currentEncoderXML() ->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 << " <person>" << *it << "</person>" << endl;
stream << " </" << tag << "s>" << endl;
}
@@ -142,14 +142,14 @@ namespace BibTeX
bool ok = FALSE;
int month = -1;
- QString tag = "";
- QString content = "";
- for ( QValueList<ValueItem*>::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it )
+ TQString tag = "";
+ TQString content = "";
+ for ( TQValueList<ValueItem*>::ConstIterator it = field->value()->items.begin(); it != field->value()->items.end(); ++it )
{
if ( dynamic_cast<MacroKey*>( *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() ) ) << "</" << tag << ">" << 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 << " <string key=\"" << macro->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 << " <comment>" ;
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<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ )
+ for ( TQValueList<ValueItem*>::ConstIterator it = value->items.begin(); it != value->items.end(); it++ )
{
if ( !isFirst )
result.append( ' ' );