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/file.cpp | |
parent | 251c9a439759c830d34c70683d0fc9454d703010 (diff) | |
download | kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.tar.gz kbibtex-5f5e7c5455d52826b0bd50f64fcffb7695ce970d.zip |
Initial TQt conversion
Diffstat (limited to 'src/file.cpp')
-rw-r--r-- | src/file.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/src/file.cpp b/src/file.cpp index 8b6106e..c02ae79 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -17,11 +17,11 @@ * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include <qfile.h> -#include <qtextstream.h> -#include <qiodevice.h> -#include <qstringlist.h> -#include <qregexp.h> +#include <ntqfile.h> +#include <ntqtextstream.h> +#include <ntqiodevice.h> +#include <ntqstringlist.h> +#include <ntqregexp.h> #include <settings.h> #include <file.h> @@ -34,7 +34,7 @@ namespace BibTeX { - File::File( ) : QObject( ), fileName( QString::null ) + File::File( ) : TQObject( ), fileName( TQString::null ) { // nothing } @@ -88,7 +88,7 @@ namespace BibTeX } if ( !found ) - qDebug( "BibTeX::File got told to delete an element which is not in this file." ); + tqDebug( "BibTeX::File got told to delete an element which is not in this file." ); } Element* File::cloneElement( Element *element ) @@ -112,7 +112,7 @@ namespace BibTeX } } - Element *File::containsKey( const QString &key ) + Element *File::containsKey( const TQString &key ) { for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ ) { @@ -136,7 +136,7 @@ namespace BibTeX return NULL; } - const Element *File::containsKeyConst( const QString &key ) const + const Element *File::containsKeyConst( const TQString &key ) const { for ( ElementList::const_iterator it = elements.begin(); it != elements.end(); it++ ) { @@ -160,9 +160,9 @@ namespace BibTeX return NULL; } - QStringList File::allKeys() + TQStringList File::allKeys() { - QStringList result; + TQStringList result; for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ ) { @@ -180,9 +180,9 @@ namespace BibTeX return result; } - QString File::text() + TQString File::text() { - QString result; + TQString result; for ( ElementList::iterator it = elements.begin(); it != elements.end(); it++ ) { @@ -213,17 +213,17 @@ namespace BibTeX return elements.constEnd(); } - QStringList File::getAllValuesAsStringList( const EntryField::FieldType fieldType ) const + TQStringList File::getAllValuesAsStringList( const EntryField::FieldType fieldType ) const { - QStringList result; + TQStringList result; for ( ElementList::ConstIterator eit = elements.constBegin(); eit != elements.constEnd(); ++eit ) { Entry* entry = dynamic_cast<Entry*>( *eit ); EntryField * field = NULL; if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL ) { - QValueList<ValueItem*> valueItems = field->value()->items; - for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit ) + TQValueList<ValueItem*> valueItems = field->value()->items; + for ( TQValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit ) { switch ( fieldType ) { @@ -231,9 +231,9 @@ namespace BibTeX { KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit ); if ( container != NULL ) - for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit ) + for ( TQValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit ) { - QString text = ( *kit )->text(); + TQString text = ( *kit )->text(); if ( !result.contains( text ) ) result.append( text ); } @@ -244,9 +244,9 @@ namespace BibTeX { PersonContainer *container = dynamic_cast<PersonContainer*>( *vit ); if ( container != NULL ) - for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit ) + for ( TQValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit ) { - QString text = ( *pit )->text(); + TQString text = ( *pit )->text(); if ( !result.contains( text ) ) result.append( text ); } @@ -254,7 +254,7 @@ namespace BibTeX break; default: { - QString text = ( *vit )->text(); + TQString text = ( *vit )->text(); if ( !result.contains( text ) ) result.append( text ); } @@ -267,17 +267,17 @@ namespace BibTeX return result; } - QMap<QString, int> File::getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const + TQMap<TQString, int> File::getAllValuesAsStringListWithCount( const EntryField::FieldType fieldType ) const { - QMap<QString, int> result; + TQMap<TQString, int> result; for ( ElementList::ConstIterator eit = elements.begin(); eit != elements.end(); ++eit ) { Entry* entry = dynamic_cast<Entry*>( *eit ); EntryField * field = NULL; if ( entry != NULL && ( field = entry->getField( fieldType ) ) != NULL ) { - QValueList<ValueItem*> valueItems = field->value()->items; - for ( QValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit ) + TQValueList<ValueItem*> valueItems = field->value()->items; + for ( TQValueList<ValueItem*>::ConstIterator vit = valueItems.begin(); vit != valueItems.end(); ++vit ) { switch ( fieldType ) { @@ -285,9 +285,9 @@ namespace BibTeX { KeywordContainer *container = dynamic_cast<KeywordContainer*>( *vit ); if ( container != NULL ) - for ( QValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit ) + for ( TQValueList<Keyword*>::ConstIterator kit = container->keywords.constBegin(); kit != container->keywords.constEnd(); ++kit ) { - QString text = ( *kit )->text(); + TQString text = ( *kit )->text(); if ( !result.contains( text ) ) result[text] = 1; else @@ -300,9 +300,9 @@ namespace BibTeX { PersonContainer *container = dynamic_cast<PersonContainer*>( *vit ); if ( container != NULL ) - for ( QValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit ) + for ( TQValueList<Person*>::ConstIterator pit = container->persons.constBegin(); pit != container->persons.constEnd(); ++pit ) { - QString text = ( *pit )->text(); + TQString text = ( *pit )->text(); if ( !result.contains( text ) ) result[text] = 1; else @@ -312,7 +312,7 @@ namespace BibTeX break; default: { - QString text = ( *vit )->text(); + TQString text = ( *vit )->text(); if ( !result.contains( text ) ) result[text] = 1; else @@ -326,9 +326,9 @@ namespace BibTeX return result; } - void File::replaceValue( const QString& oldText, const QString& newText, const EntryField::FieldType fieldType ) + void File::replaceValue( const TQString& oldText, const TQString& newText, const EntryField::FieldType fieldType ) { - qDebug( "Renaming all occurrences of '%s' to '%s' for fields of type '%s'", oldText.latin1(), newText.latin1(), EntryField::fieldTypeToString( fieldType ).latin1() ); + tqDebug( "Renaming all occurrences of '%s' to '%s' for fields of type '%s'", oldText.latin1(), newText.latin1(), EntryField::fieldTypeToString( fieldType ).latin1() ); for ( ElementList::ConstIterator it = elements.begin(); it != elements.end(); it++ ) { |