diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:25:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:25:18 +0000 |
commit | aa3a1ca934bc541bddd3fa136a85f106f7da266e (patch) | |
tree | 9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kdat/Archive.cpp | |
parent | b10cf7066791a2f362495890cd50c984e8025412 (diff) | |
download | tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdat/Archive.cpp')
-rw-r--r-- | kdat/Archive.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp index 0933265..5e8ef65 100644 --- a/kdat/Archive.cpp +++ b/kdat/Archive.cpp @@ -18,7 +18,7 @@ #include <assert.h> -#include <qstringlist.h> +#include <tqstringlist.h> #include <kdebug.h> @@ -26,7 +26,7 @@ #include "Options.h" #include "TapeManager.h" -Archive::Archive( Tape* tape, int ctime, const QString & name ) +Archive::Archive( Tape* tape, int ctime, const TQString & name ) : _stubbed( FALSE ), _fptr( 0 ), _offset( 0 ), @@ -108,7 +108,7 @@ void Archive::readAll( int version ) { read( version ); - QPtrListIterator<File> i( getChildren() ); + TQPtrListIterator<File> i( getChildren() ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -140,7 +140,7 @@ void Archive::write( FILE* fptr ) // Child range list. ival = _ranges.getRanges().count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); - QPtrListIterator<Range> it( _ranges.getRanges() ); + TQPtrListIterator<Range> it( _ranges.getRanges() ); for ( ; it.current(); ++it ) { ival = it.current()->getStart(); fwrite( &ival, sizeof( ival ), 1, _fptr ); @@ -159,7 +159,7 @@ void Archive::write( FILE* fptr ) } //===== Write files ===== - QPtrListIterator<File> i( getChildren() ); + TQPtrListIterator<File> i( getChildren() ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -186,7 +186,7 @@ int Archive::getEndBlock() return _endBlock; } -QString Archive::getName() +TQString Archive::getName() { read(); @@ -198,14 +198,14 @@ Tape* Archive::getTape() return _tape; } -const QPtrList<File>& Archive::getChildren() +const TQPtrList<File>& Archive::getChildren() { read(); return _children; } -const QPtrList<Range>& Archive::getRanges() +const TQPtrList<Range>& Archive::getRanges() { read(); @@ -226,7 +226,7 @@ void Archive::setEndBlock( int endBlock ) TapeManager::instance()->tapeModified( _tape ); } -void Archive::setName( const QString & name ) +void Archive::setName( const TQString & name ) { read(); @@ -258,13 +258,13 @@ void Archive::addChild( File* file ) _children.append( file ); } -File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const QString & filename ) +File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename ) { read(); - QStringList path; + TQStringList path; - QString fn( filename ); + TQString fn( filename ); int idx = 0; while ( ( idx = fn.find( '/' ) ) > -1 ) { path.append( fn.left( idx + 1 ) ); @@ -285,10 +285,10 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con return file; } - QString dir = path.first(); + TQString dir = path.first(); //path.remove(path.first()); path.remove(path.begin()); - QPtrListIterator<File> i( getChildren() ); + TQPtrListIterator<File> i( getChildren() ); File* parent = 0; for ( ; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { @@ -302,12 +302,12 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con addChild( parent ); } - for ( QStringList::Iterator j = path.begin(); + for ( TQStringList::Iterator j = path.begin(); j != path.end(); ++j ) { - QString dir = *j; + TQString dir = *j; File* pparent = parent; - QPtrListIterator<File> i( pparent->getChildren() ); + TQPtrListIterator<File> i( pparent->getChildren() ); for ( parent = 0; i.current() ; ++i ) { if ( i.current()->getName() == dir ) { parent = i.current(); @@ -333,10 +333,10 @@ void Archive::calcRanges() _ranges.clear(); - QPtrListIterator<File> it( getChildren() ); + TQPtrListIterator<File> it( getChildren() ); for ( ; it.current(); ++it ) { it.current()->calcRanges(); - QPtrListIterator<Range> it2( it.current()->getRanges() ); + TQPtrListIterator<Range> it2( it.current()->getRanges() ); for ( ; it2.current(); ++it2 ) { _ranges.addRange( it2.current()->getStart(), it2.current()->getEnd() ); } @@ -347,7 +347,7 @@ void Archive::calcRanges() //%%% into one big contiguous range. if ( _ranges.getRanges().count() > 1 ) { kdDebug() << "Archive::calcRanges() -- extra ranges detected, fixing..." << endl; - QPtrListIterator<Range> iter( _ranges.getRanges() ); + TQPtrListIterator<Range> iter( _ranges.getRanges() ); for ( ; iter.current(); ++iter ) { kdDebug() << "Archive::calcRanges() -- range = " << iter.current() << " to " << iter.current()->getEnd() << endl; } |