summaryrefslogtreecommitdiffstats
path: root/kdirstat/kdirtreeiterators.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:28:42 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 21:28:42 +0000
commite8d62395de6c1b3844294c5b6c09428c315ac42a (patch)
treef94a43e157b5b4607f3a8d5b9b7be873d458fafa /kdirstat/kdirtreeiterators.cpp
parent1ed26cd2c4d896ae560dc7dddb570fe14ef573f3 (diff)
downloadkdirstat-e8d62395de6c1b3844294c5b6c09428c315ac42a.tar.gz
kdirstat-e8d62395de6c1b3844294c5b6c09428c315ac42a.zip
TQt4 port kdirstat
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdirstat@1239296 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdirstat/kdirtreeiterators.cpp')
-rw-r--r--kdirstat/kdirtreeiterators.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kdirstat/kdirtreeiterators.cpp b/kdirstat/kdirtreeiterators.cpp
index 6f42798..ff43bd3 100644
--- a/kdirstat/kdirtreeiterators.cpp
+++ b/kdirstat/kdirtreeiterators.cpp
@@ -15,29 +15,29 @@
using namespace KDirStat;
-KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
+KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy )
{
- init( parent,
+ init( tqparent,
dotEntryPolicy,
true ); // callNext
}
-KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
+KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
- init( parent, dotEntryPolicy, callNext );
+ init( tqparent, dotEntryPolicy, callNext );
}
void
-KFileInfoIterator::init( KFileInfo * parent,
+KFileInfoIterator::init( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
- _parent = parent;
+ _parent = tqparent;
_policy = dotEntryPolicy;
_current = 0;
@@ -60,7 +60,7 @@ void KFileInfoIterator::next()
{
if ( ! _directChildrenProcessed )
{
- // Process direct children
+ // Process direct tqchildren
_current = _current ? _current->next() : _parent->firstChild();
@@ -98,7 +98,7 @@ void KFileInfoIterator::next()
{
if ( _policy == KDotEntryTransparent )
{
- // Process dot entry children
+ // Process dot entry tqchildren
_current = _current ?
_current->next() :
@@ -129,7 +129,7 @@ KFileInfoIterator::count()
{
int cnt = 0;
- // Count direct children
+ // Count direct tqchildren
KFileInfo *child = _parent->firstChild();
@@ -144,7 +144,7 @@ KFileInfoIterator::count()
switch ( _policy )
{
- case KDotEntryTransparent: // Count the dot entry's children as well.
+ case KDotEntryTransparent: // Count the dot entry's tqchildren as well.
if ( _parent->dotEntry() )
{
child = _parent->dotEntry()->firstChild();
@@ -174,16 +174,16 @@ KFileInfoIterator::count()
-KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
+KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * tqparent,
KDotEntryPolicy dotEntryPolicy,
KFileInfoSortOrder sortOrder,
bool ascending )
- : KFileInfoIterator( parent, dotEntryPolicy, false )
+ : KFileInfoIterator( tqparent, dotEntryPolicy, false )
{
_sortOrder = sortOrder;
_ascending = ascending;
_initComplete = false;
- _childrenList = 0;
+ _tqchildrenList = 0;
_current = 0;
}
@@ -191,8 +191,8 @@ KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
void
KFileInfoSortedIterator::delayedInit()
{
- _childrenList = new KFileInfoList( _sortOrder, _ascending );
- CHECK_PTR( _childrenList );
+ _tqchildrenList = new KFileInfoList( _sortOrder, _ascending );
+ CHECK_PTR( _tqchildrenList );
if ( _sortOrder == KSortByName )
{
@@ -203,45 +203,45 @@ KFileInfoSortedIterator::delayedInit()
makeChildrenList();
}
- _current = _childrenList->first();
+ _current = _tqchildrenList->first();
_initComplete = true;
}
KFileInfoSortedIterator::~KFileInfoSortedIterator()
{
- if ( _childrenList )
- delete _childrenList;
+ if ( _tqchildrenList )
+ delete _tqchildrenList;
}
void KFileInfoSortedIterator::makeDefaultOrderChildrenList()
{
- // Fill children list with direct children
+ // Fill tqchildren list with direct tqchildren
KFileInfo *child = _parent->firstChild();
while ( child )
{
- _childrenList->append( child );
+ _tqchildrenList->append( child );
child = child->next();
}
- _childrenList->sort();
+ _tqchildrenList->sort();
if ( _policy == KDotEntryAsSubDir && _parent->dotEntry() )
{
- // Append dot entry to the children list
+ // Append dot entry to the tqchildren list
- _childrenList->append( _parent->dotEntry() );
+ _tqchildrenList->append( _parent->dotEntry() );
}
- // Append the dot entry's children to the children list
+ // Append the dot entry's tqchildren to the tqchildren list
if ( _policy == KDotEntryTransparent && _parent->dotEntry() )
{
- // Create a temporary list for the dot entry children
+ // Create a temporary list for the dot entry tqchildren
KFileInfoList dotEntryChildrenList( _sortOrder, _ascending );
child = _parent->dotEntry()->firstChild();
@@ -255,13 +255,13 @@ void KFileInfoSortedIterator::makeDefaultOrderChildrenList()
dotEntryChildrenList.sort();
- // Now append all of this dot entry children list to the children list
+ // Now append all of this dot entry tqchildren list to the tqchildren list
child = dotEntryChildrenList.first();
while ( child )
{
- _childrenList->append( child );
+ _tqchildrenList->append( child );
child = dotEntryChildrenList.next();
}
}
@@ -275,11 +275,11 @@ KFileInfoSortedIterator::makeChildrenList()
while ( *it )
{
- _childrenList->append( *it );
+ _tqchildrenList->append( *it );
++it;
}
- _childrenList->sort();
+ _tqchildrenList->sort();
}
@@ -298,7 +298,7 @@ void KFileInfoSortedIterator::next()
if ( ! _initComplete )
delayedInit();
- _current = _childrenList->next();
+ _current = _tqchildrenList->next();
}
@@ -316,11 +316,11 @@ KFileInfoSortedIterator::finished()
-KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * parent,
+KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * tqparent,
KFileSize minSize,
KDotEntryPolicy dotEntryPolicy,
bool ascending )
- : KFileInfoSortedIterator( parent, dotEntryPolicy, KSortByTotalSize, ascending )
+ : KFileInfoSortedIterator( tqparent, dotEntryPolicy, KSortByTotalSize, ascending )
, _minSize( minSize )
{
}
@@ -334,12 +334,12 @@ KFileInfoSortedBySizeIterator::makeChildrenList()
while ( *it )
{
if ( (*it)->totalSize() >= _minSize )
- _childrenList->append( *it );
+ _tqchildrenList->append( *it );
++it;
}
- _childrenList->sort();
+ _tqchildrenList->sort();
}
@@ -348,7 +348,7 @@ KFileInfoSortedBySizeIterator::makeChildrenList()
KFileInfoList::KFileInfoList( KFileInfoSortOrder sortOrder, bool ascending )
- : QPtrList<KFileInfo>()
+ : TQPtrList<KFileInfo>()
{
_sortOrder = sortOrder;
_ascending = ascending;
@@ -380,7 +380,7 @@ KFileInfoList::sumTotalSizes()
int
-KFileInfoList::compareItems( QCollection::Item it1, QCollection::Item it2 )
+KFileInfoList::compareItems( TQCollection::Item it1, TQCollection::Item it2 )
{
if ( it1 == it2 )
return 0;
@@ -396,7 +396,7 @@ KFileInfoList::compareItems( QCollection::Item it1, QCollection::Item it2 )
return 1;
case KSortByName:
- result = QString::compare( file1->name(), file2->name() );
+ result = TQString::compare( file1->name(), file2->name() );
break;
case KSortByTotalSize: