summaryrefslogtreecommitdiffstats
path: root/experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp')
-rw-r--r--experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp b/experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp
index 928c7a635..424ac7e8e 100644
--- a/experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp
+++ b/experimental/tqtinterface/qt4/src/dialogs/tqfiledialog.cpp
@@ -1089,7 +1089,7 @@ public:
return TQString::null;
for ( int i = 0; i < len ;++i ) {
uchar inCh = (uchar)cName[ i ];
- if ( inCh >= 128 || sChars.tqcontains(inCh) )
+ if ( inCh >= 128 || sChars.contains(inCh) )
{
newStr += TQChar( '%' );
ushort c = inCh / 16;
@@ -1311,7 +1311,7 @@ void TQFileListBox::viewportMouseMoveEvent( TQMouseEvent *e )
TQListBoxItem *item = dragItem;
dragItem = 0;
if ( item ) {
- if ( !tqitemRect( item ).tqcontains( e->pos() ) )
+ if ( !tqitemRect( item ).contains( e->pos() ) )
return;
TQUriDrag* drag = new TQUriDrag( viewport() );
TQStringList files;
@@ -1439,7 +1439,7 @@ void TQFileListBox::viewportDropEvent( TQDropEvent *e )
TQString name = (currDropItem ? TQFileDialogPrivate::encodeFileName(currDropItem->text()) : TQString("."));
TQUrlInfo info(filedialog->d->url, name);
for ( i = 0; i < lst.count(); ++i ) {
- int slash = lst[i].tqfindRev('/');
+ int slash = lst[i].findRev('/');
TQString filename = lst[i].right(lst[i].length() - slash - 1);
exists = exists || TQFileDialogPrivate::fileExists( dest, filename);
}
@@ -1454,7 +1454,7 @@ void TQFileListBox::viewportDropEvent( TQDropEvent *e )
bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
{
TQListBoxItem *item = itemAt( pnt );
- if ( !item || (item && !tqitemRect( item ).tqcontains( pnt )) ) {
+ if ( !item || (item && !tqitemRect( item ).contains( pnt )) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
return FALSE;
return TRUE;
@@ -1462,7 +1462,7 @@ bool TQFileListBox::acceptDrop( const TQPoint &pnt, TQWidget *source )
TQUrlInfo fi( filedialog->d->url, item->text() );
- if ( fi.isDir() && tqitemRect( item ).tqcontains( pnt ) )
+ if ( fi.isDir() && tqitemRect( item ).contains( pnt ) )
return TRUE;
return FALSE;
}
@@ -1476,7 +1476,7 @@ void TQFileListBox::setCurrentDropItem( const TQPoint &pnt )
item = itemAt( pnt );
if ( item && !TQUrlInfo( filedialog->d->url, item->text() ).isDir() )
item = 0;
- if ( item && !tqitemRect( item ).tqcontains( pnt ) )
+ if ( item && !tqitemRect( item ).contains( pnt ) )
item = 0;
currDropItem = item;
@@ -1858,7 +1858,7 @@ void TQFileDialogTQFileListView::viewportDropEvent( TQDropEvent *e )
TQString name = (currDropItem ? TQFileDialogPrivate::encodeFileName(currDropItem->text(0)) : TQString("."));
TQUrlInfo info(filedialog->d->url, name);
for (uint i = 0; i < l.count(); ++i) {
- int slash = l[i].tqfindRev('/');
+ int slash = l[i].findRev('/');
TQString filename = l[i].right(l[i].length() - slash - 1);
exists = exists || TQFileDialogPrivate::fileExists(dest, filename);
}
@@ -1873,7 +1873,7 @@ void TQFileDialogTQFileListView::viewportDropEvent( TQDropEvent *e )
bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *source )
{
TQListViewItem *item = itemAt( pnt );
- if ( !item || (item && !tqitemRect( item ).tqcontains( pnt )) ) {
+ if ( !item || (item && !tqitemRect( item ).contains( pnt )) ) {
if ( source == viewport() && startDragDir == filedialog->dirPath() )
return FALSE;
return TRUE;
@@ -1881,7 +1881,7 @@ bool TQFileDialogTQFileListView::acceptDrop( const TQPoint &pnt, TQWidget *sourc
TQUrlInfo fi( filedialog->d->url, item->text( 0 ) );
- if ( fi.isDir() && tqitemRect( item ).tqcontains( pnt ) )
+ if ( fi.isDir() && tqitemRect( item ).contains( pnt ) )
return TRUE;
return FALSE;
}
@@ -1896,7 +1896,7 @@ void TQFileDialogTQFileListView::setCurrentDropItem( const TQPoint &pnt )
if ( item && !TQUrlInfo( filedialog->d->url, item->text( 0 ) ).isDir() )
item = 0;
- if ( item && !tqitemRect( item ).tqcontains( pnt ) )
+ if ( item && !tqitemRect( item ).contains( pnt ) )
item = 0;
currDropItem = item;
@@ -1994,7 +1994,7 @@ void TQFileDialogTQFileListView::contentsMoved( int, int )
TQFileDialogPrivate::File::~File()
{
- if ( d->pendingItems.tqfindRef( this ) )
+ if ( d->pendingItems.findRef( this ) )
d->pendingItems.removeRef( this );
}
@@ -2152,12 +2152,12 @@ static TQStringList makeFiltersList( const TQString &filter )
if ( filter.isEmpty() )
return TQStringList();
- int i = filter.tqfind( ";;", 0 );
+ int i = filter.find( ";;", 0 );
TQString sep( ";;" );
if ( i == -1 ) {
- if ( filter.tqfind( "\n", 0 ) != -1 ) {
+ if ( filter.find( "\n", 0 ) != -1 ) {
sep = "\n";
- i = filter.tqfind( sep, 0 );
+ i = filter.find( sep, 0 );
}
}
@@ -2435,10 +2435,10 @@ TQFileDialog::TQFileDialog( const TQString& dirName, const TQString & filter,
if ( !filter.isEmpty() ) {
setFilters( filter );
if ( !dirName.isEmpty() ) {
- int dotpos = dirName.tqfind( 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).tqcontains( dirName.right( dirName.length() - dotpos ) ) ) {
+ if ( d->types->text(b).contains( dirName.right( dirName.length() - dotpos ) ) ) {
d->types->setCurrentItem( b );
setFilter( d->types->text( b ) );
return;
@@ -2580,7 +2580,7 @@ void TQFileDialog::init()
}
if ( !!TQDir::homeDirPath() ) {
- if ( !d->paths->listBox()->tqfindItem( TQDir::homeDirPath() ) )
+ if ( !d->paths->listBox()->findItem( TQDir::homeDirPath() ) )
d->paths->insertItem( *openFolderIcon, TQDir::homeDirPath() );
}
@@ -2883,7 +2883,7 @@ void TQFileDialog::changeMode( int id )
if ( !d->infoPreview && !d->contentsPreview )
return;
- TQButton *btn = (TQButton*)d->modeButtons->tqfind( id );
+ TQButton *btn = (TQButton*)d->modeButtons->find( id );
if ( !btn )
return;
@@ -2935,7 +2935,7 @@ TQFileDialog::~TQFileDialog()
\brief the name of the selected file
- If a file was selected selectedFile tqcontains the file's name including
+ If a file was selected selectedFile contains the file's name including
its absolute path; otherwise selectedFile is empty.
\sa TQString::isEmpty(), selectedFiles, selectedFilter
@@ -2995,7 +2995,7 @@ void TQFileDialog::setSelectedFilter( int n )
/*!
Sets the current filter selected in the file dialog to the first
- one that tqcontains the text \a tqmask.
+ one that contains the text \a tqmask.
*/
void TQFileDialog::setSelectedFilter( const TQString& tqmask )
@@ -3003,7 +3003,7 @@ void TQFileDialog::setSelectedFilter( const TQString& tqmask )
int n;
for ( n = 0; n < d->types->count(); n++ ) {
- if ( d->types->text( n ).tqcontains( tqmask, FALSE ) ) {
+ if ( d->types->text( n ).contains( tqmask, FALSE ) ) {
d->types->setCurrentItem( n );
TQString f = tqmask;
TQRegExp r( TQString::tqfromLatin1(qt_file_dialog_filter_reg_exp) );
@@ -3022,7 +3022,7 @@ void TQFileDialog::setSelectedFilter( const TQString& tqmask )
\brief the list of selected files
- If one or more files are selected, selectedFiles tqcontains their
+ If one or more files are selected, selectedFiles contains their
names including their absolute paths. If no files are selected or
the mode isn't ExistingFiles selectedFiles is an empty list.
@@ -3050,12 +3050,12 @@ TQStringList TQFileDialog::selectedFiles() const
if ( mode() == ExistingFiles ) {
TQStringList selectedLst;
TQString selectedFiles = nameEdit->text();
- if (selectedFiles.tqfindRev('\"') == -1) {
+ if (selectedFiles.findRev('\"') == -1) {
//probably because Enter was pressed on the nameEdit, so we have one file
//not in "" but raw
selectedLst.append(selectedFiles);
} else {
- selectedFiles.truncate( selectedFiles.tqfindRev( '\"' ) );
+ selectedFiles.truncate( selectedFiles.findRev( '\"' ) );
selectedLst = selectedLst.split( TQString("\" "), selectedFiles );
}
for ( TQStringList::Iterator it = selectedLst.begin(); it != selectedLst.end(); ++it ) {
@@ -3144,7 +3144,7 @@ TQString TQFileDialog::dirPath() const
Sets the filter used in the file dialog to \a newFilter.
- If \a newFilter tqcontains a pair of parentheses containing one or more
+ If \a newFilter contains a pair of parentheses containing one or more
of <em><b>anything*something</b></em> separated by spaces or by
semi-colons then only the text contained in the parentheses is used as
the filter. This means that these calls are all equivalent:
@@ -3673,7 +3673,7 @@ void TQFileDialog::okClicked()
}
#endif
- if ( fn.tqcontains("*") ) {
+ if ( fn.contains("*") ) {
addFilter( fn );
nameEdit->blockSignals( TRUE );
nameEdit->setText( TQString::tqfromLatin1("") );
@@ -3737,7 +3737,7 @@ void TQFileDialog::okClicked()
// If selection is valid, return it, else try
// using selection as a directory to change to.
- if ( !d->currentFileName.isNull() && !d->currentFileName.tqcontains( "*" ) ) {
+ if ( !d->currentFileName.isNull() && !d->currentFileName.contains( "*" ) ) {
emit fileSelected( selectedFile() );
accept();
} else {
@@ -3761,8 +3761,8 @@ void TQFileDialog::okClicked()
trySetSelection( TRUE, d->url, TRUE );
d->checkForFilter = FALSE;
} else {
- if ( !nameEdit->text().tqcontains( "/" ) &&
- !nameEdit->text().tqcontains( "\\" )
+ if ( !nameEdit->text().contains( "/" ) &&
+ !nameEdit->text().contains( "\\" )
#if defined(TQ_OS_WIN32)
&& nameEdit->text()[ 1 ] != ':'
#endif
@@ -3823,9 +3823,9 @@ bool TQFileDialog::trySetSelection( bool isDir, const TQUrlOperator &u, bool upd
{
if ( !isDir && !u.path().isEmpty() && u.path().right( 1 ) == "/" )
isDir = TRUE;
- if ( u.fileName().tqcontains( "*") && d->checkForFilter ) {
+ if ( u.fileName().contains( "*") && d->checkForFilter ) {
TQString fn( u.fileName() );
- if ( fn.tqcontains( "*" ) ) {
+ if ( fn.contains( "*" ) ) {
addFilter( fn );
d->currentFileName = TQString::null;
d->url.setFileName( TQString::null );
@@ -4411,11 +4411,11 @@ void TQFileDialog::newFolderClicked()
TQStringList lst;
TQListViewItemIterator it( files );
for ( ; it.current(); ++it )
- if ( it.current()->text( 0 ).tqcontains( tr( "New Folder" ) ) )
+ if ( it.current()->text( 0 ).contains( tr( "New Folder" ) ) )
lst.append( it.current()->text( 0 ) );
if ( !lst.count() == 0 )
- while ( lst.tqcontains( foldername ) )
+ while ( lst.contains( foldername ) )
foldername = tr( "New Folder %1" ).arg( ++i );
d->url.mkdir( foldername );
@@ -5220,7 +5220,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi )
if ( fi.isDir() ) {
return &defaultFolder;
} else if ( ext != ".EXE" ) {
- it = cache.tqfind( key );
+ it = cache.find( key );
if ( it != cache.end() )
return &( *it );
@@ -5266,7 +5266,7 @@ const TQPixmap * TQWindowsIconProvider::pixmap( const TQFileInfo &fi )
if (lst.count() >= 2) { // don't just assume that lst has two entries
TQString filepath = lst[ 0 ].stripWhiteSpace();
if ( !filepath.isEmpty() ) {
- if ( filepath.tqfind("%1") != -1 ) {
+ if ( filepath.find("%1") != -1 ) {
filepath = filepath.arg( fi.filePath() );
if ( ext == ".DLL" ) {
pix = defaultFile;
@@ -5739,7 +5739,7 @@ static bool isRoot( const TQUrl &u )
{
#if defined(TQ_OS_MAC9)
TQString p = TQDir::convertSeparators(u.path());
- if(p.tqcontains(':') == 1)
+ if(p.contains(':') == 1)
return TRUE;
#elif defined(TQ_OS_UNIX)
if ( u.path() == "/" )
@@ -5750,7 +5750,7 @@ static bool isRoot( const TQUrl &u )
p.right( 2 ) == ":/" )
return TRUE;
if ( p[ 0 ] == '/' && p[ 1 ] == '/' ) {
- int slashes = p.tqcontains( '/' );
+ int slashes = p.contains( '/' );
if ( slashes <= 3 )
return TRUE;
if ( slashes == 4 && p[ (int)p.length() - 1 ] == '/' )
@@ -6043,7 +6043,7 @@ void TQFileDialog::itemChanged( TQNetworkOperation *op )
TQUrlInfo *i = 0;
TQListViewItemIterator it1( files );
bool ok1 = FALSE, ok2 = FALSE;
- // first check whether the new file tqreplaces an existing file.
+ // 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;