rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/krusader@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent aafc63ac62
commit acd0828c7a

@ -130,7 +130,7 @@ bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int star
fullPath += '/'; fullPath += '/';
kdDebug() << "the full path is " << fullPath << endl; kdDebug() << "the full path is " << fullPath << endl;
while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 ) while ( (pos=fullPath.find( '/', pos+1 )) != -1 )
{ {
TQString tryPath = fullPath.left( pos ); TQString tryPath = fullPath.left( pos );
kdDebug() << fullPath << " trying " << tryPath << endl; kdDebug() << fullPath << " trying " << tryPath << endl;

@ -87,7 +87,7 @@ kio_krarcProtocol::kio_krarcProtocol(const TQCString &pool_socket, const TQCStri
arcTempDir = locateLocal("tmp",TQString()); arcTempDir = locateLocal("tmp",TQString());
TQString dirName = "krArc"+TQDateTime::tqcurrentDateTime().toString(Qt::ISODate); TQString dirName = "krArc"+TQDateTime::tqcurrentDateTime().toString(Qt::ISODate);
dirName.tqreplace(TQRegExp(":"),"_"); dirName.replace(TQRegExp(":"),"_");
TQDir(arcTempDir).mkdir(dirName); TQDir(arcTempDir).mkdir(dirName);
arcTempDir = arcTempDir+dirName+"/"; arcTempDir = arcTempDir+dirName+"/";
} }
@ -132,7 +132,7 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
TQString arcDir = url.path().mid(arcFile->url().path().length()); TQString arcDir = url.path().mid(arcFile->url().path().length());
if( arcDir.right(1) != "/") arcDir = arcDir+"/"; if( arcDir.right(1) != "/") arcDir = arcDir+"/";
if( dirDict.tqfind( arcDir ) == 0 ) if( dirDict.find( arcDir ) == 0 )
addNewDir( arcDir ); addNewDir( arcDir );
finished(); finished();
return; return;
@ -140,11 +140,11 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
//TQString tmpDir = arcTempDir+url.path(); //TQString tmpDir = arcTempDir+url.path();
TQString arcDir = findArcDirectory(url); TQString arcDir = findArcDirectory(url);
TQString tmpDir = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().tqfindRev("/")+1); TQString tmpDir = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1);
if( tmpDir.right(1) != "/" ) tmpDir = tmpDir+"/"; if( tmpDir.right(1) != "/" ) tmpDir = tmpDir+"/";
if( permissions == -1 ) permissions = 0777; //set default permissions if( permissions == -1 ) permissions = 0777; //set default permissions
for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.tqfind("/",i+1)){ for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.find("/",i+1)){
::mkdir(tmpDir.left(i).local8Bit(),permissions); ::mkdir(tmpDir.left(i).local8Bit(),permissions);
} }
@ -193,10 +193,10 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
} }
TQString arcDir = findArcDirectory(url); TQString arcDir = findArcDirectory(url);
TQString tmpFile = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().tqfindRev("/")+1); TQString tmpFile = arcTempDir + arcDir.mid(1) + url.path().mid(url.path().findRev("/")+1);
TQString tmpDir = arcTempDir+arcDir.mid(1)+"/"; TQString tmpDir = arcTempDir+arcDir.mid(1)+"/";
for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.tqfind("/",i+1)){ for( unsigned int i=arcTempDir.length();i<tmpDir.length(); i=tmpDir.find("/",i+1)){
TQDir("/").mkdir(tmpDir.left(i)); TQDir("/").mkdir(tmpDir.left(i));
} }
int fd; int fd;
@ -539,7 +539,7 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
TQString destDir = dest.path( -1 ); TQString destDir = dest.path( -1 );
if( !TQDir( destDir ).exists() ) { if( !TQDir( destDir ).exists() ) {
int ndx = destDir.tqfindRev( '/' ); int ndx = destDir.findRev( '/' );
if( ndx != -1 ) if( ndx != -1 )
destDir.truncate( ndx+1 ); destDir.truncate( ndx+1 );
} }
@ -602,10 +602,10 @@ void kio_krarcProtocol::listDir(const KURL& url){
return; return;
} }
TQString arcDir = path.mid(arcFile->url().path().length()); TQString arcDir = path.mid(arcFile->url().path().length());
arcDir.truncate(arcDir.tqfindRev("/")); arcDir.truncate(arcDir.findRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/"; if(arcDir.right(1) != "/") arcDir = arcDir+"/";
UDSEntryList* dirList = dirDict.tqfind(arcDir); UDSEntryList* dirList = dirDict.find(arcDir);
if( dirList == 0 ){ if( dirList == 0 ){
error(ERR_CANNOT_ENTER_DIRECTORY,url.path()); error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
return; return;
@ -645,7 +645,7 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
} }
TQString newPath = path; TQString newPath = path;
if(newPath.right(1) != "/") newPath = newPath+"/"; if(newPath.right(1) != "/") newPath = newPath+"/";
for(int pos=0; pos >= 0; pos = newPath.tqfind("/",pos+1)){ for(int pos=0; pos >= 0; pos = newPath.find("/",pos+1)){
TQFileInfo qfi(newPath.left(pos)); TQFileInfo qfi(newPath.left(pos));
if( qfi.exists() && !qfi.isDir() ){ if( qfi.exists() && !qfi.isDir() ){
KDE_struct_stat stat_p; KDE_struct_stat stat_p;
@ -681,7 +681,7 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
if( arcType.isEmpty() ) { if( arcType.isEmpty() ) {
arcType = arcFile->mimetype(); arcType = arcFile->mimetype();
arcType = arcType.mid(arcType.tqfindRev("-")+1); arcType = arcType.mid(arcType.findRev("-")+1);
if( arcType == "jar" ) if( arcType == "jar" )
arcType = "zip"; arcType = "zip";
@ -815,7 +815,7 @@ TQString kio_krarcProtocol::findArcDirectory(const KURL& url){
return TQString(); return TQString();
} }
TQString arcDir = path.mid(arcFile->url().path().length()); TQString arcDir = path.mid(arcFile->url().path().length());
arcDir.truncate(arcDir.tqfindRev("/")); arcDir.truncate(arcDir.findRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/"; if(arcDir.right(1) != "/") arcDir = arcDir+"/";
return arcDir; return arcDir;
@ -825,7 +825,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
TQString arcDir = findArcDirectory(url); TQString arcDir = findArcDirectory(url);
if( arcDir.isEmpty() ) return 0; if( arcDir.isEmpty() ) return 0;
UDSEntryList* dirList = dirDict.tqfind(arcDir); UDSEntryList* dirList = dirDict.find(arcDir);
if( !dirList ){ if( !dirList ){
return 0; return 0;
} }
@ -833,7 +833,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
if( arcFile->url().path(-1) == url.path(-1) ) name = "."; // the "/" case if( arcFile->url().path(-1) == url.path(-1) ) name = "."; // the "/" case
else{ else{
if( name.right(1) == "/" ) name.truncate(name.length()-1); if( name.right(1) == "/" ) name.truncate(name.length()-1);
name = name.mid(name.tqfindRev("/")+1); name = name.mid(name.findRev("/")+1);
} }
UDSEntryList::iterator entry; UDSEntryList::iterator entry;
@ -853,7 +853,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
TQString kio_krarcProtocol::nextWord(TQString &s,char d) { TQString kio_krarcProtocol::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace(); s=s.stripWhiteSpace();
int j=s.tqfind(d,0); int j=s.find(d,0);
TQString temp=s.left(j); // find the leftmost word. TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j); s.remove(0,j);
return temp; return temp;
@ -885,14 +885,14 @@ UDSEntryList* kio_krarcProtocol::addNewDir(TQString path){
UDSEntryList* dir; UDSEntryList* dir;
// check if the current dir exists // check if the current dir exists
dir = dirDict.tqfind(path); dir = dirDict.find(path);
if(dir != 0) return dir; // dir exists- return it ! if(dir != 0) return dir; // dir exists- return it !
// set dir to the tqparent dir // set dir to the tqparent dir
dir = addNewDir(path.left(path.tqfindRev("/",-2)+1)); dir = addNewDir(path.left(path.findRev("/",-2)+1));
// add a new entry in the tqparent dir // add a new entry in the tqparent dir
TQString name = path.mid(path.tqfindRev("/",-2)+1); TQString name = path.mid(path.findRev("/",-2)+1);
name = name.left(name.length()-1); name = name.left(name.length()-1);
UDSEntry entry; UDSEntry entry;
@ -1049,7 +1049,7 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
nextWord(line); nextWord(line);
// full name // full name
fullName = nextWord(line); fullName = nextWord(line);
fullName = fullName.mid(fullName.tqfindRev("/")+1); fullName = fullName.mid(fullName.findRev("/")+1);
} }
if( arcType == "bzip2" ){ if( arcType == "bzip2" ){
// There is no way to list bzip2 files, so we take our information from // There is no way to list bzip2 files, so we take our information from
@ -1071,13 +1071,13 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
// ignore the next field // ignore the next field
nextWord(line); nextWord(line);
// date & time // date & time
int month = (TQStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).tqfindIndex( nextWord(line) ) + 1; int month = (TQStringList::split(',', "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec")).findIndex( nextWord(line) ) + 1;
int day = nextWord(line).toInt(); int day = nextWord(line).toInt();
int year = TQDate::tqcurrentDate().year(); int year = TQDate::tqcurrentDate().year();
TQString third = nextWord(line); TQString third = nextWord(line);
TQTime qtime; TQTime qtime;
if( third.tqcontains(":" ) ) if( third.contains(":" ) )
qtime = TQTime::fromString( third ); qtime = TQTime::fromString( third );
else else
year = third.toInt(); year = third.toInt();
@ -1126,9 +1126,9 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
// full name // full name
fullName = nextWord( line, '\n' ).mid( 1 ); fullName = nextWord( line, '\n' ).mid( 1 );
//if ( fullName.right( 1 ) == "/" ) return; //if ( fullName.right( 1 ) == "/" ) return;
if( fullName.tqcontains("->") ){ if( fullName.contains("->") ){
symlinkDest = fullName.mid(fullName.tqfind("->")+2); symlinkDest = fullName.mid(fullName.find("->")+2);
fullName = fullName.left(fullName.tqfind("->")-1); fullName = fullName.left(fullName.find("->")-1);
} }
} }
if(arcType == "7z"){ if(arcType == "7z"){
@ -1161,11 +1161,11 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1); if( fullName.right(1) == "/" ) fullName = fullName.left(fullName.length()-1);
if( !fullName.startsWith("/") ) fullName = "/"+fullName; if( !fullName.startsWith("/") ) fullName = "/"+fullName;
TQString path = fullName.left(fullName.tqfindRev("/")+1); TQString path = fullName.left(fullName.findRev("/")+1);
// set/create the directory UDSEntryList // set/create the directory UDSEntryList
dir = dirDict.tqfind(path); dir = dirDict.find(path);
if(dir == 0) dir = addNewDir(path); if(dir == 0) dir = addNewDir(path);
TQString name = fullName.mid(fullName.tqfindRev("/")+1); TQString name = fullName.mid(fullName.findRev("/")+1);
// file name // file name
atom.m_uds = UDS_NAME; atom.m_uds = UDS_NAME;
atom.m_str = name; atom.m_str = name;
@ -1194,7 +1194,7 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
} }
if( S_ISDIR(mode) ){ if( S_ISDIR(mode) ){
fullName=fullName+"/"; fullName=fullName+"/";
if(dirDict.tqfind(fullName) == 0) if(dirDict.find(fullName) == 0)
dirDict.insert(fullName,new UDSEntryList()); dirDict.insert(fullName,new UDSEntryList());
else { else {
// try to overwrite an existing entry // try to overwrite an existing entry
@ -1560,13 +1560,13 @@ void kio_krarcProtocol::checkOutputForPassword( KProcess *proc,char *buf,int len
lastData = lines[ lines.count() - 1 ]; lastData = lines[ lines.count() - 1 ];
for( unsigned i=0; i != lines.count(); i++ ) { for( unsigned i=0; i != lines.count(); i++ ) {
TQString line = lines[ i ].stripWhiteSpace().lower(); TQString line = lines[ i ].stripWhiteSpace().lower();
int ndx = line.tqfind( "testing" ); int ndx = line.find( "testing" );
if( ndx >=0 ) if( ndx >=0 )
line.truncate( ndx ); line.truncate( ndx );
if( line.isEmpty() ) if( line.isEmpty() )
continue; continue;
if( line.tqcontains( "password" ) && line.tqcontains( "enter" ) ) { if( line.contains( "password" ) && line.contains( "enter" ) ) {
KRDEBUG( "Encrypted 7z archive found!" ); KRDEBUG( "Encrypted 7z archive found!" );
encrypted = true; encrypted = true;
proc->kill(); proc->kill();
@ -1588,7 +1588,7 @@ void kio_krarcProtocol::invalidatePassword() {
authInfo.verifyPath = true; authInfo.verifyPath = true;
TQString fileName = arcFile->url().path(-1); TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" ); authInfo.url = KURL::fromPathOrURL( "/" );
authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ ); authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" ); authInfo.url.setProtocol( "krarc" );
password = TQString(); password = TQString();
@ -1612,7 +1612,7 @@ TQString kio_krarcProtocol::getPassword() {
authInfo.verifyPath = true; authInfo.verifyPath = true;
TQString fileName = arcFile->url().path(-1); TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" ); authInfo.url = KURL::fromPathOrURL( "/" );
authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ ); authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" ); authInfo.url.setProtocol( "krarc" );
if( checkCachedAuthentication( authInfo ) && !authInfo.password.isNull() ) { if( checkCachedAuthentication( authInfo ) && !authInfo.password.isNull() ) {
@ -1640,14 +1640,14 @@ TQString kio_krarcProtocol::fullPathName( TQString name ) {
TQString kio_krarcProtocol::convertFileName( TQString name ) { TQString kio_krarcProtocol::convertFileName( TQString name ) {
if( arcType == "zip" ) if( arcType == "zip" )
name = name.tqreplace( "[", "[[]" ); name = name.replace( "[", "[[]" );
return convertName( name ); return convertName( name );
} }
TQString kio_krarcProtocol::convertName( TQString name ) { TQString kio_krarcProtocol::convertName( TQString name ) {
if( !name.tqcontains( '\'' ) ) if( !name.contains( '\'' ) )
return "'" + name + "'"; return "'" + name + "'";
if( !name.tqcontains( '"' ) && !name.tqcontains( '$' ) ) if( !name.contains( '"' ) && !name.contains( '$' ) )
return "\"" + name + "\""; return "\"" + name + "\"";
return escape( name ); return escape( name );
} }
@ -1656,7 +1656,7 @@ TQString kio_krarcProtocol::escape( TQString name ) {
const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i ) for ( unsigned int i = 0; i < evilstuff.length(); ++i )
name.tqreplace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) ); name.replace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) );
return name; return name;
} }

@ -151,7 +151,7 @@ ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, TQW
_parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__file" ) else if ( currentPlaceholder->parameter( i ).preset() == "__file" )
_parameter.append( new ParameterFile( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterFile( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset().tqfind( "__choose" ) != -1 ) else if ( currentPlaceholder->parameter( i ).preset().find( "__choose" ) != -1 )
_parameter.append( new ParameterChoose( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterChoose( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__select" ) else if ( currentPlaceholder->parameter( i ).preset() == "__select" )
_parameter.append( new ParameterSelect( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterSelect( currentPlaceholder->parameter( i ), plainPage() ) );
@ -163,7 +163,7 @@ ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, TQW
_parameter.append( new ParameterSearch( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterSearch( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__panelprofile" ) else if ( currentPlaceholder->parameter( i ).preset() == "__panelprofile" )
_parameter.append( new ParameterPanelprofile( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterPanelprofile( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset().tqfind( "__int" ) != -1 ) else if ( currentPlaceholder->parameter( i ).preset().find( "__int" ) != -1 )
_parameter.append( new ParameterInt( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterInt( currentPlaceholder->parameter( i ), plainPage() ) );
else else
_parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) ); _parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) );
@ -196,7 +196,7 @@ TQString ParameterDialog::getParameter() {
for ( int i = 0; i <= lastParameter; ++i ) { for ( int i = 0; i <= lastParameter; ++i ) {
if ( i > 0 ) if ( i > 0 )
parameter += ", "; parameter += ", ";
parameter += "\"" + _parameter[ i ]->text().tqreplace( "\"", "\\\"" ) + "\""; parameter += "\"" + _parameter[ i ]->text().replace( "\"", "\\\"" ) + "\"";
} }
parameter += ")"; parameter += ")";
return parameter; return parameter;

@ -84,7 +84,7 @@ void KrBookmarkHandler::deleteBookmark(KrBookmark *bm) {
} }
void KrBookmarkHandler::removeReferences( KrBookmark *root, KrBookmark *bmToRemove ) { void KrBookmarkHandler::removeReferences( KrBookmark *root, KrBookmark *bmToRemove ) {
int index = root->tqchildren().tqfind( bmToRemove ); int index = root->tqchildren().find( bmToRemove );
if( index >= 0 ) if( index >= 0 )
root->tqchildren().take( index ); root->tqchildren().take( index );
@ -290,7 +290,7 @@ void KrBookmarkHandler::buildMenu(KrBookmark *tqparent, KPopupMenu *menu) {
int id = menu->insertItem(TQIconSet(krLoader->loadIcon(bm->icon(), KIcon::Small)), int id = menu->insertItem(TQIconSet(krLoader->loadIcon(bm->icon(), KIcon::Small)),
bm->text(), newMenu, -1 /* dummy id */, -1 /* end of list */); bm->text(), newMenu, -1 /* dummy id */, -1 /* end of list */);
if( !_bookmarkIDTable.tqfind( menu ) ) if( !_bookmarkIDTable.find( menu ) )
_bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> ); _bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> );
(*_bookmarkIDTable[ menu ])[ id ] = bm; (*_bookmarkIDTable[ menu ])[ id ] = bm;
@ -308,7 +308,7 @@ void KrBookmarkHandler::buildMenu(KrBookmark *tqparent, KPopupMenu *menu) {
CONNECT_BM(bm); CONNECT_BM(bm);
int id = bm->itemId( itemIndex ); int id = bm->itemId( itemIndex );
if( !_bookmarkIDTable.tqfind( menu ) ) if( !_bookmarkIDTable.find( menu ) )
_bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> ); _bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> );
(*_bookmarkIDTable[ menu ])[ id ] = bm; (*_bookmarkIDTable[ menu ])[ id ] = bm;
} }
@ -437,12 +437,12 @@ bool KrBookmarkHandler::eventFilter( TQObject *obj, TQEvent *ev ) {
if( obj->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) { if( obj->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
int id = static_cast<TQPopupMenu*>(TQT_TQWIDGET(obj))->idAt( TQT_TQMOUSEEVENT(ev)->pos() ); int id = static_cast<TQPopupMenu*>(TQT_TQWIDGET(obj))->idAt( TQT_TQMOUSEEVENT(ev)->pos() );
if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_mainBookmarkPopup) && _specialBookmarkIDs.tqcontains( id ) ) { if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(_mainBookmarkPopup) && _specialBookmarkIDs.contains( id ) ) {
rightClickOnSpecialBookmark(); rightClickOnSpecialBookmark();
return true; return true;
} }
if( _bookmarkIDTable.tqfind( obj ) ) { if( _bookmarkIDTable.find( obj ) ) {
TQMap<int, KrBookmark*> * table = _bookmarkIDTable[ obj ]; TQMap<int, KrBookmark*> * table = _bookmarkIDTable[ obj ];
if( table && table->count( id ) ) { if( table && table->count( id ) ) {
KrBookmark *bm = (*table)[ id ]; KrBookmark *bm = (*table)[ id ];

@ -78,7 +78,7 @@ TQStringList sumFailedFunc(const TQStringList& stdOut, const TQStringList& stdEr
// grep for the ":FAILED" substring // grep for the ":FAILED" substring
const TQString tmp = TQString(": FAILED").local8Bit(); const TQString tmp = TQString(": FAILED").local8Bit();
for (uint i=0; i<stdOut.size();++i) { for (uint i=0; i<stdOut.size();++i) {
if (stdOut[i].tqfind(tmp) != -1) if (stdOut[i].find(tmp) != -1)
result += stdOut[i]; result += stdOut[i];
} }
@ -417,7 +417,7 @@ bool MatchChecksumDlg::verifyChecksumFile(TQString path, TQString& extension) {
TQFileInfo f(path); TQFileInfo f(path);
if (!f.exists() || f.isDir()) return false; if (!f.exists() || f.isDir()) return false;
// find the extension // find the extension
extension = path.mid(path.tqfindRev(".")+1); extension = path.mid(path.findRev(".")+1);
// TODO: do we know the extension? if not, ask the user for one // TODO: do we know the extension? if not, ask the user for one
@ -501,7 +501,7 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
for ( TQStringList::ConstIterator it = stdOut.begin(); it != stdOut.end(); ++it ) { for ( TQStringList::ConstIterator it = stdOut.begin(); it != stdOut.end(); ++it ) {
TQString line = (*it); TQString line = (*it);
if(standardFormat) { if(standardFormat) {
int space = line.tqfind(' '); int space = line.find(' ');
new KListViewItem(lv, line.left(space), line.mid(space+2)); new KListViewItem(lv, line.left(space), line.mid(space+2));
} else { } else {
new KListViewItem(lv, line); new KListViewItem(lv, line);
@ -559,7 +559,7 @@ ChecksumResultsDlg::ChecksumResultsDlg(const TQStringList& stdOut, const TQStrin
if (exec() == Accepted && successes) { if (exec() == Accepted && successes) {
if (stdOut.size()>1 && standardFormat && onePerFile->isChecked()) { if (stdOut.size()>1 && standardFormat && onePerFile->isChecked()) {
savePerFile(stdOut, suggestedFilename.mid(suggestedFilename.tqfindRev('.'))); savePerFile(stdOut, suggestedFilename.mid(suggestedFilename.findRev('.')));
} else if (saveFileCb->isEnabled() && saveFileCb->isChecked() && !checksumFile->url().simplifyWhiteSpace().isEmpty()) { } else if (saveFileCb->isEnabled() && saveFileCb->isChecked() && !checksumFile->url().simplifyWhiteSpace().isEmpty()) {
saveChecksum(stdOut, checksumFile->url()); saveChecksum(stdOut, checksumFile->url());
} }
@ -592,7 +592,7 @@ void ChecksumResultsDlg::savePerFile(const TQStringList& data, const TQString& t
krApp->startWaiting(i18n("Saving checksum files..."), 0); krApp->startWaiting(i18n("Saving checksum files..."), 0);
for ( TQStringList::ConstIterator it = data.begin(); it != data.end(); ++it ) { for ( TQStringList::ConstIterator it = data.begin(); it != data.end(); ++it ) {
TQString line = (*it); TQString line = (*it);
TQString filename = line.mid(line.tqfind(' ')+2)+type; TQString filename = line.mid(line.find(' ')+2)+type;
if (!saveChecksum(*it, filename)) { if (!saveChecksum(*it, filename)) {
KMessageBox::error(0, i18n("Errors occured while saving multiple checksums. Stopping")); KMessageBox::error(0, i18n("Errors occured while saving multiple checksums. Stopping"));
krApp->stopWait(); krApp->stopWait();

@ -58,7 +58,7 @@ KrKeyDialog::~KrKeyDialog() {
} }
void KrKeyDialog::slotImportShortcuts() { void KrKeyDialog::slotImportShortcuts() {
// tqfind $KDEDIR/share/apps/krusader // find $KDEDIR/share/apps/krusader
TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap"); TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load // let the user select a file to load
TQString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file")); TQString filename = KFileDialog::getOpenFileName(basedir, i18n(FILE_FILTER), 0, i18n("Select a keymap file"));

@ -81,13 +81,13 @@ KURL KRSpWidgets::newFTP() {
TQString password = p->password->text().simplifyWhiteSpace(); TQString password = p->password->text().simplifyWhiteSpace();
TQString uri = p->url->currentText(); TQString uri = p->url->currentText();
int uriStart = uri.tqfindRev( '@' ); /* lets the user enter user and password in the URI field */ int uriStart = uri.findRev( '@' ); /* lets the user enter user and password in the URI field */
if( uriStart != -1 ) { if( uriStart != -1 ) {
TQString uriUser = uri.left( uriStart ); TQString uriUser = uri.left( uriStart );
TQString uriPsw = TQString(); TQString uriPsw = TQString();
uri = uri.mid( uriStart + 1 ); uri = uri.mid( uriStart + 1 );
int pswStart = uriUser.tqfind( ':' ); /* getting the password name from the URL */ int pswStart = uriUser.find( ':' ); /* getting the password name from the URL */
if( pswStart != -1 ) { if( pswStart != -1 ) {
uriPsw = uriUser.mid( pswStart + 1 ); uriPsw = uriUser.mid( pswStart + 1 );
uriUser = uriUser.left( pswStart ); uriUser = uriUser.left( pswStart );
@ -102,7 +102,7 @@ KURL KRSpWidgets::newFTP() {
TQString host = uri; /* separating the hostname and path from the uri */ TQString host = uri; /* separating the hostname and path from the uri */
TQString path = TQString(); TQString path = TQString();
int pathStart = uri.tqfind( "/" ); int pathStart = uri.find( "/" );
if( pathStart != -1 ) { if( pathStart != -1 ) {
path = host.mid( pathStart ); path = host.mid( pathStart );
host = host.left( pathStart ); host = host.left( pathStart );
@ -184,7 +184,7 @@ void KRMaskChoiceSub::accept() {
TQStrList list; TQStrList list;
TQListBoxItem *i=preSelections->firstItem(); TQListBoxItem *i=preSelections->firstItem();
while (i!=0) { while (i!=0) {
if (i->text().tqfind(i18n("compare mode"))==-1) if (i->text().find(i18n("compare mode"))==-1)
list.append(i->text().local8Bit()); list.append(i->text().local8Bit());
i=i->next(); i=i->next();
} }
@ -211,7 +211,7 @@ void KRMaskChoiceSub::addSelection() {
void KRMaskChoiceSub::deleteSelection() { void KRMaskChoiceSub::deleteSelection() {
if (preSelections->currentItem()!=-1 && if (preSelections->currentItem()!=-1 &&
preSelections->currentText().tqfind(i18n("compare mode"))==-1) { preSelections->currentText().find(i18n("compare mode"))==-1) {
preSelections->removeItem(preSelections->currentItem()); preSelections->removeItem(preSelections->currentItem());
preSelections->update(); preSelections->update();
} }
@ -283,7 +283,7 @@ int QuickNavLineEdit::charCount(const TQMouseEvent * const m,TQString * const st
int numOfChars = findCharFromPos(tx, fontMetrics(), m->x() - 5); int numOfChars = findCharFromPos(tx, fontMetrics(), m->x() - 5);
if(str) *str=tx; if(str) *str=tx;
return tx.tqfind('/', numOfChars); return tx.find('/', numOfChars);
} }
void QuickNavLineEdit::mouseMoveEvent( TQMouseEvent *m) { void QuickNavLineEdit::mouseMoveEvent( TQMouseEvent *m) {

@ -49,12 +49,12 @@ void KrSqueezedTextLabel::squeezeTextToLabel(int index, int length) {
if (index>3) { if (index>3) {
delta=TQMIN(index, numOfExtraChars); delta=TQMIN(index, numOfExtraChars);
numOfExtraChars -= delta; numOfExtraChars -= delta;
sqtext.tqreplace(0, delta, "..."); sqtext.replace(0, delta, "...");
} }
if (numOfExtraChars>0 && ((int)sqtext.length() > length+3)) { if (numOfExtraChars>0 && ((int)sqtext.length() > length+3)) {
delta = TQMIN(numOfExtraChars, (int)sqtext.length() - (length+3)); delta = TQMIN(numOfExtraChars, (int)sqtext.length() - (length+3));
sqtext.tqreplace(sqtext.length()-delta, delta, "..."); sqtext.replace(sqtext.length()-delta, delta, "...");
} }
TQLabel::setText(sqtext); TQLabel::setText(sqtext);

@ -74,13 +74,13 @@ newFTPGUI::newFTPGUI( TQWidget* tqparent, const char* name, bool modal, WFlags
TQStringList protocols = KProtocolInfo::protocols(); TQStringList protocols = KProtocolInfo::protocols();
prefix = new KComboBox( FALSE, grid_host, "protocol" ); prefix = new KComboBox( FALSE, grid_host, "protocol" );
if( protocols.tqcontains("ftp") ) if( protocols.contains("ftp") )
prefix->insertItem( i18n( "ftp://" ) ); prefix->insertItem( i18n( "ftp://" ) );
if( protocols.tqcontains("smb") ) if( protocols.contains("smb") )
prefix->insertItem( i18n( "smb://" ) ); prefix->insertItem( i18n( "smb://" ) );
if( protocols.tqcontains("fish") ) if( protocols.contains("fish") )
prefix->insertItem( i18n( "fish://" )); prefix->insertItem( i18n( "fish://" ));
if( protocols.tqcontains("sftp") ) if( protocols.contains("sftp") )
prefix->insertItem( i18n( "sftp://" )); prefix->insertItem( i18n( "sftp://" ));
prefix->setAcceptDrops( FALSE ); prefix->setAcceptDrops( FALSE );
prefix->setEnabled( TRUE ); prefix->setEnabled( TRUE );

@ -38,7 +38,7 @@
#include <tqlabel.h> #include <tqlabel.h>
#include <tqpushbutton.h> #include <tqpushbutton.h>
#define PS(x) lst.tqcontains(x)>0 #define PS(x) lst.contains(x)>0
// clear the statics first // clear the statics first
TQString PackGUI::filename=0; TQString PackGUI::filename=0;

@ -57,7 +57,7 @@ public:
rect.setX( splitter->sizes()[ 0 ] ); rect.setX( splitter->sizes()[ 0 ] );
rect.setWidth( splitter->handleWidth() ); rect.setWidth( splitter->handleWidth() );
} }
if( rect.tqcontains( point ) ) if( rect.contains( point ) )
tip( rect, tipString ); tip( rect, tipString );
} }
} }

@ -108,7 +108,7 @@ void PopularUrls::addUrl(const KURL& url) {
appendNode(pnode); appendNode(pnode);
ranks.insert(tmpurl.url(), head); ranks.insert(tmpurl.url(), head);
} else { } else {
pnode = ranks.tqfind(tmpurl.url()); pnode = ranks.find(tmpurl.url());
if (!pnode) { // is the added url new? if so, append it if (!pnode) { // is the added url new? if so, append it
pnode = new UrlNode; pnode = new UrlNode;
pnode->rank = STARTING_RANK; pnode->rank = STARTING_RANK;

@ -428,7 +428,7 @@ Directory * DiskUsage::getDirectory( TQString dir )
if( dir.isEmpty() ) if( dir.isEmpty() )
return root; return root;
return contentMap.tqfind( dir ); return contentMap.find( dir );
} }
File * DiskUsage::getFile( TQString path ) File * DiskUsage::getFile( TQString path )
@ -438,7 +438,7 @@ File * DiskUsage::getFile( TQString path )
TQString dir = path; TQString dir = path;
int ndx = path.tqfindRev( '/' ); int ndx = path.findRev( '/' );
TQString file = path.mid( ndx + 1 ); TQString file = path.mid( ndx + 1 );
if( ndx == -1 ) if( ndx == -1 )
@ -686,15 +686,15 @@ int DiskUsage::del( File *file, bool calcPercents, int depth )
void * DiskUsage::getProperty( File *item, TQString key ) void * DiskUsage::getProperty( File *item, TQString key )
{ {
Properties * props = propertyMap.tqfind( item ); Properties * props = propertyMap.find( item );
if( props == 0 ) if( props == 0 )
return 0; return 0;
return props->tqfind( key ); return props->find( key );
} }
void DiskUsage::addProperty( File *item, TQString key, void * prop ) void DiskUsage::addProperty( File *item, TQString key, void * prop )
{ {
Properties * props = propertyMap.tqfind( item ); Properties * props = propertyMap.find( item );
if( props == 0 ) if( props == 0 )
{ {
props = new Properties(); props = new Properties();
@ -705,7 +705,7 @@ void DiskUsage::addProperty( File *item, TQString key, void * prop )
void DiskUsage::removeProperty( File *item, TQString key ) void DiskUsage::removeProperty( File *item, TQString key )
{ {
Properties * props = propertyMap.tqfind( item ); Properties * props = propertyMap.find( item );
if( props == 0 ) if( props == 0 )
return; return;
props->remove( key ); props->remove( key );
@ -963,7 +963,7 @@ TQPixmap DiskUsage::getIcon( TQString mime )
{ {
TQPixmap icon; TQPixmap icon;
if ( !TQPixmapCache::tqfind( mime, icon ) ) if ( !TQPixmapCache::find( mime, icon ) )
{ {
// get the icon. // get the icon.
if ( mime == "Broken Link !" ) if ( mime == "Broken Link !" )
@ -1038,7 +1038,7 @@ TQString DiskUsage::getToolTip( File *item )
"<tr><td>" + i18n( "Permissions:" ) + "</td><td>" + item->perm() + "</td></tr>"+ "<tr><td>" + i18n( "Permissions:" ) + "</td><td>" + item->perm() + "</td></tr>"+
"<tr><td>" + i18n( "Owner:" ) + "</td><td>" + item->owner() + " - " + item->group() + "</td></tr>"+ "<tr><td>" + i18n( "Owner:" ) + "</td><td>" + item->owner() + " - " + item->group() + "</td></tr>"+
"</table></h5></qt>"; "</table></h5></qt>";
str.tqreplace( " ", "&nbsp;" ); str.replace( " ", "&nbsp;" );
return str; return str;
} }

@ -463,7 +463,7 @@ void AdvancedFilter::fillList(TQComboBox *list, TQString filename) {
while (!data.atEnd()) while (!data.atEnd())
{ {
TQString s = t.readLine(); TQString s = t.readLine();
TQString name = s.left(s.tqfind(':')); TQString name = s.left(s.find(':'));
list->insertItem(name); list->insertItem(name);
} }
} }

@ -78,7 +78,7 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, TQWidget *tqpare
searchForLabel->setBuddy( searchFor ); searchForLabel->setBuddy( searchFor );
nameGroupLayout->addMultiCellWidget( searchFor, 0, 0, 1, 2 ); nameGroupLayout->addMultiCellWidget( searchFor, 0, 0, 1, 2 );
TQString s = "<p><img src='toolbar|tqfind'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>"); TQString s = "<p><img src='toolbar|find'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
TQWhatsThis::add(searchFor, s); TQWhatsThis::add(searchFor, s);
TQWhatsThis::add(searchForLabel, s); TQWhatsThis::add(searchForLabel, s);

@ -31,7 +31,7 @@ DirHistoryQueue::~DirHistoryQueue() {}
void DirHistoryQueue::slotPathChanged( ListPanel* p ) { void DirHistoryQueue::slotPathChanged( ListPanel* p ) {
KURL url = p->virtualPath(); KURL url = p->virtualPath();
// already in the queue ? // already in the queue ?
if( urlQueue.tqfindIndex( url ) >= 0 ){ if( urlQueue.findIndex( url ) >= 0 ){
// remove it ! // remove it !
urlQueue.remove( url ); urlQueue.remove( url );
} }
@ -60,7 +60,7 @@ void DirHistoryQueue::addUrl(const KURL& url){
void DirHistoryQueue::RemovePath( const TQString& path ) { void DirHistoryQueue::RemovePath( const TQString& path ) {
TQStringList::iterator it; TQStringList::iterator it;
it = pathQueue.tqfind( path ); it = pathQueue.find( path );
if ( it != pathQueue.end() ) { if ( it != pathQueue.end() ) {
pathQueue.remove( it ); pathQueue.remove( it );
} }

@ -158,11 +158,11 @@ void KCMDLine::slotRun() {
cmdLine->addToHistory(command1); cmdLine->addToHistory(command1);
if ( command1.simplifyWhiteSpace().left( 3 ) == "cd " ) { // cd command effect the active panel if ( command1.simplifyWhiteSpace().left( 3 ) == "cd " ) { // cd command effect the active panel
TQString dir = command1.right( command1.length() - command1.tqfind( " " ) ).stripWhiteSpace(); TQString dir = command1.right( command1.length() - command1.find( " " ) ).stripWhiteSpace();
if ( dir == "~" ) if ( dir == "~" )
dir = TQDir::homeDirPath(); dir = TQDir::homeDirPath();
else else
if ( dir.left( 1 ) != "/" && !dir.tqcontains( ":/" ) ) if ( dir.left( 1 ) != "/" && !dir.contains( ":/" ) )
dir = panelPath + ( panelPath == "/" ? "" : "/" ) + dir; dir = panelPath + ( panelPath == "/" ? "" : "/" ) + dir;
SLOTS->refresh( dir ); SLOTS->refresh( dir );
} else { } else {

@ -66,7 +66,7 @@ void KrRemoteEncodingMenu::slotAboutToShow()
int id = 1; int id = 1;
TQStringList::Iterator it; TQStringList::Iterator it;
for (it = encodingNames.begin(); it != encodingNames.end(); ++it, ++id) for (it = encodingNames.begin(); it != encodingNames.end(); ++it, ++id)
if ((*it).tqfind(charset) != -1) if ((*it).find(charset) != -1)
break; break;
// kdDebug() << k_funcinfo << "URL=" << currentURL << " charset=" << charset << endl; // kdDebug() << k_funcinfo << "URL=" << currentURL << " charset=" << charset << endl;

@ -187,13 +187,13 @@ void MediaButton::slotEntries( KIO::Job *, const KIO::UDSEntryList& entries )
if( mounted && !localPath.isEmpty() ) if( mounted && !localPath.isEmpty() )
{ {
url = KURL::fromPathOrURL( localPath ); url = KURL::fromPathOrURL( localPath );
if( !text.tqcontains( url.path() ) ) if( !text.contains( url.path() ) )
text += " [" + url.path() + "]"; text += " [" + url.path() + "]";
} }
else if( mounted ) else if( mounted )
{ {
url = getLocalPath( url, &mountList ); url = getLocalPath( url, &mountList );
if( url.isLocalFile() && !text.tqcontains( url.path() ) ) if( url.isLocalFile() && !text.contains( url.path() ) )
text += " [" + url.path() + "]"; text += " [" + url.path() + "]";
} }
@ -220,7 +220,7 @@ KURL MediaButton::getLocalPath( const KURL &url, KMountPoint::List *mountList )
for (KMountPoint::List::iterator it = mountList->begin(); it != mountList->end(); ++it) { for (KMountPoint::List::iterator it = mountList->begin(); it != mountList->end(); ++it) {
TQString name = (*it)->mountedFrom(); TQString name = (*it)->mountedFrom();
name = name.mid( name.tqfindRev( "/" ) + 1 ); name = name.mid( name.findRev( "/" ) + 1 );
if( name == url.fileName() ) { if( name == url.fileName() ) {
TQString point = (*it)->mountPoint(); TQString point = (*it)->mountPoint();
if( !point.isEmpty() ) if( !point.isEmpty() )
@ -285,7 +285,7 @@ TQString MediaButton::detectType( KMountPoint *mp )
{ {
TQTextStream in(&m); TQTextStream in(&m);
TQString buf=in.readLine(); TQString buf=in.readLine();
if(buf.tqcontains("cdrom")) if(buf.contains("cdrom"))
isCd=true; isCd=true;
m.close(); m.close();
} }
@ -315,44 +315,44 @@ TQString MediaButton::detectType( KMountPoint *mp )
return typeName; return typeName;
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
if (-1!=mp->mountedFrom().tqfind("/acd",0,FALSE)) typeName="cdrom"; if (-1!=mp->mountedFrom().find("/acd",0,FALSE)) typeName="cdrom";
else if (-1!=mp->mountedFrom().tqfind("/scd",0,FALSE)) typeName="cdrom"; else if (-1!=mp->mountedFrom().find("/scd",0,FALSE)) typeName="cdrom";
else if (-1!=mp->mountedFrom().tqfind("/ad",0,FALSE)) typeName="hdd"; else if (-1!=mp->mountedFrom().find("/ad",0,FALSE)) typeName="hdd";
else if (-1!=mp->mountedFrom().tqfind("/da",0,FALSE)) typeName="hdd"; else if (-1!=mp->mountedFrom().find("/da",0,FALSE)) typeName="hdd";
else if (-1!=mp->mountedFrom().tqfind("/afd",0,FALSE)) typeName="zip"; else if (-1!=mp->mountedFrom().find("/afd",0,FALSE)) typeName="zip";
else else
#endif #endif
/* Guessing of cdrom and cd recorder devices */ /* Guessing of cdrom and cd recorder devices */
if (-1!=mp->mountPoint().tqfind("cdrom",0,FALSE)) typeName="cdrom"; if (-1!=mp->mountPoint().find("cdrom",0,FALSE)) typeName="cdrom";
else if (-1!=mp->mountedFrom().tqfind("cdrom",0,FALSE)) typeName="cdrom"; else if (-1!=mp->mountedFrom().find("cdrom",0,FALSE)) typeName="cdrom";
else if (-1!=mp->mountPoint().tqfind("cdwriter",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountPoint().find("cdwriter",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountedFrom().tqfind("cdwriter",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountedFrom().find("cdwriter",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountedFrom().tqfind("cdrw",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountedFrom().find("cdrw",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountPoint().tqfind("cdrw",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountPoint().find("cdrw",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountedFrom().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountedFrom().find("cdrecorder",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountPoint().tqfind("cdrecorder",0,FALSE)) typeName="cdwriter"; else if (-1!=mp->mountPoint().find("cdrecorder",0,FALSE)) typeName="cdwriter";
else if (-1!=mp->mountedFrom().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter"; else if (-1!=mp->mountedFrom().find("dvdrecorder",0,FALSE)) typeName="dvdwriter";
else if (-1!=mp->mountPoint().tqfind("dvdrecorder",0,FALSE)) typeName="dvdwriter"; else if (-1!=mp->mountPoint().find("dvdrecorder",0,FALSE)) typeName="dvdwriter";
else if (-1!=mp->mountPoint().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter"; else if (-1!=mp->mountPoint().find("dvdwriter",0,FALSE)) typeName="dvdwriter";
else if (-1!=mp->mountedFrom().tqfind("dvdwriter",0,FALSE)) typeName="dvdwriter"; else if (-1!=mp->mountedFrom().find("dvdwriter",0,FALSE)) typeName="dvdwriter";
else if (-1!=mp->mountPoint().tqfind("dvd",0,FALSE)) typeName="dvd"; else if (-1!=mp->mountPoint().find("dvd",0,FALSE)) typeName="dvd";
else if (-1!=mp->mountedFrom().tqfind("dvd",0,FALSE)) typeName="dvd"; else if (-1!=mp->mountedFrom().find("dvd",0,FALSE)) typeName="dvd";
else if (-1!=mp->mountedFrom().tqfind("/dev/scd",0,FALSE)) typeName="cdrom"; else if (-1!=mp->mountedFrom().find("/dev/scd",0,FALSE)) typeName="cdrom";
else if (-1!=mp->mountedFrom().tqfind("/dev/sr",0,FALSE)) typeName="cdrom"; else if (-1!=mp->mountedFrom().find("/dev/sr",0,FALSE)) typeName="cdrom";
/* Guessing of floppy types */ /* Guessing of floppy types */
else if (-1!=mp->mountedFrom().tqfind("fd",0,FALSE)) { else if (-1!=mp->mountedFrom().find("fd",0,FALSE)) {
if (-1!=mp->mountedFrom().tqfind("360",0,FALSE)) typeName="floppy5"; if (-1!=mp->mountedFrom().find("360",0,FALSE)) typeName="floppy5";
if (-1!=mp->mountedFrom().tqfind("1200",0,FALSE)) typeName="floppy5"; if (-1!=mp->mountedFrom().find("1200",0,FALSE)) typeName="floppy5";
else typeName="floppy"; else typeName="floppy";
} }
else if (-1!=mp->mountPoint().tqfind("floppy",0,FALSE)) typeName="floppy"; else if (-1!=mp->mountPoint().find("floppy",0,FALSE)) typeName="floppy";
else if (-1!=mp->mountPoint().tqfind("zip",0,FALSE)) typeName="zip"; else if (-1!=mp->mountPoint().find("zip",0,FALSE)) typeName="zip";
else if (-1!=mp->mountType().tqfind("nfs",0,FALSE)) typeName="nfs"; else if (-1!=mp->mountType().find("nfs",0,FALSE)) typeName="nfs";
else if (-1!=mp->mountType().tqfind("smb",0,FALSE)) typeName="smb"; else if (-1!=mp->mountType().find("smb",0,FALSE)) typeName="smb";
else if (-1!=mp->mountedFrom().tqfind("//",0,FALSE)) typeName="smb"; else if (-1!=mp->mountedFrom().find("//",0,FALSE)) typeName="smb";
else typeName="hdd"; else typeName="hdd";
return typeName; return typeName;
@ -383,13 +383,13 @@ void MediaButton::gettingSpaceData(const TQString &mountPoint, unsigned long kBS
TQString mime = mimes[ i ]; TQString mime = mimes[ i ];
if( mimes[ i ].endsWith( "_mounted" ) ) { if( mimes[ i ].endsWith( "_mounted" ) ) {
quasiMounted[ i ] = true; quasiMounted[ i ] = true;
mimes[ i ] = mimes[ i ].tqreplace( "_mounted", "_unmounted" ); mimes[ i ] = mimes[ i ].replace( "_mounted", "_unmounted" );
} }
TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( TQString(), true ) ); TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ i ] ) ->icon( TQString(), true ) );
popupMenu->changeItem( i, pixmap, popupMenu->text( i ) ); popupMenu->changeItem( i, pixmap, popupMenu->text( i ) );
} }
else if( mimes[ i ].tqcontains( "hdd_" ) ) else if( mimes[ i ].contains( "hdd_" ) )
popupMenu->changeItem( i, sizeText + " " + popupMenu->text( i ).stripWhiteSpace() ); popupMenu->changeItem( i, sizeText + " " + popupMenu->text( i ).stripWhiteSpace() );
return; return;
} }
@ -408,7 +408,7 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
if( mp->mountPoint() == "/dev/swap" || if( mp->mountPoint() == "/dev/swap" ||
mp->mountPoint() == "/dev/pts" || mp->mountPoint() == "/dev/pts" ||
mp->mountPoint().startsWith( "/sys/kernel" ) || mp->mountPoint().startsWith( "/sys/kernel" ) ||
mp->mountPoint().tqfind( "/proc" ) == 0 ) mp->mountPoint().find( "/proc" ) == 0 )
return; return;
if( mp->mountType() == "swap" || if( mp->mountType() == "swap" ||
mp->mountType() == "sysfs" || mp->mountType() == "sysfs" ||
@ -421,7 +421,7 @@ void MediaButton::addMountPoint( KMountPoint * mp, bool isMounted ) {
return; return;
if( mp->mountedFrom() == "none" || if( mp->mountedFrom() == "none" ||
mp->mountedFrom() == "tmpfs" || mp->mountedFrom() == "tmpfs" ||
mp->mountedFrom().tqfind( "shm" ) != -1 ) mp->mountedFrom().find( "shm" ) != -1 )
return; return;
int overwrite = -1; int overwrite = -1;
@ -522,8 +522,8 @@ void MediaButton::rightClickMenu( int index ) {
rightMenu->close(); rightMenu->close();
TQString mime = mimes[ index ]; TQString mime = mimes[ index ];
bool ejectable = mime.tqcontains( "dvd_" ) || mime.tqcontains( "dvdwriter_" ) || mime.tqcontains( "cdrom_" ) || mime.tqcontains( "cdwriter_" ); bool ejectable = mime.contains( "dvd_" ) || mime.contains( "dvdwriter_" ) || mime.contains( "cdrom_" ) || mime.contains( "cdwriter_" );
bool mounted = mime.tqcontains( "_mounted" ); bool mounted = mime.contains( "_mounted" );
TQPopupMenu * myMenu = rightMenu = new TQPopupMenu( popupMenu ); TQPopupMenu * myMenu = rightMenu = new TQPopupMenu( popupMenu );
myMenu->insertItem( i18n( "Open" ), 1 ); myMenu->insertItem( i18n( "Open" ), 1 );
@ -635,11 +635,11 @@ void MediaButton::slotTimeout() {
urls[ index ] = uri; urls[ index ] = uri;
mounted = true; mounted = true;
if( !text.tqcontains( uri.path() ) ) if( !text.contains( uri.path() ) )
{ {
if( text.endsWith( "]" ) ) if( text.endsWith( "]" ) )
{ {
int ndx = text.tqfindRev( " [" ); int ndx = text.findRev( " [" );
if( ndx >0 ) if( ndx >0 )
text.truncate( ndx ); text.truncate( ndx );
} }
@ -651,7 +651,7 @@ void MediaButton::slotTimeout() {
{ {
if( text.endsWith( "]" ) ) if( text.endsWith( "]" ) )
{ {
int ndx = text.tqfindRev( " [" ); int ndx = text.findRev( " [" );
if( ndx >0 ) if( ndx >0 )
text.truncate( ndx ); text.truncate( ndx );
} }
@ -661,10 +661,10 @@ void MediaButton::slotTimeout() {
if( quasiMounted[ index ] ) // mounted but not listed with DF if( quasiMounted[ index ] ) // mounted but not listed with DF
mounted = false; mounted = false;
if( mimes[ index ].tqcontains( "_mounted" ) && !mounted ) if( mimes[ index ].contains( "_mounted" ) && !mounted )
mimes[ index ] = mimes[ index ].tqreplace( "_mounted", "_unmounted" ); mimes[ index ] = mimes[ index ].replace( "_mounted", "_unmounted" );
if( mimes[ index ].tqcontains( "_unmounted" ) && mounted ) if( mimes[ index ].contains( "_unmounted" ) && mounted )
mimes[ index ] = mimes[ index ].tqreplace( "_unmounted", "_mounted" ); mimes[ index ] = mimes[ index ].replace( "_unmounted", "_mounted" );
TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( TQString(), true ) ); TQPixmap pixmap = FL_LOADICON( KMimeType::mimeType( mimes[ index ] ) ->icon( TQString(), true ) );
popupMenu->changeItem( index, pixmap, text ); popupMenu->changeItem( index, pixmap, text );

@ -114,7 +114,7 @@ void ProfileManager::newProfile( TQString defaultName )
if( !profile.isEmpty() ) if( !profile.isEmpty() )
{ {
int profileNum = 1; int profileNum = 1;
while( profileList.tqcontains( TQString( "%1" ).tqarg( profileNum ) ) ) while( profileList.contains( TQString( "%1" ).tqarg( profileNum ) ) )
profileNum++; profileNum++;
TQString profileString = TQString( "%1" ).tqarg( profileNum ); TQString profileString = TQString( "%1" ).tqarg( profileNum );

@ -169,11 +169,11 @@ bool KrViewer::eventFilter ( TQObject * /* watched */, TQEvent * e )
if( e->type() == TQEvent::AccelOverride ) if( e->type() == TQEvent::AccelOverride )
{ {
TQKeyEvent* ke = (TQKeyEvent*) e; TQKeyEvent* ke = (TQKeyEvent*) e;
if( reservedKeys.tqcontains( ke->key() ) ) if( reservedKeys.contains( ke->key() ) )
{ {
ke->accept(); ke->accept();
int id = reservedKeyIDs[ reservedKeys.tqfindIndex( ke->key() ) ]; int id = reservedKeyIDs[ reservedKeys.findIndex( ke->key() ) ];
if( id != -1 ) if( id != -1 )
{ {
// don't activate the close functions immediately! // don't activate the close functions immediately!
@ -193,7 +193,7 @@ bool KrViewer::eventFilter ( TQObject * /* watched */, TQEvent * e )
else if( e->type() == TQEvent::KeyPress ) else if( e->type() == TQEvent::KeyPress )
{ {
TQKeyEvent* ke = (TQKeyEvent*) e; TQKeyEvent* ke = (TQKeyEvent*) e;
if( reservedKeys.tqcontains( ke->key() ) ) if( reservedKeys.contains( ke->key() ) )
{ {
ke->accept(); ke->accept();
return true; return true;
@ -606,7 +606,7 @@ bool KrViewer::viewGeneric() {
viewerMenu->setItemEnabled( 1, false ); viewerMenu->setItemEnabled( 1, false );
if ( !generic_part ) { if ( !generic_part ) {
if ( mimetype.tqcontains( "html" ) ) { if ( mimetype.contains( "html" ) ) {
KHTMLPart * p = new KHTMLPart( this, 0, 0, 0, KHTMLPart::BrowserViewGUI ); KHTMLPart * p = new KHTMLPart( this, 0, 0, 0, KHTMLPart::BrowserViewGUI );
connect( p->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ), connect( p->browserExtension(), TQT_SIGNAL( openURLRequest( const KURL &, const KParts::URLArgs & ) ),
TQT_TQOBJECT(this), TQT_SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) ); TQT_TQOBJECT(this), TQT_SLOT( handleOpenURLRequest( const KURL &, const KParts::URLArgs & ) ) );

@ -67,7 +67,7 @@ KgAdvanced::KgAdvanced( bool first, TQWidget* tqparent, const char* name ) :
KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup( 1, 0, generalSettings, 3, generalGrp ); KonfiguratorCheckBoxGroup *generals = createCheckBoxGroup( 1, 0, generalSettings, 3, generalGrp );
if( !isMediaProtocolPresent ) if( !isMediaProtocolPresent )
generals->tqfind( "DontUseMediaProt" )->setEnabled( false ); generals->find( "DontUseMediaProt" )->setEnabled( false );
generalGrid->addWidget( generals, 1, 0 ); generalGrid->addWidget( generals, 1, 0 );
@ -78,7 +78,7 @@ KgAdvanced::KgAdvanced( bool first, TQWidget* tqparent, const char* name ) :
#ifdef BSD #ifdef BSD
generals->tqfind( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */ generals->find( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */
#endif #endif
kgAdvancedLayout->addWidget( generalGrp, 0 ,0 ); kgAdvancedLayout->addWidget( generalGrp, 0 ,0 );

@ -119,20 +119,20 @@ void KgArchives::slotAutoConfigure()
void KgArchives::disableNonExistingPackers() void KgArchives::disableNonExistingPackers()
{ {
#define PS(x) lst.tqcontains(x)>0 #define PS(x) lst.contains(x)>0
TQStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers TQStringList lst=KRarcHandler::supportedPackers(); // get list of availble packers
cbs->tqfind( "Do Tar" )->setEnabled(PS("tar")); cbs->find( "Do Tar" )->setEnabled(PS("tar"));
cbs->tqfind( "Do GZip" )->setEnabled(PS("gzip")); cbs->find( "Do GZip" )->setEnabled(PS("gzip"));
cbs->tqfind( "Do BZip2" )->setEnabled(PS("bzip2")); cbs->find( "Do BZip2" )->setEnabled(PS("bzip2"));
cbs->tqfind( "Do UnZip" )->setEnabled(PS("unzip")); cbs->find( "Do UnZip" )->setEnabled(PS("unzip"));
cbs->tqfind( "Do Lha" )->setEnabled(PS("lha")); cbs->find( "Do Lha" )->setEnabled(PS("lha"));
cbs->tqfind( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio")); cbs->find( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio"));
cbs->tqfind( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") ); cbs->find( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") );
cbs->tqfind( "Do UnAce" )->setEnabled(PS("unace")); cbs->find( "Do UnAce" )->setEnabled(PS("unace"));
cbs->tqfind( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") ); cbs->find( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") );
cbs->tqfind( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") ); cbs->find( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") );
cbs->tqfind( "Do 7z" )->setEnabled( PS("7z") ); cbs->find( "Do 7z" )->setEnabled( PS("7z") );
krConfig->setGroup( "Archives" ); krConfig->setGroup( "Archives" );
krConfig->writeEntry( "Supported Packers", lst ); krConfig->writeEntry( "Supported Packers", lst );

@ -66,10 +66,10 @@ KgColors::KgColors( bool first, TQWidget* tqparent, const char* name ) :
generals->tqlayout()->setSpacing( 5 ); generals->tqlayout()->setSpacing( 5 );
connect( generals->tqfind( "KDE Default" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) ); connect( generals->find( "KDE Default" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
connect( generals->tqfind( "Enable Alternate Background" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( generatePreview() ) ); connect( generals->find( "Enable Alternate Background" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( generatePreview() ) );
connect( generals->tqfind( "Show Current Item Always" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) ); connect( generals->find( "Show Current Item Always" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
connect( generals->tqfind( "Dim Inactive Colors" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) ); connect( generals->find( "Dim Inactive Colors" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
kgColorsLayout->addMultiCellWidget( generalGrp, 0 ,0, 0, 2 ); kgColorsLayout->addMultiCellWidget( generalGrp, 0 ,0, 0, 2 );
TQHBox *hbox = new TQHBox( tqparent ); TQHBox *hbox = new TQHBox( tqparent );
@ -286,7 +286,7 @@ TQLabel *KgColors::getSelectorLabel( TQString name )
void KgColors::slotDisable() void KgColors::slotDisable()
{ {
bool enabled = generals->tqfind( "KDE Default" )->isChecked(); bool enabled = generals->find( "KDE Default" )->isChecked();
importBtn->setEnabled(!enabled); importBtn->setEnabled(!enabled);
exportBtn->setEnabled(!enabled); exportBtn->setEnabled(!enabled);
@ -297,17 +297,17 @@ void KgColors::slotDisable()
for( int j = 0; itemList.at( j ) && j < endOfPanelColors ; j++ ) for( int j = 0; itemList.at( j ) && j < endOfPanelColors ; j++ )
itemList.at( j )->setEnabled( !enabled ); itemList.at( j )->setEnabled( !enabled );
generals->tqfind("Enable Alternate Background")->setEnabled( enabled ); generals->find("Enable Alternate Background")->setEnabled( enabled );
generals->tqfind("Show Current Item Always")->setEnabled( !enabled ); generals->find("Show Current Item Always")->setEnabled( !enabled );
generals->tqfind("Dim Inactive Colors")->setEnabled( !enabled ); generals->find("Dim Inactive Colors")->setEnabled( !enabled );
bool dimmed = !enabled && generals->tqfind("Dim Inactive Colors")->isChecked(); bool dimmed = !enabled && generals->find("Dim Inactive Colors")->isChecked();
if( dimmed ) if( dimmed )
inactiveColorStack->raiseWidget( dimmedInactiveWidget ); inactiveColorStack->raiseWidget( dimmedInactiveWidget );
else else
inactiveColorStack->raiseWidget( normalInactiveWidget ); inactiveColorStack->raiseWidget( normalInactiveWidget );
enabled = enabled || !generals->tqfind( "Show Current Item Always" )->isChecked(); enabled = enabled || !generals->find( "Show Current Item Always" )->isChecked();
getColorSelector( "Inactive Current Foreground" )->setEnabled( !enabled ); getColorSelector( "Inactive Current Foreground" )->setEnabled( !enabled );
getColorSelector( "Inactive Current Background" )->setEnabled( !enabled ); getColorSelector( "Inactive Current Background" )->setEnabled( !enabled );
@ -440,10 +440,10 @@ void KgColors::generatePreview()
colorSettings.setColorValue( *it, TQColor()); colorSettings.setColorValue( *it, TQColor());
} }
colorSettings.setBoolValue("KDE Default", generals->tqfind( "KDE Default" )->isChecked()); colorSettings.setBoolValue("KDE Default", generals->find( "KDE Default" )->isChecked());
colorSettings.setBoolValue("Enable Alternate Background", generals->tqfind( "Enable Alternate Background" )->isChecked()); colorSettings.setBoolValue("Enable Alternate Background", generals->find( "Enable Alternate Background" )->isChecked());
colorSettings.setBoolValue("Show Current Item Always", generals->tqfind( "Show Current Item Always" )->isChecked()); colorSettings.setBoolValue("Show Current Item Always", generals->find( "Show Current Item Always" )->isChecked());
colorSettings.setBoolValue("Dim Inactive Colors", generals->tqfind( "Dim Inactive Colors" )->isChecked()); colorSettings.setBoolValue("Dim Inactive Colors", generals->find( "Dim Inactive Colors" )->isChecked());
colorSettings.setNumValue("Dim Factor", dimFactor->value()); colorSettings.setNumValue("Dim Factor", dimFactor->value());
// let the color cache use the local color settings // let the color cache use the local color settings
@ -498,7 +498,7 @@ bool KgColors::apply()
} }
void KgColors::slotImportColors() { void KgColors::slotImportColors() {
// tqfind $KDEDIR/share/apps/krusader // find $KDEDIR/share/apps/krusader
TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap"); TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load // let the user select a file to load
TQString file = KFileDialog::getOpenFileName(basedir, "*.color", 0, i18n("Select a color-scheme file")); TQString file = KFileDialog::getOpenFileName(basedir, "*.color", 0, i18n("Select a color-scheme file"));
@ -593,7 +593,7 @@ void KgColors::deserialize(TQDataStream & stream)
if( value == "true" || value == "yes" || value == "on" || value == "1" ) if( value == "true" || value == "yes" || value == "on" || value == "1" )
bValue = true; bValue = true;
generals->tqfind( name )->setChecked( bValue ); generals->find( name )->setChecked( bValue );
continue; continue;
} }
@ -618,7 +618,7 @@ void KgColors::serializeItem(class TQDataStream & stream, const char * name)
|| (strcmp( name, "Show Current Item Always") == 0) || (strcmp( name, "Show Current Item Always") == 0)
|| (strcmp( name, "Dim Inactive Colors") == 0) ) || (strcmp( name, "Dim Inactive Colors") == 0) )
{ {
bool bValue = generals->tqfind( name )->isChecked(); bool bValue = generals->find( name )->isChecked();
stream << TQString( bValue ? "true" : "false" ); stream << TQString( bValue ? "true" : "false" );
} }
else if( strcmp( name, "Dim Factor") == 0 ) else if( strcmp( name, "Dim Factor") == 0 )

@ -196,7 +196,7 @@ void KgGeneral::slotAddExtension()
if( ok ) if( ok )
{ {
if( !atomExt.startsWith( "." ) || atomExt.tqfind( '.', 1 ) == -1 ) if( !atomExt.startsWith( "." ) || atomExt.find( '.', 1 ) == -1 )
KMessageBox::error(krApp, i18n("Atomic extensions must start with '.'\n and must contain at least one more '.' character"), i18n("Error")); KMessageBox::error(krApp, i18n("Atomic extensions must start with '.'\n and must contain at least one more '.' character"), i18n("Error"));
else else
listBox->addItem( atomExt ); listBox->addItem( atomExt );

@ -107,7 +107,7 @@ void KgLookFeel::setupOperationTab() {
quicksearchCheckboxes = createCheckBoxGroup( 2, 0, quicksearch, 2 /*count*/, quicksearchGroup, 0, PAGE_OPERATION ); quicksearchCheckboxes = createCheckBoxGroup( 2, 0, quicksearch, 2 /*count*/, quicksearchGroup, 0, PAGE_OPERATION );
quicksearchGrid->addWidget( quicksearchCheckboxes, 0, 0 ); quicksearchGrid->addWidget( quicksearchCheckboxes, 0, 0 );
connect( quicksearchCheckboxes->tqfind( "New Style Quicksearch" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) ); connect( quicksearchCheckboxes->find( "New Style Quicksearch" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
slotDisable(); slotDisable();
lookAndFeelLayout->addWidget( quicksearchGroup, 1, 0 ); lookAndFeelLayout->addWidget( quicksearchGroup, 1, 0 );
@ -197,7 +197,7 @@ void KgLookFeel::setupPanelToolbarTab() {
}; };
panelToolbarActive = createCheckBoxGroup( 1, 0, panelToolbarActiveCheckbox, 1, tab_4, "panelToolbarActive", PAGE_PANELTOOLBAR); panelToolbarActive = createCheckBoxGroup( 1, 0, panelToolbarActiveCheckbox, 1, tab_4, "panelToolbarActive", PAGE_PANELTOOLBAR);
connect( panelToolbarActive->tqfind( "Panel Toolbar visible" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotEnablePanelToolbar() ) ); connect( panelToolbarActive->find( "Panel Toolbar visible" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotEnablePanelToolbar() ) );
TQGroupBox * panelToolbarGrp = createFrame( i18n( "Visible Panel Toolbar buttons" ), tab_4, "panelToolbarGrp"); TQGroupBox * panelToolbarGrp = createFrame( i18n( "Visible Panel Toolbar buttons" ), tab_4, "panelToolbarGrp");
TQGridLayout * panelToolbarGrid = createGridLayout( panelToolbarGrp->tqlayout() ); TQGridLayout * panelToolbarGrid = createGridLayout( panelToolbarGrp->tqlayout() );
@ -335,34 +335,34 @@ void KgLookFeel::setupMouseModeTab() {
void KgLookFeel::slotDisable() void KgLookFeel::slotDisable()
{ {
bool isNewStyleQuickSearch = quicksearchCheckboxes->tqfind( "New Style Quicksearch" )->isChecked(); bool isNewStyleQuickSearch = quicksearchCheckboxes->find( "New Style Quicksearch" )->isChecked();
quicksearchCheckboxes->tqfind( "Case Sensitive Quicksearch" )->setEnabled( isNewStyleQuickSearch ); quicksearchCheckboxes->find( "Case Sensitive Quicksearch" )->setEnabled( isNewStyleQuickSearch );
} }
void KgLookFeel::slotEnablePanelToolbar() void KgLookFeel::slotEnablePanelToolbar()
{ {
bool enableTB = panelToolbarActive->tqfind("Panel Toolbar visible")->isChecked(); bool enableTB = panelToolbarActive->find("Panel Toolbar visible")->isChecked();
pnlcbs->tqfind( "Root Button Visible" )->setEnabled(enableTB); pnlcbs->find( "Root Button Visible" )->setEnabled(enableTB);
pnlcbs->tqfind( "Home Button Visible" )->setEnabled(enableTB); pnlcbs->find( "Home Button Visible" )->setEnabled(enableTB);
pnlcbs->tqfind( "Up Button Visible" )->setEnabled(enableTB); pnlcbs->find( "Up Button Visible" )->setEnabled(enableTB);
pnlcbs->tqfind( "Equal Button Visible" )->setEnabled(enableTB); pnlcbs->find( "Equal Button Visible" )->setEnabled(enableTB);
pnlcbs->tqfind( "Open Button Visible" )->setEnabled(enableTB); pnlcbs->find( "Open Button Visible" )->setEnabled(enableTB);
pnlcbs->tqfind("SyncBrowse Button Visible")->setEnabled(enableTB); pnlcbs->find("SyncBrowse Button Visible")->setEnabled(enableTB);
} }
void KgLookFeel::slotSelectionModeChanged() { void KgLookFeel::slotSelectionModeChanged() {
bool enable = mouseRadio->tqfind( i18n("Custom Selection Mode") )->isChecked(); bool enable = mouseRadio->find( i18n("Custom Selection Mode") )->isChecked();
mouseCheckboxes->tqfind( "QT Selection" )->setEnabled( enable ); mouseCheckboxes->find( "QT Selection" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Left Selects" )->setEnabled( enable ); mouseCheckboxes->find( "Left Selects" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Left Preserves" )->setEnabled( enable ); mouseCheckboxes->find( "Left Preserves" )->setEnabled( enable );
mouseCheckboxes->tqfind( "ShiftCtrl Left Selects" )->setEnabled( enable ); mouseCheckboxes->find( "ShiftCtrl Left Selects" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Right Selects" )->setEnabled( enable ); mouseCheckboxes->find( "Right Selects" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Right Preserves" )->setEnabled( enable ); mouseCheckboxes->find( "Right Preserves" )->setEnabled( enable );
mouseCheckboxes->tqfind( "ShiftCtrl Right Selects" )->setEnabled( enable ); mouseCheckboxes->find( "ShiftCtrl Right Selects" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Space Moves Down" )->setEnabled( enable ); mouseCheckboxes->find( "Space Moves Down" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Space Calc Space" )->setEnabled( enable ); mouseCheckboxes->find( "Space Calc Space" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Insert Moves Down" )->setEnabled( enable ); mouseCheckboxes->find( "Insert Moves Down" )->setEnabled( enable );
mouseCheckboxes->tqfind( "Immediate Context Menu" )->setEnabled( enable ); mouseCheckboxes->find( "Immediate Context Menu" )->setEnabled( enable );
} }
int KgLookFeel::activeSubPage() { int KgLookFeel::activeSubPage() {

@ -204,7 +204,7 @@ void KgProtocols::slotAddProtocol()
void KgProtocols::addProtocol( TQString name, bool changeCurrent ) void KgProtocols::addProtocol( TQString name, bool changeCurrent )
{ {
TQListBoxItem *item = protocolList->tqfindItem( name, ExactMatch ); TQListBoxItem *item = protocolList->findItem( name, ExactMatch );
if( item ) if( item )
{ {
protocolList->removeItem( protocolList->index( item ) ); protocolList->removeItem( protocolList->index( item ) );
@ -229,7 +229,7 @@ void KgProtocols::slotRemoveProtocol()
void KgProtocols::removeProtocol( TQString name ) void KgProtocols::removeProtocol( TQString name )
{ {
TQListViewItem *item = linkList->tqfindItem( name, 0 ); TQListViewItem *item = linkList->findItem( name, 0 );
if( item ) if( item )
{ {
while( item->childCount() != 0 ) while( item->childCount() != 0 )
@ -258,8 +258,8 @@ void KgProtocols::slotAddMime()
void KgProtocols::addMime( TQString name, TQString protocol ) void KgProtocols::addMime( TQString name, TQString protocol )
{ {
TQListBoxItem *item = mimeList->tqfindItem( name, ExactMatch ); TQListBoxItem *item = mimeList->findItem( name, ExactMatch );
TQListViewItem *currentListItem = linkList->tqfindItem( protocol, 0 ); TQListViewItem *currentListItem = linkList->findItem( protocol, 0 );
if( item && currentListItem && currentListItem->tqparent() == 0 ) if( item && currentListItem && currentListItem->tqparent() == 0 )
{ {
@ -283,7 +283,7 @@ void KgProtocols::slotRemoveMime()
void KgProtocols::removeMime( TQString name ) void KgProtocols::removeMime( TQString name )
{ {
TQListViewItem *currentMimeItem = linkList->tqfindItem( name, 0 ); TQListViewItem *currentMimeItem = linkList->findItem( name, 0 );
if( currentMimeItem && currentMimeItem->tqparent() != 0 ) if( currentMimeItem && currentMimeItem->tqparent() != 0 )
{ {
@ -351,7 +351,7 @@ bool KgProtocols::isChanged()
TQListViewItem *item = linkList->firstChild(); TQListViewItem *item = linkList->firstChild();
while( item ) while( item )
{ {
if( !protList.tqcontains( item->text( 0 ) ) ) if( !protList.contains( item->text( 0 ) ) )
return true; return true;
TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( item->text( 0 ) ) ); TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( item->text( 0 ) ) );
@ -361,7 +361,7 @@ bool KgProtocols::isChanged()
TQListViewItem *childs = item->firstChild(); TQListViewItem *childs = item->firstChild();
while( childs ) while( childs )
{ {
if( !mimes.tqcontains( childs->text( 0 ) ) ) if( !mimes.contains( childs->text( 0 ) ) )
return true; return true;
childs = childs->nextSibling(); childs = childs->nextSibling();
} }
@ -405,7 +405,7 @@ bool KgProtocols::apply()
void KgProtocols::init() void KgProtocols::init()
{ {
if( !krConfig->groupList().tqcontains( "Protocols" ) ) if( !krConfig->groupList().contains( "Protocols" ) )
{ {
krConfig->setGroup( "Protocols" ); krConfig->setGroup( "Protocols" );
krConfig->writeEntry( "Handled Protocols", defaultProtocols ); krConfig->writeEntry( "Handled Protocols", defaultProtocols );

@ -47,7 +47,7 @@ KgStartup::KgStartup( bool first, TQWidget* tqparent, const char* name ) :
TQGroupBox *panelsGrp = createFrame( i18n( "General" ), tqparent, "panelsGrp" ); TQGroupBox *panelsGrp = createFrame( i18n( "General" ), tqparent, "panelsGrp" );
TQGridLayout *panelsGrid = createGridLayout( panelsGrp->tqlayout() ); TQGridLayout *panelsGrid = createGridLayout( panelsGrp->tqlayout() );
TQString s = "<p><img src='toolbar|kr_profile'></p>" + i18n( "Defines the panel profile used at startup. A panel profile tqcontains:<ul><li>all the tabs paths</li><li>the current tab</li><li>the active panel</li></ul><b>&lt;Last session&gt;</b> is a special panel profile which is saved automatically when Krusader is closed."); TQString s = "<p><img src='toolbar|kr_profile'></p>" + i18n( "Defines the panel profile used at startup. A panel profile contains:<ul><li>all the tabs paths</li><li>the current tab</li><li>the active panel</li></ul><b>&lt;Last session&gt;</b> is a special panel profile which is saved automatically when Krusader is closed.");
TQLabel *label = addLabel( panelsGrid, 0, 0, i18n( "Startup profile:" ), panelsGrp, "Startup session" ); TQLabel *label = addLabel( panelsGrid, 0, 0, i18n( "Startup profile:" ), panelsGrp, "Startup session" );
TQWhatsThis::add( label, s ); TQWhatsThis::add( label, s );
TQWhatsThis::add( panelsGrp, s ); TQWhatsThis::add( panelsGrp, s );
@ -96,7 +96,7 @@ KgStartup::KgStartup( bool first, TQWidget* tqparent, const char* name ) :
}; };
uiCbGroup = createCheckBoxGroup( 2, 0, uiCheckBoxes, 8, uiGrp ); uiCbGroup = createCheckBoxGroup( 2, 0, uiCheckBoxes, 8, uiGrp );
connect( uiCbGroup->tqfind( "UI Save Settings" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) ); connect( uiCbGroup->find( "UI Save Settings" ), TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( slotDisable() ) );
uiGrid->addWidget( uiCbGroup, 1, 0 ); uiGrid->addWidget( uiCbGroup, 1, 0 );
@ -107,11 +107,11 @@ KgStartup::KgStartup( bool first, TQWidget* tqparent, const char* name ) :
void KgStartup::slotDisable() void KgStartup::slotDisable()
{ {
bool isUiSave = !uiCbGroup->tqfind( "UI Save Settings" )->isChecked(); bool isUiSave = !uiCbGroup->find( "UI Save Settings" )->isChecked();
int i=1; int i=1;
while( uiCbGroup->tqfind( i ) ) while( uiCbGroup->find( i ) )
uiCbGroup->tqfind( i++ )->setEnabled( isUiSave ); uiCbGroup->find( i++ )->setEnabled( isUiSave );
} }
#include "kgstartup.moc" #include "kgstartup.moc"

@ -44,9 +44,9 @@ KonfiguratorExtension::KonfiguratorExtension( TQObject *obj, TQString cfgClass,
void KonfiguratorExtension::connectNotify( const char *signal ) void KonfiguratorExtension::connectNotify( const char *signal )
{ {
TQString signalString = TQString( signal ).tqreplace( " ", "" ); TQString signalString = TQString( signal ).replace( " ", "" );
TQString applyString = TQString( TQT_SIGNAL( applyManually(TQObject *,TQString, TQString) ) ).tqreplace( " ", "" ); TQString applyString = TQString( TQT_SIGNAL( applyManually(TQObject *,TQString, TQString) ) ).replace( " ", "" );
TQString defaultsString = TQString( TQT_SIGNAL( setDefaultsManually(TQObject *) ) ).tqreplace( " ", "" ); TQString defaultsString = TQString( TQT_SIGNAL( setDefaultsManually(TQObject *) ) ).replace( " ", "" );
if( signalString == applyString ) if( signalString == applyString )
applyConnected = true; applyConnected = true;
@ -180,12 +180,12 @@ void KonfiguratorCheckBoxGroup::add( KonfiguratorCheckBox *checkBox )
checkBoxList.append( checkBox ); checkBoxList.append( checkBox );
} }
KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::tqfind( int index ) KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( int index )
{ {
return checkBoxList.at( index ); return checkBoxList.at( index );
} }
KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::tqfind( TQString name ) KonfiguratorCheckBox * KonfiguratorCheckBoxGroup::find( TQString name )
{ {
KonfiguratorCheckBox *checkBox = checkBoxList.first(); KonfiguratorCheckBox *checkBox = checkBoxList.first();
@ -227,14 +227,14 @@ void KonfiguratorRadioButtons::addRadioButton( TQRadioButton *radioWidget, TQStr
connect( radioWidget, TQT_SIGNAL( stateChanged(int) ), ext, TQT_SLOT( setChanged() ) ); connect( radioWidget, TQT_SIGNAL( stateChanged(int) ), ext, TQT_SLOT( setChanged() ) );
} }
TQRadioButton * KonfiguratorRadioButtons::tqfind( int index ) TQRadioButton * KonfiguratorRadioButtons::find( int index )
{ {
return radioButtons.at( index ); return radioButtons.at( index );
} }
TQRadioButton * KonfiguratorRadioButtons::tqfind( TQString name ) TQRadioButton * KonfiguratorRadioButtons::find( TQString name )
{ {
int index = radioNames.tqfindIndex( name ); int index = radioNames.findIndex( name );
if( index == -1 ) if( index == -1 )
return 0; return 0;
@ -795,7 +795,7 @@ TQStringList KonfiguratorListBox::list()
void KonfiguratorListBox::addItem( const TQString & item ) void KonfiguratorListBox::addItem( const TQString & item )
{ {
if( !list().tqcontains( item ) ) if( !list().contains( item ) )
{ {
insertItem( item ); insertItem( item );
ext->setChanged(); ext->setChanged();
@ -804,7 +804,7 @@ void KonfiguratorListBox::addItem( const TQString & item )
void KonfiguratorListBox::removeItem( const TQString & item ) void KonfiguratorListBox::removeItem( const TQString & item )
{ {
TQListBoxItem * listItem = tqfindItem( item ); TQListBoxItem * listItem = findItem( item );
if( listItem != 0 ) if( listItem != 0 )
{ {
takeItem( listItem ); takeItem( listItem );

@ -160,8 +160,8 @@ public:
TQWidget( tqparent, name ) {}; TQWidget( tqparent, name ) {};
void add( KonfiguratorCheckBox * ); void add( KonfiguratorCheckBox * );
KonfiguratorCheckBox * tqfind( int index ); KonfiguratorCheckBox * find( int index );
KonfiguratorCheckBox * tqfind( TQString name ); KonfiguratorCheckBox * find( TQString name );
private: private:
TQPtrList<KonfiguratorCheckBox> checkBoxList; TQPtrList<KonfiguratorCheckBox> checkBoxList;
@ -186,8 +186,8 @@ public:
void selectButton( TQString value ); void selectButton( TQString value );
TQRadioButton* tqfind( int index ); TQRadioButton* find( int index );
TQRadioButton* tqfind( TQString name ); TQRadioButton* find( TQString name );
public slots: public slots:
virtual void loadInitialValue(); virtual void loadInitialValue();

@ -91,7 +91,7 @@ bool KonfiguratorPage::isChanged()
item = itemList.next(); item = itemList.next();
} }
itemList.tqfind( currentItem ); /* restore the current pointer */ itemList.find( currentItem ); /* restore the current pointer */
return isChanged; return isChanged;
} }
@ -305,7 +305,7 @@ void KonfiguratorPage::registerObject( KonfiguratorExtension *item )
itemList.append( item ); itemList.append( item );
connect( item, TQT_SIGNAL( sigChanged( bool ) ), this, TQT_SIGNAL ( sigChanged( ) ) ); connect( item, TQT_SIGNAL( sigChanged( bool ) ), this, TQT_SIGNAL ( sigChanged( ) ) );
itemList.tqfind( currentItem ); itemList.find( currentItem );
} }
void KonfiguratorPage::removeObject( KonfiguratorExtension *item ) void KonfiguratorPage::removeObject( KonfiguratorExtension *item )

@ -363,7 +363,7 @@ public:
* maximum row number in one column. <br> * maximum row number in one column. <br>
* *
* One specific element can be reached by its name or index with the find methods. * One specific element can be reached by its name or index with the find methods.
* The first element is checkBoxGroup->tqfind( 0 ), "myCb" element is checkBoxGroup->tqfind( "myCb" ) ... * The first element is checkBoxGroup->find( 0 ), "myCb" element is checkBoxGroup->find( "myCb" ) ...
* *
* Sample:<br><br> * Sample:<br><br>
* KONFIGURATOR_CHECKBOX_PARAM myCBArray[] =<br> * KONFIGURATOR_CHECKBOX_PARAM myCBArray[] =<br>
@ -371,7 +371,7 @@ public:
* &nbsp;&nbsp;{"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br> * &nbsp;&nbsp;{"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br>
* &nbsp;&nbsp;{"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br> * &nbsp;&nbsp;{"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><br>
* KonfiguratorCheckBoxGroup *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myParent, "myCheckboxGroup" );<br> * KonfiguratorCheckBoxGroup *myCheckBoxGroup = createCheckBoxGroup( 1, 0, myCBArray, 3, myParent, "myCheckboxGroup" );<br>
* myCheckBoxGroup->tqfind( 0 )->setEnabled( false );<br><br> * myCheckBoxGroup->find( 0 )->setEnabled( false );<br><br>
* myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br> * myLayout->addWidget( myCheckBoxGroup, 0, 0 );<br>
* *
* @param sizex the maximum column number at horizontal placing * @param sizex the maximum column number at horizontal placing
@ -396,7 +396,7 @@ public:
* maximum row number in one column.<br> * maximum row number in one column.<br>
* *
* The references of the buttons can be accessed by the find methods of KonfiguratorRadioButtons. * The references of the buttons can be accessed by the find methods of KonfiguratorRadioButtons.
* The first element is myRadioGrp->tqfind( 0 ), "myRadio" element is myRadioGrp->tqfind( "myRadio" ) ... * The first element is myRadioGrp->find( 0 ), "myRadio" element is myRadioGrp->find( "myRadio" ) ...
* *
* Sample:<br><br> * Sample:<br><br>
* KONFIGURATOR_NAME_VALUE_TIP radioInfo[] =<br> * KONFIGURATOR_NAME_VALUE_TIP radioInfo[] =<br>
@ -404,7 +404,7 @@ public:
* &nbsp;&nbsp;{ i18n( "radio text2" ), "value2", i18n( "tooltip2" ) },<br> * &nbsp;&nbsp;{ i18n( "radio text2" ), "value2", i18n( "tooltip2" ) },<br>
* &nbsp;&nbsp;{ i18n( "radio text3" ), "value3", i18n( "tooltip3" ) }};<br><br> * &nbsp;&nbsp;{ i18n( "radio text3" ), "value3", i18n( "tooltip3" ) }};<br><br>
* KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br> * KonfiguratorRadioButtons *myRadioGroup = createRadioButtonGroup( "class", "name", "value1", 1, 0, radioInfo, 3, myParent, "myRadioGroup" );<br>
* myRadioGroup->tqfind( i18n( "radio text1" ) )->setEnabled( false );<br> * myRadioGroup->find( i18n( "radio text1" ) )->setEnabled( false );<br>
* myLayout->addWidget( myRadioGroup, 0, 0 );<br> * myLayout->addWidget( myRadioGroup, 0, 0 );<br>
* *
* @param cls The class name used in KConfig (ex. "Archives") * @param cls The class name used in KConfig (ex. "Archives")
@ -489,7 +489,7 @@ private:
}; };
/** /**
* KONFIGURATOR_CHECKBOX_PARAM is the basic item of checkbox arrays. It tqcontains * KONFIGURATOR_CHECKBOX_PARAM is the basic item of checkbox arrays. It contains
* every information related to a checkbox. * every information related to a checkbox.
*/ */
struct KONFIGURATOR_CHECKBOX_PARAM struct KONFIGURATOR_CHECKBOX_PARAM

@ -32,7 +32,7 @@
#include <iostream> #include <iostream>
using namespace std; using namespace std;
#define PS(x) _supported.tqcontains(x)>0 #define PS(x) _supported.contains(x)>0
KrResultTable::KrResultTable(TQWidget* tqparent) KrResultTable::KrResultTable(TQWidget* tqparent)
: TQWidget(tqparent), : TQWidget(tqparent),

@ -308,7 +308,7 @@ void LocateDlg::processStdout(KProcess *proc, char *buffer, int length)
TQString fileName = (*it).stripWhiteSpace(); TQString fileName = (*it).stripWhiteSpace();
if( fileName.endsWith( "/" ) && fileName != "/" ) if( fileName.endsWith( "/" ) && fileName != "/" )
fileName.truncate( fileName.length() -1 ); fileName.truncate( fileName.length() -1 );
fileName = fileName.mid( fileName.tqfindRev( '/' ) + 1 ); fileName = fileName.mid( fileName.findRev( '/' ) + 1 );
if( !regExp.exactMatch( fileName ) ) if( !regExp.exactMatch( fileName ) )
continue; continue;
@ -394,8 +394,8 @@ void LocateDlg::slotDoubleClick(TQListViewItem *item)
if( !TQDir( dirName ).exists() ) if( !TQDir( dirName ).exists() )
{ {
fileName = dirName.mid( dirName.tqfindRev( '/' ) + 1 ); fileName = dirName.mid( dirName.findRev( '/' ) + 1 );
dirName.truncate( dirName.tqfindRev( '/' ) ); dirName.truncate( dirName.findRev( '/' ) );
} }
ACTIVE_FUNC->openUrl(vfs::fromPathOrURL( dirName ), fileName ); ACTIVE_FUNC->openUrl(vfs::fromPathOrURL( dirName ), fileName );
@ -481,7 +481,7 @@ void LocateDlg::operate( TQListViewItem *item, int task )
findCurrentItem = (KListViewItem *)resultList->currentItem(); findCurrentItem = (KListViewItem *)resultList->currentItem();
if( tqfind() && findCurrentItem ) if( find() && findCurrentItem )
resultList->setCurrentItem( findCurrentItem ); resultList->setCurrentItem( findCurrentItem );
else else
KMessageBox::information( 0, i18n( "Search string not found!" ) ); KMessageBox::information( 0, i18n( "Search string not found!" ) );
@ -498,7 +498,7 @@ void LocateDlg::operate( TQListViewItem *item, int task )
findCurrentItem = (KListViewItem *)resultList->currentItem(); findCurrentItem = (KListViewItem *)resultList->currentItem();
nextLine(); nextLine();
if( tqfind() && findCurrentItem ) if( find() && findCurrentItem )
resultList->setCurrentItem( findCurrentItem ); resultList->setCurrentItem( findCurrentItem );
else else
KMessageBox::information( 0, i18n( "Search string not found!" ) ); KMessageBox::information( 0, i18n( "Search string not found!" ) );
@ -541,7 +541,7 @@ void LocateDlg::nextLine()
findCurrentItem = (KListViewItem *)findCurrentItem->itemBelow(); findCurrentItem = (KListViewItem *)findCurrentItem->itemBelow();
} }
bool LocateDlg::tqfind() bool LocateDlg::find()
{ {
while( findCurrentItem ) while( findCurrentItem )
{ {
@ -549,12 +549,12 @@ bool LocateDlg::tqfind()
if( findOptions & KFindDialog::RegularExpression ) if( findOptions & KFindDialog::RegularExpression )
{ {
if( item.tqcontains( TQRegExp( findPattern, findOptions & KFindDialog::CaseSensitive ) ) ) if( item.contains( TQRegExp( findPattern, findOptions & KFindDialog::CaseSensitive ) ) )
return true; return true;
} }
else else
{ {
if( item.tqcontains( findPattern, findOptions & KFindDialog::CaseSensitive ) ) if( item.contains( findPattern, findOptions & KFindDialog::CaseSensitive ) )
return true; return true;
} }

@ -67,7 +67,7 @@ protected:
private: private:
void operate( TQListViewItem *item, int task ); void operate( TQListViewItem *item, int task );
bool tqfind(); bool find();
void nextLine(); void nextLine();
bool stopping; bool stopping;

@ -108,7 +108,7 @@ void KDiskFreeSp::dfDone()
if ( !s.isEmpty() ) { if ( !s.isEmpty() ) {
//kdDebug(kfile_area) << "GOT: [" << s << "]" << endl; //kdDebug(kfile_area) << "GOT: [" << s << "]" << endl;
if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line if (s.find(BLANK)<0) // devicename was too long, rest in next line
if ( !t.eof() ) { // just appends the next line if ( !t.eof() ) { // just appends the next line
v=t.readLine(); v=t.readLine();
s=s.append(v); s=s.append(v);
@ -118,30 +118,30 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl; //kdDebug(kfile_area) << "[" << s << "]" << endl;
//TQString deviceName = s.left(s.tqfind(BLANK)); //TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.tqfind(BLANK)+1 ); s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl; //kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
if (!NO_FS_TYPE) if (!NO_FS_TYPE)
s=s.remove(0,s.tqfind(BLANK)+1 ); // eat fs type s=s.remove(0,s.find(BLANK)+1 ); // eat fs type
u=s.left(s.tqfind(BLANK)); u=s.left(s.find(BLANK));
unsigned long kBSize = u.toULong(); unsigned long kBSize = u.toULong();
s=s.remove(0,s.tqfind(BLANK)+1 ); s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl; //kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl;
u=s.left(s.tqfind(BLANK)); u=s.left(s.find(BLANK));
unsigned long kBUsed = u.toULong(); unsigned long kBUsed = u.toULong();
s=s.remove(0,s.tqfind(BLANK)+1 ); s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl; //kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl;
u=s.left(s.tqfind(BLANK)); u=s.left(s.find(BLANK));
unsigned long kBAvail = u.toULong(); unsigned long kBAvail = u.toULong();
s=s.remove(0,s.tqfind(BLANK)+1 ); s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl; //kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl;
s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94% s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94%
TQString mountPoint = s.stripWhiteSpace(); TQString mountPoint = s.stripWhiteSpace();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl; //kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;

@ -90,12 +90,12 @@ KMountMan::KMountMan() : TQObject(), Operational( false ), waiting(false), mount
KMountMan::~KMountMan() {} KMountMan::~KMountMan() {}
bool KMountMan::invalidFilesystem(TQString type) { bool KMountMan::invalidFilesystem(TQString type) {
return (invalid_fs.tqcontains(type) > 0); return (invalid_fs.contains(type) > 0);
} }
// this is an ugly hack, but type can actually be a mountpoint. oh well... // this is an ugly hack, but type can actually be a mountpoint. oh well...
bool KMountMan::nonmountFilesystem(TQString type, TQString mntPoint) { bool KMountMan::nonmountFilesystem(TQString type, TQString mntPoint) {
return((nonmount_fs.tqcontains(type) > 0) || (nonmount_fs_mntpoint.tqcontains(mntPoint) > 0)); return((nonmount_fs.contains(type) > 0) || (nonmount_fs_mntpoint.contains(mntPoint) > 0));
} }
void KMountMan::mainWindow() { void KMountMan::mainWindow() {

@ -115,7 +115,7 @@ public:
return Name; return Name;
} }
inline TQString shortName() { inline TQString shortName() {
return Name.right( Name.length() - Name.tqfind( "/", 1 ) - 1 ); return Name.right( Name.length() - Name.find( "/", 1 ) - 1 );
} }
inline TQString type() { inline TQString type() {
return Type; return Type;

@ -65,7 +65,7 @@ KrBriefViewToolTip::KrBriefViewToolTip( KrBriefView *lv, TQWidget *tqparent )
void KrBriefViewToolTip::maybeTip( const TQPoint &pos ) void KrBriefViewToolTip::maybeTip( const TQPoint &pos )
{ {
TQIconViewItem *item = view->tqfindItem( view->viewportToContents( pos ) ); TQIconViewItem *item = view->findItem( view->viewportToContents( pos ) );
if ( !item ) if ( !item )
return; return;
@ -173,7 +173,7 @@ void KrBriefView::resizeEvent ( TQResizeEvent * resEvent )
TQRect viewportRect( pnt, resEvent->oldSize() ); TQRect viewportRect( pnt, resEvent->oldSize() );
bool visible = false; bool visible = false;
if( currentItem() ) if( currentItem() )
visible = viewportRect.tqcontains( currentItem()->rect() ); visible = viewportRect.contains( currentItem()->rect() );
KIconView::resizeEvent( resEvent ); KIconView::resizeEvent( resEvent );
redrawColumns(); redrawColumns();
@ -442,7 +442,7 @@ void KrBriefView::contentsMousePressEvent( TQMouseEvent * e ) {
e = transformMouseEvent( e ); e = transformMouseEvent( e );
TQIconViewItem * oldCurrent = currentItem(); TQIconViewItem * oldCurrent = currentItem();
TQIconViewItem *newCurrent = tqfindItem( e->pos() ); TQIconViewItem *newCurrent = findItem( e->pos() );
if (e->button() == Qt::RightButton) if (e->button() == Qt::RightButton)
{ {
if (KrSelectionMode::getSelectionHandler()->rightButtonSelects() || if (KrSelectionMode::getSelectionHandler()->rightButtonSelects() ||
@ -596,7 +596,7 @@ void KrBriefView::contentsMousePressEvent( TQMouseEvent * e ) {
KIconView::contentsMousePressEvent( e ); KIconView::contentsMousePressEvent( e );
if( name.isEmpty() || _dict.tqfind( name ) == 0 ) // is the file still valid? if( name.isEmpty() || _dict.find( name ) == 0 ) // is the file still valid?
newCurrent = 0; // if not, don't do any crash... newCurrent = 0; // if not, don't do any crash...
} else { } else {
// emitting the missing signals from TQIconView::contentsMousePressEvent(); // emitting the missing signals from TQIconView::contentsMousePressEvent();
@ -638,7 +638,7 @@ void KrBriefView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
if( pressedItem ) { if( pressedItem ) {
TQPoint vp = contentsToViewport( e->pos() ); TQPoint vp = contentsToViewport( e->pos() );
TQIconViewItem *newCurrent = tqfindItem( e->pos() ); TQIconViewItem *newCurrent = findItem( e->pos() );
if( pressedItem == newCurrent ) { if( pressedItem == newCurrent ) {
// emitting the missing signals from TQIconView::contentsMouseReleaseEvent(); // emitting the missing signals from TQIconView::contentsMouseReleaseEvent();
@ -659,7 +659,7 @@ void KrBriefView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) { void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
e = transformMouseEvent( e ); e = transformMouseEvent( e );
if ( ( singleClicked || renameTimer.isActive() ) && tqfindItem( e->pos() ) != clickedItem ) if ( ( singleClicked || renameTimer.isActive() ) && findItem( e->pos() ) != clickedItem )
CANCEL_TWO_CLICK_RENAME; CANCEL_TWO_CLICK_RENAME;
if ( dragStartPos != TQPoint( -1, -1 ) && if ( dragStartPos != TQPoint( -1, -1 ) &&
@ -669,7 +669,7 @@ void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
&& KrSelectionMode::getSelectionHandler()->rightButtonSelects() && KrSelectionMode::getSelectionHandler()->rightButtonSelects()
&& KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->state() == Qt::RightButton) && KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->state() == Qt::RightButton)
{ {
TQIconViewItem *newItem = tqfindItem( e->pos() ); TQIconViewItem *newItem = findItem( e->pos() );
e->accept(); e->accept();
if (newItem != lastSwushPosition && newItem) if (newItem != lastSwushPosition && newItem)
{ {
@ -743,7 +743,7 @@ void KrBriefView::showContextMenu()
} }
KrViewItem *KrBriefView::getKrViewItemAt( const TQPoint & vp ) { KrViewItem *KrBriefView::getKrViewItemAt( const TQPoint & vp ) {
return dynamic_cast<KrViewItem*>( KIconView::tqfindItem( vp ) ); return dynamic_cast<KrViewItem*>( KIconView::findItem( vp ) );
} }
bool KrBriefView::acceptDrag( TQDropEvent* ) const { bool KrBriefView::acceptDrag( TQDropEvent* ) const {
@ -1158,7 +1158,7 @@ void KrBriefView::renameCurrentItem() {
KConfigGroupSaver svr(krConfig,"Look&Feel"); KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) { if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() ) if (it->hasExtension() && !it->VF->vfile_isDir() )
renameLineEdit()->setSelection(0, it->name().tqfindRev(it->extension())-1); renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
}*/ }*/
} }
@ -1398,7 +1398,7 @@ void KrBriefView::changeSortOrder()
TQMouseEvent * KrBriefView::transformMouseEvent( TQMouseEvent * e ) TQMouseEvent * KrBriefView::transformMouseEvent( TQMouseEvent * e )
{ {
if( tqfindItem( e->pos() ) != 0 ) if( findItem( e->pos() ) != 0 )
return e; return e;
TQIconViewItem *closestItem = 0; TQIconViewItem *closestItem = 0;

@ -66,7 +66,7 @@ public:
virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<TQIconViewItem*>( current ) ->prevItem() ); } virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<TQIconViewItem*>( current ) ->prevItem() ); }
virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); } virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
virtual KrViewItem *getKrViewItemAt(const TQPoint &vp); virtual KrViewItem *getKrViewItemAt(const TQPoint &vp);
virtual inline KrViewItem *findItemByName(const TQString &name) { return dynamic_cast<KrViewItem*>( tqfindItem( name, TQt::ExactMatch ) ); } virtual inline KrViewItem *findItemByName(const TQString &name) { return dynamic_cast<KrViewItem*>( findItem( name, TQt::ExactMatch ) ); }
virtual void addItems(vfs* v, bool addUpDir = true); virtual void addItems(vfs* v, bool addUpDir = true);
virtual void delItem(const TQString &); virtual void delItem(const TQString &);
virtual TQString getCurrentItem() const; virtual TQString getCurrentItem() const;

@ -108,7 +108,7 @@ TQValueList<TQString> KrColorSettingNames::getColorNames()
bool KrColorSettingNames::isColorNameValid(const TQString & settingName) bool KrColorSettingNames::isColorNameValid(const TQString & settingName)
{ {
initialize(); initialize();
return s_colorNames.tqcontains(settingName); return s_colorNames.contains(settingName);
} }
TQValueList<TQString> KrColorSettingNames::getNumNames() TQValueList<TQString> KrColorSettingNames::getNumNames()
@ -120,7 +120,7 @@ TQValueList<TQString> KrColorSettingNames::getNumNames()
bool KrColorSettingNames::isNumNameValid(const TQString & settingName) bool KrColorSettingNames::isNumNameValid(const TQString & settingName)
{ {
initialize(); initialize();
return s_numNames.tqcontains(settingName); return s_numNames.contains(settingName);
} }
TQValueList<TQString> KrColorSettingNames::getBoolNames() TQValueList<TQString> KrColorSettingNames::getBoolNames()
@ -132,7 +132,7 @@ TQValueList<TQString> KrColorSettingNames::getBoolNames()
bool KrColorSettingNames::isBoolNameValid(const TQString & settingName) bool KrColorSettingNames::isBoolNameValid(const TQString & settingName)
{ {
initialize(); initialize();
return s_boolNames.tqcontains(settingName); return s_boolNames.contains(settingName);
} }
@ -293,7 +293,7 @@ int KrColorSettings::getNumValue(const TQString & settingName, int defaultValue)
krOut << "Invalid number setting name: " << settingName << endl; krOut << "Invalid number setting name: " << settingName << endl;
return 0; return 0;
} }
if (!m_impl->m_numValues.tqcontains(settingName)) if (!m_impl->m_numValues.contains(settingName))
return defaultValue; return defaultValue;
return m_impl->m_numValues[settingName]; return m_impl->m_numValues[settingName];
} }
@ -326,7 +326,7 @@ int KrColorSettings::getBoolValue(const TQString & settingName, bool defaultValu
krOut << "Invalid bool setting name: " << settingName << endl; krOut << "Invalid bool setting name: " << settingName << endl;
return false; return false;
} }
if (!m_impl->m_boolValues.tqcontains(settingName)) if (!m_impl->m_boolValues.contains(settingName))
return defaultValue; return defaultValue;
return m_impl->m_boolValues[settingName]; return m_impl->m_boolValues[settingName];
} }
@ -722,7 +722,7 @@ void KrColorCache::getColors(TQColorGroup & result, const KrColorItemType & typ
strcat(hashKey, "-Selected"); strcat(hashKey, "-Selected");
// lookup in cache // lookup in cache
if (!m_impl->m_cachedColors.tqcontains(hashKey)) if (!m_impl->m_cachedColors.contains(hashKey))
// not found: calculate color group and store it in cache // not found: calculate color group and store it in cache
m_impl->m_cachedColors[hashKey] = m_impl->getColors(type); m_impl->m_cachedColors[hashKey] = m_impl->getColors(type);

@ -17,7 +17,7 @@ KrColorCache: perfomes the color calculation and caches the result. Uses KrColor
/* /*
Copies all used color settings from krConfig into a local cache on creation. It tqcontains 3 types of properties: Copies all used color settings from krConfig into a local cache on creation. It contains 3 types of properties:
color, numeric (int) and boolean. Color properties can have string or color values. Property values can be color, numeric (int) and boolean. Color properties can have string or color values. Property values can be
changed. These changes does not go into krConfig! changed. These changes does not go into krConfig!

@ -682,7 +682,7 @@ void KrDetailedView::contentsMousePressEvent( TQMouseEvent * e ) {
KListView::contentsMousePressEvent( e ); KListView::contentsMousePressEvent( e );
if( name.isEmpty() || _dict.tqfind( name ) == 0 ) // is the file still valid? if( name.isEmpty() || _dict.find( name ) == 0 ) // is the file still valid?
newCurrent = 0; // if not, don't do any crash... newCurrent = 0; // if not, don't do any crash...
} else { } else {
// emitting the missing signals from TQListView::contentsMousePressEvent(); // emitting the missing signals from TQListView::contentsMousePressEvent();
@ -1215,7 +1215,7 @@ void KrDetailedView::renameCurrentItem() {
KConfigGroupSaver svr(krConfig,"Look&Feel"); KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) { if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
if (it->hasExtension() && !it->VF->vfile_isDir() ) if (it->hasExtension() && !it->VF->vfile_isDir() )
renameLineEdit()->setSelection(0, it->name().tqfindRev(it->extension())-1); renameLineEdit()->setSelection(0, it->name().findRev(it->extension())-1);
} }
// signal will be emited when renaming is done, and finalization // signal will be emited when renaming is done, and finalization
// will occur in inplaceRenameFinished() // will occur in inplaceRenameFinished()

@ -84,7 +84,7 @@ public:
virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<KListViewItem*>( current ) ->itemAbove() ); } virtual inline KrViewItem *getPrev( KrViewItem *current ) { return dynamic_cast<KrViewItem*>( dynamic_cast<KListViewItem*>( current ) ->itemAbove() ); }
virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); } virtual inline KrViewItem *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
virtual KrViewItem *getKrViewItemAt( const TQPoint &vp ); virtual KrViewItem *getKrViewItemAt( const TQPoint &vp );
virtual inline KrViewItem *findItemByName( const TQString &name ) { return dynamic_cast<KrViewItem*>( tqfindItem( name, 0 ) ); } virtual inline KrViewItem *findItemByName( const TQString &name ) { return dynamic_cast<KrViewItem*>( findItem( name, 0 ) ); }
virtual void addItems( vfs *v, bool addUpDir = true ); virtual void addItems( vfs *v, bool addUpDir = true );
virtual TQString getCurrentItem() const; virtual TQString getCurrentItem() const;
virtual void makeItemVisible( const KrViewItem *item ); virtual void makeItemVisible( const KrViewItem *item );

@ -76,7 +76,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent) : KPopupMenu(t
insertItem( i18n("Preview"), &preview, PREVIEW_ID ); insertItem( i18n("Preview"), &preview, PREVIEW_ID );
} }
// -------------- Open with: try to tqfind-out which apps can open the file // -------------- Open with: try to find-out which apps can open the file
// this too, is meaningful only if one file is selected or if all the files // this too, is meaningful only if one file is selected or if all the files
// have the same mimetype ! // have the same mimetype !
TQString mime = panel->func->getVFile(item)->vfile_getMime(); TQString mime = panel->func->getVFile(item)->vfile_getMime();
@ -177,7 +177,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent) : KPopupMenu(t
} }
// --------- send by mail // --------- send by mail
if ( Krusader::supportedTools().tqcontains( "MAIL" ) && !vf->vfile_isDir() ) { if ( Krusader::supportedTools().contains( "MAIL" ) && !vf->vfile_isDir() ) {
insertItem( i18n( "Send by Email" ), SEND_BY_EMAIL_ID ); insertItem( i18n( "Send by Email" ), SEND_BY_EMAIL_ID );
} }
@ -314,7 +314,7 @@ void KrPopupMenu::performAction(int id) {
for ( KrViewItemList::Iterator it2 = otherItems.begin(); it2 != otherItems.end(); ++it2 ) { for ( KrViewItemList::Iterator it2 = otherItems.begin(); it2 != otherItems.end(); ++it2 ) {
TQString name = ( *it2 ) ->name(); TQString name = ( *it2 ) ->name();
if( !selectedNames.tqcontains( name ) ) if( !selectedNames.contains( name ) )
selectedNames.append( name ); selectedNames.append( name );
} }
} }
@ -330,7 +330,7 @@ void KrPopupMenu::performAction(int id) {
TQString term = krConfig->readEntry( "Terminal", _Terminal ); TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term ); proc << KrServices::separateArgs( term );
if ( !panel->func->getVFile(item)->vfile_isDir() ) proc << "-e" << item->name(); if ( !panel->func->getVFile(item)->vfile_isDir() ) proc << "-e" << item->name();
if ( term.tqcontains( "konsole" ) ) { /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */ if ( term.contains( "konsole" ) ) { /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
/* Please remove the patch if the bug is corrected */ /* Please remove the patch if the bug is corrected */
proc << "&"; proc << "&";
proc.setUseShell( true ); proc.setUseShell( true );

@ -100,7 +100,7 @@ TQPixmap KrView::getIcon( vfile *vf /*, KRListItem::cmpColor color*/ ) {
icon_name=""; icon_name="";
// first try the cache // first try the cache
if ( !TQPixmapCache::tqfind( icon_name, icon ) ) { if ( !TQPixmapCache::find( icon_name, icon ) ) {
icon = FL_LOADICON( icon_name ); icon = FL_LOADICON( icon_name );
// insert it into the cache // insert it into the cache
TQPixmapCache::insert( icon_name, icon ); TQPixmapCache::insert( icon_name, icon );

@ -19,7 +19,7 @@ KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties):
if (vf) { if (vf) {
// check if the file has an extension // check if the file has an extension
const TQString& vfName = vf->vfile_getName(); const TQString& vfName = vf->vfile_getName();
int loc = vfName.tqfindRev('.'); int loc = vfName.findRev('.');
if (loc>0) { // avoid mishandling of .bashrc and friend if (loc>0) { // avoid mishandling of .bashrc and friend
// check if it has one of the predefined 'atomic extensions' // check if it has one of the predefined 'atomic extensions'
for (TQStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) { for (TQStringList::const_iterator i = PROPS->atomicExtensions.begin(); i != PROPS->atomicExtensions.end(); ++i) {

@ -704,7 +704,7 @@ void ListPanel::slotUpdate() {
TQString origin = virtualPath().prettyURL(-1); TQString origin = virtualPath().prettyURL(-1);
if ( origin.right( 1 ) != "/" && !( ( func->files() ->vfs_getType() == vfs::FTP ) && isFtp && if ( origin.right( 1 ) != "/" && !( ( func->files() ->vfs_getType() == vfs::FTP ) && isFtp &&
origin.tqfind( '/', origin.tqfind( ":/" ) + 3 ) == -1 ) ) { origin.find( '/', origin.find( ":/" ) + 3 ) == -1 ) ) {
view->addItems( func->files() ); view->addItems( func->files() );
} else } else
view->addItems( func->files(), false ); view->addItems( func->files(), false );

@ -329,7 +329,7 @@ void ListPanelFunc::krlink( bool sym ) {
if ( linkName.left( 1 ) != "/" ) if ( linkName.left( 1 ) != "/" )
linkName = files() ->vfs_workingDir() + "/" + linkName; linkName = files() ->vfs_workingDir() + "/" + linkName;
if ( linkName.tqcontains( "/" ) ) if ( linkName.contains( "/" ) )
name = files() ->vfs_getFile( name ).path( -1 ); name = files() ->vfs_getFile( name ).path( -1 );
if ( sym ) { if ( sym ) {
@ -370,7 +370,7 @@ void ListPanelFunc::terminal() {
TQString term = krConfig->readEntry( "Terminal", _Terminal ); TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term ); proc << KrServices::separateArgs( term );
if ( term.tqcontains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */ if ( term.contains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
{ /* Please remove the patch if the bug is corrected */ { /* Please remove the patch if the bug is corrected */
proc << "&"; proc << "&";
proc.setUseShell( true ); proc.setUseShell( true );
@ -777,7 +777,7 @@ void ListPanelFunc::pack() {
return ; // the user canceled return ; // the user canceled
// check for partial URLs // check for partial URLs
if( !PackGUI::destination.tqcontains(":/") && !PackGUI::destination.startsWith("/") ){ if( !PackGUI::destination.contains(":/") && !PackGUI::destination.startsWith("/") ){
PackGUI::destination = panel->virtualPath().prettyURL()+"/"+PackGUI::destination; PackGUI::destination = panel->virtualPath().prettyURL()+"/"+PackGUI::destination;
} }

@ -360,7 +360,7 @@ void PanelPopup::quickSelect(const TQString &tqmask) {
void PanelPopup::quickSelectStore() { void PanelPopup::quickSelectStore() {
krConfig->setGroup( "Private" ); krConfig->setGroup( "Private" );
TQStringList lst = krConfig->readListEntry( "Predefined Selections" ); TQStringList lst = krConfig->readListEntry( "Predefined Selections" );
if ( lst.tqfind(quickSelectCombo->currentText()) == lst.end() ) if ( lst.find(quickSelectCombo->currentText()) == lst.end() )
lst.append( quickSelectCombo->currentText() ); lst.append( quickSelectCombo->currentText() );
krConfig->writeEntry( "Predefined Selections", lst ); krConfig->writeEntry( "Predefined Selections", lst );
} }

@ -19,7 +19,7 @@ QueueManager::~QueueManager()
Queue* QueueManager::queue(const TQString& queueName) Queue* QueueManager::queue(const TQString& queueName)
{ {
if (!_queues.tqcontains(queueName)) if (!_queues.contains(queueName))
return 0; return 0;
return _queues[queueName]; return _queues[queueName];
} }

@ -130,7 +130,7 @@ void remoteMan::refreshData() {
int l=temp.mid(2,1).toInt(); int l=temp.mid(2,1).toInt();
if ((++l)==10) { ++h; l=0; } if ((++l)==10) { ++h; l=0; }
temp=TQString("<%1%2>").tqarg(h).tqarg(l); temp=TQString("<%1%2>").tqarg(h).tqarg(l);
temp=currentItem->text(0).tqreplace(currentItem->text(0).length()-4,4,temp); temp=currentItem->text(0).replace(currentItem->text(0).length()-4,4,temp);
currentItem->setText(0,temp); currentItem->setText(0,temp);
} else currentItem->setText(0,currentItem->text(0)+"<02>"); } else currentItem->setText(0,currentItem->text(0)+"<02>");
i=currentItem->tqparent()->firstChild(); i=currentItem->tqparent()->firstChild();
@ -211,10 +211,10 @@ TQString item2connection(TQListViewItem *item) {
// in the connection, we cannot allow it to be inside a name, so // in the connection, we cannot allow it to be inside a name, so
// we find it (if it exists) and replace it with a ' character // we find it (if it exists) and replace it with a ' character
TQString temp=iterator->text(0); TQString temp=iterator->text(0);
int i=temp.tqfind('`'); // are there any ` in the name ? int i=temp.find('`'); // are there any ` in the name ?
while (i>-1) { // if so, change them until none are left while (i>-1) { // if so, change them until none are left
temp.tqreplace(i,1,TQChar('\'')); temp.replace(i,1,TQChar('\''));
i=temp.tqfind('`'); i=temp.find('`');
} }
con=temp+'`'+con; con=temp+'`'+con;
iterator=iterator->tqparent(); iterator=iterator->tqparent();
@ -227,7 +227,7 @@ TQListViewItem* remoteMan::findItem(const TQString &name, TQListViewItem *p) {
TQListViewItem *it; TQListViewItem *it;
if (name.isEmpty()) return p; // the end of the recursion has been reached!!! if (name.isEmpty()) return p; // the end of the recursion has been reached!!!
if (p==0) it=sessions->firstChild(); else it=p->firstChild(); if (p==0) it=sessions->firstChild(); else it=p->firstChild();
int loc=name.tqfind('`'); int loc=name.find('`');
while (it) { while (it) {
if (it->text(0)==name.left(loc)) break; if (it->text(0)==name.left(loc)) break;
it=it->nextSibling(); it=it->nextSibling();
@ -264,7 +264,7 @@ void remoteMan::config2tree() {
for( it = lst.begin(); it != lst.end(); ++it ) { for( it = lst.begin(); it != lst.end(); ++it ) {
TQString t=(*it); // easier to work with TQString t=(*it); // easier to work with
// this part creates the path to the session // this part creates the path to the session
int loc=t.tqfindRev('`'); int loc=t.findRev('`');
if (loc>-1) item=findItem(t.left(loc+1),0); if (loc>-1) item=findItem(t.left(loc+1),0);
// at this point we have the complete path to the object // at this point we have the complete path to the object
// let's keep only the item's name // let's keep only the item's name

@ -197,13 +197,13 @@ remoteManBase::remoteManBase( TQWidget* tqparent, const char* name, bool modal,
TQStringList protocols = KProtocolInfo::protocols(); TQStringList protocols = KProtocolInfo::protocols();
protocol = new TQComboBox( FALSE, this, "protocol" ); protocol = new TQComboBox( FALSE, this, "protocol" );
if( protocols.tqcontains("ftp") ) if( protocols.contains("ftp") )
protocol->insertItem( i18n( "ftp://" ) ); protocol->insertItem( i18n( "ftp://" ) );
if( protocols.tqcontains("smb") ) if( protocols.contains("smb") )
protocol->insertItem( i18n( "smb://" ) ); protocol->insertItem( i18n( "smb://" ) );
if( protocols.tqcontains("fish") ) if( protocols.contains("fish") )
protocol->insertItem( i18n( "fish://" )); protocol->insertItem( i18n( "fish://" ));
if( protocols.tqcontains("sftp") ) if( protocols.contains("sftp") )
protocol->insertItem( i18n( "sftp://" )); protocol->insertItem( i18n( "sftp://" ));
protocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, protocol->sizePolicy().hasHeightForWidth() ) ); protocol->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, protocol->sizePolicy().hasHeightForWidth() ) );

@ -356,7 +356,7 @@ void KrSearchDialog::found(TQString what, TQString where, KIO::filesize_t size,
struct tm* t=localtime((time_t *)&mtime); struct tm* t=localtime((time_t *)&mtime);
TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min)); TQDateTime tmp(TQDate(t->tm_year+1900, t->tm_mon+1, t->tm_mday), TQTime(t->tm_hour, t->tm_min));
ResultListViewItem *it =new ResultListViewItem(resultsList, what, ResultListViewItem *it =new ResultListViewItem(resultsList, what,
where.tqreplace(TQRegExp("\\\\"),"#"), size, tmp, perm); where.replace(TQRegExp("\\\\"),"#"), size, tmp, perm);
TQString totals = TQString(i18n("Found %1 matches.")).tqarg(resultsList->childCount()); TQString totals = TQString(i18n("Found %1 matches.")).tqarg(resultsList->childCount());
foundLabel->setText(totals); foundLabel->setText(totals);
@ -445,8 +445,8 @@ void KrSearchDialog::resultClicked(TQListViewItem* i) {
if (!it->foundText().isEmpty()) { if (!it->foundText().isEmpty()) {
// ugly hack: find the <b> and </b> in the text, then // ugly hack: find the <b> and </b> in the text, then
// use it to set the are which we don't want squeezed // use it to set the are which we don't want squeezed
int idx = it->foundText().tqfind("<b>")-4; // take "<qt>" into account int idx = it->foundText().find("<b>")-4; // take "<qt>" into account
int length = it->foundText().tqfind("</b>")-idx+4; int length = it->foundText().find("</b>")-idx+4;
foundTextLabel->setText(it->foundText(), idx, length); foundTextLabel->setText(it->foundText(), idx, length);
} }
} }

@ -106,11 +106,11 @@ void KRSearchMod::scanURL( KURL url )
if( stopSearch ) return; if( stopSearch ) return;
if( query->isExcluded( urlToCheck ) ) { if( query->isExcluded( urlToCheck ) ) {
if( !query->searchInDirs().tqcontains( urlToCheck ) ) if( !query->searchInDirs().contains( urlToCheck ) )
continue; continue;
} }
if( scannedUrls.tqcontains( urlToCheck ) ) if( scannedUrls.contains( urlToCheck ) )
continue; continue;
scannedUrls.push( urlToCheck ); scannedUrls.push( urlToCheck );
@ -164,7 +164,7 @@ void KRSearchMod::scanLocalDir( KURL urlToScan )
if ( query->searchInArchives() ) if ( query->searchInArchives() )
{ {
TQString type = mime.right( 4 ); TQString type = mime.right( 4 );
if ( mime.tqcontains( "-rar" ) ) type = "-rar"; if ( mime.contains( "-rar" ) ) type = "-rar";
if ( KRarcHandler::arcSupported( type ) ) if ( KRarcHandler::arcSupported( type ) )
{ {

@ -117,7 +117,7 @@ void Combiner::combineSplitFileFinished(KIO::Job *job)
for(unsigned int i = 0; i != splitFileContent.count(); i++ ) for(unsigned int i = 0; i != splitFileContent.count(); i++ )
{ {
int ndx = splitFileContent[i].tqfind( '=' ); int ndx = splitFileContent[i].find( '=' );
if( ndx == -1 ) if( ndx == -1 )
continue; continue;
TQString token = splitFileContent[i].left( ndx ).stripWhiteSpace(); TQString token = splitFileContent[i].left( ndx ).stripWhiteSpace();

@ -222,7 +222,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
file_name = left_file->vfile_getName(); file_name = left_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) ) if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue; continue;
if( !query->match( left_file ) ) if( !query->match( left_file ) )
@ -255,7 +255,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
file_name = right_file->vfile_getName(); file_name = right_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) ) if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue; continue;
if( !query->match( right_file ) ) if( !query->match( right_file ) )
@ -277,10 +277,10 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
{ {
TQString left_file_name = left_file->vfile_getName(); TQString left_file_name = left_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( left_file_name ) ) if( checkIfSelected && !selectedFiles.contains( left_file_name ) )
continue; continue;
if( excludedPaths.tqcontains( leftDir.isEmpty() ? left_file_name : leftDir+"/"+left_file_name ) ) if( excludedPaths.contains( leftDir.isEmpty() ? left_file_name : leftDir+"/"+left_file_name ) )
continue; continue;
if( !query->matchDirName( left_file_name ) ) if( !query->matchDirName( left_file_name ) )
@ -321,10 +321,10 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
{ {
file_name = right_file->vfile_getName(); file_name = right_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) ) if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue; continue;
if( excludedPaths.tqcontains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) ) if( excludedPaths.contains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) )
continue; continue;
if( !query->matchDirName( file_name ) ) if( !query->matchDirName( file_name ) )
@ -547,7 +547,7 @@ void Synchronizer::addSingleDirectory( SynchronizerFileItem *tqparent, Synchroni
{ {
file_name = file->vfile_getName(); file_name = file->vfile_getName();
if( excludedPaths.tqcontains( dirName.isEmpty() ? file_name : dirName+"/"+file_name ) ) if( excludedPaths.contains( dirName.isEmpty() ? file_name : dirName+"/"+file_name ) )
continue; continue;
if( !query->matchDirName( file_name ) ) if( !query->matchDirName( file_name ) )
@ -1029,7 +1029,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
KIO::filesize_t receivedSize = 0; KIO::filesize_t receivedSize = 0;
if( receivedMap.tqcontains( job ) ) { if( receivedMap.contains( job ) ) {
receivedSize = receivedMap[ job ]; receivedSize = receivedMap[ job ];
receivedMap.remove( job ); receivedMap.remove( job );
} }
@ -1278,7 +1278,7 @@ void Synchronizer::slotProcessedSize( KIO::Job * job , KIO::filesize_t size)
SynchronizerFileItem * item = jobMap[ job ]; SynchronizerFileItem * item = jobMap[ job ];
KIO::filesize_t lastProcessedSize = 0; KIO::filesize_t lastProcessedSize = 0;
if( receivedMap.tqcontains( job ) ) if( receivedMap.contains( job ) )
lastProcessedSize = receivedMap[ job ]; lastProcessedSize = receivedMap[ job ];
receivedMap[ job ] = size; receivedMap[ job ] = size;
@ -1422,7 +1422,7 @@ void Synchronizer::synchronizeWithKGet()
} }
// creating the directory system // creating the directory system
for( int i=0; i >= 0 ; i= destDir.tqfind('/',i+1) ) for( int i=0; i >= 0 ; i= destDir.find('/',i+1) )
if( !TQDir( destDir.left(i) ).exists() ) if( !TQDir( destDir.left(i) ).exists() )
TQDir().mkdir( destDir.left(i) ); TQDir().mkdir( destDir.left(i) );
@ -1432,12 +1432,12 @@ void Synchronizer::synchronizeWithKGet()
TQFile( destURL.path() ).remove(); TQFile( destURL.path() ).remove();
TQString source = downloadURL.prettyURL(); TQString source = downloadURL.prettyURL();
if( source.tqcontains( '@' ) >= 2 ) /* is this an ftp proxy URL? */ if( source.contains( '@' ) >= 2 ) /* is this an ftp proxy URL? */
{ {
int lastAt = source.tqfindRev( '@' ); int lastAt = source.findRev( '@' );
TQString startString = source.left( lastAt ); TQString startString = source.left( lastAt );
TQString endString = source.mid( lastAt ); TQString endString = source.mid( lastAt );
startString.tqreplace( "@", "%40" ); startString.replace( "@", "%40" );
source = startString+endString; source = startString+endString;
} }

@ -1162,7 +1162,7 @@ void SynchronizerGUI::initGUI(TQWidget* /* tqparent */, TQString profileName, KU
grid->addWidget( fileFilter, 1 ,1 ); grid->addWidget( fileFilter, 1 ,1 );
filterLabel->setBuddy( fileFilter ); filterLabel->setBuddy( fileFilter );
TQString wtFilter = "<p><img src='toolbar|tqfind'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>"); TQString wtFilter = "<p><img src='toolbar|find'></p>" + i18n("<p>The filename filtering criteria is defined here.</p><p>You can make use of wildcards. Multiple patterns are separated by space (means logical OR) and patterns are excluded from the search using the pipe symbol.</p><p>If the pattern is ended with a slash (<code>*pattern*/</code>), that means that pattern relates to recursive search of directories.<ul><li><code>pattern</code> - means to search those files/directories that name is <code>pattern</code>, recursive search goes through all subdirectories independently of the value of <code>pattern</code></li><li><code>pattern/</code> - means to search all files/directories, but recursive search goes through/excludes the directories that name is <code>pattern</code></li></ul><p></p><p>It's allowed to use quotation marks for names that contain space. Filter <code>\"Program&nbsp;Files\"</code> searches out those files/directories that name is <code>Program&nbsp;Files</code>.</p><p>Examples:<ul><code><li>*.o</li><li>*.h *.c\?\?</li><li>*.cpp *.h | *.tqmoc.cpp</li><li>* | CVS/ .svn/</li></code></ul><b>Note</b>: the search term '<code>text</code>' is equivalent to '<code>*text*</code>'.</p>");
TQWhatsThis::add(fileFilter, wtFilter); TQWhatsThis::add(fileFilter, wtFilter);
TQWhatsThis::add(filterLabel, wtFilter); TQWhatsThis::add(filterLabel, wtFilter);

@ -339,7 +339,7 @@ TQString bashquote( TQString s ) {
static const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped static const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i ) for ( unsigned int i = 0; i < evilstuff.length(); ++i )
s.tqreplace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) ); s.replace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) );
return s; return s;
} }
@ -946,7 +946,7 @@ TagString exp_Script::expFunc( const ListPanel*, const TQStringList& parameter,
} }
TQString filename = parameter[0]; TQString filename = parameter[0];
if ( filename.tqfind('/') && KURL::isRelativeURL(filename) ) { if ( filename.find('/') && KURL::isRelativeURL(filename) ) {
// this return the local version of the file if this exists. else the global one is returnd // this return the local version of the file if this exists. else the global one is returnd
filename = locate( "data", "krusader/js/"+filename ); filename = locate( "data", "krusader/js/"+filename );
} }
@ -1079,7 +1079,7 @@ TagString Expander::expandCurrent( const TQString& stringToExpand, bool useUrl )
// bool inQuotes = false; // bool inQuotes = false;
unsigned int idx = 0; unsigned int idx = 0;
while ( idx < stringToExpand.length() ) { while ( idx < stringToExpand.length() ) {
if ( ( begin = stringToExpand.tqfind( '%', idx ) ) == -1 ) break; if ( ( begin = stringToExpand.find( '%', idx ) ) == -1 ) break;
if ( ( end = findEnd( stringToExpand, begin ) ) == -1 ) { if ( ( end = findEnd( stringToExpand, begin ) ) == -1 ) {
setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: unterminated % in Expander::expandCurrent")) ); setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: unterminated % in Expander::expandCurrent")) );
return TQString(); return TQString();
@ -1097,7 +1097,7 @@ TagString Expander::expandCurrent( const TQString& stringToExpand, bool useUrl )
if ( error() ) if ( error() )
return TQString(); return TQString();
char panelIndicator = exp.lower()[0].latin1(); char panelIndicator = exp.lower()[0].latin1();
exp.tqreplace( 0, 1, "" ); exp.replace( 0, 1, "" );
for ( i = 0; i < placeholderCount(); ++i ) for ( i = 0; i < placeholderCount(); ++i )
if ( exp == placeholder( i )->expression() ) { if ( exp == placeholder( i )->expression() ) {
// kdDebug() << "---------------------------------------" << endl; // kdDebug() << "---------------------------------------" << endl;
@ -1145,8 +1145,8 @@ TagStringList Expander::separateParameter( TQString* const exp, bool useUrl ) {
TQStringList parameter1; TQStringList parameter1;
TQString result; TQString result;
int begin, end; int begin, end;
if ( ( begin = exp->tqfind( '(' ) ) != -1 ) { if ( ( begin = exp->find( '(' ) ) != -1 ) {
if ( ( end = exp->tqfindRev( ')' ) ) == -1 ) { if ( ( end = exp->findRev( ')' ) ) == -1 ) {
setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: missing ')' in Expander::separateParameter") )); setError(Error(Error::S_FATAL,Error::C_SYNTAX,i18n("Error: missing ')' in Expander::separateParameter") ));
return TagStringList(); return TagStringList();
} }
@ -1159,7 +1159,7 @@ TagStringList Expander::separateParameter( TQString* const exp, bool useUrl ) {
while ( idx < result.length() ) { while ( idx < result.length() ) {
if ( result[ idx ].latin1() == '\\' ) { if ( result[ idx ].latin1() == '\\' ) {
if ( result[ idx+1 ].latin1() == '"') if ( result[ idx+1 ].latin1() == '"')
result.tqreplace( idx, 1, "" ); result.replace( idx, 1, "" );
} }
if ( result[ idx ].latin1() == '"' ) if ( result[ idx ].latin1() == '"' )
inQuotes = !inQuotes; inQuotes = !inQuotes;
@ -1187,10 +1187,10 @@ TagStringList Expander::separateParameter( TQString* const exp, bool useUrl ) {
} }
int Expander::findEnd( const TQString& str, int start ) { int Expander::findEnd( const TQString& str, int start ) {
int end = str.tqfind( '%', start + 1 ); int end = str.find( '%', start + 1 );
if ( end == -1 ) if ( end == -1 )
return end; return end;
int bracket = str.tqfind( '(', start + 1 ); int bracket = str.find( '(', start + 1 );
if ( end < bracket || bracket == -1 ) if ( end < bracket || bracket == -1 )
return end; return end;

@ -309,7 +309,7 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
available = false; available = false;
for ( TQStringList::Iterator it = _showonlyPath.begin(); it != _showonlyPath.end(); ++it ) { for ( TQStringList::Iterator it = _showonlyPath.begin(); it != _showonlyPath.end(); ++it ) {
if ( (*it).right(1) == "*" ){ if ( (*it).right(1) == "*" ){
if ( currentURL.path().tqfind( (*it).left( (*it).length() - 1 ) ) == 0 ) { if ( currentURL.path().find( (*it).left( (*it).length() - 1 ) ) == 0 ) {
available = true; available = true;
break; break;
} }
@ -326,14 +326,14 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
available = false; available = false;
KMimeType::Ptr mime = KMimeType::findByURL( currentURL ); KMimeType::Ptr mime = KMimeType::findByURL( currentURL );
for ( TQStringList::Iterator it = _showonlyMime.begin(); it != _showonlyMime.end(); ++it ) { for ( TQStringList::Iterator it = _showonlyMime.begin(); it != _showonlyMime.end(); ++it ) {
if ( (*it).tqcontains("/") ) { if ( (*it).contains("/") ) {
if ( mime->is( *it ) ) { // don't use ==; use 'is()' instead, which is aware of inheritence (ie: text/x-makefile is also text/plain) if ( mime->is( *it ) ) { // don't use ==; use 'is()' instead, which is aware of inheritence (ie: text/x-makefile is also text/plain)
available = true; available = true;
break; break;
} }
} }
else { else {
if ( mime->name().tqfind( *it ) == 0 ) { // 0 is the beginning, -1 is not found if ( mime->name().find( *it ) == 0 ) { // 0 is the beginning, -1 is not found
available = true; available = true;
break; break;
} }

@ -26,7 +26,7 @@ KrActionBase::~KrActionBase()
void KrActionBase::exec() { void KrActionBase::exec() {
KrActionProc *proc; KrActionProc *proc;
// tqreplace %% and prepare string // replace %% and prepare string
TQStringList commandList; TQStringList commandList;
if(doSubstitution()) { if(doSubstitution()) {
Expander exp; Expander exp;

@ -30,8 +30,8 @@ public:
TagString_t left(unsigned) const; TagString_t left(unsigned) const;
TagString_t right(unsigned) const; TagString_t right(unsigned) const;
void insert(uint,const TQString& s); void insert(uint,const TQString& s);
int tqfind ( TQChar c, int index = 0, bool cs = TRUE ) const { int find ( TQChar c, int index = 0, bool cs = TRUE ) const {
return str.tqfind(c,index,cs); return str.find(c,index,cs);
} }
TagString_t& operator+=(const TagString_t& s); TagString_t& operator+=(const TagString_t& s);
typename taglist::const_iterator tagsBegin() const { return tags.begin(); } typename taglist::const_iterator tagsBegin() const { return tags.begin(); }

@ -60,7 +60,7 @@ TQStringList UserAction::allCategories() {
TQStringList actionCategories; TQStringList actionCategories;
for ( KrAction* action = _actions.first(); action; action = _actions.next() ) for ( KrAction* action = _actions.first(); action; action = _actions.next() )
if ( actionCategories.tqfind( action->category() ) == actionCategories.end() ) if ( actionCategories.find( action->category() ) == actionCategories.end() )
actionCategories.append( action->category() ); actionCategories.append( action->category() );
return actionCategories; return actionCategories;

@ -143,8 +143,8 @@ arc_vfs::arc_vfs(TQString origin,TQString type,TQObject* panel,bool write):
} }
// "-rpm" is used only to list the rpm - to extract files use "+rpm" // "-rpm" is used only to list the rpm - to extract files use "+rpm"
if(type == "-rpm"){ if(type == "-rpm"){
//rpm can't handle files with " " in them so tqreplace " " with "\ " //rpm can't handle files with " " in them so replace " " with "\ "
arcFile.tqreplace(TQRegExp(" "),"\\ "); arcFile.replace(TQRegExp(" "),"\\ ");
cmd = KrServices::fullPathName( "rpm" ); cmd = KrServices::fullPathName( "rpm" );
listCmd = " --dump -lpq "; listCmd = " --dump -lpq ";
@ -187,7 +187,7 @@ arc_vfs::arc_vfs(TQString origin,TQString type,TQObject* panel,bool write):
// return the working dir // return the working dir
TQString arc_vfs::vfs_workingDir(){ TQString arc_vfs::vfs_workingDir(){
// get the path inside the archive // get the path inside the archive
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
if(path.left(1) != "/") path = "/"+path; if(path.left(1) != "/") path = "/"+path;
TQDir().mkdir(tmpDir+path); TQDir().mkdir(tmpDir+path);
return tmpDir+path; return tmpDir+path;
@ -215,7 +215,7 @@ bool arc_vfs::getDirs(){
proc.start(KProcess::Block); proc.start(KProcess::Block);
if( !proc.normalExit() || !proc.exitStatus() == 0 ){ if( !proc.normalExit() || !proc.exitStatus() == 0 ){
if (!quietMode) KMessageBox::error(krApp, i18n("<qt>Can't read <b>%1</b>. Archive " if (!quietMode) KMessageBox::error(krApp, i18n("<qt>Can't read <b>%1</b>. Archive "
"might be corrupted!</qt>").tqarg(arcFile.mid(arcFile.tqfindRev('/')+1))); "might be corrupted!</qt>").tqarg(arcFile.mid(arcFile.findRev('/')+1)));
error = true; error = true;
return false; return false;
} }
@ -237,11 +237,11 @@ bool arc_vfs::getDirs(){
temp.readLine(line,10000); // skip the first line - it's garbage temp.readLine(line,10000); // skip the first line - it's garbage
if( vfs_type == "-rar" ){ if( vfs_type == "-rar" ){
while(temp.readLine(line,10000) != -1) while(temp.readLine(line,10000) != -1)
if ( line.tqcontains("----------") ) break; if ( line.contains("----------") ) break;
} }
while(temp.readLine(buf,1000) != -1){ while(temp.readLine(buf,1000) != -1){
line = TQString::fromLocal8Bit(buf); line = TQString::fromLocal8Bit(buf);
if ( line.tqcontains("----------") ) break; if ( line.contains("----------") ) break;
parseLine(line.stripWhiteSpace(),&temp); parseLine(line.stripWhiteSpace(),&temp);
} }
@ -268,13 +268,13 @@ void arc_vfs::vfs_addFiles(KURL::List *fileUrls,KIO::CopyJob::CopyMode mode,TQOb
if ( addCmd.isEmpty() ) return; if ( addCmd.isEmpty() ) return;
// get the path inside the archive // get the path inside the archive
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
path = path+"/"; path = path+"/";
if(dir != "" ) dir = "/"+dir; if(dir != "" ) dir = "/"+dir;
if(path.left(1) != "/") path = "/"+path; if(path.left(1) != "/") path = "/"+path;
// make sure the destination exist // make sure the destination exist
for( int i=0; i >= 0 ; i= TQString(tmpDir+path+dir).tqfind('/',i+1) ){ for( int i=0; i >= 0 ; i= TQString(tmpDir+path+dir).find('/',i+1) ){
TQDir().mkdir(TQString(tmpDir+path+dir).left(i)); TQDir().mkdir(TQString(tmpDir+path+dir).left(i));
} }
@ -349,7 +349,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
// return a path to the file // return a path to the file
TQString arc_vfs::vfs_getFile(TQString name){ TQString arc_vfs::vfs_getFile(TQString name){
// get the current file path // get the current file path
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1); if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/"; if(path != "") path = path+"/";
@ -364,7 +364,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
KURL::List* urls = new KURL::List(); KURL::List* urls = new KURL::List();
// get the current file path // get the current file path
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1); if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/"; if(path != "") path = path+"/";
@ -387,7 +387,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
if( vfs_type == "-rar" ) file = files.remove(file--); if( vfs_type == "-rar" ) file = files.remove(file--);
} }
// don't unpack the same file twice // don't unpack the same file twice
else if( extFiles.tqcontains(*file) ){ else if( extFiles.contains(*file) ){
file = files.remove(file--); file = files.remove(file--);
} }
} }
@ -420,7 +420,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
// make dir // make dir
void arc_vfs::vfs_mkdir(TQString name){ void arc_vfs::vfs_mkdir(TQString name){
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1); if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/"; if(path != "") path = path+"/";
@ -433,7 +433,7 @@ void arc_vfs::vfs_mkdir(TQString name){
void arc_vfs::vfs_rename(TQString fileName,TQString newName){ void arc_vfs::vfs_rename(TQString fileName,TQString newName){
KURL::List temp; KURL::List temp;
temp.append(vfs_getFile(fileName)); temp.append(vfs_getFile(fileName));
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
if(path.left(1)=="/") path.remove(0,1); if(path.left(1)=="/") path.remove(0,1);
if(path != "") path = path+"/"; if(path != "") path = path+"/";
@ -461,7 +461,7 @@ bool arc_vfs::vfs_refresh(TQString origin){
vfs_origin = origin; vfs_origin = origin;
// get the directory... // get the directory...
TQString path = origin.right((origin.length()-origin.tqfindRev('\\'))-1); TQString path = origin.right((origin.length()-origin.findRev('\\'))-1);
if(path.left(1) =="/") path.remove(0,1); if(path.left(1) =="/") path.remove(0,1);
vfs_filesP = findDir(path); vfs_filesP = findDir(path);
@ -473,7 +473,7 @@ bool arc_vfs::vfs_refresh(TQString origin){
// service functions // service functions
TQString arc_vfs::nextWord(TQString &s,char d) { TQString arc_vfs::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace(); s=s.stripWhiteSpace();
int j=s.tqfind(d,0); int j=s.find(d,0);
TQString temp=s.left(j); // find the leftmost word. TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j); s.remove(0,j);
return temp; return temp;
@ -511,11 +511,11 @@ void arc_vfs::getFilesToPack(TQStringList* filesToPack,TQString dir_name){
} }
// if the file don't exist add it to the archive and to the extFiles // if the file don't exist add it to the archive and to the extFiles
if( newDir || !extFiles.tqcontains( dir_name+name ) ){ if( newDir || !extFiles.contains( dir_name+name ) ){
filesToPack->append( dir_name+name ); filesToPack->append( dir_name+name );
extFiles.append( temp ); extFiles.append( temp );
} // else if the file exist but was modified - repack it; } // else if the file exist but was modified - repack it;
else if( !extFiles.tqcontains( temp ) ){ else if( !extFiles.contains( temp ) ){
filesToPack->append( dir_name+name ); filesToPack->append( dir_name+name );
extFiles.remove( dir_name+name ); extFiles.remove( dir_name+name );
extFiles.append( temp ); extFiles.append( temp );
@ -560,7 +560,7 @@ void arc_vfs::getExtFiles(TQString dir_name){
} }
// if the file is not in extFiles - it is newly extracted. // if the file is not in extFiles - it is newly extracted.
// note: getFilesToPack() updates time + size ! // note: getFilesToPack() updates time + size !
else if( !extFiles.tqcontains( dir_name+name ) ){ else if( !extFiles.contains( dir_name+name ) ){
extFiles.append( temp ); extFiles.append( temp );
} }
} }
@ -647,20 +647,20 @@ TQString arc_vfs::changeDir(TQString name){
name.remove(0,2); name.remove(0,2);
} }
if(!name.tqcontains('/')){ if(!name.contains('/')){
vfs_filesP = findDir(""); vfs_filesP = findDir("");
return name; return name;
} }
// seperate the path from the name // seperate the path from the name
TQString path = name.left(name.tqfindRev('/')); TQString path = name.left(name.findRev('/'));
name = name.mid(name.tqfindRev('/')+1); name = name.mid(name.findRev('/')+1);
// see if the path exists // see if the path exists
if ((vfs_filesP=findDir(path)) == 0){ if ((vfs_filesP=findDir(path)) == 0){
//create a new dir entry //create a new dir entry
TQString Pname = path.mid(path.tqfindRev('/')+1); TQString Pname = path.mid(path.findRev('/')+1);
if(Pname.isEmpty()) return name; if(Pname.isEmpty()) return name;
TQString tempName = arcFile; TQString tempName = arcFile;
TQFileInfo qfi(tempName.tqreplace(TQRegExp("\\"),"")); TQFileInfo qfi(tempName.replace(TQRegExp("\\"),""));
vfile* vf=new vfile(Pname,0,"drwxr-xr-x",qfi.lastModified().toTime_t(),false, vfile* vf=new vfile(Pname,0,"drwxr-xr-x",qfi.lastModified().toTime_t(),false,
qfi.owner(),qfi.group(),"inode/directory","",0 ); qfi.owner(),qfi.group(),"inode/directory","",0 );
// add dirs if needed // add dirs if needed
@ -683,7 +683,7 @@ void arc_vfs::vfs_calcSpace(TQString name ,KIO::filesize_t *totalSize,unsigned l
vfile* vf = vfs_search(name); vfile* vf = vfs_search(name);
// get the path inside the archive // get the path inside the archive
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
path = path+"/"; path = path+"/";
if(path.left(1) == "/") path.remove(0,1); if(path.left(1) == "/") path.remove(0,1);
@ -715,7 +715,7 @@ void arc_vfs::processName(const TQString& name, TQStringList *urls,KIO::filesize
if ( vf == 0 ) return; if ( vf == 0 ) return;
// get the path inside the archive // get the path inside the archive
TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.tqfindRev('\\'))-1); TQString path = vfs_origin.right((vfs_origin.length()-vfs_origin.findRev('\\'))-1);
path = path+"/"; path = path+"/";
if(path.left(1) == "/") path.remove(0,1); if(path.left(1) == "/") path.remove(0,1);
@ -761,7 +761,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
size = nextWord(line).toLong(); size = nextWord(line).toLong();
nextWord(line); nextWord(line);
name = nextWord(line,'\n'); name = nextWord(line,'\n');
if(name.tqcontains('/')) name = name.mid(name.tqfindRev('/')+1,name.length()); if(name.contains('/')) name = name.mid(name.findRev('/')+1,name.length());
perm = KRpermHandler::mode2TQString(stat_p.st_mode) ; perm = KRpermHandler::mode2TQString(stat_p.st_mode) ;
owner = KRpermHandler::user2uid(qfi.owner()); owner = KRpermHandler::user2uid(qfi.owner());
group = KRpermHandler::group2gid(qfi.group()); group = KRpermHandler::group2gid(qfi.group());
@ -774,7 +774,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
KDE_stat(arcFile.local8Bit(),&stat_p); KDE_stat(arcFile.local8Bit(),&stat_p);
name = qfi.fileName(); name = qfi.fileName();
name = name.left(name.tqfindRev('.')); name = name.left(name.findRev('.'));
//long size = qfi.size(); //long size = qfi.size();
perm = KRpermHandler::mode2TQString(stat_p.st_mode) ; perm = KRpermHandler::mode2TQString(stat_p.st_mode) ;
owner = KRpermHandler::user2uid(qfi.owner()); owner = KRpermHandler::user2uid(qfi.owner());
@ -786,17 +786,17 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
if(vfs_type == "-tar" || vfs_type == "-tbz" || vfs_type == "-tgz" ){ if(vfs_type == "-tar" || vfs_type == "-tbz" || vfs_type == "-tgz" ){
perm = nextWord(line); perm = nextWord(line);
TQString temp = nextWord(line); TQString temp = nextWord(line);
owner = temp.left(temp.tqfindRev('/')).toInt(); owner = temp.left(temp.findRev('/')).toInt();
group = temp.mid(temp.tqfind('/')+1,temp.length()).toInt(); group = temp.mid(temp.find('/')+1,temp.length()).toInt();
size = nextWord(line).toLong(); size = nextWord(line).toLong();
temp = nextWord(line); temp = nextWord(line);
name = nextWord(line,'\n'); name = nextWord(line,'\n');
if (name.startsWith("/")) // fix full-paths problem in tar (thanks to Heiner!) if (name.startsWith("/")) // fix full-paths problem in tar (thanks to Heiner!)
name.remove(0, 1); name.remove(0, 1);
if( name.tqcontains(" -> ") ){ if( name.contains(" -> ") ){
link = true; link = true;
dest = name.mid(name.tqfind(" -> ")+4); dest = name.mid(name.find(" -> ")+4);
name = name.left(name.tqfind(" -> ")); name = name.left(name.find(" -> "));
} }
} }
@ -805,7 +805,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
perm = nextWord(line); perm = nextWord(line);
if(perm.length() != 10) if(perm.length() != 10)
perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ; perm = (perm.at(0)=='d')? "drwxr-xr-x" : "-rw-r--r--" ;
if (nextWord(line).tqcontains("file")) return; if (nextWord(line).contains("file")) return;
nextWord(line); nextWord(line);
size = nextWord(line).toLong(); size = nextWord(line).toLong();
nextWord(line);nextWord(line); nextWord(line);nextWord(line);
@ -820,13 +820,13 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
size = nextWord(line).toLong(); size = nextWord(line).toLong();
nextWord(line);nextWord(line);nextWord(line); nextWord(line);nextWord(line);nextWord(line);
TQString tempName = arcFile; TQString tempName = arcFile;
TQFileInfo qfi(tempName.tqreplace(TQRegExp("\\"),"")); TQFileInfo qfi(tempName.replace(TQRegExp("\\"),""));
name = nextWord(line,'\n'); name = nextWord(line,'\n');
if ( name.left(1) == "/" ) name.remove(0,1); if ( name.left(1) == "/" ) name.remove(0,1);
if( name.tqcontains(" -> ") ){ if( name.contains(" -> ") ){
link = true; link = true;
dest = name.mid(name.tqfind(" -> ")+4); dest = name.mid(name.find(" -> ")+4);
name = name.left(name.tqfind(" -> ")); name = name.left(name.find(" -> "));
} }
} }
// parse rared files // parse rared files

@ -104,8 +104,8 @@ void ftp_vfs::slotAddFiles( KIO::Job *, const KIO::UDSEntryList& entries ) {
temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode, rwx ); temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode, rwx );
else { else {
TQString currentUser = vfs_origin.user(); TQString currentUser = vfs_origin.user();
if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */ if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.tqfind( '@' ) ); currentUser.truncate( currentUser.find( '@' ) );
if ( currentUser.isEmpty() ) { if ( currentUser.isEmpty() ) {
if( vfs_origin.host().isEmpty() ) if( vfs_origin.host().isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() ); currentUser = KRpermHandler::uid2user( getuid() );

@ -82,35 +82,35 @@ bool KRarcHandler::arcSupported( TQString type ) {
krConfig->setGroup( "Archives" ); krConfig->setGroup( "Archives" );
TQStringList lst = krConfig->readListEntry( "Supported Packers" ); TQStringList lst = krConfig->readListEntry( "Supported Packers" );
if ( type == "-zip" && lst.tqcontains( "unzip" ) ) if ( type == "-zip" && lst.contains( "unzip" ) )
return true; return true;
else if ( type == "-tar" && lst.tqcontains( "tar" ) ) else if ( type == "-tar" && lst.contains( "tar" ) )
return true; return true;
else if ( type == "-tbz" && lst.tqcontains( "tar" ) ) else if ( type == "-tbz" && lst.contains( "tar" ) )
return true; return true;
else if ( type == "-tgz" && lst.tqcontains( "tar" ) ) else if ( type == "-tgz" && lst.contains( "tar" ) )
return true; return true;
else if ( type == "tarz" && lst.tqcontains( "tar" ) ) else if ( type == "tarz" && lst.contains( "tar" ) )
return true; return true;
else if ( type == "gzip" && lst.tqcontains( "gzip" ) ) else if ( type == "gzip" && lst.contains( "gzip" ) )
return true; return true;
else if ( type == "zip2" && lst.tqcontains( "bzip2" ) ) else if ( type == "zip2" && lst.contains( "bzip2" ) )
return true; return true;
else if ( type == "-lha" && lst.tqcontains( "lha" ) ) else if ( type == "-lha" && lst.contains( "lha" ) )
return true; return true;
else if ( type == "-ace" && lst.tqcontains( "unace" ) ) else if ( type == "-ace" && lst.contains( "unace" ) )
return true; return true;
else if ( type == "-rpm" && lst.tqcontains( "cpio" ) ) else if ( type == "-rpm" && lst.contains( "cpio" ) )
return true; return true;
else if ( type == "cpio" && lst.tqcontains( "cpio" ) ) else if ( type == "cpio" && lst.contains( "cpio" ) )
return true; return true;
else if ( type == "-rar" && ( lst.tqcontains( "unrar" ) || lst.tqcontains( "rar" ) ) ) else if ( type == "-rar" && ( lst.contains( "unrar" ) || lst.contains( "rar" ) ) )
return true; return true;
else if ( type == "-arj" && ( lst.tqcontains( "unarj" ) || lst.tqcontains( "arj" ) ) ) else if ( type == "-arj" && ( lst.contains( "unarj" ) || lst.contains( "arj" ) ) )
return true; return true;
else if ( type == "-deb" && ( lst.tqcontains( "dpkg" ) && lst.tqcontains( "tar" ) ) ) else if ( type == "-deb" && ( lst.contains( "dpkg" ) && lst.contains( "tar" ) ) )
return true; return true;
else if ( type == "-7z" && lst.tqcontains( "7z" ) ) else if ( type == "-7z" && lst.contains( "7z" ) )
return true; return true;
// not supported : ( // not supported : (
return false; return false;
@ -299,8 +299,8 @@ bool KRarcHandler::unpack( TQString archive, TQString type, TQString password, T
KrShellProcess proc; KrShellProcess proc;
proc << packer << " " + KrServices::quote( archive ); proc << packer << " " + KrServices::quote( archive );
if( type == "zip2" || type=="gzip" ){ if( type == "zip2" || type=="gzip" ){
TQString arcname = archive.mid(archive.tqfindRev("/")+1); TQString arcname = archive.mid(archive.findRev("/")+1);
if( arcname.tqcontains(".") ) arcname = arcname.left(arcname.tqfindRev(".")); if( arcname.contains(".") ) arcname = arcname.left(arcname.findRev("."));
proc << ">" << KrServices::quote( dest+"/"+arcname ); proc << ">" << KrServices::quote( dest+"/"+arcname );
} }
if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!! if( type == "-ace" && TQFile( "/dev/ptmx" ).exists() ) // Don't remove, unace crashes if missing!!!
@ -536,7 +536,7 @@ TQString KRarcHandler::getPassword( TQString path ) {
wallet->setFolder( KWallet::Wallet::PasswordFolder() ); wallet->setFolder( KWallet::Wallet::PasswordFolder() );
TQMap<TQString,TQString> map; TQMap<TQString,TQString> map;
if ( wallet->readMap( key, map ) == 0 ) { if ( wallet->readMap( key, map ) == 0 ) {
TQMap<TQString, TQString>::ConstIterator it = map.tqfind( "password" ); TQMap<TQString, TQString>::ConstIterator it = map.find( "password" );
if ( it != map.end() ) if ( it != map.end() )
password = it.data(); password = it.data();
} }
@ -578,7 +578,7 @@ TQString KRarcHandler::getPassword( TQString path ) {
bool KRarcHandler::isArchive(const KURL& url) { bool KRarcHandler::isArchive(const KURL& url) {
TQString protocol = url.protocol(); TQString protocol = url.protocol();
if (arcProtocols.tqfind(protocol) != arcProtocols.end()) if (arcProtocols.find(protocol) != arcProtocols.end())
return true; return true;
else return false; else return false;
} }

@ -129,13 +129,13 @@ public slots:
lastData = lines[ lines.count() - 1 ]; lastData = lines[ lines.count() - 1 ];
for( unsigned i=0; i != lines.count(); i++ ) { for( unsigned i=0; i != lines.count(); i++ ) {
TQString line = lines[ i ].stripWhiteSpace().lower(); TQString line = lines[ i ].stripWhiteSpace().lower();
int ndx = line.tqfind( "testing" ); int ndx = line.find( "testing" );
if( ndx >=0 ) if( ndx >=0 )
line.truncate( ndx ); line.truncate( ndx );
if( line.isEmpty() ) if( line.isEmpty() )
continue; continue;
if( line.tqcontains( "password" ) && line.tqcontains( "enter" ) ) { if( line.contains( "password" ) && line.contains( "enter" ) ) {
encrypted = true; encrypted = true;
proc->kill(); proc->kill();
} }

@ -64,7 +64,7 @@ char KRpermHandler::writeable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
// first check other permissions. // first check other permissions.
if ( perm[ 8 ] != '-' ) return ALLOWED_PERM; if ( perm[ 8 ] != '-' ) return ALLOWED_PERM;
// now check group permission // now check group permission
if ( ( perm[ 5 ] != '-' ) && ( currentGroups->tqfind( gid ) ) ) if ( ( perm[ 5 ] != '-' ) && ( currentGroups->find( gid ) ) )
return ALLOWED_PERM; return ALLOWED_PERM;
// the last chance - user permissions // the last chance - user permissions
if ( ( perm[ 2 ] != '-' ) && ( uid == getuid() ) ) if ( ( perm[ 2 ] != '-' ) && ( uid == getuid() ) )
@ -82,7 +82,7 @@ char KRpermHandler::readable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
// first check other permissions. // first check other permissions.
if ( perm[ 7 ] != '-' ) return ALLOWED_PERM; if ( perm[ 7 ] != '-' ) return ALLOWED_PERM;
// now check group permission // now check group permission
if ( ( perm[ 4 ] != '-' ) && ( currentGroups->tqfind( gid ) ) ) if ( ( perm[ 4 ] != '-' ) && ( currentGroups->find( gid ) ) )
return ALLOWED_PERM; return ALLOWED_PERM;
// the last chance - user permissions // the last chance - user permissions
if ( ( perm[ 1 ] != '-' ) && ( uid == getuid() ) ) if ( ( perm[ 1 ] != '-' ) && ( uid == getuid() ) )
@ -97,7 +97,7 @@ char KRpermHandler::executable( TQString perm, gid_t gid, uid_t uid, int rwx ) {
// first check other permissions. // first check other permissions.
if ( perm[ 9 ] != '-' ) return ALLOWED_PERM; if ( perm[ 9 ] != '-' ) return ALLOWED_PERM;
// now check group permission // now check group permission
if ( ( perm[ 6 ] != '-' ) && ( currentGroups->tqfind( gid ) ) ) if ( ( perm[ 6 ] != '-' ) && ( currentGroups->find( gid ) ) )
return ALLOWED_PERM; return ALLOWED_PERM;
// the last chance - user permissions // the last chance - user permissions
if ( ( perm[ 3 ] != '-' ) && ( uid == getuid() ) ) if ( ( perm[ 3 ] != '-' ) && ( uid == getuid() ) )
@ -260,8 +260,8 @@ bool KRpermHandler::dirExist( TQString path ) {
bool KRpermHandler::fileExist( TQString fullPath ) { bool KRpermHandler::fileExist( TQString fullPath ) {
if ( fullPath.right( 1 ) == "/" ) fullPath = fullPath.left( fullPath.length() - 1 ) ; if ( fullPath.right( 1 ) == "/" ) fullPath = fullPath.left( fullPath.length() - 1 ) ;
if ( fullPath.left( 1 ) != "/" ) return fileExist( "/", fullPath ); if ( fullPath.left( 1 ) != "/" ) return fileExist( "/", fullPath );
return fileExist( fullPath.left( fullPath.tqfindRev( "/" ) ) , return fileExist( fullPath.left( fullPath.findRev( "/" ) ) ,
fullPath.mid( fullPath.tqfindRev( "/" ) + 1 ) ); fullPath.mid( fullPath.findRev( "/" ) + 1 ) );
} }
bool KRpermHandler::fileExist( TQString path, TQString name ) { bool KRpermHandler::fileExist( TQString path, TQString name ) {
@ -331,24 +331,24 @@ time_t KRpermHandler::TQString2time( TQString date ) {
} }
gid_t KRpermHandler::group2gid( TQString group ) { gid_t KRpermHandler::group2gid( TQString group ) {
gid_t * gid = groupCache->tqfind( group ); gid_t * gid = groupCache->find( group );
if ( gid ) return * gid; if ( gid ) return * gid;
return getgid(); return getgid();
} }
uid_t KRpermHandler::user2uid ( TQString user ) { uid_t KRpermHandler::user2uid ( TQString user ) {
uid_t * uid = passwdCache->tqfind( user ); uid_t * uid = passwdCache->find( user );
if ( uid ) return * uid; if ( uid ) return * uid;
return getuid(); return getuid();
} }
TQString KRpermHandler::gid2group( gid_t groupId ) { TQString KRpermHandler::gid2group( gid_t groupId ) {
TQString * group = gidCache->tqfind( groupId ); TQString * group = gidCache->find( groupId );
if ( group ) return * group; if ( group ) return * group;
return TQString( "???" ); return TQString( "???" );
} }
TQString KRpermHandler::uid2user ( uid_t userId ) { TQString KRpermHandler::uid2user ( uid_t userId ) {
TQString * user = uidCache->tqfind( userId ); TQString * user = uidCache->find( userId );
if ( user ) return * user; if ( user ) return * user;
return TQString( "???" ); return TQString( "???" );
} }

@ -112,15 +112,15 @@ KRQuery& KRQuery::operator=(const KRQuery &old) {
} }
void KRQuery::connectNotify ( const char * signal ) { void KRQuery::connectNotify ( const char * signal ) {
TQString signalString = TQString( signal ).tqreplace( " ", "" ); TQString signalString = TQString( signal ).replace( " ", "" );
TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).tqreplace( " ", "" ); TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).replace( " ", "" );
if( signalString == processString ) if( signalString == processString )
processEventsConnected++; processEventsConnected++;
} }
void KRQuery::disconnectNotify ( const char * signal ) { void KRQuery::disconnectNotify ( const char * signal ) {
TQString signalString = TQString( signal ).tqreplace( " ", "" ); TQString signalString = TQString( signal ).replace( " ", "" );
TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).tqreplace( " ", "" ); TQString processString = TQString( TQT_SIGNAL( processEvents( bool & ) ) ).replace( " ", "" );
if( signalString == processString ) if( signalString == processString )
processEventsConnected--; processEventsConnected--;
} }
@ -136,12 +136,12 @@ bool KRQuery::checkType( TQString mime ) const
{ {
if ( type == mime ) return true; if ( type == mime ) return true;
if ( type == i18n( "Archives" ) ) return KRarcHandler::arcSupported( mime.right( 4 ) ); if ( type == i18n( "Archives" ) ) return KRarcHandler::arcSupported( mime.right( 4 ) );
if ( type == i18n( "Directories" ) ) return mime.tqcontains( "directory" ); if ( type == i18n( "Directories" ) ) return mime.contains( "directory" );
if ( type == i18n( "Image Files" ) ) return mime.tqcontains( "image/" ); if ( type == i18n( "Image Files" ) ) return mime.contains( "image/" );
if ( type == i18n( "Text Files" ) ) return mime.tqcontains( "text/" ); if ( type == i18n( "Text Files" ) ) return mime.contains( "text/" );
if ( type == i18n( "Video Files" ) ) return mime.tqcontains( "video/" ); if ( type == i18n( "Video Files" ) ) return mime.contains( "video/" );
if ( type == i18n( "Audio Files" ) ) return mime.tqcontains( "audio/" ); if ( type == i18n( "Audio Files" ) ) return mime.contains( "audio/" );
if ( type == i18n( "Custom" ) ) return customType.tqcontains( mime ); if ( type == i18n( "Custom" ) ) return customType.contains( mime );
return false; return false;
} }
@ -159,7 +159,7 @@ bool KRQuery::matchCommon( const TQString &nameIn, const TQStringList &matchList
return true; return true;
TQString name( nameIn ); TQString name( nameIn );
int ndx = nameIn.tqfindRev( '/' ); // virtual filenames may contain '/' int ndx = nameIn.findRev( '/' ); // virtual filenames may contain '/'
if( ndx != -1 ) // but the end of the filename is OK if( ndx != -1 ) // but the end of the filename is OK
name = nameIn.mid( ndx + 1 ); name = nameIn.mid( ndx + 1 );
@ -251,17 +251,17 @@ void fixFoundTextForDisplay(TQString& haystack, int start, int length) {
TQString text = haystack.mid( start, length ); TQString text = haystack.mid( start, length );
TQString after = haystack.mid( start + length ); TQString after = haystack.mid( start + length );
before.tqreplace( '&', "&amp;" ); before.replace( '&', "&amp;" );
before.tqreplace( '<', "&lt;" ); before.replace( '<', "&lt;" );
before.tqreplace( '>', "&gt;" ); before.replace( '>', "&gt;" );
text.tqreplace( '&', "&amp;" ); text.replace( '&', "&amp;" );
text.tqreplace( '<', "&lt;" ); text.replace( '<', "&lt;" );
text.tqreplace( '>', "&gt;" ); text.replace( '>', "&gt;" );
after.tqreplace( '&', "&amp;" ); after.replace( '&', "&amp;" );
after.tqreplace( '<', "&lt;" ); after.replace( '<', "&lt;" );
after.tqreplace( '>', "&gt;" ); after.replace( '>', "&gt;" );
haystack = ("<qt>"+before+"<b>"+text+"</b>"+after+"</qt>" ); haystack = ("<qt>"+before+"<b>"+text+"</b>"+after+"</qt>" );
} }
@ -351,7 +351,7 @@ bool KRQuery::checkLines( const char * buf, int len ) const
if ( line.isNull() ) return false; if ( line.isNull() ) return false;
if ( containWholeWord ) if ( containWholeWord )
{ {
while ( ( ndx = line.tqfind( contain, ndx, containCaseSensetive ) ) != -1 ) while ( ( ndx = line.find( contain, ndx, containCaseSensetive ) ) != -1 )
{ {
TQChar before = line.at( ndx - 1 ); TQChar before = line.at( ndx - 1 );
TQChar after = line.at( ndx + contain.length() ); TQChar after = line.at( ndx + contain.length() );
@ -365,7 +365,7 @@ bool KRQuery::checkLines( const char * buf, int len ) const
ndx++; ndx++;
} }
} }
else if ( (ndx = line.tqfind( contain, 0, containCaseSensetive )) != -1 ) { else if ( (ndx = line.find( contain, 0, containCaseSensetive )) != -1 ) {
lastSuccessfulGrep = line; lastSuccessfulGrep = line;
fixFoundTextForDisplay(lastSuccessfulGrep, ndx, contain.length()); fixFoundTextForDisplay(lastSuccessfulGrep, ndx, contain.length());
return true; return true;
@ -539,7 +539,7 @@ void KRQuery::setNameFilter( const TQString &text, bool cs )
continue; continue;
} }
if( !matches[ i ].tqcontains( "*" ) && !matches[ i ].tqcontains( "?" ) ) if( !matches[ i ].contains( "*" ) && !matches[ i ].contains( "?" ) )
matches[ i ] = "*" + matches[ i ] + "*"; matches[ i ] = "*" + matches[ i ] + "*";
i++; i++;
@ -555,7 +555,7 @@ void KRQuery::setNameFilter( const TQString &text, bool cs )
continue; continue;
} }
if( !excludes[ i ].tqcontains( "*" ) && !excludes[ i ].tqcontains( "?" ) ) if( !excludes[ i ].contains( "*" ) && !excludes[ i ].contains( "?" ) )
excludes[ i ] = "*" + excludes[ i ] + "*"; excludes[ i ] = "*" + excludes[ i ] + "*";
i++; i++;

@ -72,7 +72,7 @@ temp_vfs::~temp_vfs(){
TQString temp_vfs::vfs_workingDir(){ TQString temp_vfs::vfs_workingDir(){
// get the path inside the archive // get the path inside the archive
TQString path = vfs_origin.path(-1); TQString path = vfs_origin.path(-1);
path = path.mid(path.tqfindRev('\\')+1); path = path.mid(path.findRev('\\')+1);
if(path.left(1) != "/") path = "/"+path; if(path.left(1) != "/") path = "/"+path;
TQDir().mkdir(tmpDir+path); TQDir().mkdir(tmpDir+path);
return tmpDir+path; return tmpDir+path;
@ -83,7 +83,7 @@ bool temp_vfs::vfs_refresh(const KURL& origin){
vfs_origin = origin; vfs_origin = origin;
vfs_origin.adjustPath(-1); vfs_origin.adjustPath(-1);
// get the directory... // get the directory...
TQString path = origin.path(-1).mid(origin.path(-1).tqfindRev('\\')+1); TQString path = origin.path(-1).mid(origin.path(-1).findRev('\\')+1);
if(path.left(1) =="/") path.remove(0,1); if(path.left(1) =="/") path.remove(0,1);
if ( !normal_vfs::vfs_refresh(tmpDir+"/"+path) ){ if ( !normal_vfs::vfs_refresh(tmpDir+"/"+path) ){
vfs_origin = backup; vfs_origin = backup;

@ -149,7 +149,7 @@ char vfile::vfile_isExecutable() const {
const TQString& vfile::vfile_getMime(bool fast){ const TQString& vfile::vfile_getMime(bool fast){
if( vfile_mimeType == TQString() ){ // mimetype == "" is OK so don't check mimetype.empty() ! if( vfile_mimeType == TQString() ){ // mimetype == "" is OK so don't check mimetype.empty() !
vfile_mimeType = KMimeType::findByURL( vfile_getUrl(),vfile_getMode(),vfile_getUrl().isLocalFile(),fast)->name(); vfile_mimeType = KMimeType::findByURL( vfile_getUrl(),vfile_getMode(),vfile_getUrl().isLocalFile(),fast)->name();
if( vfile_mimeType.tqcontains("directory") ) vfile_perm[0] = 'd', vfile_isdir = true; if( vfile_mimeType.contains("directory") ) vfile_perm[0] = 'd', vfile_isdir = true;
} }
return vfile_mimeType; return vfile_mimeType;
} }

@ -87,23 +87,23 @@ KURL vfs::fromPathOrURL( const TQString &originIn )
TQString password, loginName, origin = originIn; TQString password, loginName, origin = originIn;
bool bugfix = false; bool bugfix = false;
if ( originIn.tqcontains( ":/" ) && !originIn.startsWith( "/" ) ) if ( originIn.contains( ":/" ) && !originIn.startsWith( "/" ) )
{ {
// breakdown the url; // breakdown the url;
/* FIXME: untill KDE fixes the bug we have to check for /* FIXME: untill KDE fixes the bug we have to check for
passwords and users with @ in them... */ passwords and users with @ in them... */
bugfix = origin.tqfind("@") != origin.tqfindRev("@"); bugfix = origin.find("@") != origin.findRev("@");
if(bugfix){ if(bugfix){
if(origin.tqfind(":") != origin.tqfindRev(":", origin.tqfindRev("@") )){ if(origin.find(":") != origin.findRev(":", origin.findRev("@") )){
int passStart = origin.tqfind( ":",origin.tqfind(":")+1 )+1; int passStart = origin.find( ":",origin.find(":")+1 )+1;
int passLen = origin.tqfindRev("@")-passStart; int passLen = origin.findRev("@")-passStart;
password = origin.mid(passStart,passLen); password = origin.mid(passStart,passLen);
origin = origin.remove(passStart-1,passLen+1); origin = origin.remove(passStart-1,passLen+1);
} }
if(origin.tqfind("@") != origin.tqfindRev("@")){ if(origin.find("@") != origin.findRev("@")){
int usrStart = origin.tqfind( "/" )+1; int usrStart = origin.find( "/" )+1;
if(origin.at(usrStart) == '/') ++usrStart; if(origin.at(usrStart) == '/') ++usrStart;
int usrLen = origin.tqfindRev("@")-usrStart; int usrLen = origin.findRev("@")-usrStart;
loginName = origin.mid(usrStart,usrLen); loginName = origin.mid(usrStart,usrLen);
origin = origin.remove(usrStart,usrLen+1); origin = origin.remove(usrStart,usrLen+1);
} }
@ -337,7 +337,7 @@ void vfs::calculateURLSize( KURL url, KIO::filesize_t* totalSize, unsigned long
void vfs::vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){ void vfs::vfs_calcSpaceLocal(TQString name ,KIO::filesize_t *totalSize,unsigned long *totalFiles,unsigned long *totalDirs, bool* stop){
if ( *stop ) return; if ( *stop ) return;
if (!name.tqcontains("/")) name = vfs_workingDir()+"/"+name; if (!name.contains("/")) name = vfs_workingDir()+"/"+name;
if (name == "/proc") return; if (name == "/proc") return;
KDE_struct_stat stat_p; // KDE lstat is necessary as TQFileInfo and KFileItem KDE_struct_stat stat_p; // KDE lstat is necessary as TQFileInfo and KFileItem

@ -90,7 +90,7 @@ void virt_vfs::vfs_addFiles( KURL::List *fileUrls, KIO::CopyJob::CopyMode /*mode
KURL::List* urlList = virtVfsDict[ path ]; KURL::List* urlList = virtVfsDict[ path ];
for( unsigned i=0; i != fileUrls->count(); i++ ) { for( unsigned i=0; i != fileUrls->count(); i++ ) {
if( !urlList->tqcontains( (*fileUrls)[ i ] ) ) if( !urlList->contains( (*fileUrls)[ i ] ) )
urlList->push_back( (*fileUrls)[ i ] ); urlList->push_back( (*fileUrls)[ i ] );
} }
@ -268,8 +268,8 @@ vfile* virt_vfs::stat( const KURL& url ) {
temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode ); temp = new vfile( name, size, perm, mtime, symLink, getuid(), getgid(), mime, symDest, mode );
else { else {
TQString currentUser = url.user(); TQString currentUser = url.user();
if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */ if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.tqfind( '@' ) ); currentUser.truncate( currentUser.find( '@' ) );
if ( currentUser.isEmpty() ) if ( currentUser.isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() ); currentUser = KRpermHandler::uid2user( getuid() );
temp = new vfile( name, size, perm, mtime, symLink, kfi->user(), kfi->group(), currentUser, mime, symDest, mode ); temp = new vfile( name, size, perm, mtime, symLink, kfi->user(), kfi->group(), currentUser, mime, symDest, mode );

@ -52,10 +52,10 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
vfile * file = vfs->vfs_getFirstFile(); vfile * file = vfs->vfs_getFirstFile();
while( file ) { while( file ) {
if( names->tqcontains( file->vfile_getName() ) ) { if( names->contains( file->vfile_getName() ) ) {
TQString relativeDir = KURL::relativeURL( baseURL, file->vfile_getUrl().upURL() ); TQString relativeDir = KURL::relativeURL( baseURL, file->vfile_getUrl().upURL() );
KURL::List *list = m_filesToCopy.tqfind( relativeDir ); KURL::List *list = m_filesToCopy.find( relativeDir );
if( list == 0 ) { if( list == 0 ) {
list = new KURL::List(); list = new KURL::List();
m_filesToCopy.insert( relativeDir, list ); m_filesToCopy.insert( relativeDir, list );
@ -65,7 +65,7 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
m_subdirs[ relativeDir ] = 0; m_subdirs[ relativeDir ] = 0;
} }
if( !list->tqcontains( file->vfile_getUrl() ) ) { if( !list->contains( file->vfile_getUrl() ) ) {
if( file->vfile_isDir() ) { if( file->vfile_isDir() ) {
m_dirsToGetSize.append( file->vfile_getUrl() ); m_dirsToGetSize.append( file->vfile_getUrl() );
m_totalSubdirs++; m_totalSubdirs++;

@ -167,9 +167,9 @@ bool KrServices::fileToStringList(TQTextStream *stream, TQStringList& target, bo
} }
TQString KrServices::quote( TQString name ) { TQString KrServices::quote( TQString name ) {
if( !name.tqcontains( '\'' ) ) if( !name.contains( '\'' ) )
return "'" + name + "'"; return "'" + name + "'";
if( !name.tqcontains( '"' ) && !name.tqcontains( '$' ) ) if( !name.contains( '"' ) && !name.contains( '$' ) )
return "\"" + name + "\""; return "\"" + name + "\"";
return escape( name ); return escape( name );
} }
@ -185,7 +185,7 @@ TQString KrServices::escape( TQString name ) {
const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| \t\r\n"; // stuff that should get escaped
for ( unsigned int i = 0; i < evilstuff.length(); ++i ) for ( unsigned int i = 0; i < evilstuff.length(); ++i )
name.tqreplace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) ); name.replace( evilstuff[ i ], (TQString("\\") + evilstuff[ i ]) );
return name; return name;
} }

@ -101,7 +101,7 @@
void KRslots::sendFileByEmail(TQString filename) { void KRslots::sendFileByEmail(TQString filename) {
TQString mailProg; TQString mailProg;
TQStringList lst = Krusader::supportedTools(); TQStringList lst = Krusader::supportedTools();
if (lst.tqcontains("MAIL")) mailProg=lst[lst.tqfindIndex("MAIL") + 1]; if (lst.contains("MAIL")) mailProg=lst[lst.findIndex("MAIL") + 1];
else { else {
KMessageBox::error(0,i18n("Krusader can't find a supported mail client. Please install one to your path. Hint: Krusader supports Kmail.")); KMessageBox::error(0,i18n("Krusader can't find a supported mail client. Please install one to your path. Hint: Krusader supports Kmail."));
return; return;
@ -111,7 +111,7 @@ void KRslots::sendFileByEmail(TQString filename) {
if ( vfs::fromPathOrURL( mailProg ).fileName() == "kmail") { if ( vfs::fromPathOrURL( mailProg ).fileName() == "kmail") {
proc << "kmail" << "--subject \""+i18n("Sending file: ")+ proc << "kmail" << "--subject \""+i18n("Sending file: ")+
filename.mid(filename.tqfindRev('/')+1)+"\"" << TQString() + filename.mid(filename.findRev('/')+1)+"\"" << TQString() +
"--attach "+"\"" + filename + "\""; "--attach "+"\"" + filename + "\"";
} }
@ -181,7 +181,7 @@ void KRslots::compareContent( KURL url1, KURL url2 )
{ {
TQString diffProg; TQString diffProg;
TQStringList lst = Krusader::supportedTools(); TQStringList lst = Krusader::supportedTools();
if (lst.tqcontains("DIFF")) diffProg=lst[lst.tqfindIndex("DIFF") + 1]; if (lst.contains("DIFF")) diffProg=lst[lst.findIndex("DIFF") + 1];
else { else {
KMessageBox::error(0,i18n("Krusader can't find any of the supported diff-frontends. Please install one to your path. Hint: Krusader supports Kompare, Kdiff3 and Xxdiff.")); KMessageBox::error(0,i18n("Krusader can't find any of the supported diff-frontends. Please install one to your path. Hint: Krusader supports Kompare, Kdiff3 and Xxdiff."));
return; return;
@ -490,7 +490,7 @@ void KRslots::homeTerminal(){
TQString term = krConfig->readEntry("Terminal",_Terminal); TQString term = krConfig->readEntry("Terminal",_Terminal);
proc << KrServices::separateArgs( term ); proc << KrServices::separateArgs( term );
if( term.tqcontains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */ if( term.contains( "konsole" ) ) /* KDE 3.2 bug (konsole is killed by pressing Ctrl+C) */
{ /* Please remove the patch if the bug is corrected */ { /* Please remove the patch if the bug is corrected */
proc << "&"; proc << "&";
proc.setUseShell( true ); proc.setUseShell( true );
@ -506,13 +506,13 @@ void KRslots::sysInfo(){
KProcess proc; KProcess proc;
proc << "kcmshell" << "System/ksysctrl"; proc << "kcmshell" << "System/ksysctrl";
if (!proc.start(KProcess::DontCare)){ if (!proc.start(KProcess::DontCare)){
KMessageBox::sorry(krApp,i18n("Can't tqfind \"KsysCtrl\". Please install KDE admin package")); KMessageBox::sorry(krApp,i18n("Can't find \"KsysCtrl\". Please install KDE admin package"));
} }
} }
void KRslots::multiRename(){ void KRslots::multiRename(){
TQStringList lst = Krusader::supportedTools(); TQStringList lst = Krusader::supportedTools();
int i = lst.tqfindIndex("RENAME"); int i = lst.findIndex("RENAME");
if (i == -1){ if (i == -1){
KMessageBox::sorry(krApp,i18n("Can't find a batch rename tool.\nYou can get Krename at http://www.krename.net")); KMessageBox::sorry(krApp,i18n("Can't find a batch rename tool.\nYou can get Krename at http://www.krename.net"));
return; return;
@ -726,7 +726,7 @@ void KRslots::slotCombine(){
if( !unixStyle ) if( !unixStyle )
{ {
TQString name = url.fileName(); TQString name = url.fileName();
int extPos = name.tqfindRev( '.' ); int extPos = name.findRev( '.' );
TQString ext = name.mid( extPos + 1 ); TQString ext = name.mid( extPos + 1 );
name.truncate( extPos ); name.truncate( extPos );
url.setFileName( name ); url.setFileName( name );

@ -291,7 +291,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
for(unsigned int i = 0; i != leftTabs.count(); i++ ) for(unsigned int i = 0; i != leftTabs.count(); i++ )
{ {
leftTabs[ i ] = leftTabs[ i ].stripWhiteSpace(); leftTabs[ i ] = leftTabs[ i ].stripWhiteSpace();
if( !leftTabs[ i ].startsWith( "/" ) && leftTabs[ i ].tqfind( ":/" ) < 0 ) if( !leftTabs[ i ].startsWith( "/" ) && leftTabs[ i ].find( ":/" ) < 0 )
leftTabs[ i ] = TQDir::currentDirPath() + "/" + leftTabs[ i ]; leftTabs[ i ] = TQDir::currentDirPath() + "/" + leftTabs[ i ];
} }
startProfile = TQString(); startProfile = TQString();
@ -307,7 +307,7 @@ Krusader::Krusader() : KParts::MainWindow(0,0,WType_TopLevel|WDestructiveClose|T
for(unsigned int i = 0; i != rightTabs.count(); i++ ) for(unsigned int i = 0; i != rightTabs.count(); i++ )
{ {
rightTabs[ i ] = rightTabs[ i ].stripWhiteSpace(); rightTabs[ i ] = rightTabs[ i ].stripWhiteSpace();
if( !rightTabs[ i ].startsWith( "/" ) && rightTabs[ i ].tqfind( ":/" ) < 0 ) if( !rightTabs[ i ].startsWith( "/" ) && rightTabs[ i ].find( ":/" ) < 0 )
rightTabs[ i ] = TQDir::currentDirPath() + "/" + rightTabs[ i ]; rightTabs[ i ] = TQDir::currentDirPath() + "/" + rightTabs[ i ];
} }
startProfile = TQString(); startProfile = TQString();
@ -438,7 +438,7 @@ bool Krusader::versionControl() {
#if 0 #if 0
TQString oldVerText = config->readEntry( "Version", "10.0" ); TQString oldVerText = config->readEntry( "Version", "10.0" );
oldVerText.truncate( oldVerText.tqfindRev( "." ) ); // remove the third dot oldVerText.truncate( oldVerText.findRev( "." ) ); // remove the third dot
float oldVer = oldVerText.toFloat(); float oldVer = oldVerText.toFloat();
// older icompatible version // older icompatible version
if ( oldVer <= 0.9 ) { if ( oldVer <= 0.9 ) {
@ -689,9 +689,9 @@ void Krusader::setupActions() {
SLOTS, TQT_SLOT( runMountMan() ), actionCollection(), "mountman" ); SLOTS, TQT_SLOT( runMountMan() ), actionCollection(), "mountman" );
#endif /* KDE 3.2 */ #endif /* KDE 3.2 */
actFind = new KAction( i18n( "&Search..." ), "filetqfind", CTRL + Key_S, actFind = new KAction( i18n( "&Search..." ), "filefind", CTRL + Key_S,
SLOTS, TQT_SLOT( search() ), actionCollection(), "tqfind" ); SLOTS, TQT_SLOT( search() ), actionCollection(), "find" );
actLocate = new KAction( i18n( "&Locate..." ), "tqfind", SHIFT+CTRL + Key_L, actLocate = new KAction( i18n( "&Locate..." ), "find", SHIFT+CTRL + Key_L,
SLOTS, TQT_SLOT( locate() ), actionCollection(), "locate" ); SLOTS, TQT_SLOT( locate() ), actionCollection(), "locate" );
actSyncDirs = new KAction( i18n( "Synchronize &Directories..." ), "kr_syncdirs", CTRL + Key_Y, actSyncDirs = new KAction( i18n( "Synchronize &Directories..." ), "kr_syncdirs", CTRL + Key_Y,
SLOTS, TQT_SLOT( slotSynchronizeDirs() ), actionCollection(), "sync dirs" ); SLOTS, TQT_SLOT( slotSynchronizeDirs() ), actionCollection(), "sync dirs" );
@ -967,7 +967,7 @@ bool Krusader::queryClose() {
TQWidget *activeModal = TQT_TQWIDGET(TQApplication::activeModalWidget()); TQWidget *activeModal = TQT_TQWIDGET(TQApplication::activeModalWidget());
TQWidget *w = list->first(); TQWidget *w = list->first();
if( activeModal && activeModal != this && activeModal != menuBar() && activeModal != sysTray && list->tqcontains( activeModal ) && !activeModal->isHidden() ) if( activeModal && activeModal != this && activeModal != menuBar() && activeModal != sysTray && list->contains( activeModal ) && !activeModal->isHidden() )
w = activeModal; w = activeModal;
else { else {
while(w && (w==this || w==sysTray || w->isHidden() || w==menuBar()) ) while(w && (w==this || w==sysTray || w->isHidden() || w==menuBar()) )
@ -1173,7 +1173,7 @@ TQString Krusader::getTempDir() {
TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory ); TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
if ( ! TQDir( tmpDir ).exists() ) { if ( ! TQDir( tmpDir ).exists() ) {
for ( int i = 1 ; i != -1 ; i = tmpDir.tqfind( '/', i + 1 ) ) for ( int i = 1 ; i != -1 ; i = tmpDir.find( '/', i + 1 ) )
TQDir().mkdir( tmpDir.left( i ) ); TQDir().mkdir( tmpDir.left( i ) );
TQDir().mkdir( tmpDir ); TQDir().mkdir( tmpDir );
chmod( tmpDir.local8Bit(), 0777 ); chmod( tmpDir.local8Bit(), 0777 );
@ -1203,7 +1203,7 @@ TQString Krusader::getTempFile() {
TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory ); TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
if ( ! TQDir( tmpDir ).exists() ) { if ( ! TQDir( tmpDir ).exists() ) {
for ( int i = 1 ; i != -1 ; i = tmpDir.tqfind( '/', i + 1 ) ) for ( int i = 1 ; i != -1 ; i = tmpDir.find( '/', i + 1 ) )
TQDir().mkdir( tmpDir.left( i ) ); TQDir().mkdir( tmpDir.left( i ) );
TQDir().mkdir( tmpDir ); TQDir().mkdir( tmpDir );
chmod( tmpDir.local8Bit(), 0777 ); chmod( tmpDir.local8Bit(), 0777 );

@ -342,7 +342,7 @@ bool KrusaderView::eventFilter ( TQObject * watched, TQEvent * e ) {
TQString text = TQApplication::tqclipboard()->text(); TQString text = TQApplication::tqclipboard()->text();
if ( ! text.isEmpty() ) if ( ! text.isEmpty() )
{ {
text.tqreplace("\n", "\r"); text.replace("\n", "\r");
TQKeyEvent keyEvent(TQEvent::KeyPress, 0,-1,0, text); TQKeyEvent keyEvent(TQEvent::KeyPress, 0,-1,0, text);
TQApplication::sendEvent( konsole_part->widget(), &keyEvent ); TQApplication::sendEvent( konsole_part->widget(), &keyEvent );
} }

@ -156,10 +156,10 @@ TQString PanelTabBar::squeeze(TQString text, int index) {
{ {
TQString shortName; TQString shortName;
if( text.tqcontains( ":/" ) ) if( text.contains( ":/" ) )
shortName = text.left( text.tqfind( ":/" ) ) + ":"; shortName = text.left( text.find( ":/" ) ) + ":";
shortName += text.mid( text.tqfindRev( "/" ) + 1 ); shortName += text.mid( text.findRev( "/" ) + 1 );
text = shortName; text = shortName;
} }

@ -132,7 +132,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path ) {
fullPath += '/'; fullPath += '/';
kdDebug( 7109 ) << "the full path is " << fullPath << endl; kdDebug( 7109 ) << "the full path is " << fullPath << endl;
while ( ( pos = fullPath.tqfind( '/', pos + 1 ) ) != -1 ) { while ( ( pos = fullPath.find( '/', pos + 1 ) ) != -1 ) {
TQString tryPath = fullPath.left( pos ); TQString tryPath = fullPath.left( pos );
kdDebug( 7109 ) << fullPath << " trying " << tryPath << endl; kdDebug( 7109 ) << fullPath << " trying " << tryPath << endl;
struct stat statbuf; struct stat statbuf;

@ -87,7 +87,7 @@ void VirtProtocol::del(KURL const & /*url */, bool /* isFile */ ){
void VirtProtocol::copy( const KURL &src, const KURL &dest, int /* permissions */, bool /* overwrite */ ){ void VirtProtocol::copy( const KURL &src, const KURL &dest, int /* permissions */, bool /* overwrite */ ){
TQString path = dest.path( -1 ).mid( 1 ); TQString path = dest.path( -1 ).mid( 1 );
path = path.left(path.tqfindRev("/")); path = path.left(path.findRev("/"));
if ( path.isEmpty() ) path = "/"; if ( path.isEmpty() ) path = "/";
if( addDir(path) ){ if( addDir(path) ){
@ -103,9 +103,9 @@ bool VirtProtocol::addDir(TQString& path){
if( kioVirtDict[ path ] ) return true; if( kioVirtDict[ path ] ) return true;
TQString updir; TQString updir;
if( !path.tqcontains("/") ) updir = "/"; if( !path.contains("/") ) updir = "/";
else updir = path.left(path.tqfindRev("/")); else updir = path.left(path.findRev("/"));
TQString name = path.mid(path.tqfindRev("/")+1); TQString name = path.mid(path.findRev("/")+1);
if( addDir(updir) ){ if( addDir(updir) ){
KURL url; KURL url;
@ -114,7 +114,7 @@ bool VirtProtocol::addDir(TQString& path){
kioVirtDict[ updir ]->append( url ); kioVirtDict[ updir ]->append( url );
KURL::List* temp = new KURL::List(); KURL::List* temp = new KURL::List();
kioVirtDict.tqreplace( path, temp ); kioVirtDict.replace( path, temp );
return true; return true;
} }
@ -254,12 +254,12 @@ bool VirtProtocol::load(){
KURL::List* urlList; KURL::List* urlList;
for ( it = map.begin(); it != map.end(); ++it ) { for ( it = map.begin(); it != map.end(); ++it ) {
urlList = new KURL::List( db->readListEntry(it.key()) ); urlList = new KURL::List( db->readListEntry(it.key()) );
kioVirtDict.tqreplace( it.key(),urlList ); kioVirtDict.replace( it.key(),urlList );
} }
if( !kioVirtDict["/" ]){ if( !kioVirtDict["/" ]){
urlList = new KURL::List(); urlList = new KURL::List();
kioVirtDict.tqreplace( "/", urlList ); kioVirtDict.replace( "/", urlList );
} }
unlock(); unlock();

Loading…
Cancel
Save