diff options
author | Slávek Banko <[email protected]> | 2013-06-29 12:56:53 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-04 03:11:35 +0200 |
commit | 5f5e7c5455d52826b0bd50f64fcffb7695ce970d (patch) | |
tree | c8ee8792d3fb139365abbf70c2255f1e69d2aa34 /src/fileexporterris.cpp | |
parent | 251c9a439759c830d34c70683d0fc9454d703010 (diff) | |
download | kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip |
Initial TQt conversion
Diffstat (limited to 'src/fileexporterris.cpp')
-rw-r--r-- | src/fileexporterris.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/fileexporterris.cpp b/src/fileexporterris.cpp index 37908a7..88ff33c 100644 --- a/src/fileexporterris.cpp +++ b/src/fileexporterris.cpp @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qregexp.h> +#include <ntqregexp.h> #include <entry.h> @@ -36,11 +36,11 @@ namespace BibTeX // nothing } - bool FileExporterRIS::save( QIODevice* iodevice, const Element* element, QStringList* /*errorLog*/ ) + bool FileExporterRIS::save( TQIODevice* iodevice, const Element* element, TQStringList* /*errorLog*/ ) { m_mutex.lock(); bool result = FALSE; - QTextStream stream( iodevice ); + TQTextStream stream( iodevice ); const Entry *entry = dynamic_cast<const Entry*>( element ); if ( entry != NULL ) @@ -50,12 +50,12 @@ namespace BibTeX return result && !m_cancelFlag; } - bool FileExporterRIS::save( QIODevice* iodevice, const File* bibtexfile, QStringList* /*errorLog*/ ) + bool FileExporterRIS::save( TQIODevice* iodevice, const File* bibtexfile, TQStringList* /*errorLog*/ ) { m_mutex.lock(); bool result = TRUE; m_cancelFlag = FALSE; - QTextStream stream( iodevice ); + TQTextStream stream( iodevice ); int numElements = (int) bibtexfile->count(), i = 0; emit progress( 0, numElements ); @@ -80,10 +80,10 @@ namespace BibTeX m_cancelFlag = TRUE; } - bool FileExporterRIS::writeEntry( QTextStream &stream, const Entry* entry ) + bool FileExporterRIS::writeEntry( TQTextStream &stream, const Entry* entry ) { bool result = TRUE; - qDebug( "Writing Entry" ); + tqDebug( "Writing Entry" ); switch ( entry->entryType() ) { @@ -109,8 +109,8 @@ namespace BibTeX writeKeyValue( stream, "TY", "GEN" ); } - QString year = ""; - QString month = ""; + TQString year = ""; + TQString month = ""; for ( Entry::EntryFields::ConstIterator it = entry->begin(); result && it != entry->end(); it++ ) { @@ -120,14 +120,14 @@ namespace BibTeX result &= writeKeyValue( stream, field->fieldTypeName().right( 2 ), field->value()->simplifiedText() ); else if ( field->fieldType() == EntryField::ftAuthor ) { - QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); - for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) + TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); + for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) result &= writeKeyValue( stream, "AU", *it ); } else if ( field->fieldType() == EntryField::ftEditor ) { - QStringList authors = QStringList::split( QRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); - for ( QStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) + TQStringList authors = TQStringList::split( TQRegExp( "\\s+(,|and|&)\\s+", FALSE ), field->value() ->simplifiedText() ); + for ( TQStringList::Iterator it = authors.begin(); result && it != authors.end(); ++it ) result &= writeKeyValue( stream, "ED", *it ); } else if ( field->fieldType() == EntryField::ftTitle ) @@ -164,7 +164,7 @@ namespace BibTeX result &= writeKeyValue( stream, "UR", field->value() ->simplifiedText() ); else if ( field->fieldType() == EntryField::ftPages ) { - QStringList pageRange = QStringList::split( QRegExp( QString( "--|-|%1" ).arg( QChar( 0x2013 ) ) ), field->value() ->simplifiedText() ); + TQStringList pageRange = TQStringList::split( TQRegExp( TQString( "--|-|%1" ).arg( TQChar( 0x2013 ) ) ), field->value() ->simplifiedText() ); if ( pageRange.count() == 2 ) { result &= writeKeyValue( stream, "SP", pageRange[ 0 ] ); @@ -177,22 +177,22 @@ namespace BibTeX if ( !year.isEmpty() || !month.isEmpty() ) { - result &= writeKeyValue( stream, "PY", QString( "%1/%2//" ).arg( year ).arg( month ) ); + result &= writeKeyValue( stream, "PY", TQString( "%1/%2//" ).arg( year ).arg( month ) ); } - result &= writeKeyValue( stream, "ER", QString() ); + result &= writeKeyValue( stream, "ER", TQString() ); stream << endl; return result; } - bool FileExporterRIS::writeKeyValue( QTextStream &stream, const QString& key, const QString&value ) + bool FileExporterRIS::writeKeyValue( TQTextStream &stream, const TQString& key, const TQString&value ) { stream << key << " - "; if ( !value.isEmpty() ) stream << value; stream << endl; - qDebug( "%s - %s", key.latin1(), value.latin1() ); + tqDebug( "%s - %s", key.latin1(), value.latin1() ); return TRUE; } |