Browse Source

rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdirstat@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 10 years ago
parent
commit
44af2b7aa2
  1. 4
      kdirstat/kactivitytracker.cpp
  2. 2
      kdirstat/kactivitytracker.h
  3. 6
      kdirstat/kcleanup.cpp
  4. 8
      kdirstat/kcleanup.h
  5. 2
      kdirstat/kcleanupcollection.cpp
  6. 2
      kdirstat/kcleanupcollection.h
  7. 2
      kdirstat/kdirstatapp.cpp
  8. 4
      kdirstat/kdirstatapp.h
  9. 42
      kdirstat/kdirstatsettings.cpp
  10. 24
      kdirstat/kdirstatsettings.h
  11. 108
      kdirstat/kdirtree.cpp
  12. 34
      kdirstat/kdirtree.h
  13. 20
      kdirstat/kdirtreeiterators.cpp
  14. 16
      kdirstat/kdirtreeiterators.h
  15. 58
      kdirstat/kdirtreeview.cpp
  16. 16
      kdirstat/kdirtreeview.h
  17. 18
      kdirstat/kfeedback.cpp
  18. 14
      kdirstat/kfeedback.h
  19. 4
      kdirstat/kpacman.cpp
  20. 2
      kdirstat/kpacman.h
  21. 28
      kdirstat/kstdcleanup.cpp
  22. 14
      kdirstat/kstdcleanup.h
  23. 4
      kdirstat/ktreemaptile.cpp
  24. 12
      kdirstat/ktreemaptile.h
  25. 10
      kdirstat/ktreemapview.cpp
  26. 10
      kdirstat/ktreemapview.h

4
kdirstat/kactivitytracker.cpp

@ -15,10 +15,10 @@
#include "kactivitytracker.h"
KActivityTracker::KActivityTracker( TQObject * tqparent,
KActivityTracker::KActivityTracker( TQObject * parent,
const TQString & id,
long initialThreshold )
: TQObject( tqparent )
: TQObject( parent )
{
_id = id;

2
kdirstat/kactivitytracker.h

@ -40,7 +40,7 @@ public:
* the application's @ref KConfig object doesn't contain a corresponding
* entry yet.
**/
KActivityTracker( TQObject * tqparent,
KActivityTracker( TQObject * parent,
const TQString & id,
long initialThreshold );

6
kdirstat/kcleanup.cpp

@ -31,11 +31,11 @@ using namespace KDirStat;
KCleanup::KCleanup( TQString id,
TQString command,
TQString title,
KActionCollection * tqparent )
KActionCollection * parent )
: KAction( title,
0, // accel
tqparent,
parent,
id )
, _id ( id )
@ -209,7 +209,7 @@ KCleanup::execute( KFileInfo *item )
case refreshParent:
tree->refresh( item->tqparent() );
tree->refresh( item->parent() );
break;

8
kdirstat/kcleanup.h

@ -50,13 +50,13 @@ namespace KDirStat
* 'command' is the shell command to execute.
*
* Most applications will want to pass KMainWindow::actionCollection()
* for 'tqparent' so the menus and toolbars can be created using the XML
* for 'parent' so the menus and toolbars can be created using the XML
* UI description ('kdirstatui.rc' for KDirStat).
**/
KCleanup( TQString id = "",
TQString command = "",
TQString title = "",
KActionCollection * tqparent = 0 );
KActionCollection * parent = 0 );
/**
* Copy Constructor.
@ -182,8 +182,8 @@ namespace KDirStat
* refreshThis: Refresh the KDirTree from the item on that was passed
* to KCleanup::execute().
*
* refreshParent: Refresh the KDirTree from the tqparent of the item on
* that was passed to KCleanup::execute(). If there is no such tqparent,
* refreshParent: Refresh the KDirTree from the parent of the item on
* that was passed to KCleanup::execute(). If there is no such parent,
* refresh the entire tree.
*
* assumeDeleted: Do not actually refresh the KDirTree. Instead,

2
kdirstat/kcleanupcollection.cpp

@ -80,7 +80,7 @@ KCleanupCollection::operator= ( const KCleanupCollection &src )
* limitations of the KCleanup copy constructor: It doesn't make a
* truly identical copy of the entire KCleanup object. Rather, it
* copies only the KCleanup members and leaves most of the KAction
* members (the tqparent class) untouched.
* members (the parent class) untouched.
*
* The behaviour implemented here comes handy in the most common
* situation where this assignment operator is used:

2
kdirstat/kcleanupcollection.h

@ -58,7 +58,7 @@ namespace KDirStat
* using the XML UI description ('kdirstatui.rc' for KDirStat).
*
* All @ref KCleanup actions ever added to this collection will get
* this as their tqparent.
* this as their parent.
**/
KCleanupCollection( KActionCollection * actionCollection = 0 );

2
kdirstat/kdirstatapp.cpp

@ -226,7 +226,7 @@ KDirStatApp::initActions()
_showTreemapView->setStatusText ( i18n( "Enables/disables the treemap view" ) );
_treemapZoomIn->setStatusText ( i18n( "Zoom treemap in" ) );
_treemapZoomOut->setStatusText ( i18n( "Zoom treemap out" ) );
_treemapSelectParent->setStatusText ( i18n( "Select tqparent" ) );
_treemapSelectParent->setStatusText ( i18n( "Select parent" ) );
_treemapRebuild->setStatusText ( i18n( "Rebuild treemap to fit into available space" ) );
pref->setStatusText ( i18n( "Opens the preferences dialog" ) );
_reportMailToOwner->setStatusText ( i18n( "Sends a mail to the owner of the selected subtree" ) );

4
kdirstat/kdirstatapp.h

@ -79,7 +79,7 @@ public:
* Construtor of KDirStatApp, calls all init functions to create the
* application.
**/
KDirStatApp( TQWidget* tqparent=0, const char* name=0 );
KDirStatApp( TQWidget* parent=0, const char* name=0 );
/**
* Destructor.
@ -185,7 +185,7 @@ public slots:
void treemapZoomOut();
/**
* Select the tqparent of the currently selected treemap tile.
* Select the parent of the currently selected treemap tile.
**/
void treemapSelectParent();

42
kdirstat/kdirstatsettings.cpp

@ -37,7 +37,7 @@ KSettingsDialog::KSettingsDialog( KDirStatApp *mainWin )
i18n( "Settings" ), // caption
Ok | Apply | Default | Cancel | Help, // buttonMask
Ok, // defaultButton
0, // tqparent
0, // parent
0, // name
false ) // modal
, _mainWin( mainWin )
@ -132,8 +132,8 @@ KSettingsDialog::slotHelp()
KSettingsPage::KSettingsPage( KSettingsDialog * dialog,
TQWidget * tqparent )
: TQWidget( tqparent )
TQWidget * parent )
: TQWidget( parent )
{
connect( dialog, TQT_SIGNAL( aboutToShow ( void ) ),
this, TQT_SLOT ( setup ( void ) ) );
@ -159,9 +159,9 @@ KSettingsPage::~KSettingsPage()
KTreeColorsPage::KTreeColorsPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin )
: KSettingsPage( dialog, tqparent )
: KSettingsPage( dialog, parent )
, _mainWin( mainWin )
, _treeView( mainWin->treeView() )
, _maxButtons( KDirStatSettingsMaxColorButton )
@ -274,9 +274,9 @@ KTreeColorsPage::enableColors( int maxColors )
KCleanupPage::KCleanupPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin )
: KSettingsPage( dialog, tqparent )
: KSettingsPage( dialog, parent )
, _mainWin( mainWin )
, _currentCleanup( 0 )
{
@ -425,8 +425,8 @@ KCleanupPage::storeProps( KCleanup * cleanup )
/*--------------------------------------------------------------------------*/
KCleanupListBox::KCleanupListBox( TQWidget *tqparent )
: TQListBox( tqparent )
KCleanupListBox::KCleanupListBox( TQWidget *parent )
: TQListBox( parent )
{
_selection = 0;
@ -517,9 +517,9 @@ KCleanupListBoxItem::updateTitle()
/*--------------------------------------------------------------------------*/
KCleanupPropertiesPage::KCleanupPropertiesPage( TQWidget * tqparent,
KCleanupPropertiesPage::KCleanupPropertiesPage( TQWidget * parent,
KDirStatApp * mainWin )
: TQWidget( tqparent )
: TQWidget( parent )
, _mainWin( mainWin )
{
TQVBoxLayout *outerBox = new TQVBoxLayout( this, 0, 0 ); // border, spacing
@ -700,9 +700,9 @@ KCleanupPropertiesPage::fields() const
KGeneralSettingsPage::KGeneralSettingsPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin )
: KSettingsPage( dialog, tqparent )
: KSettingsPage( dialog, parent )
, _mainWin( mainWin )
, _treeView( mainWin->treeView() )
{
@ -793,14 +793,14 @@ KGeneralSettingsPage::checkEnabledState()
KTreemapPage::KTreemapPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin )
: KSettingsPage( dialog, tqparent )
: KSettingsPage( dialog, parent )
, _mainWin( mainWin )
{
// kdDebug() << k_funcinfo << endl;
TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 0, 0 ); // tqparent, border, spacing
TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 0, 0 ); // parent, border, spacing
TQVBox * vbox = new TQVBox( this );
vbox->setSpacing( dialog->spacingHint() );
@ -890,7 +890,7 @@ KTreemapPage::KTreemapPage( KSettingsDialog * dialog,
label = new TQLabel( i18n( "Minim&um Treemap Tile Size: " ), gridBox );
_minTileSize = new TQSpinBox( 0, 30, 1, gridBox ); // min, max, step, tqparent
_minTileSize = new TQSpinBox( 0, 30, 1, gridBox ); // min, max, step, parent
label->setBuddy( _minTileSize );
grid->addWidget( label, 1, 0 );
@ -1032,9 +1032,9 @@ KTreemapPage::readColorEntry( KConfig * config, const char * entryName, TQColor
void
addHStretch( TQWidget * tqparent )
addHStretch( TQWidget * parent )
{
TQWidget * stretch = new TQWidget( tqparent );
TQWidget * stretch = new TQWidget( parent );
stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, // hor
TQSizePolicy::Minimum, // vert
1, // hstretch
@ -1043,9 +1043,9 @@ addHStretch( TQWidget * tqparent )
void
addVStretch( TQWidget * tqparent )
addVStretch( TQWidget * parent )
{
TQWidget * stretch = new TQWidget( tqparent );
TQWidget * stretch = new TQWidget( parent );
stretch->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, // hor
TQSizePolicy::Expanding, // vert
0, // hstretch

24
kdirstat/kdirstatsettings.h

@ -63,8 +63,8 @@ namespace KDirStat
/**
* Constructor.
*
* Notice there is no tqparent widget passed but the application's main
* window so its functions can be accessed. The tqparent of this widget
* Notice there is no parent widget passed but the application's main
* window so its functions can be accessed. The parent of this widget
* is always 0 since this is a dialog.
**/
@ -90,7 +90,7 @@ namespace KDirStat
* certainly not be the way to go.
*
* This overwritten show() method sends that @ref aboutToShow() signal
* before calling the tqparent class show() method.
* before calling the parent class show() method.
**/
virtual void show();
@ -153,7 +153,7 @@ namespace KDirStat
* e.g., apply(), setup(), revertToDefaults().
**/
KSettingsPage( KSettingsDialog * dialog,
TQWidget * tqparent );
TQWidget * parent );
/**
* Destructor.
@ -227,7 +227,7 @@ namespace KDirStat
* Constructor
**/
KTreeColorsPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin );
/**
@ -306,7 +306,7 @@ namespace KDirStat
* Constructor
**/
KCleanupPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin );
/**
@ -414,7 +414,7 @@ namespace KDirStat
/**
* Constructor.
**/
KCleanupListBox( TQWidget * tqparent = 0 );
KCleanupListBox( TQWidget * parent = 0 );
/**
* Destructor.
@ -519,7 +519,7 @@ namespace KDirStat
/**
* Constructor
**/
KCleanupPropertiesPage( TQWidget * tqparent,
KCleanupPropertiesPage( TQWidget * parent,
KDirStatApp * mainWin );
/**
@ -579,7 +579,7 @@ namespace KDirStat
* Constructor
**/
KGeneralSettingsPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin );
/**
@ -649,7 +649,7 @@ namespace KDirStat
* Constructor
**/
KTreemapPage( KSettingsDialog * dialog,
TQWidget * tqparent,
TQWidget * parent,
KDirStatApp * mainWin );
/**
@ -737,12 +737,12 @@ namespace KDirStat
/**
* Add a horizontal stretch widget to take all excess space.
**/
void addHStretch( TQWidget * tqparent );
void addHStretch( TQWidget * parent );
/**
* Add a vertical stretch widget to take all excess space.
**/
void addVStretch( TQWidget * tqparent );
void addVStretch( TQWidget * parent );

108
kdirstat/kdirtree.cpp

@ -29,9 +29,9 @@ using namespace KDirStat;
KFileInfo::KFileInfo( KDirTree * tree,
KDirInfo * tqparent,
KDirInfo * parent,
const char * name )
: _parent( tqparent )
: _parent( parent )
, _next( 0 )
, _tree( tree )
{
@ -50,8 +50,8 @@ KFileInfo::KFileInfo( KDirTree * tree,
KFileInfo::KFileInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
KDirInfo * tqparent )
: _parent( tqparent )
KDirInfo * parent )
: _parent( parent )
, _next( 0 )
, _tree( tree )
{
@ -102,15 +102,15 @@ KFileInfo::KFileInfo( const TQString & filenameWithoutPath,
KFileInfo::KFileInfo( const KFileItem * fileItem,
KDirTree * tree,
KDirInfo * tqparent )
: _parent( tqparent )
KDirInfo * parent )
: _parent( parent )
, _next( 0 )
, _tree( tree )
{
CHECK_PTR( fileItem );
_isLocalFile = fileItem->isLocalFile();
_name = tqparent ? fileItem->name() : fileItem->url().url();
_name = parent ? fileItem->name() : fileItem->url().url();
_device = 0;
_mode = fileItem->mode();
_links = 1;
@ -151,7 +151,7 @@ KFileInfo::~KFileInfo()
/**
* The destructor should also take care about unlinking this object from
* its tqparent's tqchildren list, but regrettably that just doesn't work: At
* its parent's tqchildren list, but regrettably that just doesn't work: At
* this point (within the destructor) parts of the object are already
* destroyed, e.g., the virtual table - virtual methods don't work any
* more. Thus, somebody from outside must call deletingChild() just prior
@ -225,7 +225,7 @@ KFileInfo::urlPart( int targetLevel ) const
while ( level > targetLevel )
{
level--;
item = item->tqparent();
item = item->parent();
}
return item->name();
@ -236,12 +236,12 @@ int
KFileInfo::treeLevel() const
{
int level = 0;
KFileInfo * tqparent = _parent;
KFileInfo * parent = _parent;
while ( tqparent )
while ( parent )
{
level++;
tqparent = tqparent->tqparent();
parent = parent->parent();
}
return level;
@ -271,7 +271,7 @@ KFileInfo::isInSubtree( const KFileInfo *subtree ) const
if ( ancestor == subtree )
return true;
ancestor = ancestor->tqparent();
ancestor = ancestor->parent();
}
return false;
@ -343,9 +343,9 @@ KFileInfo::locate( TQString url, bool findDotEntries )
KDirInfo::KDirInfo( KDirTree * tree,
KDirInfo * tqparent,
KDirInfo * parent,
bool asDotEntry )
: KFileInfo( tree, tqparent )
: KFileInfo( tree, parent )
{
init();
@ -366,11 +366,11 @@ KDirInfo::KDirInfo( KDirTree * tree,
KDirInfo::KDirInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
KDirInfo * tqparent )
KDirInfo * parent )
: KFileInfo( filenameWithoutPath,
statInfo,
tree,
tqparent )
parent )
{
init();
_dotEntry = new KDirInfo( tree, this, true );
@ -379,10 +379,10 @@ KDirInfo::KDirInfo( const TQString & filenameWithoutPath,
KDirInfo::KDirInfo( const KFileItem * fileItem,
KDirTree * tree,
KDirInfo * tqparent )
KDirInfo * parent )
: KFileInfo( fileItem,
tree,
tqparent )
parent )
{
init();
_dotEntry = new KDirInfo( tree, this, true );
@ -597,7 +597,7 @@ KDirInfo::insertChild( KFileInfo *newChild )
**/
newChild->setNext( _firstChild );
_firstChild = newChild;
newChild->setParent( this ); // make sure the tqparent pointer is correct
newChild->setParent( this ); // make sure the parent pointer is correct
childAdded( newChild ); // update summaries
}
@ -669,7 +669,7 @@ KDirInfo::deletingChild( KFileInfo *deletedChild )
if ( _parent )
_parent->deletingChild( deletedChild );
if ( ! _beingDestroyed && deletedChild->tqparent() == this )
if ( ! _beingDestroyed && deletedChild->parent() == this )
{
/**
* Unlink the child from the tqchildren's list - but only if this doesn't
@ -686,7 +686,7 @@ KDirInfo::deletingChild( KFileInfo *deletedChild )
void
KDirInfo::unlinkChild( KFileInfo *deletedChild )
{
if ( deletedChild->tqparent() != this )
if ( deletedChild->parent() != this )
{
kdError() << deletedChild << " is not a child of " << this
<< " - cannot unlink from tqchildren list!" << endl;
@ -773,7 +773,7 @@ KDirInfo::cleanupDotEntries()
if ( ! _dotEntry || _isDotEntry )
return;
// Retqparent dot entry tqchildren if there are no subdirectories on this level
// Reparent dot entry tqchildren if there are no subdirectories on this level
if ( ! _firstChild )
{
@ -953,25 +953,25 @@ KLocalDirReadJob::startReading()
KFileInfo *
KLocalDirReadJob::stat( const KURL & url,
KDirTree * tree,
KDirInfo * tqparent )
KDirInfo * parent )
{
struct stat statInfo;
if ( lstat( url.path(), &statInfo ) == 0 ) // lstat() OK
{
TQString name = tqparent ? url.filename() : url.path();
TQString name = parent ? url.filename() : url.path();
if ( S_ISDIR( statInfo.st_mode ) ) // directory?
{
KDirInfo * dir = new KDirInfo( name, &statInfo, tree, tqparent );
KDirInfo * dir = new KDirInfo( name, &statInfo, tree, parent );
if ( dir && tqparent && dir->device() != tqparent->device() )
if ( dir && parent && dir->device() != parent->device() )
dir->setMountPoint();
return dir;
}
else // no directory
return new KFileInfo( name, &statInfo, tree, tqparent );
return new KFileInfo( name, &statInfo, tree, parent );
}
else // lstat() failed
return 0;
@ -1043,7 +1043,7 @@ KAnyDirReadJob::entries ( KIO::Job * job,
KFileItem entry( *it,
url,
true, // determineMimeTypeOnDemand
true ); // URL is tqparent directory
true ); // URL is parent directory
if ( entry.name() != "." &&
entry.name() != ".." )
@ -1097,7 +1097,7 @@ KAnyDirReadJob::finished( KIO::Job * job )
KFileInfo *
KAnyDirReadJob::stat( const KURL & url,
KDirTree * tree,
KDirInfo * tqparent )
KDirInfo * parent )
{
KIO::UDSEntry uds_entry;
@ -1105,9 +1105,9 @@ KAnyDirReadJob::stat( const KURL & url,
{
KFileItem entry( uds_entry, url,
true, // determine MIME type on demand
false ); // URL specifies tqparent directory
false ); // URL specifies parent directory
return entry.isDir() ? new KDirInfo ( &entry, tree, tqparent ) : new KFileInfo( &entry, tree, tqparent );
return entry.isDir() ? new KDirInfo ( &entry, tree, parent ) : new KFileInfo( &entry, tree, parent );
}
else // remote stat() failed
return 0;
@ -1134,7 +1134,7 @@ KAnyDirReadJob::owner( KURL url )
{
KFileItem entry( uds_entry, url,
true, // determine MIME type on demand
false ); // URL specifies tqparent directory
false ); // URL specifies parent directory
return entry.user();
}
@ -1276,7 +1276,7 @@ KDirTree::refresh( KFileInfo *subtree )
if ( ! _root )
return;
if ( ! subtree || ! subtree->tqparent() ) // Refresh all (from root)
if ( ! subtree || ! subtree->parent() ) // Refresh all (from root)
{
startReading( fixedUrl( _root->url() ) );
}
@ -1285,7 +1285,7 @@ KDirTree::refresh( KFileInfo *subtree )
// Save some values from the old subtree.
KURL url = subtree->url();
KDirInfo * tqparent = subtree->tqparent();
KDirInfo * parent = subtree->parent();
// Select nothing if the current selection is to be deleted
@ -1300,7 +1300,7 @@ KDirTree::refresh( KFileInfo *subtree )
// kdDebug() << "Deleting subtree " << subtree << endl;
/**
* This may sound stupid, but the tqparent must be told to unlink its
* This may sound stupid, but the parent must be told to unlink its
* child from the tqchildren list. The child cannot simply do this by
* itself in its destructor since at this point important parts of the
* object may already be destroyed, e.g., the virtual table -
@ -1308,7 +1308,7 @@ KDirTree::refresh( KFileInfo *subtree )
*
* I just found that out the hard way by several hours of debugging. ;-}
**/
tqparent->deletingChild( subtree );
parent->deletingChild( subtree );
delete subtree;
emit childDeleted();
@ -1316,7 +1316,7 @@ KDirTree::refresh( KFileInfo *subtree )
// Create new subtree root.
subtree = ( _readMethod == KDirReadLocal ) ?
KLocalDirReadJob::stat( url, this, tqparent ) : KAnyDirReadJob::stat( url, this, tqparent );
KLocalDirReadJob::stat( url, this, parent ) : KAnyDirReadJob::stat( url, this, parent );
// kdDebug() << "New subtree: " << subtree << endl;
@ -1324,7 +1324,7 @@ KDirTree::refresh( KFileInfo *subtree )
{
// Insert new subtree root into the tree hierarchy.
tqparent->insertChild( subtree );
parent->insertChild( subtree );
childAddedNotify( subtree );
if ( subtree->isDir() )
@ -1444,48 +1444,48 @@ void
KDirTree::deleteSubtree( KFileInfo *subtree )
{
// kdDebug() << "Deleting subtree " << subtree << endl;
KDirInfo *tqparent = subtree->tqparent();
KDirInfo *parent = subtree->parent();
if ( tqparent )
if ( parent )
{
// Give the tqparent of the child to be deleted a chance to unlink the
// Give the parent of the child to be deleted a chance to unlink the
// child from its tqchildren list and take care of internal summary
// fields
tqparent->deletingChild( subtree );
parent->deletingChild( subtree );
}
// Send notification to anybody interested (e.g., to attached views)
deletingChildNotify( subtree );
if ( tqparent )
if ( parent )
{
if ( tqparent->isDotEntry() && ! tqparent->hasChildren() )
if ( parent->isDotEntry() && ! parent->hasChildren() )
// This was the last child of a dot entry
{
// Get rid of that now empty and useless dot entry
if ( tqparent->tqparent() )
if ( parent->parent() )
{
if ( tqparent->tqparent()->isFinished() )
if ( parent->parent()->isFinished() )
{
// kdDebug() << "Removing empty dot entry " << tqparent << endl;
// kdDebug() << "Removing empty dot entry " << parent << endl;
deletingChildNotify( tqparent );
tqparent->tqparent()->setDotEntry( 0 );
deletingChildNotify( parent );
parent->parent()->setDotEntry( 0 );
delete tqparent;
delete parent;
}
}
else // no tqparent - this should never happen (?)
else // no parent - this should never happen (?)
{
kdError() << "Internal error: Killing dot entry without tqparent " << tqparent << endl;
kdError() << "Internal error: Killing dot entry without parent " << parent << endl;
// Better leave that dot entry alone - we shouldn't have come
// here in the first place. Who knows what will happen if this
// thing is deleted now?!
//
// Intentionally NOT calling:
// delete tqparent;
// delete parent;
}
}
}

34
kdirstat/kdirtree.h

@ -106,7 +106,7 @@ namespace KDirStat
* Default constructor.
**/
KFileInfo( KDirTree * tree,
KDirInfo * tqparent = 0,
KDirInfo * parent = 0,
const char * name = 0 );
/**
@ -115,14 +115,14 @@ namespace KDirStat
KFileInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
/**
* Constructor from a KFileItem, i.e. from a @ref KIO::StatJob
**/
KFileInfo( const KFileItem * fileItem,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
/**
* Destructor.
@ -337,13 +337,13 @@ namespace KDirStat
KDirTree * tree() const { return _tree; }
/**
* Returns a pointer to this entry's tqparent entry or 0 if there is
* Returns a pointer to this entry's parent entry or 0 if there is
* none.
**/
KDirInfo * tqparent() const { return _parent; }
KDirInfo * parent() const { return _parent; }
/**
* Set the "tqparent" pointer.
* Set the "parent" pointer.
**/
void setParent( KDirInfo *newParent ) { _parent = newParent; }
@ -572,9 +572,9 @@ namespace KDirStat
KFileSize _blocks; // 512 bytes blocks
time_t _mtime; // modification time
KDirInfo * _parent; // pointer to the tqparent entry
KDirInfo * _parent; // pointer to the parent entry
KFileInfo * _next; // pointer to the next entry
KDirTree * _tree; // pointer to the tqparent tree
KDirTree * _tree; // pointer to the parent tree
}; // class KFileInfo
@ -592,13 +592,13 @@ namespace KDirStat
/**
* Default constructor.
*
* If "asDotEntry" is set, this will be used as the tqparent's
* "dot entry", i.e. the pseudo directory that holds all the tqparent's
* If "asDotEntry" is set, this will be used as the parent's
* "dot entry", i.e. the pseudo directory that holds all the parent's
* non-directory tqchildren. This is the only way to create a "dot
* entry"!
**/
KDirInfo( KDirTree * tree,
KDirInfo * tqparent = 0,
KDirInfo * parent = 0,
bool asDotEntry = false );
/**
@ -607,14 +607,14 @@ namespace KDirStat
KDirInfo( const TQString & filenameWithoutPath,
struct stat * statInfo,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
/**
* Constructor from a KFileItem, i.e. from a @ref KIO::StatJob
**/
KDirInfo( const KFileItem * fileItem,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
/**
* Destructor.
@ -849,7 +849,7 @@ namespace KDirStat
/**
* Clean up unneeded / undesired dot entries:
* Delete dot entries that don't have any tqchildren,
* reparent dot entry tqchildren to the "real" (tqparent) directory if
* reparent dot entry tqchildren to the "real" (parent) directory if
* there are not subdirectory siblings at the level of the dot entry.
**/
void cleanupDotEntries();
@ -897,7 +897,7 @@ namespace KDirStat
* KDirTree.
*
* For each entry automatically a @ref KFileInfo or @ref KDirInfo will be
* created and added to the tqparent @ref KDirInfo. For each directory a new
* created and added to the parent @ref KDirInfo. For each directory a new
* @ref KDirReadJob will be created and added to the @ref KDirTree 's job
* queue.
*
@ -1007,7 +1007,7 @@ namespace KDirStat
**/
static KFileInfo * stat( const KURL & url,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
protected:
DIR * _diskDir;
@ -1058,7 +1058,7 @@ namespace KDirStat
**/
static KFileInfo * stat( const KURL & url,
KDirTree * tree,
KDirInfo * tqparent = 0 );
KDirInfo * parent = 0 );
/**
* Obtain the owner of the URL specified.

20
kdirstat/kdirtreeiterators.cpp

@ -15,29 +15,29 @@
using namespace KDirStat;
KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy )
{
init( tqparent,
init( parent,
dotEntryPolicy,
true ); // callNext
}
KFileInfoIterator::KFileInfoIterator( KFileInfo * tqparent,
KFileInfoIterator::KFileInfoIterator( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
init( tqparent, dotEntryPolicy, callNext );
init( parent, dotEntryPolicy, callNext );
}
void
KFileInfoIterator::init( KFileInfo * tqparent,
KFileInfoIterator::init( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy,
bool callNext )
{
_parent = tqparent;
_parent = parent;
_policy = dotEntryPolicy;
_current = 0;
@ -174,11 +174,11 @@ KFileInfoIterator::count()
KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * tqparent,
KFileInfoSortedIterator::KFileInfoSortedIterator( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy,
KFileInfoSortOrder sortOrder,
bool ascending )
: KFileInfoIterator( tqparent, dotEntryPolicy, false )
: KFileInfoIterator( parent, dotEntryPolicy, false )
{
_sortOrder = sortOrder;
_ascending = ascending;
@ -316,11 +316,11 @@ KFileInfoSortedIterator::finished()
KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * tqparent,
KFileInfoSortedBySizeIterator::KFileInfoSortedBySizeIterator( KFileInfo * parent,
KFileSize minSize,
KDotEntryPolicy dotEntryPolicy,
bool ascending )
: KFileInfoSortedIterator( tqparent, dotEntryPolicy, KSortByTotalSize, ascending )
: KFileInfoSortedIterator( parent, dotEntryPolicy, KSortByTotalSize, ascending )
, _minSize( minSize )
{
}

16
kdirstat/kdirtreeiterators.h

@ -73,12 +73,12 @@ namespace KDirStat
public:
/**
* Constructor: Initialize an iterator object to iterate over the
* tqchildren of 'tqparent' (unsorted!), depending on 'dotEntryPolicy':
* tqchildren of 'parent' (unsorted!), depending on 'dotEntryPolicy':
*
* KDotEntryTransparent (default):
*
* Treat the dot entry as if it wasn't there - pretend to move all its
* tqchildren up to the real tqparent. This makes a directory look very
* tqchildren up to the real parent. This makes a directory look very
* much like the directory on disk, without the dot entry. 'current()'
* or 'operator*()' will never return the dot entry, but all of its
* tqchildren. Subdirectories will be processed before any file tqchildren.
@ -89,7 +89,7 @@ namespace KDirStat
* over its tqchildren, too (unlike KDotEntryTransparent above).
* 'current()' or 'operator*()' will return the dot entry, but none of
* its tqchildren (unless, of course, you create an iterator with the dot
* entry as the tqparent).
* entry as the parent).
*
* KDotEntryIgnore:
*
@ -99,7 +99,7 @@ namespace KDirStat
* tqchildren.
*
**/
KFileInfoIterator( KFileInfo * tqparent,
KFileInfoIterator( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent );
protected:
@ -107,7 +107,7 @@ namespace KDirStat
* Alternate constructor to be called from derived classes: Those can
* choose not to call next() in the constructor.
**/
KFileInfoIterator ( KFileInfo * tqparent,
KFileInfoIterator ( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy,
bool callNext );
@ -115,7 +115,7 @@ namespace KDirStat
/**
* Internal initialization called from any constructor.
**/
void init ( KFileInfo * tqparent,
void init ( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy,
bool callNext );
@ -202,7 +202,7 @@ namespace KDirStat
* Constructor. Specify the sorting order with 'sortOrder' and 'ascending'.
* See @ref KFileInfoIterator for more details.
**/
KFileInfoSortedIterator( KFileInfo * tqparent,
KFileInfoSortedIterator( KFileInfo * parent,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
KFileInfoSortOrder sortOrder = KSortByName,
bool ascending = true );
@ -293,7 +293,7 @@ namespace KDirStat
/**
* Constructor. Children below 'minSize' will be ignored by this iterator.
**/
KFileInfoSortedBySizeIterator( KFileInfo * tqparent,
KFileInfoSortedBySizeIterator( KFileInfo * parent,
KFileSize minSize = 0,
KDotEntryPolicy dotEntryPolicy = KDotEntryTransparent,
bool ascending = false );

58
kdirstat/kdirtreeview.cpp

@ -33,8 +33,8 @@
using namespace KDirStat;
KDirTreeView::KDirTreeView( TQWidget * tqparent )
: KDirTreeViewParentClass( tqparent )
KDirTreeView::KDirTreeView( TQWidget * parent )
: KDirTreeViewParentClass( parent )
{
_tree = 0;
_updateTimer = 0;
@ -135,7 +135,7 @@ KDirTreeView::~KDirTreeView()
/*
* Don't delete _updateTimer here, it's already automatically deleted by TQt!
* (Since it's derived from TQObject and has a TQObject tqparent).
* (Since it's derived from TQObject and has a TQObject parent).
*/
}
@ -337,9 +337,9 @@ KDirTreeView::clear()
void
KDirTreeView::addChild( KFileInfo *newChild )
{
if ( newChild->tqparent() )
if ( newChild->parent() )
{
KDirTreeViewItem *cloneParent = locate( newChild->tqparent(),
KDirTreeViewItem *cloneParent = locate( newChild->parent(),
_doLazyClone, // lazy
true ); // doClone
@ -355,12 +355,12 @@ KDirTreeView::addChild( KFileInfo *newChild )
{
if ( ! _doLazyClone )
{
kdError() << k_funcinfo << "Can't find tqparent view item for "
kdError() << k_funcinfo << "Can't find parent view item for "
<< newChild << endl;
}
}
}
else // No tqparent - top level item
else // No parent - top level item
{
// kdDebug() << "Immediately top level cloning " << newChild << endl;
new KDirTreeViewItem( this, newChild );
@ -383,7 +383,7 @@ KDirTreeView::deleteChild( KFileInfo *child )
/**
* The selected item is about to be deleted. Select some other item
* so there is still something selected: Preferably the next item
* or the tqparent if there is no next. This cannot be done from
* or the parent if there is no next. This cannot be done from
* outside because the order of items is not known to the outside;
* it might appear very random if the next item in the KFileInfo
* list would be selected. The order of that list is definitely
@ -397,17 +397,17 @@ KDirTreeView::deleteChild( KFileInfo *child )
* next item so he can clean up many items in a row.
**/
nextSelection = clone->next() ? clone->next() : clone->tqparent();
nextSelection = clone->next() ? clone->next() : clone->parent();
// kdDebug() << k_funcinfo << " Next selection: " << nextSelection << endl;
}
KDirTreeViewItem *tqparent = clone->tqparent();
KDirTreeViewItem *parent = clone->parent();
delete clone;
while ( tqparent )
while ( parent )
{
tqparent->updateSummary();
tqparent = tqparent->tqparent();
parent->updateSummary();
parent = parent->parent();
}
if ( nextSelection )
@ -979,22 +979,22 @@ KDirTreeViewItem::KDirTreeViewItem( KDirTreeView * view,
KDirTreeViewItem::KDirTreeViewItem( KDirTreeView * view,
KDirTreeViewItem * tqparent,
KDirTreeViewItem * parent,
KFileInfo * orig )
: TQListViewItem( tqparent )
: TQListViewItem( parent )
{
CHECK_PTR( tqparent );
init( view, tqparent, orig );
CHECK_PTR( parent );
init( view, parent, orig );
}
void
KDirTreeViewItem::init( KDirTreeView * view,
KDirTreeViewItem * tqparent,
KDirTreeViewItem * parent,
KFileInfo * orig )
{
_view = view;
_parent = tqparent;
_parent = parent;
_orig = orig;
_percent = 0.0;
_pacMan = 0;
@ -1082,7 +1082,7 @@ KDirTreeViewItem::init( KDirTreeView * view,
}
}
if ( ! tqparent || tqparent->isOpen() )
if ( ! parent || parent->isOpen() )
{
setIcon();
}
@ -1184,11 +1184,11 @@ KDirTreeViewItem::updateSummary()
// Calculate and display percentage
if ( _orig->tqparent() && // only if there is a tqparent as calculation base
_orig->tqparent()->pendingReadJobs() < 1 && // not before subtree is finished reading
_orig->tqparent()->totalSize() > 0 ) // avoid division by zero
if ( _orig->parent() && // only if there is a parent as calculation base
_orig->parent()->pendingReadJobs() < 1 && // not before subtree is finished reading
_orig->parent()->totalSize() > 0 ) // avoid division by zero
{
_percent = ( 100.0 * _orig->totalSize() ) / (float) _orig->tqparent()->totalSize();
_percent = ( 100.0 * _orig->totalSize() ) / (float) _orig->parent()->totalSize();
setText( _view->percentNumCol(), formatPercent ( _percent ) );
}
else
@ -1367,7 +1367,7 @@ KDirTreeViewItem::cleanupDotEntries()
return;
// Retqparent dot entry tqchildren if there are no subdirectories on this level
// Reparent dot entry tqchildren if there are no subdirectories on this level
if ( ! _orig->firstChild() )
{
@ -1379,7 +1379,7 @@ KDirTreeViewItem::cleanupDotEntries()
KDirTreeViewItem *nextChild = child->next();
// Retqparent this child
// Reparent this child
// kdDebug() << "Reparenting clone " << child << endl;
dotEntry->removeItem( child );
@ -1473,8 +1473,8 @@ KDirTreeViewItem::openNotify( bool open )
void
KDirTreeViewItem::openSubtree()
{
if ( tqparent() )
tqparent()->setOpen( true );
if ( parent() )
parent()->setOpen( true );
setOpen( true );
}
@ -1649,7 +1649,7 @@ KDirTreeViewItem::paintCell( TQPainter * painter,
else
{
/*
* Call the tqparent's paintCell() method. We don't want to do
* Call the parent's paintCell() method. We don't want to do
* all the hassle of drawing strings and pixmaps, regarding
* alignments etc.
*/

16
kdirstat/kdirtreeview.h

@ -12,7 +12,7 @@
#define KDirTreeView_h
// Alternative tqparent class for KDirTreeView.
// Alternative parent class for KDirTreeView.
//
// If you change this, don't forget to change the KDirTreeView class
// declaration also. Unfortunately there this 'define' can't be used -
@ -71,7 +71,7 @@ namespace KDirStat
/**
* Default constructor.
**/
KDirTreeView( TQWidget * tqparent = 0 );
KDirTreeView( TQWidget * parent = 0 );
/**
* Destructor.
@ -193,7 +193,7 @@ namespace KDirStat
* inevitably be the case for a white background (which unfortunately
* is very common): The percentage bars use white and black for 3D
* borders - like any other widget. But other widgets normally can
* assume their tqparent widget uses some more neutral color so white and
* assume their parent widget uses some more neutral color so white and
* black will result in at least some minimal contrast.
*
* This function automagically sets a reasonable default background
@ -580,7 +580,7 @@ namespace KDirStat
* Constructor for all other items.
**/
KDirTreeViewItem ( KDirTreeView * view,
KDirTreeViewItem * tqparent,
KDirTreeViewItem * parent,
KFileInfo * orig );
/**
@ -630,9 +630,9 @@ namespace KDirStat
/**
* Returns the tqparent view item or 0 if this is the root.
* Returns the parent view item or 0 if this is the root.
**/
KDirTreeViewItem * tqparent() { return _parent; }
KDirTreeViewItem * parent() { return _parent; }
/**
* Returns the corresponding original item of the "real" (vs. view)
@ -721,7 +721,7 @@ namespace KDirStat
/**
* Remove dot entry if it doesn't have any tqchildren.
* Retqparent all of the dot entry's tqchildren if there are no
* Reparent all of the dot entry's tqchildren if there are no
* subdirectories on this level.
**/
void cleanupDotEntries();
@ -779,7 +779,7 @@ namespace KDirStat
* Initializations common to all constructors.
**/
void init ( KDirTreeView * view,
KDirTreeViewItem * tqparent,
KDirTreeViewItem * parent,
KFileInfo * orig );
protected:

18
kdirstat/kfeedback.cpp

@ -77,8 +77,8 @@ KFeedbackDialog::checkSendButton()
KFeedbackForm::KFeedbackForm( const TQString & feedbackMailAddress,
TQWidget * tqparent )
: TQVBox( tqparent )
TQWidget * parent )
: TQVBox( parent )
, _feedbackMailAddress( feedbackMailAddress )
{
//
@ -232,8 +232,8 @@ KFeedbackForm::readyToSend()
KFeedbackQuestionList::KFeedbackQuestionList( TQWidget *tqparent )
: TQListView( tqparent )
KFeedbackQuestionList::KFeedbackQuestionList( TQWidget *parent )
: TQListView( parent )
{
addColumn( "" );
header()->hide();
@ -329,13 +329,13 @@ KFeedbackQuestionList::questionAdded( KFeedbackQuestion * question)
static int nextNo = 0;
KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * tqparent,
KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * parent,
const TQString & text,
const TQString & id,
bool exclusiveAnswer,
bool required,
bool open )
: TQCheckListItem( tqparent, text )
: TQCheckListItem( parent, text )
, _id( id )
, _exclusiveAnswer( exclusiveAnswer )
, _required( required )
@ -348,7 +348,7 @@ KFeedbackQuestion::KFeedbackQuestion( KFeedbackQuestionList * tqparent,
setOpen( open );
_no = nextNo++;
tqparent->questionAdded( this );
parent->questionAdded( this );
}