summaryrefslogtreecommitdiffstats
path: root/kdat/Archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdat/Archive.cpp')
-rw-r--r--kdat/Archive.cpp40
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;
}