From d1248617107f659af9d03cf1ef6d783571a0cba8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:45:05 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kdat/Tape.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'kdat/Tape.cpp') diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp index 1f762c3..ff35d1a 100644 --- a/kdat/Tape.cpp +++ b/kdat/Tape.cpp @@ -216,7 +216,7 @@ void Tape::read() default: { KMessageBox::sorry( KDatMainWindow::getInstance(), - i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).tqarg(version ), + i18n( "The tape index file format is version %d. The index cannot be read by this version of KDat. Perhaps the tape index file was created by a newer version of KDat?" ).arg(version ), i18n("Tape Index") ); } } @@ -226,7 +226,7 @@ void Tape::readAll( int version ) { read(); - TQPtrListIterator i( _tqchildren ); + TQPtrListIterator i( _children ); for ( ; i.current(); ++i ) { i.current()->readAll( version ); } @@ -282,7 +282,7 @@ void Tape::write() memset( buf, 0, 4096 ); memcpy( buf, _name.ascii(), _name.length() > 4095 ? 4095 : _name.length() ); fwrite( buf, sizeof( char ), 4096, _fptr ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); // Fill in the archive offsets later... @@ -292,7 +292,7 @@ void Tape::write() } //===== Write archives ===== - TQPtrListIterator i( _tqchildren ); + TQPtrListIterator i( _children ); int count = 0; for ( ; i.current(); ++i, count++ ) { // Fill in the file offset. @@ -346,7 +346,7 @@ const TQPtrList& Tape::getChildren() { read(); - return _tqchildren; + return _children; } void Tape::setName( const TQString & name ) @@ -528,7 +528,7 @@ void Tape::addChild( Archive* archive ) archive->calcRanges(); - _tqchildren.append( archive ); + _children.append( archive ); char buf[4096]; fseek( _fptr, 0, SEEK_END ); @@ -537,9 +537,9 @@ void Tape::addChild( Archive* archive ) fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); - fseek( _fptr, ( _tqchildren.count() - 1 ) * 4, SEEK_CUR ); + fseek( _fptr, ( _children.count() - 1 ) * 4, SEEK_CUR ); fwrite( &here, sizeof( here ), 1, _fptr ); fseek( _fptr, here, SEEK_SET ); archive->write( _fptr ); @@ -559,21 +559,21 @@ void Tape::removeChild( Archive* archive ) { read(); - while ( _tqchildren.last() != archive ) { - _tqchildren.removeLast(); + while ( _children.last() != archive ) { + _children.removeLast(); } - _tqchildren.removeLast(); + _children.removeLast(); char buf[4096]; fseek( _fptr, 0, SEEK_SET ); fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); int here; if ( ival > 0 ) { - fseek( _fptr, _tqchildren.count() * 4, SEEK_CUR ); + fseek( _fptr, _children.count() * 4, SEEK_CUR ); fread( &here, sizeof( here ), 1, _fptr ); } else { fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); @@ -593,13 +593,13 @@ void Tape::removeChild( Archive* archive ) void Tape::clear() { - if ( _tqchildren.count() < 1 ) { + if ( _children.count() < 1 ) { return; } - while ( _tqchildren.first() ) { - delete _tqchildren.first(); - _tqchildren.removeFirst(); + while ( _children.first() ) { + delete _children.first(); + _children.removeFirst(); } char buf[4096]; @@ -607,7 +607,7 @@ void Tape::clear() fgets( buf, 4096, _fptr ); fgets( buf, 4096, _fptr ); fseek( _fptr, 12 + 4096, SEEK_CUR ); - int ival = _tqchildren.count(); + int ival = _children.count(); fwrite( &ival, sizeof( ival ), 1, _fptr ); fseek( _fptr, MAX_NUM_ARCHIVES * 4, SEEK_CUR ); int here = ftell( _fptr ); @@ -711,7 +711,7 @@ void Tape::readVersion1Index( FILE* fptr ) Archive* archive = new Archive( this, archiveTimeStamp, archiveName ); archive->setEndBlock( archiveEndBlock - archiveStartBlock ); - _tqchildren.append( archive ); + _children.append( archive ); // Read the number of files. if ( !fgets( buf, 4096, fptr ) ) { @@ -827,7 +827,7 @@ void Tape::readVersion2Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } } @@ -870,7 +870,7 @@ void Tape::readVersion3Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } } @@ -913,7 +913,7 @@ void Tape::readVersion4Index( FILE* fptr ) int ival; for ( ; numArchives; numArchives-- ) { fread( &ival, sizeof( ival ), 1, fptr ); - _tqchildren.append( new Archive( this, fptr, ival ) ); + _children.append( new Archive( this, fptr, ival ) ); } /* 2002-01-31 LEW */ -- cgit v1.2.3