summaryrefslogtreecommitdiffstats
path: root/kdat/Archive.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-18 20:34:22 +0000
commitb09bffed6b43262948018dfb0f11890850ddf7c1 (patch)
tree138696bfcc7ac01070d0e8ecaa1cdf94611a2bd8 /kdat/Archive.cpp
parent6d43944a7130b9d1b4ae3fba37b774aced8612cf (diff)
downloadtdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.tar.gz
tdeadmin-b09bffed6b43262948018dfb0f11890850ddf7c1.zip
TQt4 port kdeadmin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1237416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdat/Archive.cpp')
-rw-r--r--kdat/Archive.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp
index 5e8ef65..1a78d44 100644
--- a/kdat/Archive.cpp
+++ b/kdat/Archive.cpp
@@ -94,7 +94,7 @@ void Archive::read( int version )
}
}
- // Number of immediate children (4 bytes).
+ // Number of immediate tqchildren (4 bytes).
fread( &ival, sizeof( ival ), 1, _fptr );
//===== Read files =====
@@ -148,7 +148,7 @@ void Archive::write( FILE* fptr )
fwrite( &ival, sizeof( ival ), 1, _fptr );
}
- // Number of immediate children (4 bytes).
+ // Number of immediate tqchildren (4 bytes).
ival = getChildren().count();
fwrite( &ival, sizeof( ival ), 1, _fptr );
@@ -202,7 +202,7 @@ const TQPtrList<File>& Archive::getChildren()
{
read();
- return _children;
+ return _tqchildren;
}
const TQPtrList<Range>& Archive::getRanges()
@@ -255,7 +255,7 @@ void Archive::addChild( File* file )
{
read();
- _children.append( file );
+ _tqchildren.append( file );
}
File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, const TQString & filename )
@@ -266,7 +266,7 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
TQString fn( filename );
int idx = 0;
- while ( ( idx = fn.find( '/' ) ) > -1 ) {
+ while ( ( idx = fn.tqfind( '/' ) ) > -1 ) {
path.append( fn.left( idx + 1 ) );
fn.remove( 0, idx + 1 );
}
@@ -289,40 +289,40 @@ File* Archive::addFile( int size, int mtime, int startRecord, int endRecord, con
//path.remove(path.first());
path.remove(path.begin());
TQPtrListIterator<File> i( getChildren() );
- File* parent = 0;
+ File* tqparent = 0;
for ( ; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
- parent = i.current();
+ tqparent = i.current();
break;
}
}
- if ( parent == 0 ) {
- parent = new File( 0, 0, 0, startRecord, endRecord, dir );
- addChild( parent );
+ if ( tqparent == 0 ) {
+ tqparent = new File( 0, 0, 0, startRecord, endRecord, dir );
+ addChild( tqparent );
}
for ( TQStringList::Iterator j = path.begin();
j != path.end();
++j ) {
TQString dir = *j;
- File* pparent = parent;
- TQPtrListIterator<File> i( pparent->getChildren() );
- for ( parent = 0; i.current() ; ++i ) {
+ File* ptqparent = tqparent;
+ TQPtrListIterator<File> i( ptqparent->getChildren() );
+ for ( tqparent = 0; i.current() ; ++i ) {
if ( i.current()->getName() == dir ) {
- parent = i.current();
+ tqparent = i.current();
break;
}
}
- if ( parent == 0 ) {
- parent = new File( pparent, 0, 0, 0, 0, dir );
- pparent->addChild( parent );
+ if ( tqparent == 0 ) {
+ tqparent = new File( ptqparent, 0, 0, 0, 0, dir );
+ ptqparent->addChild( tqparent );
}
}
- file = new File( parent, size, mtime, startRecord, endRecord, fn );
- parent->addChild( file );
+ file = new File( tqparent, size, mtime, startRecord, endRecord, fn );
+ tqparent->addChild( file );
return file;
}