diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-01 22:09:14 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-07-08 08:53:47 +0900 |
| commit | c03a4800879ab62692e017e01c825ba12a421ad0 (patch) | |
| tree | 57aeff4300eb9fa64d193569f56b2d98305b49a2 /examples/dirview/dirview.cpp | |
| parent | 030b165ac197ce4c2eb62c7700dc4c10604637aa (diff) | |
| download | tqt-c03a4800879ab62692e017e01c825ba12a421ad0.tar.gz tqt-c03a4800879ab62692e017e01c825ba12a421ad0.zip | |
Replace TRUE/FALSE with boolean values true/false - part 2
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'examples/dirview/dirview.cpp')
| -rw-r--r-- | examples/dirview/dirview.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/examples/dirview/dirview.cpp b/examples/dirview/dirview.cpp index 1dc9483aa..c30a36b67 100644 --- a/examples/dirview/dirview.cpp +++ b/examples/dirview/dirview.cpp @@ -200,12 +200,12 @@ void Directory::setOpen( bool o ) TQString s( fullName() ); TQDir thisDir( s ); if ( !thisDir.isReadable() ) { - readable = FALSE; - setExpandable( FALSE ); + readable = false; + setExpandable( false ); return; } - listView()->setUpdatesEnabled( FALSE ); + listView()->setUpdatesEnabled( false ); const TQFileInfoList * files = thisDir.entryInfoList(); if ( files ) { TQFileInfoListIterator it( *files ); @@ -229,7 +229,7 @@ void Directory::setOpen( bool o ) } } } - listView()->setUpdatesEnabled( TRUE ); + listView()->setUpdatesEnabled( true ); } TQListViewItem::setOpen( o ); } @@ -237,7 +237,7 @@ void Directory::setOpen( bool o ) void Directory::setup() { - setExpandable( TRUE ); + setExpandable( true ); TQListViewItem::setup(); } @@ -274,7 +274,7 @@ TQString Directory::text( int column ) const DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo ) : TQListView( parent, name ), dirsOnly( sdo ), oldCurrent( 0 ), - dropItem( 0 ), mousePressed( FALSE ) + dropItem( 0 ), mousePressed( false ) { autoopen_timer = new TQTimer( this ); if ( !folderLocked ) { @@ -289,8 +289,8 @@ DirectoryView::DirectoryView( TQWidget *parent, const char *name, bool sdo ) connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ), this, TQ_SLOT( slotFolderSelected( TQListViewItem * ) ) ); - setAcceptDrops( TRUE ); - viewport()->setAcceptDrops( TRUE ); + setAcceptDrops( true ); + viewport()->setAcceptDrops( true ); connect( autoopen_timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( openFolder() ) ); @@ -309,7 +309,7 @@ void DirectoryView::openFolder() { autoopen_timer->stop(); if ( dropItem && !dropItem->isOpen() ) { - dropItem->setOpen( TRUE ); + dropItem->setOpen( true ); dropItem->repaint(); } } @@ -344,7 +344,7 @@ void DirectoryView::contentsDragMoveEvent( TQDragMoveEvent *e ) TQPoint vp = contentsToViewport( ( (TQDragMoveEvent*)e )->pos() ); TQListViewItem *i = itemAt( vp ); if ( i ) { - setSelected( i, TRUE ); + setSelected( i, true ); e->accept(); if ( i != dropItem ) { autoopen_timer->stop(); @@ -376,7 +376,7 @@ void DirectoryView::contentsDragLeaveEvent( TQDragLeaveEvent * ) dropItem = 0; setCurrentItem( oldCurrent ); - setSelected( oldCurrent, TRUE ); + setSelected( oldCurrent, true ); } void DirectoryView::contentsDropEvent( TQDropEvent *e ) @@ -461,7 +461,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e ) treeStepSize() * ( i->depth() + ( rootIsDecorated() ? 1 : 0) ) + itemMargin() || p.x() < header()->cellPos( header()->mapToActual( 0 ) ) ) { presspos = e->pos(); - mousePressed = TRUE; + mousePressed = true; } } } @@ -469,7 +469,7 @@ void DirectoryView::contentsMousePressEvent( TQMouseEvent* e ) void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e ) { if ( mousePressed && ( presspos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) { - mousePressed = FALSE; + mousePressed = false; TQListViewItem *item = itemAt( contentsToViewport(presspos) ); if ( item ) { TQString source = fullPath(item); @@ -486,7 +486,7 @@ void DirectoryView::contentsMouseMoveEvent( TQMouseEvent* e ) void DirectoryView::contentsMouseReleaseEvent( TQMouseEvent * ) { - mousePressed = FALSE; + mousePressed = false; } void DirectoryView::setDir( const TQString &s ) @@ -494,7 +494,7 @@ void DirectoryView::setDir( const TQString &s ) TQListViewItemIterator it( this ); ++it; for ( ; it.current(); ++it ) { - it.current()->setOpen( FALSE ); + it.current()->setOpen( false ); } TQStringList lst( TQStringList::split( "/", s ) ); @@ -503,7 +503,7 @@ void DirectoryView::setDir( const TQString &s ) for ( ; it2 != lst.end(); ++it2 ) { while ( item ) { if ( item->text( 0 ) == *it2 ) { - item->setOpen( TRUE ); + item->setOpen( true ); break; } item = item->itemBelow(); |
