diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-06 11:32:15 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-01-06 16:43:33 +0900 |
| commit | 1dd8222792710b74ab283d3832284455d5affa7d (patch) | |
| tree | 19587979c9edd23419cb52da1b4a8a005d6b1e9d /kdat | |
| parent | 3e22959a47d82ce8baefea9458102340be013350 (diff) | |
| download | tdeadmin-master.tar.gz tdeadmin-master.zip | |
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdat')
37 files changed, 347 insertions, 347 deletions
diff --git a/kdat/Archive.cpp b/kdat/Archive.cpp index 5e8ef65..6cd9df6 100644 --- a/kdat/Archive.cpp +++ b/kdat/Archive.cpp @@ -27,7 +27,7 @@ #include "TapeManager.h" Archive::Archive( Tape* tape, int ctime, const TQString & name ) - : _stubbed( FALSE ), + : _stubbed( false ), _fptr( 0 ), _offset( 0 ), _name( name ), @@ -39,7 +39,7 @@ Archive::Archive( Tape* tape, int ctime, const TQString & name ) } Archive::Archive( Tape* tape, FILE* fptr, int offset ) - : _stubbed( TRUE ), + : _stubbed( true ), _tape( tape ) { assert( _tape ); @@ -58,7 +58,7 @@ void Archive::read( int version ) return; } - _stubbed = FALSE; + _stubbed = false; fseek( _fptr, _offset, SEEK_SET ); diff --git a/kdat/ArchiveInfoWidget.cpp b/kdat/ArchiveInfoWidget.cpp index 48fd9de..e5b31c8 100644 --- a/kdat/ArchiveInfoWidget.cpp +++ b/kdat/ArchiveInfoWidget.cpp @@ -62,7 +62,7 @@ ArchiveInfoWidget::ArchiveInfoWidget( TQWidget* parent, const char* name ) _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); @@ -141,5 +141,5 @@ void ArchiveInfoWidget::slotApply() _archive->setName( _archiveName->text() ); } - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); } diff --git a/kdat/BackupDlg.cpp b/kdat/BackupDlg.cpp index 09358e6..70e4966 100644 --- a/kdat/BackupDlg.cpp +++ b/kdat/BackupDlg.cpp @@ -52,7 +52,7 @@ BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, const TQStringList& files, bool oneFilesystem, bool incremental, const TQString & snapshot, bool removeSnapshot, int archiveSize, Tape* tape, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ), + : TQDialog( parent, name, true ), _proc( NULL ), _tarParser( NULL ), _archiveName( archiveName ), @@ -68,7 +68,7 @@ BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, _totalRecords( 0 ), _startTime( 0 ), _archive( NULL ), - _aborted( FALSE ), + _aborted( false ), _numFiles( 0 ), _fileSize( -1 ), _fileMTime( -1 ), @@ -133,12 +133,12 @@ BackupDlg::BackupDlg( const TQString & archiveName, const TQString & workingDir, _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOK() ) ); - _ok->setEnabled( FALSE ); + _ok->setEnabled( false ); _save = new TQPushButton( i18n( "Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQ_SIGNAL( clicked() ), _log, TQ_SLOT( save() ) ); - _save->setEnabled( FALSE ); + _save->setEnabled( false ); _abort = new KPushButton( KStdGuiItem::cancel(), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); @@ -310,10 +310,10 @@ void BackupDlg::slotProcessExited( TDEProcess* ) _tape->addChild( _archive ); - _ok->setEnabled( TRUE ); - _ok->setDefault( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _ok->setDefault( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); } // the TDEProcess passes the arguments to tar, and tar's output is piped here. @@ -387,12 +387,12 @@ void BackupDlg::slotAbort() delete _proc; } delete _archive; - _aborted = TRUE; + _aborted = true; - _ok->setEnabled( TRUE ); - _ok->setDefault( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _ok->setDefault( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); } void BackupDlg::timerEvent( TQTimerEvent* ) diff --git a/kdat/BackupDlg.h b/kdat/BackupDlg.h index c0822eb..57103ee 100644 --- a/kdat/BackupDlg.h +++ b/kdat/BackupDlg.h @@ -87,8 +87,8 @@ public: * @param archiveName The name for the new archive. * @param workingDir The directory to backup from. * @param files The list of files to backup. - * @param oneFilesystem TRUE means do not follow symbolic links across filesystems. - * @param incremental TRUE mean do a GNU listed incremental backup. + * @param oneFilesystem true means do not follow symbolic links across filesystems. + * @param incremental true mean do a GNU listed incremental backup. * @param snapshot The name of the snapshot file for an incremental backup. * @param removeSnapshot Remove the snapshot before backing up. * @param archiveSize The estimate size of the archive in kilobytes. diff --git a/kdat/BackupOptDlg.cpp b/kdat/BackupOptDlg.cpp index 3a5e6c0..f3c69fc 100644 --- a/kdat/BackupOptDlg.cpp +++ b/kdat/BackupOptDlg.cpp @@ -31,7 +31,7 @@ #include "BackupOptDlg.moc" BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ) + : TQDialog( parent, name, true ) { setIconText( i18n( "KDat: Backup Options" ) ); setCaption( i18n( "KDat: Backup Options" ) ); @@ -57,7 +57,7 @@ BackupOptDlg::BackupOptDlg( BackupProfile* backupProfile, TQWidget* parent, cons l1_1->addWidget( ok ); l1_1->addWidget( cancel ); - ok->setDefault( TRUE ); + ok->setDefault( true ); } BackupOptDlg::~BackupOptDlg() diff --git a/kdat/BackupOptDlg.h b/kdat/BackupOptDlg.h index 88f44f0..528772d 100644 --- a/kdat/BackupOptDlg.h +++ b/kdat/BackupOptDlg.h @@ -69,7 +69,7 @@ public: * Query whether or not to cross filesystem boundaries when performing the * backup. * - * @return TRUE if the backup is restricted to a single filesystem, FALSE + * @return true if the backup is restricted to a single filesystem, false * if the backup can cross filesystem boundaries. */ bool isOneFilesystem(); @@ -77,7 +77,7 @@ public: /** * Query whether this is to be a GNU incremental backup. * - * @return TRUE if incremental, otherwise FALSE. + * @return true if incremental, otherwise false. */ bool isIncremental(); @@ -92,7 +92,7 @@ public: * Query whether to remove the snapshot file before beginning an * incremental backup. This has the effect of performing a full backup. * - * @return TRUE if the snapshot file should be removed, otherwise FALSE. + * @return true if the snapshot file should be removed, otherwise false. */ bool getRemoveSnapshot(); }; diff --git a/kdat/BackupProfile.cpp b/kdat/BackupProfile.cpp index 3dfc390..bc29371 100644 --- a/kdat/BackupProfile.cpp +++ b/kdat/BackupProfile.cpp @@ -110,7 +110,7 @@ void BackupProfile::save() _lastSavedName = _name.copy(); - if( TRUE == null_name_p ){ + if( true == null_name_p ){ return; } @@ -154,7 +154,7 @@ TQString BackupProfile::getWorkingDirectory() // LEW: is this fix necessary? #ifdef LEW - if ( FALSE == _workingDirectory.isEmpty() ) { + if ( false == _workingDirectory.isEmpty() ) { return _workingDirectory; } else { return 0; diff --git a/kdat/BackupProfile.h b/kdat/BackupProfile.h index 048690d..0f8af5e 100644 --- a/kdat/BackupProfile.h +++ b/kdat/BackupProfile.h @@ -106,7 +106,7 @@ public: * Query whether or not to cross filesystem boundaries when performing the * backup. * - * @return TRUE if the backup is restricted to a single filesystem, FALSE + * @return true if the backup is restricted to a single filesystem, false * if the backup can cross filesystem boundaries. */ bool isOneFilesystem(); @@ -114,7 +114,7 @@ public: /** * Query whether this is to be a GNU incremental backup. * - * @return TRUE if incremental, otherwise FALSE. + * @return true if incremental, otherwise false. */ bool isIncremental(); @@ -129,7 +129,7 @@ public: * Query whether to remove the snapshot file before beginning an * incremental backup. This has the effect of performing a full backup. * - * @return TRUE if the snapshot file should be removed, otherwise FALSE. + * @return true if the snapshot file should be removed, otherwise false. */ bool getRemoveSnapshot(); @@ -165,8 +165,8 @@ public: * Set whether or not to cross filesystem boundaries when performing the * backup. * - * @param oneFilesystem TRUE if the backup is restricted to a single - * filesystem, FALSE if the backup can cross + * @param oneFilesystem true if the backup is restricted to a single + * filesystem, false if the backup can cross * filesystem boundaries. */ void setOneFilesystem( bool oneFilesystem ); @@ -174,7 +174,7 @@ public: /** * Set whether this is to be a GNU incremental backup. * - * @param incremental TRUE if incremental, otherwise FALSE. + * @param incremental true if incremental, otherwise false. */ void setIncremental( bool incremental ); @@ -189,8 +189,8 @@ public: * Set whether to remove the snapshot file before beginning an * incremental backup. This has the effect of performing a full backup. * - * @param removeSnapshot TRUE if the snapshot file should be removed, - * otherwise FALSE. + * @param removeSnapshot true if the snapshot file should be removed, + * otherwise false. */ void setRemoveSnapshot( bool removeSnapshot ); }; diff --git a/kdat/BackupProfileInfoWidget.cpp b/kdat/BackupProfileInfoWidget.cpp index 07f7c35..e4059e1 100644 --- a/kdat/BackupProfileInfoWidget.cpp +++ b/kdat/BackupProfileInfoWidget.cpp @@ -59,7 +59,7 @@ BackupProfileInfoWidget::BackupProfileInfoWidget( TQWidget* parent, const char* _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); @@ -104,11 +104,11 @@ void BackupProfileInfoWidget::setBackupProfile( BackupProfile* backupProfile ) bool BackupProfileInfoWidget::isModified() { if ( _backupProfile->getName() != _name->text() ) { - return TRUE; + return true; } if ( _profile->getArchiveName() != _backupProfile->getArchiveName() ) { - return TRUE; + return true; } TQString one = _backupProfile->getWorkingDirectory(); @@ -116,11 +116,11 @@ bool BackupProfileInfoWidget::isModified() // 7/31/01: this breaks // if ( _profile->getWorkingDirectory() != _backupProfile->getWorkingDirectory() ) { if( one != two ){ - return TRUE; + return true; } if ( _profile->getAbsoluteFiles().count() != _backupProfile->getAbsoluteFiles().count() ) { - return TRUE; + return true; } TQStringList list1 = _profile->getAbsoluteFiles(); @@ -135,27 +135,27 @@ bool BackupProfileInfoWidget::isModified() } if ( j == list2.end() ) { // Could not find i.current() in j => lists are not equal. - return TRUE; + return true; } } if ( _profile->isOneFilesystem() != _backupProfile->isOneFilesystem() ) { - return TRUE; + return true; } if ( _profile->isIncremental() != _backupProfile->isIncremental() ) { - return TRUE; + return true; } if ( _profile->getSnapshotFile() != _backupProfile->getSnapshotFile() ) { - return TRUE; + return true; } if ( _profile->getRemoveSnapshot() != _backupProfile->getRemoveSnapshot() ) { - return TRUE; + return true; } - return FALSE; + return false; } void BackupProfileInfoWidget::slotTextChanged( const TQString & ) @@ -193,7 +193,7 @@ void BackupProfileInfoWidget::slotApply() _backupProfile->save(); - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); } void BackupProfileInfoWidget::slotSetSelection() diff --git a/kdat/BackupProfileManager.cpp b/kdat/BackupProfileManager.cpp index 45f8b6d..868a9c5 100644 --- a/kdat/BackupProfileManager.cpp +++ b/kdat/BackupProfileManager.cpp @@ -31,7 +31,7 @@ BackupProfileManager::BackupProfileManager() { - _backupProfiles.setAutoDelete( TRUE ); + _backupProfiles.setAutoDelete( true ); // Get a list of all available backup profiles. TQStringList relList; diff --git a/kdat/BackupProfileWidget.cpp b/kdat/BackupProfileWidget.cpp index 7a80b29..e535a31 100644 --- a/kdat/BackupProfileWidget.cpp +++ b/kdat/BackupProfileWidget.cpp @@ -48,7 +48,7 @@ BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) TQLabel* lbl2 = new TQLabel( i18n( "Working folder:" ), one ); lbl2->setFixedSize( lbl2->sizeHint() ); - _workingDir = new TQComboBox( FALSE, one ); + _workingDir = new TQComboBox( false, one ); _workingDir->setFixedHeight( _workingDir->sizeHint().height() ); TQLabel* lbl3 = new TQLabel( i18n( "Backup files:" ), one ); @@ -75,7 +75,7 @@ BackupProfileWidget::BackupProfileWidget( TQWidget* parent, const char* name ) _removeSnapshot = new TQCheckBox( i18n( "Remove snapshot file before backup" ), two ); _removeSnapshot->setFixedHeight( _removeSnapshot->sizeHint().height() ); - slotIncrementalToggled( FALSE ); + slotIncrementalToggled( false ); TQVBoxLayout* l1 = new TQVBoxLayout( one, 8, 4 ); @@ -142,7 +142,7 @@ void BackupProfileWidget::slotIncrementalToggled( bool set ) void BackupProfileWidget::slotWorkingDirActivated( const TQString & text ) { - while ( FALSE == _relativeFiles.isEmpty() ) { + while ( false == _relativeFiles.isEmpty() ) { TQString my_first = _relativeFiles.first(); _relativeFiles.remove( my_first ); } diff --git a/kdat/BackupProfileWidget.h b/kdat/BackupProfileWidget.h index 4fd4060..9272727 100644 --- a/kdat/BackupProfileWidget.h +++ b/kdat/BackupProfileWidget.h @@ -113,7 +113,7 @@ public: * Query whether or not to cross filesystem boundaries when performing the * backup. * - * @return TRUE if the backup is restricted to a single filesystem, FALSE + * @return true if the backup is restricted to a single filesystem, false * if the backup can cross filesystem boundaries. */ bool isOneFilesystem(); @@ -121,7 +121,7 @@ public: /** * Query whether this is to be a GNU incremental backup. * - * @return TRUE if incremental, otherwise FALSE. + * @return true if incremental, otherwise false. */ bool isIncremental(); @@ -136,7 +136,7 @@ public: * Query whether to remove the snapshot file before beginning an * incremental backup. This has the effect of performing a full backup. * - * @return TRUE if the snapshot file should be removed, otherwise FALSE. + * @return true if the snapshot file should be removed, otherwise false. */ bool getRemoveSnapshot(); signals: diff --git a/kdat/File.cpp b/kdat/File.cpp index fd766b3..c205e43 100644 --- a/kdat/File.cpp +++ b/kdat/File.cpp @@ -22,7 +22,7 @@ #include "File.h" File::File( File* parent, int size, int mtime, int startRecord, int endRecord, const TQString & name ) - : _stubbed( FALSE ), + : _stubbed( false ), _name( name ), _parent( parent ) { @@ -35,7 +35,7 @@ File::File( File* parent, int size, int mtime, int startRecord, int endRecord, c } File::File( File* parent, FILE* fptr, int offset ) - : _stubbed( TRUE ), + : _stubbed( true ), _parent( parent ) { _union._stub._fptr = fptr; @@ -56,7 +56,7 @@ void File::read( int version ) return; } - _stubbed = FALSE; + _stubbed = false; FILE* fptr = _union._stub._fptr; diff --git a/kdat/File.h b/kdat/File.h index 75b1d87..1137407 100644 --- a/kdat/File.h +++ b/kdat/File.h @@ -111,7 +111,7 @@ public: * Determine whether this file entry represents a directory. If the file * name ends in a '/' then it is assumed that it is a directory. * - * @return TRUE if the file represents a directory, or FALSE if it is an + * @return true if the file represents a directory, or false if it is an * ordinary file. */ bool isDirectory(); diff --git a/kdat/FormatOptDlg.cpp b/kdat/FormatOptDlg.cpp index ec67426..e2a1c56 100644 --- a/kdat/FormatOptDlg.cpp +++ b/kdat/FormatOptDlg.cpp @@ -35,7 +35,7 @@ #include "FormatOptDlg.moc" FormatOptDlg::FormatOptDlg( const TQString & def, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ) + : TQDialog( parent, name, true ) { setIconText( i18n( "KDat: Format Options" ) ); setCaption( i18n( "KDat: Format Options" ) ); diff --git a/kdat/IndexDlg.cpp b/kdat/IndexDlg.cpp index 2ff3a93..b446925 100644 --- a/kdat/IndexDlg.cpp +++ b/kdat/IndexDlg.cpp @@ -42,7 +42,7 @@ #include "IndexDlg.moc" IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ), + : TQDialog( parent, name, true ), _tarParser( NULL ), _tape( tape ), _archive( NULL ), @@ -50,7 +50,7 @@ IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name ) _archiveCount( 0 ), _fileCount( 0 ), _totalFileCount( 0 ), - _aborted( FALSE ), + _aborted( false ), _numFiles( 0 ), _fileSize( -1 ), _fileMTime( -1 ), @@ -110,12 +110,12 @@ IndexDlg::IndexDlg( Tape* tape, TQWidget* parent, const char* name ) _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOK() ) ); - _ok->setEnabled( FALSE ); + _ok->setEnabled( false ); _save = new TQPushButton( i18n( "Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQ_SIGNAL( clicked() ), _log, TQ_SLOT( save() ) ); - _save->setEnabled( FALSE ); + _save->setEnabled( false ); _abort = new TQPushButton( i18n( "Abort" ), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); @@ -222,7 +222,7 @@ void IndexDlg::slotOK() void IndexDlg::slotAbort() { this->killTimers(); - _aborted = TRUE; + _aborted = true; } void IndexDlg::timerEvent( TQTimerEvent* ) @@ -233,9 +233,9 @@ void IndexDlg::timerEvent( TQTimerEvent* ) _log->append( i18n( "Rewinding tape." ) ); if ( !TapeDrive::instance()->rewind() ) { KMessageBox::error( this, i18n( "Cannot rewind tape. Indexing aborted." )); - _ok->setEnabled( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); _log->append( i18n( "Cannot rewind tape." ) ); return; } @@ -243,9 +243,9 @@ void IndexDlg::timerEvent( TQTimerEvent* ) // Skip tape ID. if ( !TapeDrive::instance()->nextFile( 1 ) ) { KMessageBox::error( this, i18n( "Failed to skip tape ID. Indexing aborted." )); - _ok->setEnabled( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); _log->append( i18n( "Failed to skip tape ID." ) ); return; } @@ -256,9 +256,9 @@ void IndexDlg::timerEvent( TQTimerEvent* ) TQString msg; int count; char *buf = new char[Options::instance()->getTapeBlockSize()]; - bool atLeastOneGoodRead = TRUE; + bool atLeastOneGoodRead = true; while ( ( !_aborted ) && ( atLeastOneGoodRead ) ) { - atLeastOneGoodRead = FALSE; + atLeastOneGoodRead = false; _archive = NULL; delete _tarParser; @@ -271,7 +271,7 @@ void IndexDlg::timerEvent( TQTimerEvent* ) while ( ( count = TapeDrive::instance()->read( buf, Options::instance()->getTapeBlockSize() ) ) > 0 ) { // Is this the first block of the archive? if ( !atLeastOneGoodRead ) { - atLeastOneGoodRead = TRUE; + atLeastOneGoodRead = true; _archiveCount++; msg.setNum( _archiveCount ); _archives->setText( msg ); @@ -331,10 +331,10 @@ void IndexDlg::timerEvent( TQTimerEvent* ) _tape->setSize( Options::instance()->getDefaultTapeSize() ); } - _ok->setEnabled( TRUE ); - _ok->setDefault( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _ok->setDefault( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); } void IndexDlg::updateStats() diff --git a/kdat/KDatMainWindow.cpp b/kdat/KDatMainWindow.cpp index 48be0dc..280a504 100644 --- a/kdat/KDatMainWindow.cpp +++ b/kdat/KDatMainWindow.cpp @@ -85,7 +85,7 @@ KDatMainWindow* KDatMainWindow::getInstance() #define KDAT_HORIZONTAL_LAYOUT KDatMainWindow::KDatMainWindow() - : TDEMainWindow(0), _destroyed( FALSE ) + : TDEMainWindow(0), _destroyed( false ) { #ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */ resize( 600, 600 ); /* was 600 by 400 */ @@ -157,15 +157,15 @@ KDatMainWindow::KDatMainWindow() _toolbar = new TDEToolBar( this ); - _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileMountTape() ), TRUE, i18n( "Mount/unmount tape" ) ); + _toolbar->insertButton( *ImageCache::instance()->getTapeUnmounted(), 0, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileMountTape() ), true, i18n( "Mount/unmount tape" ) ); _toolbar->insertSeparator(); - _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileBackup() ) , TRUE, i18n( "Backup" ) ); + _toolbar->insertButton( *ImageCache::instance()->getBackup() , 1, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileBackup() ) , true, i18n( "Backup" ) ); _toolbar->setButtonIconSet( 1, BarIconSet("kdat_backup")); - _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileRestore() ), TRUE, i18n( "Restore" ) ); + _toolbar->insertButton( *ImageCache::instance()->getRestore(), 2, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileRestore() ), true, i18n( "Restore" ) ); _toolbar->setButtonIconSet( 2, BarIconSet("kdat_restore")); - _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileVerify() ) , TRUE, i18n( "Verify" ) ); + _toolbar->insertButton( *ImageCache::instance()->getVerify() , 3, TQ_SIGNAL( clicked( int ) ), this, TQ_SLOT( fileVerify() ) , true, i18n( "Verify" ) ); _toolbar->setButtonIconSet( 3, BarIconSet("kdat_verify")); addToolBar( _toolbar ); @@ -188,7 +188,7 @@ KDatMainWindow::KDatMainWindow() // Now set up the tree _tree = new KTreeView( _panner ); - _tree->setExpandButtonDrawing( TRUE ); + _tree->setExpandButtonDrawing( true ); #ifdef KDAT_HORIZONTAL_LAYOUT /* 2002-01-20 LEW */ _tree->setMinimumWidth( 300 ); @@ -213,7 +213,7 @@ KDatMainWindow::KDatMainWindow() connect( TapeDrive::instance(), TQ_SIGNAL( sigStatus( const TQString & ) ), this, TQ_SLOT( status( const TQString & ) ) ); - setTapePresent( FALSE ); + setTapePresent( false ); connect( Options::instance(), TQ_SIGNAL( sigTapeDevice() ), this, TQ_SLOT( slotTapeDevice() ) ); @@ -225,7 +225,7 @@ KDatMainWindow::KDatMainWindow() KDatMainWindow::~KDatMainWindow() { - _destroyed = TRUE; + _destroyed = true; if ( Options::instance()->getLockOnMount() ) { TapeDrive::instance()->unlock(); @@ -246,10 +246,10 @@ void KDatMainWindow::popupTapeDriveMenu( const TQPoint& p ) // Configure menu before popping up. if ( TapeManager::instance()->getMountedTape() ) { _tapeDriveMenu->changeItem( i18n( "Unmount Tape" ), _tapeDriveMenu->idAt( 0 ) ); - _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), TRUE ); + _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), true ); } else { _tapeDriveMenu->changeItem( i18n( "Mount Tape" ), _tapeDriveMenu->idAt( 0 ) ); - _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), FALSE ); + _tapeDriveMenu->setItemEnabled( _tapeDriveMenu->idAt( 1 ), false ); } _tapeDriveMenu->popup( p ); @@ -454,10 +454,10 @@ void KDatMainWindow::fileBackup() backupProfile.setArchiveName( name ); backupProfile.setAbsoluteFiles( files ); - backupProfile.setOneFilesystem( TRUE ); - backupProfile.setIncremental( FALSE ); + backupProfile.setOneFilesystem( true ); + backupProfile.setIncremental( false ); backupProfile.setSnapshotFile( "snapshot" ); - backupProfile.setRemoveSnapshot( FALSE ); + backupProfile.setRemoveSnapshot( false ); } int ret = 0; @@ -540,12 +540,12 @@ void KDatMainWindow::fileBackup() void KDatMainWindow::fileRestore() { - doVerify( TRUE ); + doVerify( true ); } void KDatMainWindow::fileVerify() { - doVerify( FALSE ); + doVerify( false ); } void KDatMainWindow::doVerify( bool restore ) @@ -603,7 +603,7 @@ void KDatMainWindow::doVerify( bool restore ) // Make sure the mounted archive node has populated its children. archiveNode = (MountedArchiveNode*)rangeableNode; if ( archiveNode->childCount() == 0 ) { - bool dummy = TRUE; + bool dummy = true; archiveNode->expanding( dummy ); } @@ -613,7 +613,7 @@ void KDatMainWindow::doVerify( bool restore ) } else if ( ((Node*)rangeableNode->childAt( i ))->isType( Node::MountedTapeFileNodeType ) ) { files.append( ((MountedTapeFileNode*)rangeableNode->childAt( i ))->getFullPath() ); } else { - assert( FALSE ); + assert( false ); } } } else if ( rangeableNode->isType( Node::MountedTapeDirectoryNodeType ) ) { @@ -621,7 +621,7 @@ void KDatMainWindow::doVerify( bool restore ) } else if ( rangeableNode->isType( Node::MountedTapeFileNodeType ) ) { files.append( ((MountedTapeFileNode*)rangeableNode)->getFullPath() ); } else { - assert( FALSE ); + assert( false ); } } else { // Compile a list of files to verify/restore. @@ -629,7 +629,7 @@ void KDatMainWindow::doVerify( bool restore ) // Make sure the mounted archive node has populated its children. if ( archiveNode->childCount() == 0 ) { - bool dummy = TRUE; + bool dummy = true; archiveNode->expanding( dummy ); } @@ -650,7 +650,7 @@ void KDatMainWindow::doVerify( bool restore ) } else if ( sel->isType( Node::MountedTapeFileNodeType ) ) { files.append( ((MountedTapeFileNode*)sel)->getFullPath() ); } else { - assert( FALSE ); + assert( false ); } } else if ( sel->hasSelectedChildren() ) { for ( int i = sel->childCount() - 1; i >= 0; i-- ) { @@ -708,12 +708,12 @@ void KDatMainWindow::fileMountTape() } if ( TapeDrive::instance()->isTapePresent() ) { - setTapePresent( TRUE ); + setTapePresent( true ); } else { KMessageBox::sorry( this, msg); } } else { - setTapePresent( FALSE ); + setTapePresent( false ); } } @@ -886,8 +886,8 @@ void KDatMainWindow::fileFormatTape() TapeManager::instance()->addTape( tape ); status( i18n( "Format complete." ) ); - setTapePresent( FALSE, FALSE ); - setTapePresent( TRUE, FALSE ); + setTapePresent( false, false ); + setTapePresent( true, false ); } } @@ -922,10 +922,10 @@ void KDatMainWindow::fileNewBackupProfile() backupProfile->setWorkingDirectory( "/" ); } backupProfile->setAbsoluteFiles( files ); - backupProfile->setOneFilesystem( TRUE ); - backupProfile->setIncremental( FALSE ); + backupProfile->setOneFilesystem( true ); + backupProfile->setIncremental( false ); backupProfile->setSnapshotFile( "snapshot" ); - backupProfile->setRemoveSnapshot( FALSE ); + backupProfile->setRemoveSnapshot( false ); backupProfile->save(); BackupProfileManager::instance()->addBackupProfile( backupProfile ); @@ -1051,7 +1051,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons TQTextStream t( &snap ); t >> tmp; } else { - useSnapshot = FALSE; + useSnapshot = false; } } TQDateTime mtime; @@ -1061,7 +1061,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons /* 2002-01-24 LEW: start of backup-cancel dialog */ create_backup_dialog(); - stop_flag = FALSE; // initialize the flag that tells us whether use + stop_flag = false; // initialize the flag that tells us whether use // cancelled the backup via the dialog. /* 2002-01-24 LEW: end of backup-cancel dialog */ @@ -1100,7 +1100,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons TQDir dir; const TQFileInfoList* infoList; while ( !dirStack.isEmpty() ) { - if( stop_flag == TRUE ) break; + if( stop_flag == true ) break; TQString* path = dirStack.pop(); msg = i18n("Estimating backup size: %1, %2" ) .arg(Util::kbytesToString( size / 2 )) @@ -1142,7 +1142,7 @@ int KDatMainWindow::calcBackupSize( const TQString& workingDir, bool local, cons // Convert size in tar blocks to size in kbytes. return_value = size / 2; - if( stop_flag == TRUE ) return_value = -1; + if( stop_flag == true ) return_value = -1; return return_value; } @@ -1174,7 +1174,7 @@ void KDatMainWindow::getBackupFiles( TQStringList& files ) void KDatMainWindow::setBackupFiles( const TQStringList& files ) { - _rootNode->setSelected( FALSE ); + _rootNode->setSelected( false ); TQString tmp; TQStringList filesTmp = files; @@ -1183,11 +1183,11 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files ) ArchiveableNode* n = _rootNode; while ( n ) { if ( n->getFullPath() == *it ) { - n->setSelected( TRUE ); + n->setSelected( true ); n = 0; } else { if ( n->childCount() == 0 ) { - bool dummy = TRUE; + bool dummy = true; n->expanding( dummy ); } int i; @@ -1208,7 +1208,7 @@ void KDatMainWindow::setBackupFiles( const TQStringList& files ) void KDatMainWindow::slotTapeDevice() { - setTapePresent( FALSE ); + setTapePresent( false ); } void KDatMainWindow::slotTapeMounted() @@ -1253,7 +1253,7 @@ void KDatMainWindow::configureUI( Tape* tape ) for ( int i = _tapeDriveNode->childCount() - 1; i >= 0; i-- ) { if ( ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->isSelected() ) || ( ((SelectableNode*)_tapeDriveNode->childAt( i ))->hasSelectedChildren() )) { - canRestore = TRUE; + canRestore = true; break; } } @@ -1267,7 +1267,7 @@ void KDatMainWindow::configureUI( Tape* tape ) ( parent ) && ( parent->getParent() ); parent = (Node*)parent->getParent() ) { if ( parent->isType( Node::TapeNodeType ) ) { - canRestore = FALSE; + canRestore = false; } } } @@ -1349,7 +1349,7 @@ void KDatMainWindow::create_backup_dialog() _cancel = new KPushButton( KStdGuiItem::cancel(), _backupdialog ); _cancel->setFixedSize( 80, _cancel->sizeHint().height() ); - _cancel->setEnabled( TRUE ); + _cancel->setEnabled( true ); /* 2002-01-24 LEW: looks like we can't increase the button width to accomodate a wider message :( */ // _cancel->setGeometry( TQRect( 50, 170, 0, 0 ) ); /* 2002-01-28 LEW */ @@ -1358,8 +1358,8 @@ void KDatMainWindow::create_backup_dialog() _continue = new KPushButton( KStdGuiItem::cont(), _backupdialog ); _continue->setFixedSize( 80, _continue->sizeHint().height() ); - _continue->setEnabled( TRUE ); - _continue->setDefault( TRUE ); + _continue->setEnabled( true ); + _continue->setDefault( true ); // _continue->setGeometry( TQRect( 200, 170, 0, 0 ) ); /* 2002-01-28 LEW */ _continue->setGeometry( TQRect( 200, 230, 0, 0 ) ); connect( _continue, TQ_SIGNAL( clicked() ), this, TQ_SLOT( backupContinue() ) ); @@ -1370,7 +1370,7 @@ void KDatMainWindow::create_backup_dialog() // stop calculating the backup size and hide the dialog screen void KDatMainWindow::backupCancel() { - stop_flag = TRUE; + stop_flag = true; _backupdialog->hide(); } diff --git a/kdat/KDatMainWindow.h b/kdat/KDatMainWindow.h index 34772dc..f4be1c9 100644 --- a/kdat/KDatMainWindow.h +++ b/kdat/KDatMainWindow.h @@ -83,8 +83,8 @@ private: static KDatMainWindow* _instance; - void doVerify( bool restore = FALSE ); - void setTapePresent( bool tapePresent, bool eject = TRUE ); + void doVerify( bool restore = false ); + void setTapePresent( bool tapePresent, bool eject = true ); int calcBackupSize( const TQString& workingDir, bool local, const TQStringList& files, bool incremental, const TQString& snapshot, bool removeSnapshot ); diff --git a/kdat/LoggerWidget.cpp b/kdat/LoggerWidget.cpp index 3df963c..e2fdfc7 100644 --- a/kdat/LoggerWidget.cpp +++ b/kdat/LoggerWidget.cpp @@ -36,7 +36,7 @@ LoggerWidget::LoggerWidget( const TQString & title, TQWidget* parent, const char lbl1->setFixedHeight( lbl1->sizeHint().height() ); _mle = new TQMultiLineEdit( this ); - _mle->setReadOnly( TRUE ); + _mle->setReadOnly( true ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 0, 4 ); l1->addWidget( lbl1 ); diff --git a/kdat/Node.cpp b/kdat/Node.cpp index 5134caa..8f9cabe 100644 --- a/kdat/Node.cpp +++ b/kdat/Node.cpp @@ -116,7 +116,7 @@ bool Node::isType( int type ) void Node::expanding( bool expand ) { - expand = TRUE; + expand = true; } void Node::expanded() @@ -140,7 +140,7 @@ TapeNode::TapeNode( Tape* tape ) : Node( TapeNodeType, tape->getName(), *ImageCache::instance()->getTape() ), _tape( tape ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); } Tape* TapeNode::getTape() @@ -200,7 +200,7 @@ bool TapeNode::validate() bool TapeNode::isType( int type ) { if ( type == TapeNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -208,7 +208,7 @@ bool TapeNode::isType( int type ) void TapeNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added @@ -248,7 +248,7 @@ ArchiveNode::ArchiveNode( Archive* archive ) : Node( ArchiveNodeType, archive->getName(), *ImageCache::instance()->getArchive() ), _archive( archive ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); } Archive* ArchiveNode::getArchive() @@ -269,7 +269,7 @@ bool ArchiveNode::validate() bool ArchiveNode::isType( int type ) { if ( type == ArchiveNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -277,7 +277,7 @@ bool ArchiveNode::isType( int type ) void ArchiveNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added. @@ -308,7 +308,7 @@ TapeDirectoryNode::TapeDirectoryNode( File* file ) : Node( TapeDirectoryNodeType, "", *ImageCache::instance()->getFolderClosed() ), _file( file ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); int len = _file->getName().length(); int idx1 = _file->getName().findRev( '/', len - 2 ); @@ -327,7 +327,7 @@ File* TapeDirectoryNode::getFile() bool TapeDirectoryNode::isType( int type ) { if ( type == TapeDirectoryNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -335,7 +335,7 @@ bool TapeDirectoryNode::isType( int type ) void TapeDirectoryNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added. @@ -388,7 +388,7 @@ File* TapeFileNode::getFile() bool TapeFileNode::isType( int type ) { if ( type == TapeFileNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -407,23 +407,23 @@ SelectableNode::SelectableNode( int type, const TQString & text, const TQPixmap& void SelectableNode::doUpdateState() { - bool oneSelected = FALSE; - bool hasSelected = FALSE; - bool allSelected = TRUE; + bool oneSelected = false; + bool hasSelected = false; + bool allSelected = true; for ( uint i = 0; i < childCount(); i++ ) { switch ( ((SelectableNode*)childAt( i ))->_state ) { case SelAll: - oneSelected = TRUE; - hasSelected = TRUE; + oneSelected = true; + hasSelected = true; break; case SelSome: - hasSelected = TRUE; - allSelected = FALSE; + hasSelected = true; + allSelected = false; break; case SelNone: - allSelected = FALSE; + allSelected = false; break; } } @@ -447,11 +447,11 @@ void SelectableNode::doSetSelected( bool select ) for ( uint i = 0; i < childCount(); i++ ) { if ( select ) { if ( !((SelectableNode*)childAt( i ))->isSelected() ) { - ((SelectableNode*)childAt( i ))->doSetSelected( TRUE ); + ((SelectableNode*)childAt( i ))->doSetSelected( true ); } } else { if ( ((SelectableNode*)childAt( i ))->isSelected() || ((SelectableNode*)childAt( i ))->hasSelectedChildren() ) { - ((SelectableNode*)childAt( i ))->doSetSelected( FALSE ); + ((SelectableNode*)childAt( i ))->doSetSelected( false ); } } } @@ -485,20 +485,20 @@ bool SelectableNode::mousePressEvent( const TQPoint& point ) if ( _selectRect.contains( point ) ) { switch ( _state ) { case SelAll: - setSelected( FALSE ); + setSelected( false ); break; case SelNone: - setSelected( TRUE ); + setSelected( true ); break; case SelSome: - setSelected( TRUE ); + setSelected( true ); break; } - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -581,7 +581,7 @@ TQRect SelectableNode::textBoundingRect(int indent) const bool SelectableNode::isType( int type ) { if ( type == SelectableNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -618,7 +618,7 @@ RangeableNode::RangeableNode( int type, const TQString & text, const TQPixmap& p bool RangeableNode::isType( int type ) { if ( type == RangeableNodeType ) { - return TRUE; + return true; } else { return SelectableNode::isType( type ); } @@ -628,7 +628,7 @@ MountedArchiveNode::MountedArchiveNode( Archive* archive ) : RangeableNode( MountedArchiveNodeType, archive->getName(), *ImageCache::instance()->getArchive(), SelNone ), _archive( archive ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); } Archive* MountedArchiveNode::getArchive() @@ -658,7 +658,7 @@ void MountedArchiveNode::setSelected( bool select ) Node* parent = (Node*)getParent(); for ( int i = parent->childCount() - 1; i >= 0; i-- ) { if ( parent->childAt( i ) != this ) { - ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); + ((SelectableNode*)parent->childAt( i ))->setSelected( false ); } } } @@ -669,7 +669,7 @@ void MountedArchiveNode::setSelected( bool select ) bool MountedArchiveNode::isType( int type ) { if ( type == MountedArchiveNodeType ) { - return TRUE; + return true; } else { return RangeableNode::isType( type ); } @@ -677,7 +677,7 @@ bool MountedArchiveNode::isType( int type ) void MountedArchiveNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added. @@ -710,7 +710,7 @@ MountedTapeDirectoryNode::MountedTapeDirectoryNode( File* file, int state ) { assert( _file > (File*)0x1 ); - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); int len = _file->getName().length(); int idx1 = _file->getName().findRev( '/', len - 2 ); @@ -758,7 +758,7 @@ void MountedTapeDirectoryNode::setSelected( bool select ) } for ( int i = parent->childCount() - 1; i >= 0; i-- ) { if ( parent->childAt( i ) != arcNode ) { - ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); + ((SelectableNode*)parent->childAt( i ))->setSelected( false ); } } } @@ -769,7 +769,7 @@ void MountedTapeDirectoryNode::setSelected( bool select ) bool MountedTapeDirectoryNode::isType( int type ) { if ( type == MountedTapeDirectoryNodeType ) { - return TRUE; + return true; } else { return RangeableNode::isType( type ); } @@ -777,7 +777,7 @@ bool MountedTapeDirectoryNode::isType( int type ) void MountedTapeDirectoryNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added. @@ -864,7 +864,7 @@ void MountedTapeFileNode::setSelected( bool select ) } for ( int i = parent->childCount() - 1; i >= 0; i-- ) { if ( parent->childAt( i ) != arcNode ) { - ((SelectableNode*)parent->childAt( i ))->setSelected( FALSE ); + ((SelectableNode*)parent->childAt( i ))->setSelected( false ); } } } @@ -875,7 +875,7 @@ void MountedTapeFileNode::setSelected( bool select ) bool MountedTapeFileNode::isType( int type ) { if ( type == MountedTapeFileNodeType ) { - return TRUE; + return true; } else { return RangeableNode::isType( type ); } @@ -899,7 +899,7 @@ ArchiveableNode::ArchiveableNode( int type, const TQString & text, const TQPixma bool ArchiveableNode::isType( int type ) { if ( type == ArchiveableNodeType ) { - return TRUE; + return true; } else { return SelectableNode::isType( type ); } @@ -909,7 +909,7 @@ RootNode::RootNode() : ArchiveableNode( RootNodeType, "/", *ImageCache::instance()->getFolderClosed(), SelNone ), _mtime( -1 ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); } TQString RootNode::getFullPath() @@ -924,7 +924,7 @@ TQString RootNode::getFullPath() bool RootNode::isType( int type ) { if ( type == RootNodeType ) { - return TRUE; + return true; } else { return ArchiveableNode::isType( type ); } @@ -932,14 +932,14 @@ bool RootNode::isType( int type ) void RootNode::expanding( bool expand ) { - expand = TRUE; + expand = true; // If we already have some children, check to see if the directory has been modified. if ( childCount() > 0 ) { struct stat statinfo; if ( stat( "/", &statinfo ) < 0 ) { printf( "Can't stat '/'\n" ); - expand = FALSE; + expand = false; return; } @@ -960,7 +960,7 @@ void RootNode::expanding( bool expand ) struct stat statinfo; if ( stat( "/", &statinfo ) < 0 ) { printf( "Can't stat '/'\n" ); - expand = FALSE; + expand = false; return; } @@ -1016,7 +1016,7 @@ DirectoryNode::DirectoryNode( const TQString & text, int state ) : ArchiveableNode( DirectoryNodeType, text, *ImageCache::instance()->getFolderClosed(), state ), _mtime( -1 ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); } TQString DirectoryNode::getFullPath() @@ -1031,7 +1031,7 @@ TQString DirectoryNode::getFullPath() bool DirectoryNode::isType( int type ) { if ( type == DirectoryNodeType ) { - return TRUE; + return true; } else { return ArchiveableNode::isType( type ); } @@ -1039,7 +1039,7 @@ bool DirectoryNode::isType( int type ) void DirectoryNode::expanding( bool expand ) { - expand = TRUE; + expand = true; // Construct the full path. TQString path; @@ -1055,7 +1055,7 @@ void DirectoryNode::expanding( bool expand ) struct stat statinfo; if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { kdError() << "Can't stat " << path << endl; - expand = FALSE; + expand = false; return; } @@ -1076,7 +1076,7 @@ void DirectoryNode::expanding( bool expand ) struct stat statinfo; if ( stat( TQFile::encodeName(path), &statinfo ) < 0 ) { kdError() << "Can't stat " << path << endl; - expand = FALSE; + expand = false; return; } @@ -1155,7 +1155,7 @@ TQString FileNode::getFullPath() bool FileNode::isType( int type ) { if ( type == FileNodeType ) { - return TRUE; + return true; } else { return ArchiveableNode::isType( type ); } @@ -1184,7 +1184,7 @@ void FileNode::popupMenu( const TQPoint& p ) TapeDriveNode::TapeDriveNode() : Node( TapeDriveNodeType, i18n( "<no tape>" ), *ImageCache::instance()->getTapeUnmounted() ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); connect( TapeManager::instance(), TQ_SIGNAL( sigTapeMounted() ) , this, TQ_SLOT( slotTapeMounted() ) ); connect( TapeManager::instance(), TQ_SIGNAL( sigTapeUnmounted() ) , this, TQ_SLOT( slotTapeUnmounted() ) ); @@ -1194,7 +1194,7 @@ TapeDriveNode::TapeDriveNode() bool TapeDriveNode::isType( int type ) { if ( type == TapeDriveNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -1203,11 +1203,11 @@ bool TapeDriveNode::isType( int type ) void TapeDriveNode::expanding( bool expand ) { if ( !TapeManager::instance()->getMountedTape() ) { - expand = FALSE; + expand = false; return; } - expand = TRUE; + expand = true; if ( childCount() > 0 ) { // We already have the children added @@ -1244,7 +1244,7 @@ void TapeDriveNode::slotTapeMounted() } if ( isExpanded() ) { - bool dummy = TRUE; + bool dummy = true; expanding( dummy ); } } @@ -1334,7 +1334,7 @@ MountedArchiveNode* TapeDriveNode::findArchiveNode( Archive* archive ) TapeIndexRootNode::TapeIndexRootNode() : Node( TapeIndexRootNodeType, i18n( "Tape Indexes" ), *ImageCache::instance()->getFolderClosed() ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); connect( TapeManager::instance(), TQ_SIGNAL( sigTapeAdded( Tape* ) ) , this, TQ_SLOT( slotTapeAdded( Tape* ) ) ); connect( TapeManager::instance(), TQ_SIGNAL( sigTapeRemoved( Tape* ) ) , this, TQ_SLOT( slotTapeRemoved( Tape* ) ) ); @@ -1344,7 +1344,7 @@ TapeIndexRootNode::TapeIndexRootNode() bool TapeIndexRootNode::isType( int type ) { if ( type == TapeIndexRootNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -1352,7 +1352,7 @@ bool TapeIndexRootNode::isType( int type ) void TapeIndexRootNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { return; @@ -1450,7 +1450,7 @@ bool BackupProfileNode::validate() bool BackupProfileNode::isType( int type ) { if ( type == BackupProfileNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -1469,7 +1469,7 @@ void BackupProfileNode::popupMenu( const TQPoint& p ) BackupProfileRootNode::BackupProfileRootNode() : Node( BackupProfileRootNodeType, i18n( "Backup Profiles" ), *ImageCache::instance()->getFolderClosed() ) { - setDelayedExpanding( TRUE ); + setDelayedExpanding( true ); connect( BackupProfileManager::instance(), TQ_SIGNAL( sigBackupProfileAdded( BackupProfile* ) ) , this, TQ_SLOT( slotBackupProfileAdded( BackupProfile* ) ) ); @@ -1481,8 +1481,8 @@ BackupProfileRootNode::BackupProfileRootNode() void BackupProfileRootNode::setSelected( BackupProfile* pBackupProfile ) { - setExpanded( TRUE ); - bool dummy = TRUE; + setExpanded( true ); + bool dummy = true; expanding( dummy ); expanded(); @@ -1498,7 +1498,7 @@ void BackupProfileRootNode::setSelected( BackupProfile* pBackupProfile ) bool BackupProfileRootNode::isType( int type ) { if ( type == BackupProfileRootNodeType ) { - return TRUE; + return true; } else { return Node::isType( type ); } @@ -1506,7 +1506,7 @@ bool BackupProfileRootNode::isType( int type ) void BackupProfileRootNode::expanding( bool expand ) { - expand = TRUE; + expand = true; if ( childCount() > 0 ) { return; diff --git a/kdat/Node.h b/kdat/Node.h index 5a55aed..f342f55 100644 --- a/kdat/Node.h +++ b/kdat/Node.h @@ -94,10 +94,10 @@ public: * prevent the node from expanding. The default implementation does * nothing. * - * @param expand The method sets this to TRUE to allow the node to be - * expanded or FALSE to prevent the node from being expanded. + * @param expand The method sets this to true to allow the node to be + * expanded or false to prevent the node from being expanded. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * This method is called immediately after the node has been expanded. @@ -152,7 +152,7 @@ public: * Make sure that the displayed information matches the tape index. This * method recurses through child nodes. * - * @return TRUE if the node's text has changed. + * @return true if the node's text has changed. */ bool validate(); @@ -166,9 +166,9 @@ public: /** * Create child nodes for each archive in the tape index. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * This method is called immediately after the node has been selected. @@ -206,7 +206,7 @@ public: * Make sure that the displayed information matches the tape index. This * method recurses through child nodes. * - * @return TRUE if the node's text has changed. + * @return true if the node's text has changed. */ bool validate(); @@ -221,9 +221,9 @@ public: * Create child nodes for each top-level file/directory contained in the * archive. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * This method is called immediately after the node has been selected. @@ -267,9 +267,9 @@ public: /** * Create child nodes for each file contained in this directory. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. @@ -361,21 +361,21 @@ public: /** * Determine whether the node and all of its children are selected. * - * @return TRUE if the node is selected, otherwise FALSE. + * @return true if the node is selected, otherwise false. */ bool isSelected(); /** * Determine whether the node has at least one selected descendent. * - * @return TRUE if at least one descendent is selected. + * @return true if at least one descendent is selected. */ bool hasSelectedChildren(); /** * Select/deselect this node and all of its children. * - * @param selected TRUE means the node will be selected, FALSE means the + * @param selected true means the node will be selected, false means the * node will be deselected. */ virtual void setSelected( bool selected ); @@ -434,7 +434,7 @@ public: * Make sure that the displayed information matches the tape index. This * method recurses through child nodes. * - * @return TRUE if the node's text has changed. + * @return true if the node's text has changed. */ bool validate(); @@ -447,7 +447,7 @@ public: /** * Select/deselect this node and all of its children. * - * @param selected TRUE means the node will be selected, FALSE means the + * @param selected true means the node will be selected, false means the * node will be deselected. */ virtual void setSelected( bool selected ); @@ -463,9 +463,9 @@ public: * Create child nodes for each top-level file/directory contained in the * archive. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * This method is called immediately after the node has been selected. @@ -518,7 +518,7 @@ public: /** * Select/deselect this node and all of its children. * - * @param selected TRUE means the node will be selected, FALSE means the + * @param selected true means the node will be selected, false means the * node will be deselected. */ virtual void setSelected( bool selected ); @@ -533,9 +533,9 @@ public: /** * Create child nodes for each file contained in this directory. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. @@ -598,7 +598,7 @@ public: /** * Select/deselect this node and all of its children. * - * @param selected TRUE means the node will be selected, FALSE means the + * @param selected true means the node will be selected, false means the * node will be deselected. */ virtual void setSelected( bool selected ); @@ -685,9 +685,9 @@ public: * Create child nodes for each file contained in this directory. If the * directory has been modified then all of the child nodes are recreated. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. @@ -745,9 +745,9 @@ public: * Create child nodes for each file contained in this directory. If the * directory has been modified then all of the child nodes are recreated. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. @@ -836,9 +836,9 @@ public: /** * Create child nodes for each archive in the tape index. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * This method is called immediately after the node has been selected. @@ -894,9 +894,9 @@ public: /** * Create child nodes for each tape index. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. @@ -954,7 +954,7 @@ public: /** * Make sure that the displayed information matches the backup profile. * - * @return TRUE if the node's text has changed. + * @return true if the node's text has changed. */ bool validate(); @@ -1008,9 +1008,9 @@ public: /** * Create child nodes for each tape index. * - * @param expand This will always be set to TRUE. + * @param expand This will always be set to true. */ - virtual void expanding( bool expand=TRUE ); + virtual void expanding( bool expand=true ); /** * Change the node's pixmap to an open folder. diff --git a/kdat/Options.cpp b/kdat/Options.cpp index 6cba56c..0fa747e 100644 --- a/kdat/Options.cpp +++ b/kdat/Options.cpp @@ -33,10 +33,10 @@ Options::Options() _tapeBlockSize = _config->readNumEntry( "tapeBlockSize", 20*512 ); // Use tar default. _tapeDevice = _config->readEntry( "tapeDevice", "/dev/tape" ).copy(); _tarCommand = _config->readPathEntry( "tarCommand", "tar" ).copy(); - _loadOnMount = _config->readNumEntry( "loadOnMount", FALSE ); - _lockOnMount = _config->readNumEntry( "lockOnMount", FALSE ); - _ejectOnUnmount = _config->readNumEntry( "ejectOnUnmount", FALSE ); - _variableBlockSize = _config->readNumEntry( "variableBlockSize", FALSE ); + _loadOnMount = _config->readNumEntry( "loadOnMount", false ); + _lockOnMount = _config->readNumEntry( "lockOnMount", false ); + _ejectOnUnmount = _config->readNumEntry( "ejectOnUnmount", false ); + _variableBlockSize = _config->readNumEntry( "variableBlockSize", false ); } Options* Options::instance() diff --git a/kdat/Options.h b/kdat/Options.h index 237ab75..7fabafd 100644 --- a/kdat/Options.h +++ b/kdat/Options.h @@ -87,28 +87,28 @@ public: /** * Get whether to load the tape before attempting to mount it. * - * @return TRUE if the tape should be loaded. + * @return true if the tape should be loaded. */ bool getLoadOnMount(); /** * Get whether to lock the tape drive when a tape is mounted. * - * @return TRUE if the tape drive should be locked, otherwise FALSE. + * @return true if the tape drive should be locked, otherwise false. */ bool getLockOnMount(); /** * Get whether to automatically eject the tape when it is unmounted. * - * @return TRUE if the tape should be ejected, otherwise FALSE. + * @return true if the tape should be ejected, otherwise false. */ bool getEjectOnUnmount(); /** * Get whether the tape drive supports variable block sizes. * - * @return TRUE if the tape drive can handle the MTSETBLK command. + * @return true if the tape drive can handle the MTSETBLK command. */ bool getVariableBlockSize(); @@ -143,28 +143,28 @@ public: /** * Set whether to load the tape before attempting to mount it. * - * @param b TRUE if the tape should be loaded. + * @param b true if the tape should be loaded. */ void setLoadOnMount( bool b ); /** * Set whether to lock the tape drive whenever a tape is mounted. * - * @param b TRUE means lock the drive, FALSE means don't. + * @param b true means lock the drive, false means don't. */ void setLockOnMount( bool b ); /** * Set whether to eject the tape drive whenever a tape is unmounted. * - * @param b TRUE means eject the tape, FALSE means don't. + * @param b true means eject the tape, false means don't. */ void setEjectOnUnmount( bool b ); /** * Set whether the tape drive can support variable block sizes. * - * @param b TRUE means the tape drive understands MTSETBLK. + * @param b true means the tape drive understands MTSETBLK. */ void setVariableBlockSize( bool b ); signals: diff --git a/kdat/RELEASE_NOTES b/kdat/RELEASE_NOTES index 0aa1533..9f3645c 100644 --- a/kdat/RELEASE_NOTES +++ b/kdat/RELEASE_NOTES @@ -38,7 +38,7 @@ command line. This is necessary becase sometimes the new archive isn't saved so kdat can't restore the data. This problem appears to have disappeared spontaneously today, and - was linked to the variable _stubbed=FALSE. + was linked to the variable _stubbed=false. 2002-01-24 - Frank Pieczynski <pieczy at knuut.de> provided improved blue icons. @@ -159,8 +159,8 @@ Outstanding Bugs call Tape::addChild( Archive* archive ) to add the new archive, and addChild() does call read() in preparation for updating the on-disk tape file. However, read() refuses to do anything because the tape - isn't stubbed (_stubbed==FALSE). I don't know what this means yet. - Forcing _stubbed=TRUE doesn't work either. It looks like _stubbed has + isn't stubbed (_stubbed==false). I don't know what this means yet. + Forcing _stubbed=true doesn't work either. It looks like _stubbed has to do with whether the tape ID is recognized as belonging to an index file on disk or not (see the second paragraph of 2002-01-26). @@ -212,8 +212,8 @@ c/o rolandg at onlinehome.de: 1) don't return 0 instead of a null TQString (e.g., BackupProfile::getWorkingDirectory()) -2) don't test for FALSE predicate values with - !(). Use == FALSE instead. +2) don't test for false predicate values with + !(). Use == false instead. 3) don't piggyback .remove with .first: _relativeFiles.remove(_relativeFiles.first()) diff --git a/kdat/Tape.cpp b/kdat/Tape.cpp index d14a191..f98163f 100644 --- a/kdat/Tape.cpp +++ b/kdat/Tape.cpp @@ -38,7 +38,7 @@ #include "kdat.h" Tape::Tape() - : _stubbed( FALSE ), + : _stubbed( false ), _name( i18n( "New Tape" ) ), _size( Options::instance()->getDefaultTapeSize() ), _fptr( 0 ) @@ -54,7 +54,7 @@ Tape::Tape() } Tape::Tape( const char * id ) - : _stubbed( TRUE ), + : _stubbed( true ), _id( id ), _ctime( -1 ), _mtime( -1 ), @@ -127,7 +127,7 @@ void Tape::read() return; } - _stubbed = FALSE; + _stubbed = false; /* 2002-01-28 LEW */ // printf("Preparing to read tape data\n" ); diff --git a/kdat/TapeDrive.cpp b/kdat/TapeDrive.cpp index 6fb1777..c52c75a 100644 --- a/kdat/TapeDrive.cpp +++ b/kdat/TapeDrive.cpp @@ -52,7 +52,7 @@ TapeDrive* TapeDrive::instance() TapeDrive::TapeDrive() : _fd ( -1 ), - _readOnly( TRUE ), + _readOnly( true ), _tape( 0 ), _writeBuf( 0 ), _readBuf( 0 ), @@ -94,7 +94,7 @@ void TapeDrive::flush() bool TapeDrive::load() { if ( _fd < 0 ) { - return FALSE; + return false; } #ifdef MTLOAD @@ -109,14 +109,14 @@ bool TapeDrive::load() return ret >= 0; #else - return TRUE; + return true; #endif } bool TapeDrive::lock() { if ( _fd < 0 ) { - return FALSE; + return false; } #ifdef MTLOCK @@ -131,14 +131,14 @@ bool TapeDrive::lock() return ret >= 0; #else - return TRUE; + return true; #endif } bool TapeDrive::unlock() { if ( _fd < 0 ) { - return FALSE; + return false; } #ifdef MTUNLOCK @@ -153,7 +153,7 @@ bool TapeDrive::unlock() return ret >= 0; #else - return TRUE; + return true; #endif } @@ -166,14 +166,14 @@ bool TapeDrive::isTapePresent() { open(); if ( _fd < 0 ) { - return FALSE; + return false; } // Get tape status. struct mtget tapeStatus; int ret = ioctl( _fd, MTIOCGET, &tapeStatus ); if ( ret < 0 ) { - return FALSE; + return false; } // Check for the presence of a tape. @@ -193,9 +193,9 @@ bool TapeDrive::isTapePresent() } else { emit sigStatus( i18n( "Tape mounted read/write." ) ); } - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -273,7 +273,7 @@ Tape* TapeDrive::readHeader() bool TapeDrive::rewind() { if ( _fd < 0 ) { - return FALSE; + return false; } flush(); @@ -330,7 +330,7 @@ int TapeDrive::getBlock() bool TapeDrive::nextFile( int count ) { if ( _fd < 0 ) { - return FALSE; + return false; } flush(); @@ -348,7 +348,7 @@ bool TapeDrive::nextFile( int count ) bool TapeDrive::prevFile( int count ) { if ( _fd < 0 ) { - return FALSE; + return false; } flush(); @@ -366,7 +366,7 @@ bool TapeDrive::prevFile( int count ) bool TapeDrive::nextRecord( int count ) { if ( _fd < 0 ) { - return FALSE; + return false; } flush(); @@ -385,13 +385,13 @@ bool TapeDrive::nextRecord( int count ) while ( bytes > 0 ) { ret = read( buf, bytes > Options::instance()->getTapeBlockSize() ? Options::instance()->getTapeBlockSize() : bytes ); if ( ret <= 0 ) { - status = FALSE; + status = false; break; } bytes -= ret; } delete [] buf; - status = TRUE; + status = true; } return status; } @@ -399,7 +399,7 @@ bool TapeDrive::nextRecord( int count ) bool TapeDrive::prevRecord( int count ) { if ( _fd < 0 ) { - return FALSE; + return false; } flush(); @@ -436,10 +436,10 @@ void TapeDrive::open() if ( _fd < 0 ) { return; } else { - _readOnly = TRUE; + _readOnly = true; } } else { - _readOnly = FALSE; + _readOnly = false; } // Set the tape block size after the device is opened. @@ -511,7 +511,7 @@ bool TapeDrive::seek( int file, int tarBlock ) if ( _fd < 0 ) { printf( "bailing1\n" ); - return FALSE; + return false; } flush(); @@ -548,33 +548,33 @@ bool TapeDrive::seek( int file, int tarBlock ) nextFile( file ); if ( ( curBlock = getBlock() ) < 0 ) { printf( "bailing2\n" ); - return FALSE; + return false; } } if ( tapeBlock > curBlock ) { if ( !nextRecord( tapeBlock - curBlock ) ) { printf( "bailing3\n" ); - return FALSE; + return false; } } else if ( tapeBlock < curBlock ) { if ( tapeBlock == 0 ) { if ( !prevFile( 1 ) ) { printf( "bailing6\n" ); - return FALSE; + return false; } if ( !nextFile( 1 ) ) { printf( "bailing7\n" ); - return FALSE; + return false; } } else { if ( !prevRecord( curBlock - tapeBlock + 1 ) ) { printf( "bailing4\n" ); - return FALSE; + return false; } if ( !nextRecord( 1 ) ) { printf( "bailing5\n" ); - return FALSE; + return false; } } } @@ -588,19 +588,19 @@ bool TapeDrive::seek( int file, int tarBlock ) delete [] buf; - return TRUE; + return true; } bool TapeDrive::pastEOF() { if ( _fd < 0 ) { - return FALSE; + return false; } struct mtget tapeStatus; if ( ioctl( _fd, MTIOCGET, &tapeStatus ) < 0 ) { printf( "TapeDrive::pastEOF() -- ioctl( MTIOCGET ) failed!\n" ); - return FALSE; + return false; } return GMT_EOF( tapeStatus.mt_gstat ); @@ -609,7 +609,7 @@ bool TapeDrive::pastEOF() bool TapeDrive::setBlockSize( int blockSize ) { if ( _fd < 0 ) { - return FALSE; + return false; } #ifdef MTSETBLK @@ -637,6 +637,6 @@ bool TapeDrive::setBlockSize( int blockSize ) #else // some systems (e.g. HP-UX) encode block size into device file names // so setting the block size by software does not make sense - return TRUE; + return true; #endif } diff --git a/kdat/TapeDrive.h b/kdat/TapeDrive.h index 8e6bc1c..e377b90 100644 --- a/kdat/TapeDrive.h +++ b/kdat/TapeDrive.h @@ -90,21 +90,21 @@ public: /** * Determine whether the tape can be written to. * - * @return TRUE if the tape cannot be written to, otherwise FALSE. + * @return true if the tape cannot be written to, otherwise false. */ bool isReadOnly(); /** * Determine whether there is a tape in the drive. * - * @return TRUE if there is a tape, otherwise FALSE. + * @return true if there is a tape, otherwise false. */ bool isTapePresent(); /** * Load the tape into the drive. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool load(); @@ -112,7 +112,7 @@ public: * Lock the tape in the drive, so that it cannot be ejected manually by the * user. Not all tape drives support this operation. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool lock(); @@ -122,7 +122,7 @@ public: * * @param count The number of end-of-file markers to skip over. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool nextFile( int count ); @@ -131,7 +131,7 @@ public: * * @param count The number of tape blocks to skip over. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool nextRecord( int count ); @@ -140,8 +140,8 @@ public: * opening the tape device for reading only. Check isReadOnly() to see * if the tape device was opened for reading and writing. * - * @return TRUE if the tape device was opened for reading and/or writing, - * otherwise FALSE. + * @return true if the tape device was opened for reading and/or writing, + * otherwise false. */ void open(); @@ -149,8 +149,8 @@ public: * Determine wether the tape is positioned just after an end-of-file * marker. * - * @return TRUE if the tape is positioned after an end-of-file marker, - * otherwise FALSE. + * @return true if the tape is positioned after an end-of-file marker, + * otherwise false. */ bool pastEOF(); @@ -160,7 +160,7 @@ public: * * @param count The number of end-of-file markers to backspace over. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool prevFile( int count ); @@ -169,7 +169,7 @@ public: * * @param count The number of tape block to backspace over. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool prevRecord( int count ); @@ -195,7 +195,7 @@ public: /** * Rewind the tape. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool rewind(); @@ -206,7 +206,7 @@ public: * @param file The tape file number. * @param tarBlock The desired tar block (NOT tape block). * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool seek( int file, int tarBlock ); @@ -215,7 +215,7 @@ public: * * @param blockSize The new tape block size in bytes. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool setBlockSize( int blockSize ); @@ -223,7 +223,7 @@ public: * Unlock the tape in the drive, so that it can be ejected manually by the * user. Not all tape drives support this operation. * - * @return TRUE on success, otherwise FALSE. + * @return true on success, otherwise false. */ bool unlock(); diff --git a/kdat/TapeInfoWidget.cpp b/kdat/TapeInfoWidget.cpp index c6498b7..3889fda 100644 --- a/kdat/TapeInfoWidget.cpp +++ b/kdat/TapeInfoWidget.cpp @@ -93,7 +93,7 @@ TapeInfoWidget::TapeInfoWidget( TQWidget* parent, const char* name ) _apply = new KPushButton( KStdGuiItem::apply(), this ); _apply->setFixedSize( 80, _apply->sizeHint().height() ); - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); TQVBoxLayout* l1 = new TQVBoxLayout( this, 4, 4 ); @@ -215,7 +215,7 @@ void TapeInfoWidget::setTape( Tape* tape ) bool TapeInfoWidget::isModified() { if ( _tape->getName() != _tapeName->text() ) { - return TRUE; + return true; } int size = (int)TDEGlobal::locale()->readNumber( _tapeSize->text() ); @@ -271,5 +271,5 @@ void TapeInfoWidget::slotApply() _tape->setSize( size ); } - _apply->setEnabled( FALSE ); + _apply->setEnabled( false ); } diff --git a/kdat/TapeManager.cpp b/kdat/TapeManager.cpp index 5b02dc3..c305bdd 100644 --- a/kdat/TapeManager.cpp +++ b/kdat/TapeManager.cpp @@ -33,7 +33,7 @@ TapeManager::TapeManager() : _mountedTape( 0 ) { - _tapes.setAutoDelete( TRUE ); + _tapes.setAutoDelete( true ); // Get a list of all available tape indexes. TQStringList relList; diff --git a/kdat/TarParser.cpp b/kdat/TarParser.cpp index 4529d64..583e60a 100644 --- a/kdat/TarParser.cpp +++ b/kdat/TarParser.cpp @@ -24,8 +24,8 @@ TarParser::TarParser() : _bufIdx( 0 ), _blocksToSkip( 0 ), _record( 0 ), - _longname( FALSE ), - _extended( FALSE ), + _longname( false ), + _extended( false ), _archnameIdx( 0 ) { } @@ -103,11 +103,11 @@ void TarParser::parseTarBlock() if ( rec->header.linkflag == LF_LONGNAME ) { // The actual file name is stored in the next _blocksToSkip blocks of the tar-file. - _longname = TRUE; + _longname = true; _archnameIdx = 0; } else { if ( _longname ) { - _longname = FALSE; + _longname = false; emit sigEntry( _archname, parseOctal( rec->header.size, 11 ), parseOctal( rec->header.mtime, 11 ), _record ); } else { emit sigEntry( rec->header.arch_name, parseOctal( rec->header.size, 11 ), parseOctal( rec->header.mtime, 11 ), _record ); diff --git a/kdat/VerifyDlg.cpp b/kdat/VerifyDlg.cpp index 9f162da..3f6a37b 100644 --- a/kdat/VerifyDlg.cpp +++ b/kdat/VerifyDlg.cpp @@ -46,7 +46,7 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges, bool restore, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ), + : TQDialog( parent, name, true ), _restore( restore ), _proc( NULL ), _workingDir( workingDir ), @@ -54,9 +54,9 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& _ranges( ranges ), _totalKBytes( 0.0 ), _fileCount( 0 ), - _wroteStdin( TRUE ), - _aborted( FALSE ), - _done( FALSE ) + _wroteStdin( true ), + _aborted( false ), + _done( false ) { // Calculate size of verify. TQPtrListIterator<Range> i( _ranges.getRanges() ); @@ -139,12 +139,12 @@ VerifyDlg::VerifyDlg( const TQString & workingDir, int fileno, const RangeList& _ok = new KPushButton( KStdGuiItem::ok(), this ); _ok->setFixedSize( 80, _ok->sizeHint().height() ); connect( _ok, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotOK() ) ); - _ok->setEnabled( FALSE ); + _ok->setEnabled( false ); _save = new TQPushButton( i18n( "&Save Log..." ), this ); _save->setFixedSize( 80, _save->sizeHint().height() ); connect( _save, TQ_SIGNAL( clicked() ), _log, TQ_SLOT( save() ) ); - _save->setEnabled( FALSE ); + _save->setEnabled( false ); _abort = new TQPushButton( i18n( "&Abort" ), this ); _abort->setFixedSize( 80, _abort->sizeHint().height() ); @@ -237,12 +237,12 @@ void VerifyDlg::slotProcessExited( TDEProcess* ) delete _proc; // Set this, or we get caught in a loop. - _done = TRUE; + _done = true; - _ok->setEnabled( TRUE ); - _ok->setDefault( TRUE ); - _save->setEnabled( TRUE ); - _abort->setEnabled( FALSE ); + _ok->setEnabled( true ); + _ok->setDefault( true ); + _save->setEnabled( true ); + _abort->setEnabled( false ); } void VerifyDlg::slotStdout( TDEProcess*, char* buf, int len ) @@ -288,7 +288,7 @@ void VerifyDlg::slotStdout( TDEProcess*, char* buf, int len ) void VerifyDlg::slotWroteStdin( TDEProcess* ) { - _wroteStdin = TRUE; + _wroteStdin = true; } void VerifyDlg::slotOK() @@ -302,7 +302,7 @@ void VerifyDlg::slotOK() void VerifyDlg::slotAbort() { - _aborted = TRUE; + _aborted = true; } void VerifyDlg::timerEvent( TQTimerEvent* ) @@ -357,7 +357,7 @@ void VerifyDlg::timerEvent( TQTimerEvent* ) /* 2002-01-30 LEW */ break; } - _wroteStdin = FALSE; + _wroteStdin = false; _proc->writeStdin( buf, count ); bytesToRead -= count; _totalKBytes += (float)count / 1024.0; diff --git a/kdat/VerifyDlg.h b/kdat/VerifyDlg.h index bb330f3..0d8062f 100644 --- a/kdat/VerifyDlg.h +++ b/kdat/VerifyDlg.h @@ -79,12 +79,12 @@ public: * @param workingDir The directory to restore files to or verify files against. * @param fileno The tape file number of the archive to verify/restore. * @param ranges A list of tar block ranges to read. - * @param restore TRUE means restore, FALSE means verify. + * @param restore true means restore, false means verify. * @param parent The parent widget for the dialog. * @param name The name of this widget. */ VerifyDlg( const TQString & workingDir, int fileno, const RangeList& ranges, - bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 ); + bool restore = false, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the verify/restore dialog. diff --git a/kdat/VerifyOptDlg.cpp b/kdat/VerifyOptDlg.cpp index 8768000..2d220f2 100644 --- a/kdat/VerifyOptDlg.cpp +++ b/kdat/VerifyOptDlg.cpp @@ -34,7 +34,7 @@ #include "VerifyOptDlg.moc" VerifyOptDlg::VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore, TQWidget* parent, const char* name ) - : TQDialog( parent, name, TRUE ), + : TQDialog( parent, name, true ), _restore( restore ) { if ( _restore ) { diff --git a/kdat/VerifyOptDlg.h b/kdat/VerifyOptDlg.h index c1444f8..0e53d45 100644 --- a/kdat/VerifyOptDlg.h +++ b/kdat/VerifyOptDlg.h @@ -45,11 +45,11 @@ public: * * @param def The default working directory. * @param files The list of files that will be verified/restored. - * @param restore TRUE means we are doing a restore, FALSE means we are doing a verify. + * @param restore true means we are doing a restore, false means we are doing a verify. * @param parent The parent widget for the dialog. * @param name The name for the dialog. */ - VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = FALSE, TQWidget* parent = 0, const char* name = 0 ); + VerifyOptDlg( const TQString & def, const TQStringList& files, bool restore = false, TQWidget* parent = 0, const char* name = 0 ); /** * Destroy the verify/restore options dialog. diff --git a/kdat/ktreeview.cpp b/kdat/ktreeview.cpp index f3a98ce..3934117 100644 --- a/kdat/ktreeview.cpp +++ b/kdat/ktreeview.cpp @@ -160,7 +160,7 @@ inline bool KTreeViewItem::expandButtonClicked(const TQPoint& coord) const bool KTreeViewItem::mousePressEvent( const TQPoint& ) { - return FALSE; + return false; } // returns a pointer to first child item @@ -259,7 +259,7 @@ void KTreeViewItem::insertChild(int index, KTreeViewItem* newChild) } // indicates whether this item is displayed expanded -// NOTE: a TRUE response does not necessarily indicate the item +// NOTE: a true response does not necessarily indicate the item // has any children bool KTreeViewItem::isExpanded() const { @@ -719,10 +719,10 @@ void KTreeView::clear() setCurrentItem(-1); /* somewhat of a hack for takeItem so it doesn't update the current item... */ - clearing = TRUE; + clearing = true; bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); TQPtrStack<KTreeViewItem> stack; stack.push(treeRoot); while(!stack.isEmpty()) { @@ -740,7 +740,7 @@ void KTreeView::clear() delete item; } } - clearing = FALSE; + clearing = false; if(goingDown || TQApplication::closingDown()) return; if(autoU && isVisible()) @@ -825,7 +825,7 @@ bool KTreeView::forEveryItem(KForEvery func, void* user, KTreeViewItem* item) // visits every visible item in the tree in order and applies the // user supplied function with the item and user data passed as parameters -// if user supplied function returns TRUE, traversal ends and function +// if user supplied function returns true, traversal ends and function // returns bool KTreeView::forEveryVisibleItem(KForEvery func, void *user, KTreeViewItem* item) @@ -1303,7 +1303,7 @@ void KTreeView::collapseSubTree(KTreeViewItem* subRoot) } // roland repaint(); - setAutoUpdate(TRUE); + setAutoUpdate(true); // roland } @@ -1362,7 +1362,7 @@ void KTreeView::expandSubTree(KTreeViewItem* subRoot) } // roland repaint(); - setAutoUpdate(TRUE); + setAutoUpdate(true); // roland } @@ -1400,7 +1400,7 @@ void KTreeView::focusInEvent(TQFocusEvent *) // visits every item in the tree, visible or not and applies the user // supplied member function with the item and user data passed as parameters -// if the user supplied member function returns TRUE, traversal +// if the user supplied member function returns true, traversal // ends and the function returns void KTreeView::forEveryItem(KForEveryM func, void *user) @@ -1427,7 +1427,7 @@ void KTreeView::forEveryItem(KForEveryM func, // visits every visible item in the tree in order and applies the user // supplied member function with the item and user data passed as parameters -// if user supplied function returns TRUE, traversal ends and function +// if user supplied function returns true, traversal ends and function // returns void KTreeView::forEveryVisibleItem(KForEveryM func, void *user) @@ -1447,7 +1447,7 @@ void KTreeView::forEveryVisibleItem(KForEveryM func, if(stack.isEmpty()) break; item = stack.pop()->getSibling(); - } while(TRUE); + } while(true); } // called by updateCellWidth() for each item in the visible list @@ -1510,7 +1510,7 @@ bool KTreeView::insertItem(KTreeViewItem* referenceItem, // enabled if (newItem->isVisible() || parentItem->childCount() == 1) { bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); updateVisibleItems(); if(autoU && isVisible()) repaint(); @@ -1541,9 +1541,9 @@ void KTreeView::join(KTreeViewItem *item) KTreeViewItem *itemParent = item->getParent(); if(itemParent->hasParent()) { bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); takeItem(item); - insertItem(itemParent, item, FALSE); + insertItem(itemParent, item, false); if(autoU && isVisible()) repaint(); setAutoUpdate(autoU); @@ -1647,9 +1647,9 @@ void KTreeView::lowerItem(KTreeViewItem *item) uint itemChildIndex = itemParent->childIndex(item); if(itemChildIndex < itemParent->childCount() - 1) { bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); takeItem(item); - insertItem(itemParent->childAt(itemChildIndex), item, FALSE); + insertItem(itemParent->childAt(itemChildIndex), item, false); if(autoU && isVisible()) repaint(); setAutoUpdate(autoU); @@ -1810,7 +1810,7 @@ void KTreeView::start_rubberband(const TQPoint& where) rubber_startMouse = where; rubber_startX = xOffset(); rubber_startY = yOffset(); - rubberband_mode=TRUE; + rubberband_mode=true; draw_rubberband(); #endif } @@ -1821,7 +1821,7 @@ void KTreeView::end_rubberband() #if 0 if (!rubberband_mode) return; draw_rubberband(); - rubberband_mode = FALSE; + rubberband_mode = false; #endif } @@ -1873,9 +1873,9 @@ void KTreeView::raiseItem(KTreeViewItem *item) int itemChildIndex = itemParent->childIndex(item); if(itemChildIndex > 0) { bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); takeItem(item); - insertItem(itemParent->childAt(--itemChildIndex), item, TRUE); + insertItem(itemParent->childAt(--itemChildIndex), item, true); if(autoU && isVisible()) repaint(); setAutoUpdate(autoU); @@ -1916,15 +1916,15 @@ bool KTreeView::setItemExpanded(KTreeViewItem *item, void *) if(item->hasChild() && !item->isExpanded()) expandSubTree(item); else - item->setExpanded(TRUE); + item->setExpanded(true); } else { if (item->hasChild() && item->isExpanded()) collapseSubTree(item); else - item->setExpanded(FALSE); + item->setExpanded(false); } - return FALSE; + return false; } // called by setExpandButtonDrawing for every item in tree @@ -1932,7 +1932,7 @@ bool KTreeView::setItemExpandButtonDrawing(KTreeViewItem *item, void *) { item->setDrawExpandButton(drawExpandButton); - return FALSE; + return false; } // called by setShowItemText for every item in tree @@ -1940,14 +1940,14 @@ bool KTreeView::setItemShowText(KTreeViewItem *item, void *) { item->setDrawText(showText); - return FALSE; + return false; } // called by setTreeDrawing for every item in tree bool KTreeView::setItemTreeDrawing(KTreeViewItem *item, void *) { item->setDrawTree(drawTree); - return FALSE; + return false; } // makes the item a child of the item above it, splitting @@ -1959,7 +1959,7 @@ void KTreeView::split(KTreeViewItem *item) if(itemChildIndex == 0) return; bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); takeItem(item); appendChildItem(itemParent->childAt(--itemChildIndex), item); if(autoU && isVisible()) @@ -1999,7 +1999,7 @@ void KTreeView::takeItem(KTreeViewItem* item) item->sibling = 0; if (wasVisible || parentItem->childCount() == 0) { bool autoU = autoUpdate(); - setAutoUpdate(FALSE); + setAutoUpdate(false); updateVisibleItems(); if (autoU && isVisible()) diff --git a/kdat/ktreeview.h b/kdat/ktreeview.h index a6031c4..e72a2f6 100644 --- a/kdat/ktreeview.h +++ b/kdat/ktreeview.h @@ -670,12 +670,12 @@ public: bool scrollBar() const; /** - If enable is TRUE (default), enables auto update, else disables it. + If enable is true (default), enables auto update, else disables it. */ void setAutoUpdate(bool enable); /** - If enable is TRUE, displays a horizontal scroll bar, else hides it. + If enable is true, displays a horizontal scroll bar, else hides it. */ void setBottomScrollBar(bool enable); @@ -696,24 +696,24 @@ public: void setIndentSpacing(int spacing); /** - If enable is TRUE, displays a vertical scroll bar, else hides it. + If enable is true, displays a vertical scroll bar, else hides it. */ void setScrollBar(bool enable); /** - If enable is TRUE (default), item text will be displayed, otherwise + If enable is true (default), item text will be displayed, otherwise it will not, and no highlight will be shown in the default widget. */ void setShowItemText(bool enable); /** - If enable is TRUE, enables smooth scrolling, else disables + If enable is true, enables smooth scrolling, else disables it (default). */ void setSmoothScrolling(bool enable); /** - If enable is TRUE (default), lines depicting the structure of the + If enable is true (default), lines depicting the structure of the tree will be drawn, otherwise they will not. */ void setTreeDrawing(bool enable); |
