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 | |
| parent | 3e22959a47d82ce8baefea9458102340be013350 (diff) | |
| download | tdeadmin-master.tar.gz tdeadmin-master.zip | |
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
83 files changed, 690 insertions, 693 deletions
diff --git a/kcron/ctcron.h b/kcron/ctcron.h index 485da8d..dd8170a 100644 --- a/kcron/ctcron.h +++ b/kcron/ctcron.h @@ -40,7 +40,7 @@ public: * files and obtains some information about the user from the system. * * Default is to construct from the user's crontab. Can also be called, - * passing TRUE, to construct from the system crontab. Throws an + * passing true, to construct from the system crontab. Throws an * exception if the crontab file can not be found, read, or parsed. */ CTCron(bool _syscron = false, std::string _login = ""); 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); diff --git a/knetworkconf/knetworkconf/kadddevicecontainer.cpp b/knetworkconf/knetworkconf/kadddevicecontainer.cpp index aaeb48e..b3f4294 100644 --- a/knetworkconf/knetworkconf/kadddevicecontainer.cpp +++ b/knetworkconf/knetworkconf/kadddevicecontainer.cpp @@ -42,8 +42,8 @@ KAddDeviceContainer::KAddDeviceContainer(TQWidget *parent, const char *name) buttonsLayout->addItem( buttonsSpacer ); kpbApply = new KPushButton( this, "kpbApply" ); - kpbApply->setEnabled( FALSE ); - kpbApply->setDefault( TRUE ); + kpbApply->setEnabled( false ); + kpbApply->setDefault( true ); buttonsLayout->addWidget( kpbApply ); kpbCancel = new KPushButton( this, "kpbCancel" ); diff --git a/kpackage/cache.cpp b/kpackage/cache.cpp index bcd45e0..facdd6b 100644 --- a/kpackage/cache.cpp +++ b/kpackage/cache.cpp @@ -60,7 +60,7 @@ TQString cacheObj::PDir() TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { - KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); + KpMsgE(i18n("Cannot create folder %1").arg(tmpd),true); tmpd = ""; } else { chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); @@ -81,7 +81,7 @@ TQString cacheObj::CDir() TQDir d(tmpd); if (!d.exists()) { if (!d.mkdir(tmpd)) { - KpMsgE(i18n("Cannot create folder %1").arg(tmpd),TRUE); + KpMsgE(i18n("Cannot create folder %1").arg(tmpd),true); tmpd = ""; } else { chown(TQFile::encodeName(tmpd),buf.st_uid,buf.st_gid); @@ -95,7 +95,7 @@ int cacheObj::newDCache(const TQString &url, const TQString &fn, TQString &fnam KURL u(url); if ( !u.isValid() ) { - KpMsgE(i18n("Malformed URL: %1").arg(url),TRUE); + KpMsgE(i18n("Malformed URL: %1").arg(url),true); return -1; } @@ -169,7 +169,7 @@ void cacheObj::clearPCache() { ////////////////////////////////////////////////////////////////////////////// LcacheObj::LcacheObj() { - setAutoDelete(TRUE); + setAutoDelete(true); } LcacheObj::~LcacheObj() diff --git a/kpackage/cache.h b/kpackage/cache.h index 86cac1e..f77c61c 100644 --- a/kpackage/cache.h +++ b/kpackage/cache.h @@ -51,7 +51,7 @@ public: TQString option; bool subdirs; - cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString(), bool Psubdirs = FALSE); + cacheObj(const TQString &Pbase, const TQString &Plocation, const TQString &PcacheFile, const TQString &Poption = TQString(), bool Psubdirs = false); ~cacheObj(); static TQString PDir(); diff --git a/kpackage/debAptInterface.cpp b/kpackage/debAptInterface.cpp index 5f0f067..58752a5 100644 --- a/kpackage/debAptInterface.cpp +++ b/kpackage/debAptInterface.cpp @@ -51,7 +51,7 @@ DEBAPT::DEBAPT():DEB() queryMsg = i18n("Querying DEB APT package list: "); procMsg = i18n("KPackage: Waiting on APT-GET"); - hasRemote = TRUE; + hasRemote = true; locatedialog = new Locations(i18n("Location of Debian Packages")); @@ -64,22 +64,22 @@ DEBAPT::DEBAPT():DEB() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Download only"),FALSE,FALSE,"-d")); - paramsInst.append(new param(i18n("No download"),FALSE,FALSE,"--no-download")); - paramsInst.append(new param(i18n("Ignore missing"),FALSE,FALSE,"-m")); - paramsInst.append(new param(i18n("Ignore hold"),FALSE,FALSE,"--ignore-hold")); - paramsInst.append(new param(i18n("Allow Unauthenticated"),FALSE,FALSE,"--allow-unauthenticated")); - paramsInst.append(new param(i18n("Assume yes"),TRUE,FALSE,"--yes")); - paramsInst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-s")); + paramsInst.append(new param(i18n("Download only"),false,false,"-d")); + paramsInst.append(new param(i18n("No download"),false,false,"--no-download")); + paramsInst.append(new param(i18n("Ignore missing"),false,false,"-m")); + paramsInst.append(new param(i18n("Ignore hold"),false,false,"--ignore-hold")); + paramsInst.append(new param(i18n("Allow Unauthenticated"),false,false,"--allow-unauthenticated")); + paramsInst.append(new param(i18n("Assume yes"),true,false,"--yes")); + paramsInst.append(new param(i18n("Test (do not uninstall)"),false,false,"-s")); - paramsUninst.append(new param(i18n("Purge Config Files"),FALSE,FALSE,"--purge")); - paramsUninst.append(new param(i18n("Assume yes"),TRUE,FALSE,"--yes")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-s")); + paramsUninst.append(new param(i18n("Purge Config Files"),false,false,"--purge")); + paramsUninst.append(new param(i18n("Assume yes"),true,false,"--yes")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"-s")); env = "DEBIAN_FRONTEND=readline; export DEBIAN_FRONTEND; "; - noFetch = TRUE; - hasSearchAll = TRUE; + noFetch = true; + hasSearchAll = true; hasProgram = ifExe("apt-get"); } @@ -129,7 +129,7 @@ void DEBAPT::updateS() { if (kprun->run("apt-get update", "APT update")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -137,7 +137,7 @@ void DEBAPT::upgradeS() { if (kprun->run(env + "apt-get dist-upgrade", "APT upgrade")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -145,7 +145,7 @@ void DEBAPT::fixupS() { if (kprun->run(env + "apt-get -f install", "APT fixup")) { if (kprun->exec()) - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } } @@ -156,7 +156,7 @@ void DEBAPT::fileS() kprun->exec(); } } else { - KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE); + KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), true); } } @@ -218,7 +218,7 @@ void DEBAPT::listRPack(TQPtrList<packageInfo> *pki) // kdDebug() << "---------\n"; p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -274,7 +274,7 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) } else { p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, FALSE)) { + if (!p->pkgInsert(pki, typeID, false)) { delete p; } } @@ -290,7 +290,7 @@ void DEBAPT::listAvail(TQPtrList<packageInfo> *pki) TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool &cancel) { - bool extras=FALSE, found=FALSE; + bool extras=false, found=false; TQString match; TQString s = "apt-get -s "; @@ -307,11 +307,11 @@ TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool s += " "; } - TQStringList list = kpty->run(s, TRUE, TRUE); + TQStringList list = kpty->run(s, true, true); if (!kpty->inSession) { - cancel = TRUE; // Root login did not work + cancel = true; // Root login did not work } else { - cancel = FALSE; + cancel = false; } // kdDebug() << "LS=" << list.count() << "\n"; @@ -327,7 +327,7 @@ TQStringList DEBAPT::listInstalls(const TQStringList &packs, bool install, bool break; } } - extras=TRUE; + extras=true; } } @@ -365,7 +365,7 @@ TQStringList DEBAPT::FindFile(const TQString &name, bool searchAll) return filelist; } else { - KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), TRUE); + KpMsg("Error",i18n("The %1 program needs to be installed").arg("apt-file"), true); TQStringList nill; return nill; } @@ -414,7 +414,7 @@ TQString DEBAPT::doUninstall(int uninstallFlags, const TQString &packs, bool &te kdDebug() << "uCMD=" << s << "\n"; if (uninstallFlags>>2 & 1) - test = TRUE; + test = true; return s; } @@ -456,7 +456,7 @@ TQString DEBAPT::doInstall(int installFlags, const TQString &packs, bool &test) kdDebug() << "iCMD=" << s << "\n"; if ((installFlags>>0 & 1) || (installFlags>>5 & 1)) - test = TRUE; + test = true; return s; } @@ -525,7 +525,7 @@ void DEBAPT::writeApt(const TQStringList &list) { cmd += "mv /etc/apt/sources.list /etc/apt/sources.list.b; mv /etc/apt/sources.list.n /etc/apt/sources.list; fi\" "; - TQStringList rlist = kpty->run(cmd,TRUE,TRUE); + TQStringList rlist = kpty->run(cmd,true,true); //for ( TQStringList::Iterator it = rlist.begin(); it != rlist.end(); ++it ) { // kdDebug() << "SL=" << *it << "\n"; //} diff --git a/kpackage/debDpkgInterface.cpp b/kpackage/debDpkgInterface.cpp index ddacf75..624630a 100644 --- a/kpackage/debDpkgInterface.cpp +++ b/kpackage/debDpkgInterface.cpp @@ -81,15 +81,15 @@ DEBDPKG::DEBDPKG():DEB() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Allow Downgrade"),TRUE,TRUE,"--refuse-downgrade")); - paramsInst.append(new param(i18n("Check Conflicts"),TRUE,TRUE,"--force-conflicts")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--force-depends")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"--no-act")); + paramsInst.append(new param(i18n("Allow Downgrade"),true,true,"--refuse-downgrade")); + paramsInst.append(new param(i18n("Check Conflicts"),true,true,"--force-conflicts")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"--force-depends")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"--no-act")); - paramsUninst.append(new param(i18n("Purge Config Files"),TRUE,FALSE, + paramsUninst.append(new param(i18n("Purge Config Files"),true,false, "--purge","--remove")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--force-depends")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"--no-act")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true,"--force-depends")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"--no-act")); hasProgram = ifExe("dpkg"); diff --git a/kpackage/debInterface.cpp b/kpackage/debInterface.cpp index 5b0bf58..a66d7b7 100644 --- a/kpackage/debInterface.cpp +++ b/kpackage/debInterface.cpp @@ -132,10 +132,10 @@ bool DEB::parseName(const TQString &name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } - return FALSE; + return false; } void DEB::listInstalledPackages(TQPtrList<packageInfo> *pki) @@ -145,7 +145,7 @@ void DEB::listInstalledPackages(TQPtrList<packageInfo> *pki) void DEB::listPackList(TQPtrList<packageInfo> *pki, const TQString &fname, cacheObj *cp) { - bool local = FALSE; + bool local = false; packageInfo *p; TQStringList list; TQString sline( i18n("Querying DEB package list: ")+fname ); @@ -260,7 +260,7 @@ packageInfo *DEB::getIRPackageInfo( const TQString &name) if (list.count() > 1) { pki = DEB::collectInfo(list); if (pki) { - pki->updated = TRUE; + pki->updated = true; if (pki->getFilename().isEmpty()) pki->setFilename(name); } @@ -292,7 +292,7 @@ packageInfo *DEB::getUPackageInfo( const TQString &name) if (list.count() > 1) { pki = DEB::collectInfo(list, kpinterface[0]); // To be fixed up later, assumes order of kpinterface if (pki) - pki->updated = TRUE; + pki->updated = true; } return pki; @@ -310,9 +310,9 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) TQMap<TQString, TQString> a; TQString key, val; - bool bad_install = FALSE; - bool available = FALSE; - bool haveName = FALSE; + bool bad_install = false; + bool available = false; + bool haveName = false; for ( TQStringList::Iterator it = ln.begin(); it != ln.end(); ++it ) { loop: @@ -347,10 +347,10 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) break; } else if (key == "package") { a.insert("name", val); - haveName = TRUE; + haveName = true; } else if (key == "md5sum") { - available = TRUE; - bad_install = FALSE; + available = true; + bad_install = false; } else if (key == "section") { a.insert("group", val); } else if (key == "status") { @@ -361,7 +361,7 @@ packageInfo *DEB::collectInfo(TQStringList &ln, pkgInterface *pkgInt) val != "deinstall ok installed" && val != "deinstall ok config-files" && val != "purge ok installed") { - bad_install = TRUE; + bad_install = true; } a.insert("status", val); } else if (key == "version") { diff --git a/kpackage/fbsdInterface.cpp b/kpackage/fbsdInterface.cpp index 98174e2..b0a752c 100644 --- a/kpackage/fbsdInterface.cpp +++ b/kpackage/fbsdInterface.cpp @@ -71,19 +71,19 @@ fbsdInterface::fbsdInterface():pkgInterface() { locatedialog = new Locations(i18n("Location of BSD Packages and Ports")); locatedialog->dLocations(1, 1, this, i18n("Ports"), "Pkg", "*.tbz", - i18n("Location of Ports Tree (e.g. /usr/ports or /usr/opt)"),FALSE); + i18n("Location of Ports Tree (e.g. /usr/ports or /usr/opt)"),false); locatedialog->dLocations(1, 6, this, i18n("Packages"), "Pkg", "*.tbz", i18n("Location of Folders Containing BSD Packages or Package Trees")); connect(locatedialog, TQ_SIGNAL(returnVal(LcacheObj *)), this, TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Ignore Scripts"),FALSE,FALSE,"-I")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"-f")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"-n")); + paramsInst.append(new param(i18n("Ignore Scripts"),false,false,"-I")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"-f")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"-n")); - paramsUninst.append(new param(i18n("Ignore Scripts"),FALSE,FALSE, "-I")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE, "-f")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE, "-n")); + paramsUninst.append(new param(i18n("Ignore Scripts"),false,false, "-I")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true, "-f")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false, "-n")); hasProgram = ifExe("pkg_info") && ifExe("pkg_add"); } @@ -223,11 +223,11 @@ TQStringList fbsdInterface::getChangeLog(packageInfo *) { bool fbsdInterface::filesTab(packageInfo *) { - return TRUE; + return true; } bool fbsdInterface::changeTab(packageInfo *) { - return FALSE; + return false; } TQStringList fbsdInterface::getFileList(packageInfo *p) { @@ -527,7 +527,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a) // Find the last word on this line (which should be the package name) minus a trailing :. TQString pkg = name.section(' ',-1); if (pkg.isEmpty()) { - KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), TRUE); + KpMsgE(i18n("Unexpected output from pkg_info (looking for package name): %1").arg(value), true); kpackage->setStatus(TQString()); return; } else { @@ -578,7 +578,7 @@ int fbsdInterface::pathInfo(TQMap<TQString, TQString> &a) bsdPortsIndexItem::bsdPortsIndexItem(fbsdInterface *parent, char *desc, bool binaries, const TQString &dname) : bin(binaries), port(!binaries), installed(false) { - fields = TQStringList::split('|', desc, TRUE); + fields = TQStringList::split('|', desc, true); TQString name = fields[NAME]; bsdPortsIndexItem *port = parent->ports[name]; diff --git a/kpackage/findf.cpp b/kpackage/findf.cpp index 2a39057..0998d71 100644 --- a/kpackage/findf.cpp +++ b/kpackage/findf.cpp @@ -78,7 +78,7 @@ FindF::FindF(TQWidget *parent) tab->addColumn("",0); // Hidden column for package type tab->addColumn(i18n("Package"),180); tab->addColumn(i18n("File Name"),330); - tab->setAllColumnsShowFocus(TRUE); + tab->setAllColumnsShowFocus(true); tab->setSorting(1); if (kpackage->management->dirInstPackages->find("apt-file/deb")) { @@ -86,7 +86,7 @@ FindF::FindF(TQWidget *parent) } else { searchAll = new TQCheckBox(i18n("Also search uninstalled packages (apt-file needs to be installed)"), frame1, "searchAll"); } - searchAll->setChecked(FALSE); + searchAll->setChecked(false); gtop->addWidget(valueLabel, 0, 0); gtop->addWidget(value, 0, 1); @@ -110,11 +110,11 @@ void FindF::checkSearchAll() { // button not enabled if no package interface has search uninstalled // packages for files ability - bool hasAll = FALSE; + bool hasAll = false; for (int i = 0; i < kpinterfaceN; i++) { if (kpinterface[i] && opts->handlePackage[i]) { if (kpinterface[i]->hasSearchAll) - hasAll = TRUE; + hasAll = true; } } @@ -221,7 +221,7 @@ void FindF::dropEvent(TQDropEvent *de) // something has been dropped value->setText(file); doFind(file); } else { - KpMsgE(i18n("Incorrect URL type"),FALSE); + KpMsgE(i18n("Incorrect URL type"),false); } } diff --git a/kpackage/kissInterface.cpp b/kpackage/kissInterface.cpp index 71a2a4e..a2a3796 100644 --- a/kpackage/kissInterface.cpp +++ b/kpackage/kissInterface.cpp @@ -82,11 +82,11 @@ KISS::KISS():pkgInterface() procMsg = i18n("KPackage: Waiting on KISS"); param paramsInst[] = { - param(0,FALSE,FALSE,0) + param(0,false,false,0) }; param paramsUninst[] = { - param(0,FALSE,FALSE,0) + param(0,false,false,0) }; hasProgram = ifExe("kiss"); } @@ -125,10 +125,10 @@ bool KISS::parseName(const TQString& name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } - return FALSE; + return false; } void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) @@ -140,7 +140,7 @@ void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) reader.setup("kiss"); *reader.proc << "-qq"; - if (!reader.start(0,FALSE)) + if (!reader.start(0,false)) return; kpackage->setStatus(sline); @@ -154,7 +154,7 @@ void KISS::listInstalledPackages(TQPtrList<packageInfo> *pki) break; p = collectInfo(reader.buf.mid(sp,sc-sp).ascii()); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -179,7 +179,7 @@ packageInfo *KISS::getPackageInfo(char mode, const TQString &name, const TQStrin case 'i': reader.setup("kiss"); *reader.proc << "-q" << name; - if (reader.start(0,FALSE)) { + if (reader.start(0,false)) { reader.buf += "package: " + name + "\n"; pki = collectInfo(reader.buf.ascii()); } @@ -190,7 +190,7 @@ packageInfo *KISS::getPackageInfo(char mode, const TQString &name, const TQStrin case 'u': reader.setup("perl"); *reader.proc << name << "-q"; - if (reader.start(0,TRUE)) { + if (reader.start(0,true)) { pki = collectInfo(reader.buf.ascii()); TQFileInfo fi(name); @@ -275,11 +275,11 @@ TQStringList KISS::getChangeLog(packageInfo *) { bool KISS::filesTab(packageInfo *) { - return TRUE; + return true; } bool KISS::changeTab(packageInfo *) { - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -306,7 +306,7 @@ TQStringList KISS::getFileList(packageInfo *p) reader.setup("kiss"); *reader.proc << "-f" << name; - if (reader.start(0,FALSE)) { + if (reader.start(0,false)) { char *buffer = tqstrdup(reader.buf.ascii()); char *str = strtok(buffer,"\n"); if (str) { @@ -323,7 +323,7 @@ TQStringList KISS::getFileList(packageInfo *p) case 'u': reader.setup("perl"); *reader.proc << fn << "-f"; - if (reader.start(0,TRUE)) { + if (reader.start(0,true)) { char *buffer = tqstrdup(reader.buf.ascii()); char *str = strtok(buffer,"\n"); if (str) { diff --git a/kpackage/kpPty.cpp b/kpackage/kpPty.cpp index 2919dc4..2530297 100644 --- a/kpackage/kpPty.cpp +++ b/kpackage/kpPty.cpp @@ -86,10 +86,10 @@ kpPty::kpPty() : TQObject() tm = new TQTimer(this); connect(tm, TQ_SIGNAL(timeout()), this, TQ_SLOT(slotTimeout())); - eventLoop = FALSE; - inSession = FALSE; - pUnterm = FALSE; - loginSession = FALSE; + eventLoop = false; + inSession = false; + pUnterm = false; + loginSession = false; codec = TQTextCodec::codecForLocale(); TQMap<TQString, TQString> passwords; @@ -138,19 +138,19 @@ bool kpPty::needSession(bool needRoot) bool kpPty::startSession(bool needRoot) { - bool interact = FALSE; // Have interacted with user, prevents loops - bool passwordTried = FALSE; // Have tried the current save password, so need to put up dialog - pUnterm = FALSE; + bool interact = false; // Have interacted with user, prevents loops + bool passwordTried = false; // Have tried the current save password, so need to put up dialog + pUnterm = false; kdDebug() << "kpPty::startSession\n"; if (!inSession && needSession(needRoot)) { // Assume !needRoot actions are simple executables - kdDebug() << "kpPty::startSession TRUE\n"; - loginSession = TRUE; + kdDebug() << "kpPty::startSession true\n"; + loginSession = true; int ret; TQString s = "echo START=$?\n"; FULL_RESTART: - interact = FALSE; + interact = false; retList.clear(); pty->resetAll(); @@ -169,14 +169,14 @@ bool kpPty::startSession(bool needRoot) pty->sstart(TDEProcess::NotifyOnExit); RESTART: - tm->start(6*1000, TRUE); - eventLoop = TRUE; + tm->start(6*1000, true); + eventLoop = true; kdDebug() << "Loopst\n"; tdeApp->enter_loop(); kdDebug() << "Loopfn Result=" << Result << "\n"; tm->stop(); if (Result == TIMEOUT) { // timeout - interact = TRUE; + interact = true; // kdDebug() << "Line=" << retList.last() << "\n"; kpstart->addText(retList); kpstart->run("", i18n("Login Problem: Please login manually")); @@ -184,14 +184,14 @@ bool kpPty::startSession(bool needRoot) ret = kpstart->exec(); kdDebug() << "Sret=" << ret << "\n"; if (ret) { - inSession = FALSE; + inSession = false; } else { - inSession = TRUE; + inSession = true; } } else if (Result == PASSWORD) { // We got a password prompt TQString pass; int res; - interact = TRUE; + interact = true; // kdDebug() << "H=" << hostName << " PH=" << passwords[hostName] << " PT=" << passwordTried <<"\n"; if (passwords[hostName] != 0 && !passwordTried) { pass = passwords[hostName]; @@ -213,31 +213,31 @@ bool kpPty::startSession(bool needRoot) } } pty->writeStdin(pass.append("\n"), false); - passwordTried = TRUE; + passwordTried = true; if (res) { retList.clear(); goto RESTART; } else { - inSession = FALSE; + inSession = false; } } else if (Result == PROMPT) { // Got Prompt - inSession = TRUE; - kdDebug() << "kpPty::startSession TRUE\n"; + inSession = true; + kdDebug() << "kpPty::startSession true\n"; } else { // process return code pty->writeStdin(TQCString("\04"), false); // SU doesn't listen to ^C if (interact) { goto FULL_RESTART; } else { TQString errMsg = retList.join(" "); - KpMsgE(errMsg, TRUE); - inSession = FALSE; + KpMsgE(errMsg, true); + inSession = false; } } } else { kdDebug() << "kpPty::startSession Not needed\n"; } - loginSession = FALSE; + loginSession = false; if (!inSession) close(); @@ -248,7 +248,7 @@ void kpPty::breakUpCmd(const TQString &cmd) { kdDebug() << " kpPty::run CMD=\""<< cmd <<"\" pty = " << pty << endl; - bool quote = FALSE; + bool quote = false; TQString s; TQStringList cl = TQStringList::split(" ", cmd); @@ -259,16 +259,16 @@ void kpPty::breakUpCmd(const TQString &cmd) if ((*it)[lastPt] == '\'') { // Also End of quoted string s.replace("'",""); (*pty) << s; - quote = FALSE; + quote = false; } else { s += " "; - quote = TRUE; + quote = true; } } else if ((*it)[lastPt] == '\'') { // End of quoted string s += *it; s.replace("'",""); (*pty) << s; - quote = FALSE; + quote = false; } else if (quote) { s += *it; s += " "; @@ -282,7 +282,7 @@ TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot) { Result = 0; - pUnterm = FALSE; + pUnterm = false; if (!inSession && !needSession(needRoot)) { // Assume !needRoot actions are simple executables @@ -308,7 +308,7 @@ TQStringList kpPty::run(const TQString &cmd, bool inLoop, bool needRoot) retList.clear(); if (inLoop) { - eventLoop = TRUE; + eventLoop = true; tdeApp->enter_loop(); return retList; @@ -366,14 +366,14 @@ void kpPty::finish(int ret) if (eventLoop) { - eventLoop = FALSE; + eventLoop = false; tdeApp->exit_loop(); } } void kpPty::readLines() { - bool unterm = FALSE; + bool unterm = false; TQString stext; while(pty->readln(stext, false, &unterm) >= 0) diff --git a/kpackage/kpPty.h b/kpackage/kpPty.h index 35ba413..88d5ba7 100644 --- a/kpackage/kpPty.h +++ b/kpackage/kpPty.h @@ -59,8 +59,8 @@ public: kpPty(); ~kpPty(); - TQStringList run(const TQString &cmd, bool inLoop = TRUE, - bool needRoot= FALSE); + TQStringList run(const TQString &cmd, bool inLoop = true, + bool needRoot= false); bool startSession(bool needRoot); void close(); diff --git a/kpackage/kpTerm.cpp b/kpackage/kpTerm.cpp index cc94726..ba0dd26 100644 --- a/kpackage/kpTerm.cpp +++ b/kpackage/kpTerm.cpp @@ -46,7 +46,7 @@ kpTerm::kpTerm(kpPty *pt, TQWidget * parent, const char * name ) : // setMinimumWidth(fontMetrics().maxWidth()*80 + // minimumSizeHint().width()); setWordWrap(NoWrap); - setReadOnly(TRUE); + setReadOnly(true); } void kpTerm::doConnect() @@ -71,15 +71,15 @@ void kpTerm::doUnconnect() bool kpTerm::run(const TQString &cmd, TQStringList &r) { - setReadOnly(FALSE); + setReadOnly(false); setFocus(); - if (pty->startSession(TRUE)) { + if (pty->startSession(true)) { doConnect(); - r = pty->run(cmd,FALSE); - return TRUE; + r = pty->run(cmd,false); + return true; } else { - return FALSE; + return false; } } @@ -91,7 +91,7 @@ void kpTerm::done() { clear(); doUnconnect(); - setReadOnly(TRUE); + setReadOnly(true); clearFocus(); } @@ -152,7 +152,7 @@ void kpTerm::insert ( const TQString & str, bool) { getCursorPosition(&y,&x); // kdDebug() << "k=" << y << "," << x <<"\n"; } - TQTextEdit::insert(str,(bool)FALSE); + TQTextEdit::insert(str,(bool)false); } } @@ -197,7 +197,7 @@ bool kpRun::run(TQString cmd, TQString msg) return term->run(cmd, r); } else { term->doConnect(); - term->setReadOnly(FALSE); + term->setReadOnly(false); term->setFocus(); return true; } diff --git a/kpackage/kpTerm.h b/kpackage/kpTerm.h index da6254e..74031f6 100644 --- a/kpackage/kpTerm.h +++ b/kpackage/kpTerm.h @@ -53,7 +53,7 @@ public: bool run(const TQString &cmd, TQStringList &r); void doConnect(); void doUnconnect(); - void insert ( const TQString & str, bool mark=FALSE ); + void insert ( const TQString & str, bool mark=false ); kpPty *pty; void cancel(); void done(); diff --git a/kpackage/kpackage.cpp b/kpackage/kpackage.cpp index e3246bb..bbc1429 100644 --- a/kpackage/kpackage.cpp +++ b/kpackage/kpackage.cpp @@ -189,7 +189,7 @@ void KPKG::setupMenu() } } - // urlList.setAutoDelete(TRUE); + // urlList.setAutoDelete(true); createGUI(); } @@ -367,7 +367,7 @@ void KPACKAGE::setupStatusBar() statusbar = new TQFrame(this); statusbar->setFrameStyle(TQFrame::Raised | TQFrame::Panel); processProgress = new KProgress(100,statusbar); - processProgress->setTextEnabled(FALSE); + processProgress->setTextEnabled(false); status = new TQLabel(i18n("Management Mode"), statusbar); } @@ -417,7 +417,7 @@ void KPACKAGE::cleanUp() // file->quit selected from menu void KPACKAGE::reload() { - kpackage->management->collectData(TRUE); + kpackage->management->collectData(true); } void KPACKAGE::fileOpen() // file->quit selected from menu @@ -485,9 +485,9 @@ pkgInterface *KPACKAGE::pkType(const TQString &fname) } } fclose(file); - KpMsgE(i18n("Unknown package type: %1").arg(fname),TRUE); + KpMsgE(i18n("Unknown package type: %1").arg(fname),true); } else { - KpMsgE(i18n("File not found: %1").arg(fname),TRUE); + KpMsgE(i18n("File not found: %1").arg(fname),true); } return 0; @@ -544,7 +544,7 @@ void KPACKAGE::openNetFiles (const TQStringList &urls, bool install ) kpinterface[i]->installation->setup(lst[i],kpinterface[i]->head); if (kpinterface[i]->installation->exec()) { for (packageInfo *inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - kpackage->management->updatePackage(inf,TRUE); + kpackage->management->updatePackage(inf,true); } } } @@ -585,7 +585,7 @@ TQString KPACKAGE::getFileName(const KURL & url, TQString &cacheName ) TQString fname = ""; if ( !url.isValid() ) { - KpMsgE(i18n("Malformed URL: %1").arg(url.url()),TRUE); + KpMsgE(i18n("Malformed URL: %1").arg(url.url()),true); } else { // Just a usual file ? @@ -701,7 +701,7 @@ KFileDialog* KPACKAGE::getFileDialog(const TQString &captiontext) if(!file_dialog) { file_dialog = new KFileDialog(TQDir::currentDirPath(), "", - this,"file_dialog",TRUE); + this,"file_dialog",true); } TQString pat; diff --git a/kpackage/kpackage.h b/kpackage/kpackage.h index 3315e55..722b485 100644 --- a/kpackage/kpackage.h +++ b/kpackage/kpackage.h @@ -97,8 +97,8 @@ public: int typeIndex(pkgInterface *); // convert interface pointer to index - void openNetFiles(const TQStringList &urls, bool install=TRUE); - void openNetFile(const KURL & url, bool install=TRUE); + void openNetFiles(const TQStringList &urls, bool install=true); + void openNetFile(const KURL & url, bool install=true); // open a file given a URL TQString fetchNetFile(const KURL & url); @@ -333,6 +333,6 @@ extern TQString hostName; extern pkgInterface *kpinterface[]; void KpMsg(const TQString &lab, const TQString &msg, bool stop); -void KpMsgE(const TQString &msg, bool stop = FALSE); +void KpMsgE(const TQString &msg, bool stop = false); #endif diff --git a/kpackage/kplview.cpp b/kpackage/kplview.cpp index 3bbbb4e..12c9345 100644 --- a/kpackage/kplview.cpp +++ b/kpackage/kplview.cpp @@ -68,8 +68,8 @@ TDEListView (parent) addColumn(i18n("Old Version")); setColumnWidthMode(5,TQListView::Manual); - // setAllColumnsShowFocus(TRUE); - setRootIsDecorated(TRUE); + // setAllColumnsShowFocus(true); + setRootIsDecorated(true); readTreeConfig(); update(); show(); @@ -295,7 +295,7 @@ void KpTreeList::expandTree(KpTreeList *list) while (item) { if (item->childCount() > 0) { - item->setOpen(TRUE); + item->setOpen(true); expandTree(item); } item = item->nextSibling(); @@ -309,7 +309,7 @@ void KpTreeList::expandTree(KpTreeListItem *pitem) while (item) { if (item->childCount() > 0) { - item->setOpen(TRUE); + item->setOpen(true); expandTree(item); } item = item->nextSibling(); @@ -341,9 +341,9 @@ void KpTreeList::collapseTree(KpTreeListItem *pitem) item = item->nextSibling(); }; if (n) - pitem->setOpen(TRUE); + pitem->setOpen(true); else - pitem->setOpen(FALSE); + pitem->setOpen(false); } /////////////////////////////////////////////////////////////////////////// @@ -365,13 +365,13 @@ void KpTreeList::packageHighlighted(TQListViewItem *item, packageDisplayWidget * } // Disable the tree list while we do this - setEnabled(FALSE); + setEnabled(false); // Tell everything that is interested to change packages packageDisplay->changePackage(sel->info); // Re-enable the treeList and uninstall button - setEnabled(TRUE); + setEnabled(true); setFocus(); if (!notPress) { @@ -388,8 +388,8 @@ KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head, KpTreeListItem *item = firstChild(); searchCitem = start; - searchSkip = FALSE; - searchSubstr = FALSE; + searchSkip = false; + searchSubstr = false; searchStr = str; searchResult = 0; @@ -404,7 +404,7 @@ KpTreeListItem *KpTreeList::search(const TQString &str, const TQString &head, } KpTreeListItem *KpTreeList::search(const TQString &str, bool subStr, bool wrap, - bool start=FALSE) + bool start=false) { if (!firstChild()) return 0; @@ -430,26 +430,26 @@ bool KpTreeList::searchChild(KpTreeListItem *it) TQString s = it->text(0); // kdDebug() << "s='" << s << "'='" << searchStr << "\n"; if ((it->childCount() == 0) && (it->info->display(treeType)) && - (searchSubstr ? s.contains(searchStr,FALSE) : s == searchStr)) { + (searchSubstr ? s.contains(searchStr,false) : s == searchStr)) { searchResult = it; - return TRUE; + return true; } } if (searchCitem == it) { if (searchSkip) { - searchSkip = FALSE; + searchSkip = false; } else { - return TRUE; + return true; } } if (it->childCount() > 0) { if (searchChild(it->firstChild())) - return TRUE; + return true; } } while ((it = it->nextSibling())); - return FALSE; + return false; } KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) @@ -459,7 +459,7 @@ KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) i = searchResult; while ((i = i->parent())) { - i->setOpen(TRUE); + i->setOpen(true); } if (push) { stack.append(searchResult); @@ -467,7 +467,7 @@ KpTreeListItem *KpTreeList::changePack(KpTreeListItem *searchResult, bool push) } notPress = true; - setSelected(searchResult,TRUE); + setSelected(searchResult,true); setCurrentItem(searchResult); ensureItemVisible(searchResult); return searchResult; diff --git a/kpackage/main.cpp b/kpackage/main.cpp index 396fe7b..68779f6 100644 --- a/kpackage/main.cpp +++ b/kpackage/main.cpp @@ -144,7 +144,7 @@ int main(int argc, char **argv) for(int i = 0; i < args->count(); i++) { files.append(args->url(i).url()); } - kpackage->openNetFiles(files, FALSE); + kpackage->openNetFiles(files, false); } else { if (!kpkg->prop_restart) kpackage->setup(); diff --git a/kpackage/managementWidget.cpp b/kpackage/managementWidget.cpp index 8287006..7fa0c6b 100644 --- a/kpackage/managementWidget.cpp +++ b/kpackage/managementWidget.cpp @@ -162,11 +162,11 @@ void managementWidget::setupWidgets() lbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); luinstButton = new TQPushButton(i18n("Uninstall Marked"),leftpanel); - luinstButton->setEnabled(FALSE); + luinstButton->setEnabled(false); connect(luinstButton,TQ_SIGNAL(clicked()), TQ_SLOT(uninstallMultClicked())); linstButton = new TQPushButton(i18n("Install Marked"),leftpanel); - linstButton->setEnabled(FALSE); + linstButton->setEnabled(false); connect(linstButton,TQ_SIGNAL(clicked()), TQ_SLOT(installMultClicked())); @@ -191,11 +191,11 @@ void managementWidget::setupWidgets() rbuttons = new TQBoxLayout(TQBoxLayout::LeftToRight); uinstButton = new TQPushButton(i18n("Uninstall"),rightpanel); - uinstButton->setEnabled(FALSE); + uinstButton->setEnabled(false); connect(uinstButton,TQ_SIGNAL(clicked()), TQ_SLOT(uninstallSingleClicked())); instButton = new TQPushButton(i18n("Install"),rightpanel); - instButton->setEnabled(FALSE); + instButton->setEnabled(false); connect(instButton,TQ_SIGNAL(clicked()), TQ_SLOT(installSingleClicked())); @@ -327,7 +327,7 @@ void managementWidget::collectData(bool refresh) } allPackages = new TQPtrList<packageInfo>; - allPackages->setAutoDelete(TRUE); + allPackages->setAutoDelete(true); dirInstPackages->clear(); dirUninstPackages->clear(); @@ -365,7 +365,7 @@ void managementWidget::rebuildListTree() for(i=allPackages->first(); i!=0; i=allPackages->next()) { - i->place(treeList,TRUE); + i->place(treeList,true); if (!(n % incr)) { kpackage->setPercent(int (n*100/count)); @@ -419,7 +419,7 @@ void managementWidget::installSingleClicked() // it was accepted, so the package has been installed packageInfo *inf; for (inf = plist.first(); inf != 0; inf = plist.next()) { - updatePackage(inf,TRUE); + updatePackage(inf,true); } if (treeList->currentItem()) { @@ -441,7 +441,7 @@ void managementWidget::installSingleClicked() setupInstButton(); } } else { - KpMsgE(i18n("Filename not available\n"),TRUE); + KpMsgE(i18n("Filename not available\n"),true); } } } @@ -485,7 +485,7 @@ void managementWidget::installMultClicked() if (kpinterface[i]->installation->exec() || kpinterface[i]->installation->modified) { for (inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - updatePackage(inf,TRUE); + updatePackage(inf,true); } } } @@ -521,7 +521,7 @@ void managementWidget::uninstallSingleClicked() interface->installation->modified) { packageInfo *inf; for (inf = plist.first(); inf != 0; inf = plist.next()) { - updatePackage(inf,FALSE); + updatePackage(inf,false); } if (treeList->currentItem()) { @@ -572,7 +572,7 @@ void managementWidget::uninstallMultClicked() if (kpinterface[i]->uninstallation->exec()|| kpinterface[i]->installation->modified ) { for (inf = lst[i]->first(); inf != 0; inf = lst[i]->next()) { - updatePackage(inf,FALSE); + updatePackage(inf,false); } } } @@ -644,7 +644,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) dirInstPackages->insert(pkgId,pnew); - q = pnew->place(treeList,TRUE); + q = pnew->place(treeList,true); allPackages->insert(0,pnew); if (!q) { printf("NOTP=%s \n",pnew->getProperty("name").ascii()); @@ -668,7 +668,7 @@ KpTreeListItem *managementWidget::updatePackage(packageInfo *pki, bool install) packageInfo *pb = dirUninstPackages->find(pkgId); if (pb) { // available package matching the one just uninstalled pb->packageState = packageInfo::NEW; - q = pb->place(treeList,TRUE); + q = pb->place(treeList,true); if (!q) { printf("NOTP=%s \n",pb->getProperty("name").ascii()); } else { diff --git a/kpackage/managementWidget.h b/kpackage/managementWidget.h index f8fa276..8135602 100644 --- a/kpackage/managementWidget.h +++ b/kpackage/managementWidget.h @@ -111,7 +111,7 @@ public: // emit change package KpTreeListItem *search(TQString str, bool subStr, bool wrap, - bool start=FALSE); + bool start=false); protected: void resizeEvent(TQResizeEvent *re); // This is called when the widget is resized diff --git a/kpackage/options.cpp b/kpackage/options.cpp index 360dce8..65bc800 100644 --- a/kpackage/options.cpp +++ b/kpackage/options.cpp @@ -223,7 +223,7 @@ void Options::setValues() { } if (!hostName.isEmpty()) { - huse->setChecked(TRUE); + huse->setChecked(true); } // kdDebug() << "C=" <<opts->hostList.count() << "\n"; @@ -235,9 +235,9 @@ void Options::setValues() { } scanLocates(); - dcache[DCache]->setChecked(TRUE); - pcache[PCache]->setChecked(TRUE); - privs[privCmd]->setChecked(TRUE); + dcache[DCache]->setChecked(true); + pcache[PCache]->setChecked(true); + privs[privCmd]->setChecked(true); cachedir->lineEdit()->setText(CacheDir); valid->setChecked(opts->VerifyFL); diff --git a/kpackage/packageDisplay.cpp b/kpackage/packageDisplay.cpp index e7a4114..7553b49 100644 --- a/kpackage/packageDisplay.cpp +++ b/kpackage/packageDisplay.cpp @@ -207,7 +207,7 @@ void packageDisplayWidget::changePackage(packageInfo *p) } package->interface = np->interface; delete np; - package->updated = TRUE; + package->updated = true; } } @@ -367,7 +367,7 @@ void packageDisplayWidget::updateFileList() { hide(); addColumn("name"); - setRootIsDecorated(TRUE); + setRootIsDecorated(true); connect(this, TQ_SIGNAL(contextMenu(TDEListView *, TQListViewItem *, const TQPoint &)), this, TQ_SLOT( openContext(TDEListView *, TQListViewItem *, const TQPoint &)) ); @@ -397,7 +397,7 @@ void packageDisplayWidget::updateFileList() void kpFileList::openContext(TDEListView *, TQListViewItem *, const TQPoint &p) { FileListMenu->setItemEnabled(openwith, - (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? TRUE : FALSE); + (selectedItem() && pkDisplay->package && pkDisplay->package->getFilename().isEmpty()) ? true : false); FileListMenu->exec(p); } diff --git a/kpackage/packageInfo.cpp b/kpackage/packageInfo.cpp index 7dcbf9f..616bc2b 100644 --- a/kpackage/packageInfo.cpp +++ b/kpackage/packageInfo.cpp @@ -65,7 +65,7 @@ packageInfo::packageInfo(TQMap<TQString, TQString> _info, pkgInterface *type) item = NULL; packageState = UNSET; - updated = FALSE; + updated = false; url = TQString(); } @@ -265,7 +265,7 @@ int packageInfo::pnewer(const TQString &s, const TQString &sp) int ns = 0, nsp = 0, vs, vsp; // kdDebug() << "S=" << s << " SP=" << sp << "\n"; - while (TRUE) { + while (true) { vs = getDigElement(s,&ns); vsp = getDigElement(sp,&nsp); // kdDebug() << "s=" << ns << " " << vs << " sp=" << nsp << " " << vsp << "\n"; @@ -369,21 +369,21 @@ bool packageInfo::display(int treeType) switch (treeType) { case Opts::INSTALLED: if (packageState == INSTALLED || packageState == BAD_INSTALL) - return TRUE; + return true; break; case Opts::UPDATED: if (packageState == UPDATED) - return TRUE; + return true; break; case Opts::NEW: if ((packageState == UPDATED) || (packageState == NEW)) - return TRUE; + return true; break; case Opts::ALL: - return TRUE; + return true; break; }; - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////// @@ -393,11 +393,11 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) { KpTreeListItem *search = tree->firstChild(), *parent=NULL, *child=NULL; TQString qtmp, tmp; - bool doit = FALSE; + bool doit = false; - doit = TRUE; + doit = true; if (packageState == NOLIST || packageState == HIDDEN) - doit = FALSE; + doit = false; if (doit) { qtmp = interface->head; @@ -411,7 +411,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) if( search && (group=findGroup(*it, search)) ) { parent = group; - parent->setOpen(TRUE); + parent->setOpen(true); search = group->firstChild(); } else { if (parent) { @@ -420,7 +420,7 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) group = new KpTreeListItem(tree, 0, interface->folder, *it); } parent = group; - parent->setOpen(TRUE); + parent->setOpen(true); search = NULL; } cnt++; @@ -484,9 +484,9 @@ KpTreeListItem *packageInfo::place(KpTreeList *tree, bool insertI) } if (insertI) { - parent->setOpen(TRUE); + parent->setOpen(true); } else { - parent->setOpen(FALSE); + parent->setOpen(false); } return item; @@ -520,9 +520,9 @@ bool packageInfo::smerge( const TQString &exp) { } ++it; } - return TRUE; + return true; } - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -531,9 +531,9 @@ void packageInfo::pkgFileIns(const TQString &fileName) info.insert("filename", fileName); info.insert("base", "/"); - if (pkgInsert(kpackage->management->allPackages, interface->typeID, FALSE)) { + if (pkgInsert(kpackage->management->allPackages, interface->typeID, false)) { packageState = packageInfo::NEW; - place(kpackage->management->treeList,TRUE); + place(kpackage->management->treeList,true); TQString pname = getProperty("name") + interface->typeID; kpackage->management->dirUninstPackages->insert(pname,this); @@ -551,15 +551,15 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, TQString pname = getProperty("name") + exp; // printf("U1=%s\n",pname.data()); - bool shouldUpdate = TRUE; - bool hidden = FALSE; + bool shouldUpdate = true; + bool hidden = false; packageInfo *pi = dirInstPackages->find(pname); if (pi) { // installed version exists if ((pi->packageState != BAD_INSTALL) && (pi->packageState != NOLIST)) { if (newer(pi) >= 0) { - hidden = TRUE; + hidden = true; } } } @@ -569,7 +569,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, if ((pu->packageState != BAD_INSTALL) && (pu->packageState != NOLIST)) { if (newer(pu) >= 0) { - shouldUpdate = FALSE; + shouldUpdate = false; } else if (!installed) { // If older available package exists, remove it dirUninstPackages->remove(*(pu->info.find("name"))); pki->remove(pu); @@ -578,7 +578,7 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, } if (getProperty("version").isEmpty()) { - shouldUpdate = TRUE; + shouldUpdate = true; } if (shouldUpdate) { @@ -624,9 +624,9 @@ bool packageInfo::pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, dirInstPackages->insert(pname,this); } else dirUninstPackages->insert(pname,this); - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/kpackage/packageInfo.h b/kpackage/packageInfo.h index 1ce24a3..0ffc74b 100644 --- a/kpackage/packageInfo.h +++ b/kpackage/packageInfo.h @@ -86,7 +86,7 @@ public: void fixup(); // Initialize fields if missing - KpTreeListItem *place(KpTreeList *tree, bool InsertI=FALSE); + KpTreeListItem *place(KpTreeList *tree, bool InsertI=false); // places the object in the treelist `tree' and initialises // `item'. If necessary, new groups will be added to `tree'. @@ -120,7 +120,7 @@ public: // Insert a package from a file into package tree bool pkgInsert(TQPtrList<packageInfo> *pki, const TQString &exp, bool installed, - bool infoPackage = FALSE); + bool infoPackage = false); // insert packgeInfo either installed or not installed TQMap<TQString, TQString> info; diff --git a/kpackage/pkgInterface.cpp b/kpackage/pkgInterface.cpp index 288caf4..e1d6710 100644 --- a/kpackage/pkgInterface.cpp +++ b/kpackage/pkgInterface.cpp @@ -75,10 +75,10 @@ pkgInterface::pkgInterface( ) : TQObject(), new_pict(), updated_pict() markUnInst = UserIcon("noball"); bad_pict = UserIcon("dbad"); - hasRemote = FALSE; + hasRemote = false; defaultHandle = 1; - noFetch = FALSE; - hasSearchAll = FALSE; + noFetch = false; + hasSearchAll = false; } ////////////////////////////////////////////////////////////////////////////// @@ -109,11 +109,11 @@ TQString pkgInterface::doInstall(int, const TQString &, bool &) {return 0;} bool pkgInterface::ifExe(TQString exe) { if (!TDEGlobal::dirs()->findExe( exe ).isNull()) { - return TRUE; + return true; } else { kdDebug() << "Program not found: " << exe << "\n"; errExe = exe; - return FALSE; + return false; } } @@ -149,9 +149,9 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c TQDir d(fname,packagePattern); if (subdirs) - d.setMatchAllDirs( TRUE ); // list contains subdirs + d.setMatchAllDirs( true ); // list contains subdirs else - d.setMatchAllDirs( FALSE ); // list contains no subdirs + d.setMatchAllDirs( false ); // list contains no subdirs if (d.exists()) { if ( d.isReadable() ) { @@ -189,7 +189,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c } if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, FALSE)) + if (!p->pkgInsert(pki, typeID, false)) delete p; } } @@ -213,7 +213,7 @@ void pkgInterface::listDir(TQPtrList<packageInfo> *pki, const TQString &fname, c packageInfo *p = collectDir(name,size,dir); if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, FALSE)) + if (!p->pkgInsert(pki, typeID, false)) delete p; } } @@ -297,7 +297,7 @@ TQString pkgInterface::getDir(cacheObj *cp) { cl.write(); return tmpDir; } else { - KpMsgE(i18n("Cannot read folder %1").arg(url),FALSE); + KpMsgE(i18n("Cannot read folder %1").arg(url),false); unlink(tmpDir.ascii()); return TQString(); } @@ -399,7 +399,7 @@ TQString pkgInterface::install(int installFlags, TQPtrList<packageInfo> *p, bool ////////////////////////////////////////////////////////////////////////////// TQStringList pkgInterface::listInstalls(const TQStringList &packs, bool , bool &cancel) { - cancel = FALSE; + cancel = false; return packs; } diff --git a/kpackage/pkgInterface.h b/kpackage/pkgInterface.h index 74f15c2..fcd2a97 100644 --- a/kpackage/pkgInterface.h +++ b/kpackage/pkgInterface.h @@ -128,7 +128,7 @@ public: TQString getDir(cacheObj *cp); // list directory local or remote - void listDir(TQPtrList<packageInfo> *pki, const TQString &fname, const TQString &dir, bool subdirs = FALSE); + void listDir(TQPtrList<packageInfo> *pki, const TQString &fname, const TQString &dir, bool subdirs = false); // list the packages in a directory packageInfo *collectDir(const TQString &name, const TQString &size, const TQString &dir); diff --git a/kpackage/pkgOptions.cpp b/kpackage/pkgOptions.cpp index 38479d4..5dec101 100644 --- a/kpackage/pkgOptions.cpp +++ b/kpackage/pkgOptions.cpp @@ -48,7 +48,7 @@ /////////////////////////////////////////////////////////////////////////// pkgOptions::pkgOptions(pkgInterface *pki, TQWidget *parent, const TQString &caption) - : KDialog(parent,0,TRUE) + : KDialog(parent,0,true) { // setFrameStyle(TQFrame::Raised | TQFrame::Panel); @@ -154,7 +154,7 @@ void pkgOptions::setup(packageInfo *p, const TQString &type) { bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) { TQString s; - modified = FALSE; + modified = false; packList = pl; @@ -208,7 +208,7 @@ bool pkgOptions::setup(TQPtrList<packageInfo> *pl, const TQString &) new TQListViewItem(packages, *pit); } cancelButton->setGuiItem(KStdGuiItem::cancel()); - return TRUE; + return true; } // install button has been clicked....so install the package @@ -216,7 +216,7 @@ void pkgOptions::pkginstallButtonClicked() { int i; TQStringList r; - modified = TRUE; + modified = true; // Collect data from check boxes int installFlags = 0; @@ -225,7 +225,7 @@ void pkgOptions::pkginstallButtonClicked() installFlags |= (Boxs[i]->isChecked()) << i; } - test = FALSE; + test = false; TQString s = doPackages(installFlags, packList, test); // A "0=" or "1=" indicates it was actually (un)installed by the doPackages // routine instead of just returning a command to execute @@ -239,10 +239,10 @@ void pkgOptions::pkginstallButtonClicked() connect(term,TQ_SIGNAL(result(TQStringList &, int)), this,TQ_SLOT(slotResult(TQStringList &, int))); - installButton->setEnabled(FALSE); + installButton->setEnabled(false); if (term->run(s, r)) { - running = TRUE; + running = true; cancelButton->setGuiItem(KStdGuiItem::cancel()); } else { reset(); @@ -265,11 +265,11 @@ void pkgOptions::slotSearch(TQListViewItem *item) } void pkgOptions::reset() { - installButton->setEnabled(TRUE); + installButton->setEnabled(true); cancelButton->setGuiItem(KGuiItem(i18n("Done"))); //clear icon disconnect(term,TQ_SIGNAL(result(TQStringList &, int)), this,TQ_SLOT(slotResult(TQStringList &, int))); - running = FALSE; + running = false; } void pkgOptions::slotResult(TQStringList &, int ret) @@ -310,8 +310,8 @@ void pkgOptions::showEvent ( TQShowEvent *e ) { // kdDebug() << "pkgOptions::showEvent\n"; getKeep(); - modified = FALSE; - running = FALSE; + modified = false; + running = false; TQWidget::showEvent(e); } @@ -344,7 +344,7 @@ pkgOptionsI::pkgOptionsI(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Install")) { insType = i18n("Install"); - installer = TRUE; + installer = true; setupWidgets(pkg->paramsInst); } @@ -359,7 +359,7 @@ pkgOptionsU::pkgOptionsU(pkgInterface *pkg, TQWidget *parent): pkgOptions(pkg, parent, i18n("Uninstall")) { insType = i18n("Uninstall"); - installer = FALSE; + installer = false; setupWidgets(pkg->paramsUninst); } diff --git a/kpackage/procbuf.cpp b/kpackage/procbuf.cpp index e5b844b..bedbb9e 100644 --- a/kpackage/procbuf.cpp +++ b/kpackage/procbuf.cpp @@ -33,7 +33,7 @@ #include <kdebug.h> Modal::Modal(TQString msg, TQWidget *parent, const char * name ) - : KDialog( parent, name, TRUE ) + : KDialog( parent, name, true ) { TQLabel *line1 = new TQLabel(msg,this); line1->setAlignment(AlignCenter); @@ -81,7 +81,7 @@ void procbuf::slotReadInfo(TDEProcess *, char *buffer, int buflen) buf += last; if (timed) { - timed = FALSE; + timed = false; tm->stop(); } } @@ -92,7 +92,7 @@ void procbuf::slotExited(TDEProcess *) m->terminate(); } if (timed) { - timed = FALSE; + timed = false; tm->stop(); } } @@ -109,14 +109,14 @@ int procbuf::start (TQString msg, bool errorDlg, int timeout, TQString timeMsg ) { if (timeout) { - tm->start(timeout*1000, TRUE); + tm->start(timeout*1000, true); timed = true; } if (!proc->start(!msg.isNull() ? TDEProcess::NotifyOnExit : TDEProcess::Block, TDEProcess::All)) { if (errorDlg) { - KpMsgE(i18n("TDEProcess Failure"),TRUE); + KpMsgE(i18n("TDEProcess Failure"),true); } return 0; }; @@ -134,13 +134,13 @@ int procbuf::start (TQString msg, bool errorDlg, << " exit=" << proc->exitStatus() << endl; if (timed) { kdDebug() << "timeout..................\n"; - KpMsg("Error",i18n("Timeout: %1").arg(timeMsg), TRUE); + KpMsg("Error",i18n("Timeout: %1").arg(timeMsg), true); delete proc; proc = 0; return 0; } else { if (!proc->normalExit() || proc->exitStatus()) { if (errorDlg) { - KpMsg("Error",i18n("TDEProcess error:%1").arg(buf), TRUE); + KpMsg("Error",i18n("TDEProcess error:%1").arg(buf), true); } delete proc; proc = 0; return 0; diff --git a/kpackage/procbuf.h b/kpackage/procbuf.h index 9ca0eeb..6ac264c 100644 --- a/kpackage/procbuf.h +++ b/kpackage/procbuf.h @@ -52,7 +52,7 @@ public: procbuf(); ~procbuf(); void setup(TQString); - int start(TQString msg, bool errorDlg = TRUE, + int start(TQString msg, bool errorDlg = true, int timeout=0, TQString timeMsg = ""); TQString buf; diff --git a/kpackage/rpmInterface.cpp b/kpackage/rpmInterface.cpp index 8a37844..0015e97 100644 --- a/kpackage/rpmInterface.cpp +++ b/kpackage/rpmInterface.cpp @@ -63,16 +63,16 @@ RPM::RPM():pkgInterface() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Upgrade"),TRUE,FALSE,"-U","-i")); - paramsInst.append(new param(i18n("Replace Files"),FALSE,FALSE,"--replacefiles")); - paramsInst.append(new param(i18n("Replace Packages"),TRUE,FALSE,"--replacepkgs")); - paramsInst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--nodeps")); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"--test")); + paramsInst.append(new param(i18n("Upgrade"),true,false,"-U","-i")); + paramsInst.append(new param(i18n("Replace Files"),false,false,"--replacefiles")); + paramsInst.append(new param(i18n("Replace Packages"),true,false,"--replacepkgs")); + paramsInst.append(new param(i18n("Check Dependencies"),true,true,"--nodeps")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"--test")); - paramsUninst.append(new param(i18n("Remove all versions"),FALSE,FALSE,"--allmatches")); - paramsUninst.append(new param(i18n("Use Scripts"),TRUE,TRUE,"--noscripts")); - paramsUninst.append(new param(i18n("Check Dependencies"),TRUE,TRUE,"--nodeps")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"--test")); + paramsUninst.append(new param(i18n("Remove all versions"),false,false,"--allmatches")); + paramsUninst.append(new param(i18n("Use Scripts"),true,true,"--noscripts")); + paramsUninst.append(new param(i18n("Check Dependencies"),true,true,"--nodeps")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"--test")); queryMsg = i18n("Querying RPM package list: "); @@ -129,11 +129,11 @@ bool RPM::parseName(const TQString &name, TQString *n, TQString *v) d1 = d2; *n = name.left(d1); *v = name.mid(d1+1,s1-d1-1); - return TRUE; + return true; } } } - return FALSE; + return false; } TQString RPM::packageQuery() { @@ -187,7 +187,7 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) } else { p = collectInfo(plist); if (p) { - if (!p->pkgInsert(pki, typeID, TRUE)) { + if (!p->pkgInsert(pki, typeID, true)) { delete p; } } @@ -203,7 +203,7 @@ void RPM::listInstalledPackages(TQPtrList<packageInfo> *pki) packageInfo* RPM::collectInfo(TQStringList &ln) { - bool haveName = FALSE; + bool haveName = false; TQMap<TQString, TQString> a; TQString name, value; @@ -226,7 +226,7 @@ packageInfo* RPM::collectInfo(TQStringList &ln) { a.insert("install time", value); } else if (name == "name") { if (!value.isEmpty()) - haveName = TRUE; + haveName = true; a.insert("name", value.stripWhiteSpace()); } else if (name == "buildtime") { a.insert("build-time", value); @@ -427,7 +427,7 @@ packageInfo *RPM::getUPackageInfo( const TQString &name ) TQStringList infoList = kpty->run(cmd); packageInfo *pki = collectInfo(infoList); if (pki) { - pki->updated = TRUE; + pki->updated = true; pki->packageState = packageInfo::AVAILABLE; if (pki->hasProperty("install time")) pki->info.remove("install time"); @@ -530,7 +530,7 @@ TQString RPM::doUninstP(int uninstallFlags, const TQStringList &files, bool &tes } if (uninstallFlags>>3 & 1) - test = TRUE; + test = true; kdDebug() << "uCMD=" << s << " test=" << test << "\n"; @@ -582,7 +582,7 @@ TQString RPM::doinstP(int installFlags, const TQStringList &files, bool &test) } if (installFlags>>4 & 1) - test = TRUE; + test = true; kdDebug() << "iCMD=" << s << " test=" << test << "\n"; diff --git a/kpackage/search.cpp b/kpackage/search.cpp index 3782257..9d2bba7 100644 --- a/kpackage/search.cpp +++ b/kpackage/search.cpp @@ -62,13 +62,13 @@ Search::Search(TQWidget *parent, const char * name) vf->addLayout(hc,0); substr = new TQCheckBox(i18n("Sub string"), frame1, "substr"); - substr->setChecked(TRUE); + substr->setChecked(true); hc->addWidget(substr,1,AlignLeft); substr->setFixedSize(substr->sizeHint()); hc->addStretch(1); wrap = new TQCheckBox(i18n("Wrap search"), frame1, "wrap"); - wrap->setChecked(TRUE); + wrap->setChecked(true); hc->addWidget(wrap,1,AlignRight); wrap->setFixedSize(wrap->sizeHint()); @@ -97,14 +97,14 @@ void Search::ok_slot() to_find = to_find.stripWhiteSpace(); pkg = kpackage->management->search(to_find, - substr->isChecked(),FALSE,FALSE); + substr->isChecked(),false,false); if (pkg == 0 && wrap->isChecked()) { pkg = kpackage->management->search(to_find, - substr->isChecked(),TRUE,FALSE); + substr->isChecked(),true,false); } if (pkg == 0) KpMsg(i18n("Note"), - i18n("%1 was not found.").arg(to_find),TRUE); + i18n("%1 was not found.").arg(to_find),true); } void Search::done_slot() diff --git a/kpackage/slackInterface.cpp b/kpackage/slackInterface.cpp index b5841b5..570216d 100644 --- a/kpackage/slackInterface.cpp +++ b/kpackage/slackInterface.cpp @@ -96,9 +96,9 @@ SLACK::SLACK():pkgInterface() this,TQ_SLOT(setAvail(LcacheObj *))); locatedialog->apply_slot(); - paramsInst.append(new param(i18n("Test (do not install)"),FALSE,FALSE,"-warn")); + paramsInst.append(new param(i18n("Test (do not install)"),false,false,"-warn")); - paramsUninst.append(new param(i18n("Test (do not uninstall)"),FALSE,FALSE,"-warn")); + paramsUninst.append(new param(i18n("Test (do not uninstall)"),false,false,"-warn")); hasProgram = ifExe("installpkg"); @@ -153,9 +153,9 @@ bool SLACK::parseName(const TQString &name, TQString *n, TQString *v) if (s1 > 0) { *n = name.left(s1); v = new TQString(""); - return TRUE; + return true; } - return FALSE; + return false; } void SLACK::listPackages(TQPtrList<packageInfo> *pki) @@ -237,7 +237,7 @@ void SLACK::listInstalledPackages(TQPtrList<packageInfo> *pki) p = collectInfo(vb.ascii(), INSTALLED); if (p) { smerge(p); - if (!p->pkgInsert(pki, typeID, TRUE)) + if (!p->pkgInsert(pki, typeID, true)) delete p; } } @@ -355,7 +355,7 @@ packageInfo *SLACK::getPackageInfo(char mode, const TQString &name, const TQStri pki = new packageInfo(a,this); if (pki) { smerge(pki); - pki->updated = TRUE; + pki->updated = true; } } break; @@ -494,11 +494,11 @@ TQStringList SLACK::getChangeLog(packageInfo *) { } bool SLACK::filesTab(packageInfo *) { - return TRUE; + return true; } bool SLACK::changeTab(packageInfo *) { - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// diff --git a/kpackage/tdeio.cpp b/kpackage/tdeio.cpp index 1897031..50ef5cf 100644 --- a/kpackage/tdeio.cpp +++ b/kpackage/tdeio.cpp @@ -84,12 +84,9 @@ bool Kiod::listDir(const TQString &url, const TQString &fname, bool subdirs) tdeApp->enter_loop(); file->close(); - if (worked) - return TRUE; - else - return FALSE; + return worked; } else - return FALSE; + return false; } void Kiod::slotListEntries( TDEIO::Job *, const TDEIO::UDSEntryList& entries ) diff --git a/kpackage/updateLoc.cpp b/kpackage/updateLoc.cpp index d89a177..d4adc25 100644 --- a/kpackage/updateLoc.cpp +++ b/kpackage/updateLoc.cpp @@ -78,22 +78,22 @@ bool apanel::getUse() if (puse) return puse->isChecked(); else - return FALSE; + return false; } void apanel::setUse(int n) { if (puse) { if (n) - puse->setChecked(TRUE); + puse->setChecked(true); else - puse->setChecked(FALSE); + puse->setChecked(false); } } void apanel::clear() { - puse->setChecked(FALSE); + puse->setChecked(false); pent->clear(); } @@ -175,16 +175,16 @@ bool dpanel::getUse() const if (puse) return puse->isChecked(); else - return FALSE; + return false; } void dpanel::setUse(int n) { if (puse) { if (n) - puse->setChecked(TRUE); + puse->setChecked(true); else - puse->setChecked(FALSE); + puse->setChecked(false); } } @@ -193,7 +193,7 @@ bool dpanel::getSubdirs() const if (psubdirs) return psubdirs->isChecked(); else - return FALSE; + return false; } void dpanel::setSubdirs(int n) @@ -201,9 +201,9 @@ void dpanel::setSubdirs(int n) if (psubdirs) { if (n) - psubdirs->setChecked(TRUE); + psubdirs->setChecked(true); else - psubdirs->setChecked(FALSE); + psubdirs->setChecked(false); } } @@ -253,7 +253,7 @@ void dpanel::dirOpen() ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// updateLoc::updateLoc(TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname) - : TQWidget(p,"updateLoc",FALSE) + : TQWidget(p,"updateLoc",false) { interName = iname; interface = inter; diff --git a/kpackage/updateLoc.h b/kpackage/updateLoc.h index 7dd49aa..ddea958 100644 --- a/kpackage/updateLoc.h +++ b/kpackage/updateLoc.h @@ -208,7 +208,7 @@ public: pdUpdateLoc (TQWidget *p, int panelNumber, pkgInterface *inter, const TQString &iname, int numberLines, const TQString &filter, const TQString &lmsg, TQString bmsg = 0, - bool subdirs = FALSE); + bool subdirs = false); ~pdUpdateLoc(); @@ -294,13 +294,13 @@ public: void dLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, const TQString &filter, const TQString &dirMsg, - bool subdirs=TRUE ); + bool subdirs=true ); void pLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, const TQString &filter, const TQString &packMsg, TQString baseMsg = 0, - bool subdirs=FALSE); + bool subdirs=false); void cLocations(int numberDirs, int numberLines, pkgInterface *inter, const TQString &iname, const TQString &label, diff --git a/ksysv/IOCore.cpp b/ksysv/IOCore.cpp index 0520706..50798c8 100644 --- a/ksysv/IOCore.cpp +++ b/ksysv/IOCore.cpp @@ -46,7 +46,7 @@ TQString ksv::IO::relToAbs (const TQString& dir, const TQString& rel) void ksv::IO::removeFile (const TQFileInfo& info, TQDir& dir, TQString& rich, TQString& plain) { - if (!dir.remove(info.fileName(), FALSE)) + if (!dir.remove(info.fileName(), false)) { rich = (i18n ("<error>FAILED</error> to remove <cmd>%1</cmd> from <cmd>%2</cmd>: \"%3\"<br/>") .arg(info.fileName()) diff --git a/ksysv/OldView.cpp b/ksysv/OldView.cpp index 7f35b7f..7fa7baa 100644 --- a/ksysv/OldView.cpp +++ b/ksysv/OldView.cpp @@ -202,7 +202,7 @@ void KSVContent::initLList() TQFont bold_font = TQFont(TDEGlobalSettings::generalFont()); - bold_font.setBold(TRUE); + bold_font.setBold(true); servL->setFont(bold_font); scripts = new KServiceDragList (scriptLabelBox, "Scripts"); @@ -399,7 +399,7 @@ void KSVContent::initScripts() { { name = fi->fileName(); scripts->initItem(name, - ksv::IO::relToAbs(conf->scriptPath(), fi->dirPath(FALSE)), + ksv::IO::relToAbs(conf->scriptPath(), fi->dirPath(false)), name, 0); comp->addItem (name); @@ -456,7 +456,7 @@ void KSVContent::info2Widget( TQFileInfo* info, int index ) TQFileInfo link_info = TQFileInfo(info->readLink()); TQString l_base = link_info.fileName(); - TQString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(FALSE)); + TQString l_path = ksv::IO::relToAbs(conf->scriptPath(), link_info.dirPath(false)); TQString name; int number; diff --git a/ksysv/ksvconfigwizard.cpp b/ksysv/ksvconfigwizard.cpp index 86aaf24..dac20d2 100644 --- a/ksysv/ksvconfigwizard.cpp +++ b/ksysv/ksvconfigwizard.cpp @@ -37,7 +37,7 @@ * name 'name' and widget flags set to 'f' * * The wizard will by default be modeless, unless you set 'modal' to - * TRUE to construct a modal wizard. + * true to construct a modal wizard. */ KSVConfigWizard::KSVConfigWizard (TQWidget* parent, const char* name, bool modal, WFlags fl) : ConfigWizard (parent, name, modal, fl), diff --git a/ksysv/ksvconfigwizard.h b/ksysv/ksvconfigwizard.h index b37a7cf..fbba75c 100644 --- a/ksysv/ksvconfigwizard.h +++ b/ksysv/ksvconfigwizard.h @@ -35,7 +35,7 @@ class KSVConfigWizard : public ConfigWizard public: - KSVConfigWizard( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + KSVConfigWizard( TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 ); ~KSVConfigWizard(); public: diff --git a/ksysv/ksvdraglist.cpp b/ksysv/ksvdraglist.cpp index 077bad4..0168aae 100644 --- a/ksysv/ksvdraglist.cpp +++ b/ksysv/ksvdraglist.cpp @@ -755,7 +755,7 @@ void KSVDragList::setEnabled (bool enable) clearWState (WState_Disabled); // setBackgroundFromMode(); // this is private in TQWidget... // well it doesn't really matter in this case - enabledChange( TRUE ); + enabledChange( true ); } } else @@ -763,11 +763,11 @@ void KSVDragList::setEnabled (bool enable) if (!testWState(WState_Disabled)) { if (focusWidget() == this) - focusNextPrevChild (TRUE); + focusNextPrevChild (true); setWState (WState_Disabled); // setBackgroundFromMode(); // this is private in TQWidget... // well it doesn't really matter in this case - enabledChange (FALSE); + enabledChange (false); } } diff --git a/kuser/kgroup.cpp b/kuser/kgroup.cpp index 77fcc91..5b61efd 100644 --- a/kuser/kgroup.cpp +++ b/kuser/kgroup.cpp @@ -174,7 +174,7 @@ void KU::KGroup::clear() KU::KGroups::KGroups(KUserPrefsBase *cfg) { - mGroups.setAutoDelete(TRUE); + mGroups.setAutoDelete(true); mCfg = cfg; } diff --git a/kuser/kgroupfiles.cpp b/kuser/kgroupfiles.cpp index 7466d91..d77308b 100644 --- a/kuser/kgroupfiles.cpp +++ b/kuser/kgroupfiles.cpp @@ -45,9 +45,9 @@ KGroupFiles::KGroupFiles( KUserPrefsBase *cfg ) : KGroups( cfg ) { - gs_backuped = FALSE; - gr_backuped = FALSE; - gn_backuped = FALSE; + gs_backuped = false; + gr_backuped = false; + gn_backuped = false; smode = 0400; mode = 0644; @@ -122,7 +122,7 @@ bool KGroupFiles::reload() TQString tmp; if (fgrp == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); - return FALSE; + return false; } while ((p = fgetgrent(fgrp)) != NULL) { @@ -166,11 +166,11 @@ bool KGroupFiles::reload() } // end of processing files, for loop if( (group_errno == 0) && (nisgroup_errno == 0) ) - return(TRUE); + return(true); if( (group_errno != 0) && (nisgroup_errno != 0) ) - return(FALSE); + return(false); else - return(TRUE); + return(true); } bool KGroupFiles::save() @@ -213,19 +213,19 @@ bool KGroupFiles::save() if(!group_filename.isEmpty()) { if (!gr_backuped) { if ( !backup(group_filename) ) return false; - gr_backuped = TRUE; + gr_backuped = true; } } if(!gshadow_filename.isEmpty()) { if (!gs_backuped) { if ( !backup(gshadow_filename) ) return false; - gs_backuped = TRUE; + gs_backuped = true; } } if(!nisgroup_filename.isEmpty() && (nisgroup_filename != group_filename)) { if (!gn_backuped) { if ( !backup(nisgroup_filename) ) return false; - gn_backuped = TRUE; + gn_backuped = true; } } @@ -365,12 +365,12 @@ bool KGroupFiles::save() if( (nis_groups_written > 0) || (nisgroup_filename == group_filename) ) { if (system(GRMKDB) != 0) { KMessageBox::error( 0, i18n("Unable to build NIS group databases.") ); - return FALSE; + return false; } } #endif - return TRUE; + return true; } bool KGroupFiles::dbcommit() diff --git a/kuser/kgroupldap.cpp b/kuser/kgroupldap.cpp index 977cb06..a567831 100644 --- a/kuser/kgroupldap.cpp +++ b/kuser/kgroupldap.cpp @@ -31,7 +31,7 @@ KGroupLDAP::KGroupLDAP( KUserPrefsBase *cfg ) : KU::KGroups( cfg ) { - mGroups.setAutoDelete(TRUE); + mGroups.setAutoDelete(true); if ( mCfg->ldapssl() ) mUrl.setProtocol("ldaps"); diff --git a/kuser/kuser.cpp b/kuser/kuser.cpp index 687cf44..27c332c 100644 --- a/kuser/kuser.cpp +++ b/kuser/kuser.cpp @@ -688,7 +688,7 @@ void KU::KUser::copyDir(const TQString &srcPath, const TQString &dstPath) } else if ( info.isDir() ) { TQDir dir(filename); - d.mkdir(name, FALSE); + d.mkdir(name, false); copyDir(s.filePath(name), d.filePath(name)); if (chown(TQFile::encodeName(d.filePath(name)), p_uid, p_gid) != 0) { @@ -817,7 +817,7 @@ int KU::KUser::removeProcesses() KU::KUsers::KUsers(KUserPrefsBase *cfg) { - mUsers.setAutoDelete(TRUE); + mUsers.setAutoDelete(true); mCfg = cfg; } @@ -891,7 +891,7 @@ bool KU::KUsers::doCreate(KU::KUser *user) } } - return TRUE; + return true; } bool KU::KUsers::doDelete( KU::KUser *user ) @@ -906,7 +906,7 @@ bool KU::KUsers::doDelete( KU::KUser *user ) /* user->removeProcesses(); */ - return TRUE; + return true; } KU::KUser *KU::KUsers::lookup(const TQString & name) diff --git a/kuser/kuserfiles.cpp b/kuser/kuserfiles.cpp index 2d9bef5..be2f762 100644 --- a/kuser/kuserfiles.cpp +++ b/kuser/kuserfiles.cpp @@ -47,9 +47,9 @@ KUserFiles::KUserFiles(KUserPrefsBase *cfg) : KUsers( cfg ) { - pw_backuped = FALSE; - pn_backuped = FALSE; - s_backuped = FALSE; + pw_backuped = false; + pn_backuped = false; + s_backuped = false; pwd_mode = 0644; pwd_uid = 0; @@ -59,7 +59,7 @@ KUserFiles::KUserFiles(KUserPrefsBase *cfg) : KUsers( cfg ) sdw_uid = 0; sdw_gid = 0; - mUsers.setAutoDelete(TRUE); + mUsers.setAutoDelete(true); caps = Cap_Passwd; #ifdef HAVE_SHADOW @@ -78,12 +78,12 @@ KUserFiles::~KUserFiles() bool KUserFiles::reload() { if (!loadpwd()) - return FALSE; + return false; if (!loadsdw()) - return FALSE; + return false; - return TRUE; + return true; } // Load passwd file @@ -156,7 +156,7 @@ bool KUserFiles::loadpwd() FILE *fpwd = fopen(TQFile::encodeName(filename), "r"); if(fpwd == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(filename) ); - return FALSE; + return false; } while ((p = fgetpwent(fpwd)) != NULL) { @@ -208,11 +208,11 @@ bool KUserFiles::loadpwd() } // end of processing files, for loop if( (passwd_errno == 0) && (nispasswd_errno == 0) ) - return (TRUE); + return (true); if( (passwd_errno != 0) && (nispasswd_errno != 0) ) - return (FALSE); + return (false); else - return(TRUE); + return(true); } // Load shadow passwords @@ -227,7 +227,7 @@ bool KUserFiles::loadsdw() shadow_file = mCfg->shadowsrc(); if ( shadow_file.isEmpty() ) - return TRUE; + return true; stat( TQFile::encodeName(shadow_file), &st); sdw_mode = st.st_mode & 0666; @@ -240,7 +240,7 @@ bool KUserFiles::loadsdw() if ((f = fopen( TQFile::encodeName(shadow_file), "r")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for reading.").arg(shadow_file) ); caps &= ~Cap_Shadow; - return TRUE; + return true; } while ((spw = fgetspent( f ))) { // read a shadow password structure #else @@ -280,7 +280,7 @@ bool KUserFiles::loadsdw() #endif #endif // HAVE_SHADOW - return TRUE; + return true; } // Save password file @@ -326,15 +326,15 @@ bool KUserFiles::savepwd() if(!passwd_filename.isEmpty()) { if (!pw_backuped) { - if (!backup(passwd_filename)) return FALSE; - pw_backuped = TRUE; + if (!backup(passwd_filename)) return false; + pw_backuped = true; } } if(!nispasswd_filename.isEmpty() && (nispasswd_filename != passwd_filename)) { if (!pn_backuped) { - if (!backup(nispasswd_filename)) return FALSE; - pn_backuped = TRUE; + if (!backup(nispasswd_filename)) return false; + pn_backuped = true; } } @@ -484,18 +484,18 @@ bool KUserFiles::savepwd() #if defined(__FreeBSD__) || defined(__bsdi__) if (system(PWMKDB) != 0) { KMessageBox::error( 0, i18n("Unable to build password database.") ); - return FALSE; + return false; } #else if( (nis_users_written > 0) || (nispasswd_filename == passwd_filename) ) { if (system(PWMKDB) != 0) { KMessageBox::error( 0, i18n("Unable to build password databases.") ); - return FALSE; + return false; } } #endif - return TRUE; + return true; } #undef escstr @@ -515,16 +515,16 @@ bool KUserFiles::savesdw() TQString new_shadow_file = shadow_file+TQString::fromLatin1(KU_CREATE_EXT); if ( shadow_file.isEmpty() ) - return TRUE; + return true; if (!s_backuped) { - if (!backup(shadow_file)) return FALSE; - s_backuped = TRUE; + if (!backup(shadow_file)) return false; + s_backuped = true; } if ((f = fopen(TQFile::encodeName(new_shadow_file), "w")) == NULL) { KMessageBox::error( 0, i18n("Error opening %1 for writing.").arg(new_shadow_file) ); - return FALSE; + return false; } s.sp_namp = (char *)malloc(200); @@ -580,7 +580,7 @@ bool KUserFiles::savesdw() free(s.sp_namp); free(s.sp_pwdp); #endif // HAVE_SHADOW - return TRUE; + return true; } @@ -616,5 +616,5 @@ bool KUserFiles::dbcommit() mDel.clear(); mAdd.clear(); mMod.clear(); - return TRUE; + return true; } diff --git a/kuser/kusersystem.cpp b/kuser/kusersystem.cpp index 89a0c7d..40bd99d 100644 --- a/kuser/kusersystem.cpp +++ b/kuser/kusersystem.cpp @@ -36,7 +36,7 @@ KUserSystem::KUserSystem(KUserPrefsBase *cfg) : KU::KUsers( cfg ) { - mUsers.setAutoDelete(TRUE); + mUsers.setAutoDelete(true); caps = Cap_ReadOnly | Cap_Passwd; #ifdef HAVE_SHADOW @@ -56,12 +56,12 @@ KUserSystem::~KUserSystem() bool KUserSystem::reload() { if (!loadpwd()) - return FALSE; + return false; if (!loadsdw()) - return FALSE; + return false; - return TRUE; + return true; } // Load passwd file @@ -99,7 +99,7 @@ bool KUserSystem::loadpwd() } endpwent(); - return(TRUE); + return(true); } // Load shadow passwords |
