summaryrefslogtreecommitdiffstats
path: root/src/dialogs/qfiledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dialogs/qfiledialog.cpp')
-rw-r--r--src/dialogs/qfiledialog.cpp606
1 files changed, 303 insertions, 303 deletions
diff --git a/src/dialogs/qfiledialog.cpp b/src/dialogs/qfiledialog.cpp
index 085401daa..fec0b31aa 100644
--- a/src/dialogs/qfiledialog.cpp
+++ b/src/dialogs/qfiledialog.cpp
@@ -474,10 +474,10 @@ static int lastWidth = 0;
static int lastHeight = 0;
static TQString * workingDirectory = 0;
-static bool bShowHiddenFiles = FALSE;
+static bool bShowHiddenFiles = false;
static int sortFilesBy = (int)TQDir::Name;
-static bool sortAscending = TRUE;
-static bool detailViewMode = FALSE;
+static bool sortAscending = true;
+static bool detailViewMode = false;
static TQCleanupHandler<TQPixmap> qfd_cleanup_pixmap;
static TQCleanupHandler<TQString> qfd_cleanup_string;
@@ -528,7 +528,7 @@ static PtrExtractIconEx ptrExtractIconEx = 0;
static void resolveLibs()
{
#ifndef Q_OS_TEMP
- static bool triedResolve = FALSE;
+ static bool triedResolve = false;
if ( !triedResolve ) {
#ifdef TQT_THREAD_SUPPORT
@@ -543,10 +543,10 @@ static void resolveLibs()
return;
}
#endif
- triedResolve = TRUE;
+ triedResolve = true;
if ( qt_winunicode ) {
TQLibrary lib("shell32");
- lib.setAutoUnload( FALSE );
+ lib.setAutoUnload( false );
ptrExtractIconEx = (PtrExtractIconEx) lib.resolve( "ExtractIconExW" );
}
}
@@ -619,9 +619,9 @@ static void makeVariables() {
TQBitmap m( fifteenTransparentPixels->width(), 1 );
m.fill( TQt::color0 );
fifteenTransparentPixels->setMask( m );
- bShowHiddenFiles = FALSE;
+ bShowHiddenFiles = false;
sortFilesBy = (int)TQDir::Name;
- detailViewMode = FALSE;
+ detailViewMode = false;
#if defined(TQ_WS_WIN)
if ( !fileIconProvider )
fileIconProvider = new TQWindowsIconProvider( tqApp );
@@ -641,7 +641,7 @@ class TQRenameEdit : public TQLineEdit
public:
TQRenameEdit( TQWidget *parent )
- : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(FALSE)
+ : TQLineEdit( parent, "qt_rename_edit" ), doRenameAlreadyEmitted(false)
{
connect( this, TQ_SIGNAL(returnPressed()), TQ_SLOT(slotReturnPressed()) );
}
@@ -672,7 +672,7 @@ private:
void clear();
void show();
- void startRename( bool check = TRUE );
+ void startRename( bool check = true );
void viewportMousePressEvent( TQMouseEvent *e );
void viewportMouseReleaseEvent( TQMouseEvent *e );
void viewportMouseDoubleClickEvent( TQMouseEvent *e );
@@ -721,8 +721,8 @@ public:
TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *d );
void clear();
- void startRename( bool check = TRUE );
- void setSorting( int column, bool increasing = TRUE );
+ void startRename( bool check = true );
+ void setSorting( int column, bool increasing = true );
TQRenameEdit *lined;
bool renaming;
@@ -807,7 +807,7 @@ TQFDProgressAnimation::TQFDProgressAnimation( TQWidget *parent )
void TQFDProgressAnimation::start()
{
- timer->start( 150, FALSE );
+ timer->start( 150, false );
}
void TQFDProgressAnimation::next()
@@ -871,7 +871,7 @@ private:
};
TQFDProgressDialog::TQFDProgressDialog( TQWidget *parent, const TQString &fn, int steps )
- : TQDialog( parent, "", TRUE )
+ : TQDialog( parent, "", true )
{
#ifndef TQT_NO_WIDGET_TOPEXTRA
setCaption( TQFileDialog::tr( "Copy or Move a File" ) );
@@ -963,15 +963,15 @@ public:
struct File: public TQListViewItem {
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListViewItem * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent )
- : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, dlgp->last ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); dlgp->last = this; }
File( TQFileDialogPrivate * dlgp,
const TQUrlInfo * fi, TQListView * parent, TQListViewItem * after )
- : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( FALSE )
+ : TQListViewItem( parent, after ), info( *fi ), d(dlgp), i( 0 ), hasMimePixmap( false )
{ setup(); if ( !nextSibling() ) dlgp->last = this; }
~File();
@@ -998,7 +998,7 @@ public:
class UrlInfoList : public TQPtrList<TQUrlInfo> {
public:
- UrlInfoList() { setAutoDelete( TRUE ); }
+ UrlInfoList() { setAutoDelete( true ); }
int compareItems( TQPtrCollection::Item n1, TQPtrCollection::Item n2 ) {
if ( !n1 || !n2 )
return 0;
@@ -1125,7 +1125,7 @@ public:
return ui.isValid();
}
}
- return TRUE;
+ return true;
}
#ifndef Q_NO_CURSOR
@@ -1163,12 +1163,12 @@ void TQRenameEdit::focusOutEvent( TQFocusEvent * )
if ( !doRenameAlreadyEmitted )
emit doRename();
else
- doRenameAlreadyEmitted = FALSE;
+ doRenameAlreadyEmitted = false;
}
void TQRenameEdit::slotReturnPressed()
{
- doRenameAlreadyEmitted = TRUE;
+ doRenameAlreadyEmitted = true;
emit doRename();
}
@@ -1180,8 +1180,8 @@ void TQRenameEdit::slotReturnPressed()
TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
: TQListBox( parent, "filelistbox" ), filedialog( dlg ),
- renaming( FALSE ), renameItem( 0 ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ renaming( false ), renameItem( 0 ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1201,7 +1201,7 @@ TQFileListBox::TQFileListBox( TQWidget *parent, TQFileDialog *dlg )
this, TQ_SLOT( changeDirDuringDrag() ) );
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
dragItem = 0;
}
@@ -1256,7 +1256,7 @@ void TQFileListBox::keyPressEvent( TQKeyEvent *e )
void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
@@ -1266,12 +1266,12 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListBox::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
int i = currentItem();
- bool wasSelected = FALSE;
+ bool wasSelected = false;
if ( i != -1 )
wasSelected = item( i )->isSelected();
TQListBox::mousePressEvent( e );
@@ -1282,24 +1282,24 @@ void TQFileListBox::viewportMousePressEvent( TQMouseEvent *e )
|| ( filedialog->mode() == TQFileDialog::Directory ) || ( filedialog->mode() == TQFileDialog::DirectoryOnly );
if ( itemAt( e->pos() ) != item( i ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() != -1 &&
wasSelected && TQUrlInfo( filedialog->d->url, "." ).isWritable() && item( currentItem() )->text() != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = item( i );
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileListBox::viewportMouseReleaseEvent( TQMouseEvent *e )
{
dragItem = 0;
TQListBox::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
}
void TQFileListBox::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1335,7 +1335,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
} else
#endif
@@ -1463,15 +1463,15 @@ bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
TQListBoxItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text() );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileListBox::setCurrentDropItem( const TQPoint &pnt )
@@ -1517,7 +1517,7 @@ void TQFileListBox::startRename( bool check )
return;
int i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( item( i ) );
int bdr = item( i )->pixmap() ?
item( i )->pixmap()->width() : 16;
@@ -1531,10 +1531,10 @@ void TQFileListBox::startRename( bool check )
lined->setFocus();
lined->setText( item( i )->text() );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileListBox::clear()
@@ -1559,7 +1559,7 @@ void TQFileListBox::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
updateItem( currentItem() );
if ( lined->hasFocus() )
viewport()->setFocus();
@@ -1580,9 +1580,9 @@ void TQFileListBox::contentsMoved( int, int )
************************************************************************/
TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFileDialog *dlg )
- : TQListView( parent, "qt_filedlg_listview" ), renaming( FALSE ), renameItem( 0 ),
- filedialog( dlg ), mousePressed( FALSE ),
- firstMousePressEvent( TRUE )
+ : TQListView( parent, "qt_filedlg_listview" ), renaming( false ), renameItem( 0 ),
+ filedialog( dlg ), mousePressed( false ),
+ firstMousePressEvent( true )
{
changeDirTimer = new TQTimer( this );
TQVBox *box = new TQVBox( viewport(), "qt_vbox" );
@@ -1596,7 +1596,7 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
this, TQ_SLOT (rename() ) );
connect( lined, TQ_SIGNAL( cancelRename() ),
this, TQ_SLOT( cancelRename() ) );
- header()->setMovingEnabled( FALSE );
+ header()->setMovingEnabled( false );
connect( renameTimer, TQ_SIGNAL( timeout() ),
this, TQ_SLOT( doubleClickTimeout() ) );
connect( changeDirTimer, TQ_SIGNAL( timeout() ),
@@ -1608,9 +1608,9 @@ TQFileDialogTQFileListView::TQFileDialogTQFileListView( TQWidget *parent, TQFile
connect( this, TQ_SIGNAL( contentsMoving(int,int) ),
this, TQ_SLOT( contentsMoved(int,int) ) );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
sortcolumn = 0;
- ascending = TRUE;
+ ascending = true;
dragItem = 0;
}
@@ -1644,7 +1644,7 @@ void TQFileDialogTQFileListView::setSorting( int column, bool increasing )
void TQFileDialogTQFileListView::changeSortColumn2( int column )
{
int lcol = header()->mapToLogical( column );
- setSorting( lcol, sortcolumn == lcol ? !ascending : TRUE );
+ setSorting( lcol, sortcolumn == lcol ? !ascending : true );
}
void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
@@ -1689,7 +1689,7 @@ void TQFileDialogTQFileListView::keyPressEvent( TQKeyEvent *e )
void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
{
pressPos = e->pos();
- mousePressed = FALSE;
+ mousePressed = false;
bool didRename = renaming;
cancelRename();
@@ -1698,7 +1698,7 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( e->button() != LeftButton ) {
TQListView::viewportMousePressEvent( e );
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
@@ -1712,17 +1712,17 @@ void TQFileDialogTQFileListView::viewportMousePressEvent( TQMouseEvent *e )
if ( itemAt( e->pos() ) != i ||
e->x() + contentsX() > columnWidth( 0 ) ) {
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
return;
}
if ( !firstMousePressEvent && !didRename && i == currentItem() && currentItem() &&
TQUrlInfo( filedialog->d->url, "." ).isWritable() && currentItem()->text( 0 ) != ".." ) {
- renameTimer->start( TQApplication::doubleClickInterval(), TRUE );
+ renameTimer->start( TQApplication::doubleClickInterval(), true );
renameItem = currentItem();
}
- firstMousePressEvent = FALSE;
+ firstMousePressEvent = false;
}
void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e )
@@ -1734,7 +1734,7 @@ void TQFileDialogTQFileListView::viewportMouseDoubleClickEvent( TQMouseEvent *e
void TQFileDialogTQFileListView::viewportMouseReleaseEvent( TQMouseEvent *e )
{
TQListView::viewportMouseReleaseEvent( e );
- mousePressed = FALSE;
+ mousePressed = false;
dragItem = 0;
}
@@ -1763,7 +1763,7 @@ void TQFileDialogTQFileListView::viewportMouseMoveEvent( TQMouseEvent *e )
this, TQ_SLOT( dragObjDestroyed() ) );
drag->drag();
- mousePressed = FALSE;
+ mousePressed = false;
}
}
#endif
@@ -1882,15 +1882,15 @@ bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *sourc
TQListViewItem *item = itemAt( pnt );
if ( !item || ( item && !itemRect( item ).contains( pnt ) ) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
- return FALSE;
- return TRUE;
+ return false;
+ return true;
}
TQUrlInfo fi( filedialog->d->url, item->text( 0 ) );
if ( fi.isDir() && itemRect( item ).contains( pnt ) )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt )
@@ -1940,7 +1940,7 @@ void TQFileDialogTQFileListView::startRename( bool check )
return;
TQListViewItem *i = currentItem();
- setSelected( i, TRUE );
+ setSelected( i, true );
TQRect r = itemRect( i );
int bdr = i->pixmap( 0 ) ?
@@ -1955,10 +1955,10 @@ void TQFileDialogTQFileListView::startRename( bool check )
lined->setFocus();
lined->setText( i->text( 0 ) );
lined->selectAll();
- lined->setFrame( FALSE );
+ lined->setFrame( false );
lined->parentWidget()->show();
viewport()->setFocusProxy( lined );
- renaming = TRUE;
+ renaming = true;
}
void TQFileDialogTQFileListView::clear()
@@ -1983,7 +1983,7 @@ void TQFileDialogTQFileListView::cancelRename()
renameItem = 0;
lined->parentWidget()->hide();
viewport()->setFocusProxy( this );
- renaming = FALSE;
+ renaming = false;
if ( currentItem() )
currentItem()->repaint();
if ( lined->hasFocus() )
@@ -2210,7 +2210,7 @@ static TQStringList makeFiltersList( const TQString &filter )
the TQFileDialog.
\code
- TQFileDialog* fd = new TQFileDialog( this, "file dialog", TRUE );
+ TQFileDialog* fd = new TQFileDialog( this, "file dialog", true );
fd->setMode( TQFileDialog::AnyFile );
\endcode
@@ -2309,14 +2309,14 @@ static TQStringList makeFiltersList( const TQString &filter )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
\endcode
The first line creates an instance of our preview widget. We then
- create our file dialog and call setContentsPreviewEnabled( TRUE ),
+ create our file dialog and call setContentsPreviewEnabled( true ),
this tell the file dialog to preview the contents of the currently
selected file. We then call setContentsPreview() -- note that we pass
the same preview widget twice. Finally, before showing the file
@@ -2394,7 +2394,7 @@ extern const char qt_file_dialog_filter_reg_exp[] =
/*!
Constructs a file dialog called \a name, with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
*/
@@ -2406,7 +2406,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
init();
d->mode = ExistingFile;
d->types->insertItem( tr( "All Files (*)" ) );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
emit dirEntered( d->url.dirPath() );
rereadDir();
}
@@ -2414,7 +2414,7 @@ TQFileDialog::TQFileDialog( TQWidget *parent, const char *name, bool modal )
/*!
Constructs a file dialog called \a name with the parent, \a parent.
- If \a modal is TRUE then the file dialog is modal; otherwise it is
+ If \a modal is true then the file dialog is modal; otherwise it is
modeless.
If \a dirName is specified then it will be used as the dialog's
@@ -2442,7 +2442,7 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter,
if ( !filter.isEmpty() ) {
setFilters( filter );
if ( !dirName.isEmpty() ) {
- int dotpos = dirName.find( TQChar('.'), 0, FALSE );
+ int dotpos = dirName.find( TQChar('.'), 0, false );
if ( dotpos != -1 ) {
for ( int b=0 ; b<d->types->count() ; b++ ) {
if ( d->types->text(b).contains( dirName.right( dirName.length() - dotpos ) ) ) {
@@ -2470,23 +2470,23 @@ extern int qt_ntfs_permission_lookup;
void TQFileDialog::init()
{
- setSizeGripEnabled( TRUE );
+ setSizeGripEnabled( true );
d = new TQFileDialogPrivate();
d->mode = AnyFile;
d->last = 0;
d->lastEFSelected = 0;
d->moreFiles = 0;
- d->infoPreview = FALSE;
- d->contentsPreview = FALSE;
- d->hadDotDot = FALSE;
- d->ignoreNextKeyPress = FALSE;
+ d->infoPreview = false;
+ d->contentsPreview = false;
+ d->hadDotDot = false;
+ d->ignoreNextKeyPress = false;
d->progressDia = 0;
- d->checkForFilter = FALSE;
- d->ignoreNextRefresh = FALSE;
- d->ignoreStop = FALSE;
- d->pendingItems.setAutoDelete( FALSE );
+ d->checkForFilter = false;
+ d->ignoreNextRefresh = false;
+ d->ignoreStop = false;
+ d->pendingItems.setAutoDelete( false );
d->mimeTypeTimer = new TQTimer( this );
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
#if defined(TQ_WS_WIN)
d->oldPermissionLookup = qt_ntfs_permission_lookup;
#endif
@@ -2532,7 +2532,7 @@ void TQFileDialog::init()
files->addColumn( tr("Type") );
files->addColumn( tr("Date") );
files->addColumn( tr("Attributes") );
- files->header()->setStretchEnabled( TRUE, 0 );
+ files->header()->setStretchEnabled( true, 0 );
files->setMinimumSize( 50, 25 + 2*fm.lineSpacing() );
@@ -2552,7 +2552,7 @@ void TQFileDialog::init()
d->moreFiles = new TQFileListBox( d->stack, this );
d->moreFiles->setRowMode( TQListBox::FitToHeight );
- d->moreFiles->setVariableWidth( TRUE );
+ d->moreFiles->setVariableWidth( true );
connect( d->moreFiles, TQ_SIGNAL(selected(TQListBoxItem*)),
this, TQ_SLOT(selectDirectoryOrFile(TQListBoxItem*)) );
@@ -2567,14 +2567,14 @@ void TQFileDialog::init()
d->moreFiles->viewport()->installEventFilter( this );
okB = new TQPushButton( tr("&OK"), this, "OK" ); //### Or "Save (see other "OK")
- okB->setDefault( TRUE );
- okB->setEnabled( FALSE );
+ okB->setDefault( true );
+ okB->setEnabled( false );
connect( okB, TQ_SIGNAL(clicked()), this, TQ_SLOT(okClicked()) );
cancelB = new TQPushButton( tr("Cancel") , this, "Cancel" );
connect( cancelB, TQ_SIGNAL(clicked()), this, TQ_SLOT(cancelClicked()) );
- d->paths = new TQComboBox( TRUE, this, "directory history/editor" );
- d->paths->setDuplicatesEnabled( FALSE );
+ d->paths = new TQComboBox( true, this, "directory history/editor" );
+ d->paths->setDuplicatesEnabled( false );
d->paths->setInsertionPolicy( TQComboBox::NoInsertion );
const TQFileInfoList * rootDrives = TQDir::drives();
TQFileInfoListIterator it( *rootDrives );
@@ -2600,10 +2600,10 @@ void TQFileDialog::init()
( (TQLineEdit*)ol->first() )->installEventFilter( this );
delete ol;
- d->geometryDirty = TRUE;
- d->types = new TQComboBox( TRUE, this, "file types" );
- d->types->setDuplicatesEnabled( FALSE );
- d->types->setEditable( FALSE );
+ d->geometryDirty = true;
+ d->types = new TQComboBox( true, this, "file types" );
+ d->types->setDuplicatesEnabled( false );
+ d->types->setEditable( false );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
this, TQ_SLOT(setFilter(const TQString&)) );
connect( d->types, TQ_SIGNAL(activated(const TQString&)),
@@ -2614,7 +2614,7 @@ void TQFileDialog::init()
d->typeL = new TQLabel( d->types, tr("File &type:"), this, "qt_filetype_lbl" );
d->goBack = new TQToolButton( this, "go back" );
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
d->goBack->setFocusPolicy( TabFocus );
connect( d->goBack, TQ_SIGNAL( clicked() ), this, TQ_SLOT( goBack() ) );
#ifndef TQT_NO_TOOLTIP
@@ -2643,7 +2643,7 @@ void TQFileDialog::init()
d->modeButtons = new TQButtonGroup( 0, "invisible group" );
connect( d->modeButtons, TQ_SIGNAL(destroyed()),
this, TQ_SLOT(modeButtonsDestroyed()) );
- d->modeButtons->setExclusive( TRUE );
+ d->modeButtons->setExclusive( true );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
d->stack, TQ_SLOT(raiseWidget(int)) );
connect( d->modeButtons, TQ_SIGNAL(clicked(int)),
@@ -2655,7 +2655,7 @@ void TQFileDialog::init()
TQToolTip::add( d->mcView, tr( "List View" ) );
#endif
d->mcView->setIconSet( *multiColumnListViewIcon );
- d->mcView->setToggleButton( TRUE );
+ d->mcView->setToggleButton( true );
d->stack->addWidget( d->moreFiles, d->modeButtons->insert( d->mcView ) );
d->detailView = new TQToolButton( this, "list view" );
d->detailView->setFocusPolicy( TabFocus );
@@ -2663,7 +2663,7 @@ void TQFileDialog::init()
TQToolTip::add( d->detailView, tr( "Detail View" ) );
#endif
d->detailView->setIconSet( *detailViewIcon );
- d->detailView->setToggleButton( TRUE );
+ d->detailView->setToggleButton( true );
d->stack->addWidget( files, d->modeButtons->insert( d->detailView ) );
d->previewInfo = new TQToolButton( this, "preview info view" );
@@ -2672,7 +2672,7 @@ void TQFileDialog::init()
TQToolTip::add( d->previewInfo, tr( "Preview File Info" ) );
#endif
d->previewInfo->setIconSet( *previewInfoViewIcon );
- d->previewInfo->setToggleButton( TRUE );
+ d->previewInfo->setToggleButton( true );
d->modeButtons->insert( d->previewInfo );
d->previewContents = new TQToolButton( this, "preview info view" );
@@ -2682,20 +2682,20 @@ void TQFileDialog::init()
if ( !qstrcmp(style().className(), "TQWindowsStyle") )
#endif
{
- d->goBack->setAutoRaise( TRUE );
- d->cdToParent->setAutoRaise( TRUE );
- d->newFolder->setAutoRaise( TRUE );
- d->mcView->setAutoRaise( TRUE );
- d->detailView->setAutoRaise( TRUE );
- d->previewInfo->setAutoRaise( TRUE );
- d->previewContents->setAutoRaise( TRUE );
+ d->goBack->setAutoRaise( true );
+ d->cdToParent->setAutoRaise( true );
+ d->newFolder->setAutoRaise( true );
+ d->mcView->setAutoRaise( true );
+ d->detailView->setAutoRaise( true );
+ d->previewInfo->setAutoRaise( true );
+ d->previewContents->setAutoRaise( true );
}
d->previewContents->setFocusPolicy( TabFocus );
#ifndef TQT_NO_TOOLTIP
TQToolTip::add( d->previewContents, tr( "Preview File Contents" ) );
#endif
d->previewContents->setIconSet( *previewContentsViewIcon );
- d->previewContents->setToggleButton( TRUE );
+ d->previewContents->setToggleButton( true );
d->modeButtons->insert( d->previewContents );
connect( d->detailView, TQ_SIGNAL( clicked() ),
@@ -2708,18 +2708,18 @@ void TQFileDialog::init()
files, TQ_SLOT( cancelRename() ) );
d->stack->raiseWidget( d->moreFiles );
- d->mcView->setOn( TRUE );
+ d->mcView->setOn( true );
TQHBoxLayout *lay = new TQHBoxLayout( this );
lay->setMargin( 6 );
d->leftLayout = new TQHBoxLayout( lay, 5 );
d->topLevelLayout = new TQVBoxLayout( (TQWidget*)0, 5 );
lay->addLayout( d->topLevelLayout, 1 );
- d->extraWidgetsLayouts.setAutoDelete( FALSE );
- d->extraLabels.setAutoDelete( FALSE );
- d->extraWidgets.setAutoDelete( FALSE );
- d->extraButtons.setAutoDelete( FALSE );
- d->toolButtons.setAutoDelete( FALSE );
+ d->extraWidgetsLayouts.setAutoDelete( false );
+ d->extraLabels.setAutoDelete( false );
+ d->extraWidgets.setAutoDelete( false );
+ d->extraButtons.setAutoDelete( false );
+ d->toolButtons.setAutoDelete( false );
TQHBoxLayout * h;
@@ -2822,8 +2822,8 @@ void TQFileDialog::init()
if ( detailViewMode ) {
d->stack->raiseWidget( files );
- d->mcView->setOn( FALSE );
- d->detailView->setOn( TRUE );
+ d->mcView->setOn( false );
+ d->detailView->setOn( true );
}
d->preview->hide();
@@ -2858,9 +2858,9 @@ void TQFileDialog::fileNameEditReturnPressed()
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url,
TQFileDialogPrivate::encodeFileName(nameEdit->text() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
}
}
nameEdit->setText( TQString::null );
@@ -2920,12 +2920,12 @@ TQFileDialog::~TQFileDialog()
{
// since clear might call setContentsPos which would emit
// a signal and thus cause a recompute of sizes...
- files->blockSignals( TRUE );
- d->moreFiles->blockSignals( TRUE );
+ files->blockSignals( true );
+ d->moreFiles->blockSignals( true );
files->clear();
d->moreFiles->clear();
- d->moreFiles->blockSignals( FALSE );
- files->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
+ files->blockSignals( false );
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride )
@@ -3010,7 +3010,7 @@ void TQFileDialog::setSelectedFilter( const TQString& mask )
int n;
for ( n = 0; n < d->types->count(); n++ ) {
- if ( d->types->text( n ).contains( mask, FALSE ) ) {
+ if ( d->types->text( n ).contains( mask, false ) ) {
d->types->setCurrentItem( n );
TQString f = mask;
TQRegExp r( TQString::fromLatin1(qt_file_dialog_filter_reg_exp) );
@@ -3105,7 +3105,7 @@ void TQFileDialog::setSelection( const TQString & filename )
else
d->url = TQUrlOperator( filename );
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
bool isDirOk;
bool isDir = d->url.isDir( &isDirOk );
if ( !isDirOk )
@@ -3113,8 +3113,8 @@ void TQFileDialog::setSelection( const TQString & filename )
if ( !isDir ) {
TQUrlOperator u( d->url );
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, TRUE );
- d->ignoreNextRefresh = TRUE;
+ trySetSelection( false, u, true );
+ d->ignoreNextRefresh = true;
nameEdit->selectAll();
rereadDir();
emit dirEntered( d->url.dirPath() );
@@ -3125,12 +3125,12 @@ void TQFileDialog::setSelection( const TQString & filename )
p += "/";
d->url.setPath( p );
}
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
nameEdit->setText( TQString::fromLatin1("") );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3274,9 +3274,9 @@ void TQFileDialog::setDir( const TQDir &dir )
d->url = dir.canonicalPath();
d->url.setNameFilter( nf );
TQUrlInfo i( d->url, nameEdit->text() );
- d->checkForFilter = TRUE;
- trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), FALSE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( i.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(nameEdit->text() ) ), false );
+ d->checkForFilter = false;
rereadDir();
emit dirEntered( d->url.path() );
}
@@ -3292,7 +3292,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
d->oldUrl = d->url;
TQString nf = d->url.nameFilter();
- TQString operatorPath = url.toString( FALSE, FALSE );
+ TQString operatorPath = url.toString( false, false );
if ( TQUrl::isRelativeUrl( operatorPath ) ) {
d->url = TQUrl( d->url, operatorPath );
} else {
@@ -3300,21 +3300,21 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
}
d->url.setNameFilter( nf );
- d->checkForFilter = TRUE;
+ d->checkForFilter = true;
if ( !d->url.isDir() ) {
TQUrlOperator u = d->url;
d->url.setPath( d->url.dirPath() );
- trySetSelection( FALSE, u, FALSE );
+ trySetSelection( false, u, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
TQString fn = u.fileName();
nameEdit->setText( fn );
} else {
- trySetSelection( TRUE, d->url, FALSE );
+ trySetSelection( true, d->url, false );
rereadDir();
emit dirEntered( d->url.dirPath() );
}
- d->checkForFilter = FALSE;
+ d->checkForFilter = false;
}
/*!
@@ -3322,7 +3322,7 @@ void TQFileDialog::setUrl( const TQUrlOperator &url )
\brief whether hidden files are shown in the file dialog
- The default is FALSE, i.e. don't show hidden files.
+ The default is false, i.e. don't show hidden files.
*/
void TQFileDialog::setShowHiddenFiles( bool s )
@@ -3354,7 +3354,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
d->pendingItems.clear();
@@ -3364,7 +3364,7 @@ void TQFileDialog::rereadDir()
#ifndef TQT_NO_CURSOR
if ( d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
}
@@ -3413,7 +3413,7 @@ void TQFileDialog::rereadDir()
*/
extern bool tqt_resolve_symlinks; // defined in qapplication.cpp
-bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
+bool TQ_EXPORT tqt_use_native_dialogs = true;
/*!
This is a convenience static function that returns an existing file
@@ -3452,7 +3452,7 @@ bool TQ_EXPORT tqt_use_native_dialogs = TRUE;
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileNames(), getSaveFileName(), getExistingDirectory()
@@ -3514,10 +3514,10 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames(filter,
startWith.isEmpty() ? 0 : workingDirectory,
- parent, name, caption, selectedFilter, FALSE).first());
+ parent, name, caption, selectedFilter, false).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3583,7 +3583,7 @@ TQString TQFileDialog::getOpenFileName( const TQString & startWith,
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
\sa getOpenFileName(), getOpenFileNames(), getExistingDirectory()
@@ -3642,7 +3642,7 @@ TQString TQFileDialog::getSaveFileName( const TQString & startWith,
caption, selectedFilter));
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gsfn", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -3690,9 +3690,9 @@ void TQFileDialog::okClicked()
if ( fn.contains("*") ) {
addFilter( fn );
- nameEdit->blockSignals( TRUE );
+ nameEdit->blockSignals( true );
nameEdit->setText( TQString::fromLatin1("") );
- nameEdit->blockSignals( FALSE );
+ nameEdit->blockSignals( false );
return;
}
@@ -3721,7 +3721,7 @@ void TQFileDialog::okClicked()
if ( mode() == ExistingFiles ) {
if ( ! nameEdit->text().isEmpty() ) {
TQStringList sf = selectedFiles();
- bool isdir = FALSE;
+ bool isdir = false;
if ( sf.count() == 1 ) {
TQUrlOperator u( d->url, sf[0] );
bool ok;
@@ -3772,9 +3772,9 @@ void TQFileDialog::okClicked()
}
if ( f.isDir() ) {
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName(f.name() + "/" ) ) );
- d->checkForFilter = TRUE;
- trySetSelection( TRUE, d->url, TRUE );
- d->checkForFilter = FALSE;
+ d->checkForFilter = true;
+ trySetSelection( true, d->url, true );
+ d->checkForFilter = false;
} else {
if ( !nameEdit->text().contains( "/" ) &&
!nameEdit->text().contains( "\\" )
@@ -3837,7 +3837,7 @@ void TQFileDialog::resizeEvent( TQResizeEvent * e )
bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool updatelined )
{
if ( !isDir && !u.path().isEmpty() && u.path().right( 1 ) == "/" )
- isDir = TRUE;
+ isDir = true;
if ( u.fileName().contains( "*") && d->checkForFilter ) {
TQString fn( u.fileName() );
if ( fn.contains( "*" ) ) {
@@ -3845,7 +3845,7 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
d->currentFileName = TQString::null;
d->url.setFileName( TQString::null );
nameEdit->setText( TQString::fromLatin1("") );
- return FALSE;
+ return false;
}
}
@@ -3880,9 +3880,9 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
}
if ( !d->currentFileName.isNull() || isDir ) {
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
} else if ( !isDirectoryMode( d->mode ) ) {
- okB->setEnabled( FALSE );
+ okB->setEnabled( false );
}
if ( d->currentFileName.length() && old != d->currentFileName )
@@ -3900,7 +3900,7 @@ void TQFileDialog::updateGeometries()
if ( !d || !d->geometryDirty )
return;
- d->geometryDirty = FALSE;
+ d->geometryDirty = false;
TQSize r, t;
@@ -3997,19 +3997,19 @@ void TQFileDialog::updateFileNameEdit( TQListViewItem * newItem )
if ( mode() == ExistingFiles ) {
detailViewSelectionChanged();
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
- TQFileInfo fi( u.toString( FALSE, FALSE ) );
+ TQFileInfo fi( u.toString( false, false ) );
if ( !fi.isDir() )
- emit fileHighlighted( u.toString( FALSE, FALSE ) );
+ emit fileHighlighted( u.toString( false, false ) );
} else if ( files->isSelected( newItem ) ) {
TQFileDialogPrivate::File * i = (TQFileDialogPrivate::File *)newItem;
if ( i && i->i && !i->i->isSelected() ) {
- d->moreFiles->blockSignals( TRUE );
- d->moreFiles->setSelected( i->i, TRUE );
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( true );
+ d->moreFiles->setSelected( i->i, true );
+ d->moreFiles->blockSignals( false );
}
// Encode the filename in case it had any special characters in it
TQString encFile = TQFileDialogPrivate::encodeFileName( newItem->text( 0 ) );
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), TRUE );
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, encFile ), true );
}
}
@@ -4021,7 +4021,7 @@ void TQFileDialog::detailViewSelectionChanged()
nameEdit->clear();
TQString str;
TQListViewItem * i = files->firstChild();
- d->moreFiles->blockSignals( TRUE );
+ d->moreFiles->blockSignals( true );
while( i ) {
if ( d->moreFiles && isVisible() ) {
TQFileDialogPrivate::File *f = (TQFileDialogPrivate::File *)i;
@@ -4032,10 +4032,10 @@ void TQFileDialog::detailViewSelectionChanged()
str += TQString( "\"%1\" " ).arg( i->text( 0 ) );
i = i->nextSibling();
}
- d->moreFiles->blockSignals( FALSE );
+ d->moreFiles->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && files->currentItem() ) {
TQUrl u = TQUrl( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)files->currentItem())->info.name() ) );
updatePreviews( u );
@@ -4048,7 +4048,7 @@ void TQFileDialog::listBoxSelectionChanged()
return;
if ( d->ignoreNextRefresh ) {
- d->ignoreNextRefresh = FALSE;
+ d->ignoreNextRefresh = false;
return;
}
@@ -4057,7 +4057,7 @@ void TQFileDialog::listBoxSelectionChanged()
TQListBoxItem * i = d->moreFiles->item( 0 );
TQListBoxItem * j = 0;
int index = 0;
- files->blockSignals( TRUE );
+ files->blockSignals( true );
while( i ) {
TQFileDialogPrivate::MCItem *mcitem = (TQFileDialogPrivate::MCItem *)i;
if ( files && isVisible() ) {
@@ -4075,7 +4075,7 @@ void TQFileDialog::listBoxSelectionChanged()
if ( mcitem->isSelected() && i != d->lastEFSelected ) {
TQUrl u( d->url, TQFileDialogPrivate::encodeFileName( ((TQFileDialogPrivate::File*)(mcitem)->i)->info.name()) );
d->lastEFSelected = i;
- emit fileHighlighted( u.toString(FALSE, FALSE) );
+ emit fileHighlighted( u.toString(false, false) );
}
}
}
@@ -4088,10 +4088,10 @@ void TQFileDialog::listBoxSelectionChanged()
i = d->moreFiles->item( ++index );
}
- files->blockSignals( FALSE );
+ files->blockSignals( false );
nameEdit->setText( str );
nameEdit->setCursorPosition( str.length() );
- okB->setEnabled( TRUE );
+ okB->setEnabled( true );
if ( d->preview && d->preview->isVisible() && j ) {
TQUrl u = TQUrl( d->url,
TQFileDialogPrivate::encodeFileName( ( (TQFileDialogPrivate::File*)( (TQFileDialogPrivate::MCItem*)j )->i )->info.name() ) );
@@ -4120,7 +4120,7 @@ void TQFileDialog::fileNameEditDone()
TQUrlInfo f( d->url, nameEdit->text() );
if ( mode() != TQFileDialog::ExistingFiles ) {
TQUrlOperator u( d->url, TQFileDialogPrivate::encodeFileName( nameEdit->text() ) );
- trySetSelection( f.isDir(), u, FALSE );
+ trySetSelection( f.isDir(), u, false );
if ( d->preview && d->preview->isVisible() )
updatePreviews( u );
}
@@ -4159,10 +4159,10 @@ void TQFileDialog::selectDirectoryOrFile( TQListViewItem * newItem )
setUrl( TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) + "/" ) );
if ( isDirectoryMode( mode() ) ) {
TQUrlInfo f ( d->url, TQString::fromLatin1( "." ) );
- trySetSelection( f.isDir(), d->url, TRUE );
+ trySetSelection( f.isDir(), d->url, true );
}
} else if ( newItem->isSelectable() &&
- trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), TRUE ) ) {
+ trySetSelection( i->info.isDir(), TQUrlOperator( d->url, TQFileDialogPrivate::encodeFileName( i->info.name() ) ), true ) ) {
if ( !isDirectoryMode( mode() ) ) {
if ( mode() == ExistingFile ) {
if ( TQFileDialogPrivate::fileExists( d->url, nameEdit->text() ) ) {
@@ -4201,16 +4201,16 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
{
if ( item ) {
files->setCurrentItem( item );
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
}
PopupAction action;
- popupContextMenu( item ? item->text( 0 ) : TQString::null, TRUE, action, p );
+ popupContextMenu( item ? item->text( 0 ) : TQString::null, true, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- files->startRename( FALSE );
+ files->startRename( false );
else if ( action == PA_Delete )
deleteFile( item ? item->text( 0 ) : TQString::null );
else if ( action == PA_Reload )
@@ -4220,19 +4220,19 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
@@ -4241,12 +4241,12 @@ void TQFileDialog::popupContextMenu( TQListViewItem *item, const TQPoint &p,
void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
{
PopupAction action;
- popupContextMenu( item ? item->text() : TQString::null, FALSE, action, p );
+ popupContextMenu( item ? item->text() : TQString::null, false, action, p );
if ( action == PA_Open )
selectDirectoryOrFile( item );
else if ( action == PA_Rename )
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
else if ( action == PA_Delete )
deleteFile( item->text() );
else if ( action == PA_Reload )
@@ -4256,19 +4256,19 @@ void TQFileDialog::popupContextMenu( TQListBoxItem *item, const TQPoint & p )
rereadDir();
} else if ( action == PA_SortName ) {
sortFilesBy = (int)TQDir::Name;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortSize ) {
sortFilesBy = (int)TQDir::Size;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortDate ) {
sortFilesBy = (int)TQDir::Time;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
} else if ( action == PA_SortUnsorted ) {
sortFilesBy = (int)TQDir::Unsorted;
- sortAscending = TRUE;
+ sortAscending = true;
resortDir();
}
}
@@ -4281,7 +4281,7 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
bool glob = filename.isEmpty();
TQPopupMenu m( 0, "file dialog context menu" );
- m.setCheckable( TRUE );
+ m.setCheckable( true );
if ( !glob ) {
TQString okt;
@@ -4302,9 +4302,9 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isWritable() ||
filename == ".." ) {
if ( filename.isEmpty() || !TQUrlInfo( d->url, filename ).isReadable() )
- m.setItemEnabled( ok, FALSE );
- m.setItemEnabled( rename, FALSE );
- m.setItemEnabled( del, FALSE );
+ m.setItemEnabled( ok, false );
+ m.setItemEnabled( rename, false );
+ m.setItemEnabled( del, false );
}
m.move( p );
@@ -4328,18 +4328,18 @@ void TQFileDialog::popupContextMenu( const TQString &filename, bool,
m2.insertSeparator();
int sunsorted = m2.insertItem( tr( "&Unsorted" ) );
- //m2.setItemEnabled( stype, FALSE );
+ //m2.setItemEnabled( stype, false );
if ( sortFilesBy == (int)TQDir::Name )
- m2.setItemChecked( sname, TRUE );
+ m2.setItemChecked( sname, true );
else if ( sortFilesBy == (int)TQDir::Size )
- m2.setItemChecked( ssize, TRUE );
+ m2.setItemChecked( ssize, true );
// else if ( sortFilesBy == 0x16 )
-// m2.setItemChecked( stype, TRUE );
+// m2.setItemChecked( stype, true );
else if ( sortFilesBy == (int)TQDir::Time )
- m2.setItemChecked( sdate, TRUE );
+ m2.setItemChecked( sdate, true );
else if ( sortFilesBy == (int)TQDir::Unsorted )
- m2.setItemChecked( sunsorted, TRUE );
+ m2.setItemChecked( sunsorted, true );
m.insertItem( tr( "Sort" ), &m2 );
@@ -4443,7 +4443,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
for ( uint i = 0; i < d->moreFiles->count(); ++i ) {
if ( d->moreFiles->text( i ) == info.name() ) {
d->moreFiles->setCurrentItem( i );
- d->moreFiles->startRename( FALSE );
+ d->moreFiles->startRename( false );
break;
}
}
@@ -4451,9 +4451,9 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
TQListViewItem *item = files->firstChild();
while ( item ) {
if ( item->text( 0 ) == info.name() ) {
- files->setSelected( item, TRUE );
+ files->setSelected( item, true );
files->setCurrentItem( item );
- files->startRename( FALSE );
+ files->startRename( false );
break;
}
item = item->nextSibling();
@@ -4472,7 +4472,7 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
this,
"get existing directory",
"Choose a directory",
- TRUE );
+ true );
\endcode
This function creates a modal file dialog called \a name, with
@@ -4486,13 +4486,13 @@ void TQFileDialog::createdDirectory( const TQUrlInfo &info, TQNetworkOperation *
Note on Windows that if \a dir is TQString::null then the dialog's working
directory will be set to the user's My Documents directory.
- If \a dirOnly is TRUE, then only directories will be shown in
+ If \a dirOnly is true, then only directories will be shown in
the file dialog; otherwise both directories and files will be shown.
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Under Windows and Mac OS X, this static function will use the native
@@ -4551,10 +4551,10 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
if( tqt_use_native_dialogs && (tqApp->style().inherits(TQMAC_DEFAULT_STYLE)
|| tqApp->style().inherits("TQMacStyle")))
return qt_mac_precomposeFileName(macGetOpenFileNames("", initialDir, parent, name,
- caption, 0, FALSE, TRUE).first());
+ caption, 0, false, true).first());
#endif
- TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( parent, name ? name : "qt_filedlg_ged", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -4568,7 +4568,7 @@ TQString TQFileDialog::getExistingDirectory( const TQString & dir,
dlg->d->types->clear();
dlg->d->types->insertItem( TQFileDialog::tr("Directories") );
- dlg->d->types->setEnabled( FALSE );
+ dlg->d->types->setEnabled( false );
TQString dir_( dir );
dir_ = dir_.simplifyWhiteSpace();
@@ -4642,32 +4642,32 @@ void TQFileDialog::setMode( Mode newMode )
d->moreFiles->setSelectionMode( TQListBox::Single );
if ( sel.isNull() )
sel = TQString::fromLatin1(".");
- d->types->setEnabled( FALSE );
+ d->types->setEnabled( false );
} else if ( newMode == ExistingFiles ) {
maxnamelen = INT_MAX;
files->setSelectionMode( TQListView::Extended );
d->moreFiles->setSelectionMode( TQListBox::Extended );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
} else {
files->setSelectionMode( TQListView::Single );
d->moreFiles->setSelectionMode( TQListBox::Single );
- d->types->setEnabled( TRUE );
+ d->types->setEnabled( true );
}
nameEdit->setMaxLength(maxnamelen);
rereadDir();
TQUrlInfo f( d->url, "." );
- trySetSelection( f.isDir(), d->url, FALSE );
+ trySetSelection( f.isDir(), d->url, false );
}
TQString okt;
- bool changeFilters = FALSE;
+ bool changeFilters = false;
if ( mode() == AnyFile ) {
okt = tr("&Save");
d->fileL->setText( tr("File &name:") );
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4683,7 +4683,7 @@ void TQFileDialog::setMode( Mode newMode )
if ( d->types->count() == 1 ) {
d->types->setCurrentItem( 0 );
if ( d->types->currentText() == "Directories" ) {
- changeFilters = TRUE;
+ changeFilters = true;
}
}
}
@@ -4749,15 +4749,15 @@ TQFileDialog::ViewMode TQFileDialog::viewMode() const
void TQFileDialog::setViewMode( ViewMode m )
{
if ( m == Detail ) {
- detailViewMode = TRUE;
+ detailViewMode = true;
d->stack->raiseWidget( files );
- d->detailView->setOn( TRUE );
- d->mcView->setOn( FALSE );
+ d->detailView->setOn( true );
+ d->mcView->setOn( false );
} else if ( m == List ) {
- detailViewMode = FALSE;
+ detailViewMode = false;
d->stack->raiseWidget( d->moreFiles );
- d->detailView->setOn( FALSE );
- d->mcView->setOn( TRUE );
+ d->detailView->setOn( false );
+ d->mcView->setOn( true );
}
}
@@ -4779,15 +4779,15 @@ void TQFileDialog::setViewMode( ViewMode m )
void TQFileDialog::setPreviewMode( PreviewMode m )
{
if ( m == NoPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( false );
} else if ( m == Info && d->infoPreview ) {
- d->previewInfo->setOn( TRUE );
- d->previewContents->setOn( FALSE );
+ d->previewInfo->setOn( true );
+ d->previewContents->setOn( false );
changeMode( d->modeButtons->id( d->previewInfo ) );
} else if ( m == Contents && d->contentsPreview ) {
- d->previewInfo->setOn( FALSE );
- d->previewContents->setOn( TRUE );
+ d->previewInfo->setOn( false );
+ d->previewContents->setOn( true );
changeMode( d->modeButtons->id( d->previewContents ) );
}
}
@@ -4834,7 +4834,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
if ( !l && !w && !b )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
TQHBoxLayout *lay = new TQHBoxLayout();
d->extraWidgetsLayouts.append( lay );
@@ -4866,7 +4866,7 @@ void TQFileDialog::addWidgets( TQLabel * l, TQWidget * w, TQPushButton * b )
/*!
Adds the tool button \a b to the row of tool buttons at the top of the
file dialog. The button is appended to the right of
- this row. If \a separator is TRUE, a small space is inserted between the
+ this row. If \a separator is true, a small space is inserted between the
last button of the row and the new button \a b.
\sa addWidgets(), addLeftWidget(), addRightWidget()
@@ -4877,7 +4877,7 @@ void TQFileDialog::addToolButton( TQButton *b, bool separator )
if ( !b || !d->buttonLayout )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->toolButtons.append( b );
if ( separator )
@@ -4897,7 +4897,7 @@ void TQFileDialog::addLeftWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->leftLayout->addWidget( w );
d->leftLayout->addSpacing( 5 );
@@ -4915,7 +4915,7 @@ void TQFileDialog::addRightWidget( TQWidget *w )
{
if ( !w )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->rightLayout->addSpacing( 5 );
d->rightLayout->addWidget( w );
@@ -4956,7 +4956,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
while ( i && nameEdit->text() != i->text( 0 ) )
i = i->nextSibling();
if ( i )
- files->setSelected( i, TRUE );
+ files->setSelected( i, true );
else
ke->accept(); // strangely, means to ignore that event
}
@@ -4968,7 +4968,7 @@ void TQFileDialog::keyPressEvent( TQKeyEvent * ke )
ke->ignore();
}
- d->ignoreNextKeyPress = FALSE;
+ d->ignoreNextKeyPress = false;
if ( !ke->isAccepted() ) {
TQDialog::keyPressEvent( ke );
@@ -5237,7 +5237,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi )
return pixmap(TQFileInfo(real));
}
- TQString ext = fi.extension( FALSE ).upper();
+ TQString ext = fi.extension( false ).upper();
TQString key = ext;
ext.prepend( "." );
TQMap< TQString, TQPixmap >::Iterator it;
@@ -5393,38 +5393,38 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F5 ) {
rereadDir();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == files || o == files->viewport() ) ) {
if ( files->isVisible() && files->currentItem() ) {
if ( TQUrlInfo( d->url, "." ).isWritable() && files->currentItem()->text( 0 ) != ".." ) {
files->renameItem = files->currentItem();
- files->startRename( TRUE );
+ files->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && ( (TQKeyEvent*)e )->key() == Key_F2 &&
( o == d->moreFiles || o == d->moreFiles->viewport() ) ) {
if ( d->moreFiles->isVisible() && d->moreFiles->currentItem() != -1 ) {
if ( TQUrlInfo( d->url, "." ).isWritable() &&
d->moreFiles->item( d->moreFiles->currentItem() )->text() != ".." ) {
d->moreFiles->renameItem = d->moreFiles->item( d->moreFiles->currentItem() );
- d->moreFiles->startRename( TRUE );
+ d->moreFiles->startRename( true );
}
}
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && d->moreFiles->renaming ) {
d->moreFiles->lined->setFocus();
TQApplication::sendEvent( d->moreFiles->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress && files->renaming ) {
files->lined->setFocus();
TQApplication::sendEvent( files->lined, e );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Backspace &&
( o == files ||
@@ -5433,7 +5433,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
o == d->moreFiles->viewport() ) ) {
cdUpClicked();
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == files ||
@@ -5441,7 +5441,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( files->currentItem() )
deleteFile( files->currentItem()->text( 0 ) );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::KeyPress &&
((TQKeyEvent *)e)->key() == Key_Delete &&
( o == d->moreFiles ||
@@ -5450,7 +5450,7 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
if ( c >= 0 )
deleteFile( d->moreFiles->item( c )->text() );
((TQKeyEvent *)e)->accept();
- return TRUE;
+ return true;
} else if ( o == files && e->type() == TQEvent::FocusOut && files->currentItem() ) {
} else if ( o == files && e->type() == TQEvent::KeyPress ) {
TQTimer::singleShot( 0, this, TQ_SLOT(fixupNameEdit()) );
@@ -5475,23 +5475,23 @@ bool TQFileDialog::eventFilter( TQObject * o, TQEvent * e )
nt = i->text( 0 );
int cp = nameEdit->cursorPosition()+1;
nameEdit->validateAndSet( nt, cp, cp, nt.length() );
- return TRUE;
+ return true;
}
}
} else if ( o == nameEdit && e->type() == TQEvent::FocusIn ) {
fileNameEditDone();
} else if ( d->moreFiles->renaming && o != d->moreFiles->lined && e->type() == TQEvent::FocusIn ) {
d->moreFiles->lined->setFocus();
- return TRUE;
+ return true;
} else if ( files->renaming && o != files->lined && e->type() == TQEvent::FocusIn ) {
files->lined->setFocus();
- return TRUE;
+ return true;
} else if ( ( o == d->moreFiles || o == d->moreFiles->viewport() ) &&
e->type() == TQEvent::FocusIn ) {
if ( ( o == d->moreFiles->viewport() && !d->moreFiles->viewport()->hasFocus() ) ||
( o == d->moreFiles && !d->moreFiles->hasFocus() ) )
((TQWidget*)o)->setFocus();
- return FALSE;
+ return false;
}
return TQDialog::eventFilter( o, e );
@@ -5647,7 +5647,7 @@ void TQFileDialog::modeButtonsDestroyed()
Under Unix/X11, the normal behavior of the file dialog is to resolve
and follow symlinks. For example, if /usr/tmp is a symlink to /var/tmp,
the file dialog will change to /var/tmp after entering /usr/tmp.
- If \a resolveSymlinks is FALSE, the file dialog will treat
+ If \a resolveSymlinks is false, the file dialog will treat
symlinks as regular directories.
Note that if you want to iterate over the list of files, you should
@@ -5714,7 +5714,7 @@ TQStringList TQFileDialog::getOpenFileNames( const TQString & filter,
}
#endif
- TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", TRUE );
+ TQFileDialog *dlg = new TQFileDialog( *workingDirectory, TQString::null, parent, name ? name : "qt_filedlg_gofns", true );
TQ_CHECK_PTR( dlg );
#ifndef TQT_NO_WIDGET_TOPEXTRA
@@ -5768,21 +5768,21 @@ static bool isRoot( const TQUrl &u )
#if defined(Q_OS_MAC9)
TQString p = TQDir::convertSeparators(u.path());
if(p.contains(':') == 1)
- return TRUE;
+ return true;
#elif defined(Q_OS_UNIX)
if ( u.path() == "/" )
- return TRUE;
+ return true;
#elif defined(Q_OS_WIN32)
TQString p = u.path();
if ( p.length() == 3 &&
p.right( 2 ) == ":/" )
- return TRUE;
+ return true;
if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) {
int slashes = p.contains( '/' );
if ( slashes <= 3 )
- return TRUE;
+ return true;
if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' )
- return TRUE;
+ return true;
}
#else
#if defined(Q_CC_GNU)
@@ -5791,9 +5791,9 @@ static bool isRoot( const TQUrl &u )
#endif
if ( !u.isLocalFile() && u.path() == "/" )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void TQFileDialog::urlStart( TQNetworkOperation *op )
@@ -5808,13 +5808,13 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
#ifndef TQT_NO_CURSOR
if ( !d->cursorOverride ) {
TQApplication::setOverrideCursor( TQCursor( TQt::WaitCursor ) );
- d->cursorOverride = TRUE;
+ d->cursorOverride = true;
}
#endif
if ( isRoot( d->url ) )
- d->cdToParent->setEnabled( FALSE );
+ d->cdToParent->setEnabled( false );
else
- d->cdToParent->setEnabled( TRUE );
+ d->cdToParent->setEnabled( true );
d->mimeTypeTimer->stop();
d->sortedList.clear();
d->pendingItems.clear();
@@ -5824,15 +5824,15 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
files->clear();
files->setSorting( -1 );
- TQString s = d->url.toString( FALSE, FALSE );
- bool found = FALSE;
+ TQString s = d->url.toString( false, false );
+ bool found = false;
for ( int i = 0; i < d->paths->count(); ++i ) {
#if defined(TQ_WS_WIN)
if ( d->paths->text( i ).lower() == s.lower() ) {
#else
if ( d->paths->text( i ) == s ) {
#endif
- found = TRUE;
+ found = true;
d->paths->setCurrentItem( i );
break;
}
@@ -5842,12 +5842,12 @@ void TQFileDialog::urlStart( TQNetworkOperation *op )
d->paths->setCurrentItem( d->paths->count() - 1 );
}
d->last = 0;
- d->hadDotDot = FALSE;
+ d->hadDotDot = false;
if ( d->goBack && d->history.last() != d->url.toString() ) {
d->history.append( d->url.toString() );
if ( d->history.count() > 1 )
- d->goBack->setEnabled( TRUE );
+ d->goBack->setEnabled( true );
}
}
}
@@ -5861,16 +5861,16 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
if ( op->operation() == TQNetworkProtocol::OpListChildren &&
d->cursorOverride ) {
TQApplication::restoreOverrideCursor();
- d->cursorOverride = FALSE;
+ d->cursorOverride = false;
}
#endif
if ( op->state() == TQNetworkProtocol::StFailed ) {
if ( d->paths->hasFocus() )
- d->ignoreNextKeyPress = TRUE;
+ d->ignoreNextKeyPress = true;
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
delete d->progressDia;
d->progressDia = 0;
@@ -5893,17 +5893,17 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpListChildren &&
op == d->currListChildren ) {
if ( !d->hadDotDot && !isRoot( d->url ) ) {
- bool ok = TRUE;
+ bool ok = true;
#if defined(TQ_WS_WIN)
if ( d->url.path().left( 2 ) == "//" )
- ok = FALSE;
+ ok = false;
#endif
if ( ok ) {
TQUrlInfo ui( d->url, ".." );
ui.setName( ".." );
- ui.setDir( TRUE );
- ui.setFile( FALSE );
- ui.setSymLink( FALSE );
+ ui.setDir( true );
+ ui.setFile( false );
+ ui.setSymLink( false );
ui.setSize( 0 );
TQValueList<TQUrlInfo> lst;
lst << ui;
@@ -5915,7 +5915,7 @@ void TQFileDialog::urlFinished( TQNetworkOperation *op )
} else if ( op->operation() == TQNetworkProtocol::OpPut ) {
rereadDir();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
d->progressDia->close();
}
delete d->progressDia;
@@ -5944,7 +5944,7 @@ void TQFileDialog::dataTransferProgress( int bytesDone, int bytesTotal, TQNetwor
if ( !d->progressDia ) {
if ( bytesDone < bytesTotal) {
- d->ignoreStop = FALSE;
+ d->ignoreStop = false;
d->progressDia = new TQFDProgressDialog( this, label, bytesTotal );
connect( d->progressDia, TQ_SIGNAL( cancelled() ),
this, TQ_SLOT( stopCopy() ) );
@@ -5980,7 +5980,7 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( d->mode == DirectoryOnly && !inf.isDir() )
continue;
if ( inf.name() == ".." ) {
- d->hadDotDot = TRUE;
+ d->hadDotDot = true;
if ( isRoot( d->url ) )
continue;
#if defined(TQ_WS_WIN)
@@ -6025,8 +6025,8 @@ void TQFileDialog::insertEntry( const TQValueList<TQUrlInfo> &lst, TQNetworkOper
if ( ( d->mode == ExistingFiles && inf.isDir() ) ||
( isDirectoryMode( d->mode ) && inf.isFile() ) ) {
- i->setSelectable( FALSE );
- i2->setSelectable( FALSE );
+ i->setSelectable( false );
+ i2->setSelectable( false );
}
i->i = i2;
@@ -6043,7 +6043,7 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
TQString encName = TQFileDialogPrivate::encodeFileName(
( (TQFileDialogPrivate::File*)it.current() )->info.name() );
@@ -6051,12 +6051,12 @@ void TQFileDialog::removeEntry( TQNetworkOperation *op )
d->pendingItems.removeRef( (TQFileDialogPrivate::File*)it.current() );
delete ( (TQFileDialogPrivate::File*)it.current() )->i;
delete it.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6070,18 +6070,18 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it1( files );
- bool ok1 = FALSE, ok2 = FALSE;
+ bool ok1 = false, ok2 = false;
// first check whether the new file replaces an existing file.
for ( i = d->sortedList.first(); it1.current(); ++it1, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it1.current() )->info.name() == op->arg( 1 ) ) {
delete ( (TQFileDialogPrivate::File*)it1.current() )->i;
delete it1.current();
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 1 ) ) {
d->sortedList.removeRef( i );
i = d->sortedList.prev();
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6089,16 +6089,16 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
i = 0;
TQListViewItemIterator it( files );
- ok1 = FALSE;
- ok2 = FALSE;
+ ok1 = false;
+ ok2 = false;
for ( i = d->sortedList.first(); it.current(); ++it, i = d->sortedList.next() ) {
if ( ( (TQFileDialogPrivate::File*)it.current() )->info.name() == op->arg( 0 ) ) {
( (TQFileDialogPrivate::File*)it.current() )->info.setName( op->arg( 1 ) );
- ok1 = TRUE;
+ ok1 = true;
}
if ( i && i->name() == op->arg( 0 ) ) {
i->setName( op->arg( 1 ) );
- ok2 = TRUE;
+ ok2 = true;
}
if ( ok1 && ok2 )
break;
@@ -6113,7 +6113,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
\brief whether the file dialog can provide preview information about
the currently selected file
- The default is FALSE.
+ The default is false.
*/
bool TQFileDialog::isInfoPreviewEnabled() const
{
@@ -6124,7 +6124,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
{
if ( info == d->infoPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->infoPreview = info;
updateGeometries();
}
@@ -6136,7 +6136,7 @@ void TQFileDialog::setInfoPreviewEnabled( bool info )
\brief whether the file dialog can provide a contents preview of the
currently selected file
- The default is FALSE.
+ The default is false.
\sa setContentsPreview() setInfoPreviewEnabled()
*/
@@ -6152,7 +6152,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
{
if ( contents == d->contentsPreview )
return;
- d->geometryDirty = TRUE;
+ d->geometryDirty = true;
d->contentsPreview = contents;
updateGeometries();
}
@@ -6192,7 +6192,7 @@ void TQFileDialog::setContentsPreviewEnabled( bool contents )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setInfoPreviewEnabled( TRUE );
+ fd->setInfoPreviewEnabled( true );
fd->setInfoPreview( p, p );
fd->setPreviewMode( TQFileDialog::Info );
fd->show();
@@ -6252,7 +6252,7 @@ void TQFileDialog::setInfoPreview( TQWidget *w, TQFilePreview *preview )
Preview* p = new Preview;
TQFileDialog* fd = new TQFileDialog( this );
- fd->setContentsPreviewEnabled( TRUE );
+ fd->setContentsPreviewEnabled( true );
fd->setContentsPreview( p, p );
fd->setPreviewMode( TQFileDialog::Contents );
fd->show();
@@ -6307,8 +6307,8 @@ void TQFileDialog::resortDir()
d->pendingItems.append( item );
if ( ( d->mode == ExistingFiles && item->info.isDir() ) ||
( isDirectoryMode( d->mode ) && item->info.isFile() ) ) {
- item->setSelectable( FALSE );
- item2->setSelectable( FALSE );
+ item->setSelectable( false );
+ item2->setSelectable( false );
}
}
@@ -6330,13 +6330,13 @@ void TQFileDialog::stopCopy()
if ( d->ignoreStop )
return;
- d->url.blockSignals( TRUE );
+ d->url.blockSignals( true );
d->url.stop();
if ( d->progressDia ) {
- d->ignoreStop = TRUE;
+ d->ignoreStop = true;
TQTimer::singleShot( 100, this, TQ_SLOT( removeProgressDia() ) );
}
- d->url.blockSignals( FALSE );
+ d->url.blockSignals( false );
}
/*!
@@ -6372,30 +6372,30 @@ void TQFileDialog::doMimeTypeLookup()
if ( item ) {
TQFileInfo fi;
if ( d->url.isLocalFile() ) {
- fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( FALSE ) );
+ fi.setFile( TQUrl( d->url.path(), TQFileDialogPrivate::encodeFileName( item->info.name() ) ).path( false ) );
} else
fi.setFile( item->info.name() ); // #####
const TQPixmap *p = iconProvider()->pixmap( fi );
if ( p && p != item->pixmap( 0 ) &&
( !item->pixmap( 0 ) || p->serialNumber() != item->pixmap( 0 )->serialNumber() ) &&
p != fifteenTransparentPixels ) {
- item->hasMimePixmap = TRUE;
+ item->hasMimePixmap = true;
// evil hack to avoid much too much repaints!
TQGuardedPtr<TQFileDialog> that( this ); // this may be deleted by an event handler
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( FALSE );
- files->viewport()->setUpdatesEnabled( FALSE );
+ files->setUpdatesEnabled( false );
+ files->viewport()->setUpdatesEnabled( false );
if ( item != d->pendingItems.first() )
return;
item->setPixmap( 0, *p );
tqApp->processEvents();
if ( that.isNull() )
return;
- files->setUpdatesEnabled( TRUE );
- files->viewport()->setUpdatesEnabled( TRUE );
+ files->setUpdatesEnabled( true );
+ files->viewport()->setUpdatesEnabled( true );
if ( files->isVisible() ) {
TQRect ir( files->itemRect( item ) );
@@ -6414,19 +6414,19 @@ void TQFileDialog::doMimeTypeLookup()
}
if ( d->moreFiles->isVisible() ) {
- d->moreFiles->viewport()->repaint( r, FALSE );
+ d->moreFiles->viewport()->repaint( r, false );
} else {
- files->viewport()->repaint( r, FALSE );
+ files->viewport()->repaint( r, false );
}
if ( d->pendingItems.count() )
d->mimeTypeTimer->start( 0 );
else if ( d->moreFiles->isVisible() )
- d->moreFiles->triggerUpdate( TRUE );
+ d->moreFiles->triggerUpdate( true );
}
/*!
- If \a b is TRUE then all the files in the current directory are selected;
+ If \a b is true then all the files in the current directory are selected;
otherwise, they are deselected.
*/
@@ -6444,7 +6444,7 @@ void TQFileDialog::goBack()
return;
d->history.remove( d->history.last() );
if ( d->history.count() < 2 )
- d->goBack->setEnabled( FALSE );
+ d->goBack->setEnabled( false );
setUrl( d->history.last() );
}