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 += '/';
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 );
kdDebug() << fullPath << " trying " << tryPath << endl;

@ -87,7 +87,7 @@ kio_krarcProtocol::kio_krarcProtocol(const TQCString &pool_socket, const TQCStri
arcTempDir = locateLocal("tmp",TQString());
TQString dirName = "krArc"+TQDateTime::tqcurrentDateTime().toString(Qt::ISODate);
dirName.tqreplace(TQRegExp(":"),"_");
dirName.replace(TQRegExp(":"),"_");
TQDir(arcTempDir).mkdir(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());
if( arcDir.right(1) != "/") arcDir = arcDir+"/";
if( dirDict.tqfind( arcDir ) == 0 )
if( dirDict.find( arcDir ) == 0 )
addNewDir( arcDir );
finished();
return;
@ -140,11 +140,11 @@ void kio_krarcProtocol::mkdir(const KURL& url,int permissions){
//TQString tmpDir = arcTempDir+url.path();
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( 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);
}
@ -193,10 +193,10 @@ void kio_krarcProtocol::put(const KURL& url,int permissions,bool overwrite,bool
}
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)+"/";
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));
}
int fd;
@ -539,7 +539,7 @@ void kio_krarcProtocol::copy (const KURL &url, const KURL &dest, int, bool overw
TQString destDir = dest.path( -1 );
if( !TQDir( destDir ).exists() ) {
int ndx = destDir.tqfindRev( '/' );
int ndx = destDir.findRev( '/' );
if( ndx != -1 )
destDir.truncate( ndx+1 );
}
@ -602,10 +602,10 @@ void kio_krarcProtocol::listDir(const KURL& url){
return;
}
TQString arcDir = path.mid(arcFile->url().path().length());
arcDir.truncate(arcDir.tqfindRev("/"));
arcDir.truncate(arcDir.findRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/";
UDSEntryList* dirList = dirDict.tqfind(arcDir);
UDSEntryList* dirList = dirDict.find(arcDir);
if( dirList == 0 ){
error(ERR_CANNOT_ENTER_DIRECTORY,url.path());
return;
@ -645,7 +645,7 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
}
TQString newPath = path;
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));
if( qfi.exists() && !qfi.isDir() ){
KDE_struct_stat stat_p;
@ -681,7 +681,7 @@ bool kio_krarcProtocol::setArcFile(const KURL& url){
if( arcType.isEmpty() ) {
arcType = arcFile->mimetype();
arcType = arcType.mid(arcType.tqfindRev("-")+1);
arcType = arcType.mid(arcType.findRev("-")+1);
if( arcType == "jar" )
arcType = "zip";
@ -815,7 +815,7 @@ TQString kio_krarcProtocol::findArcDirectory(const KURL& url){
return TQString();
}
TQString arcDir = path.mid(arcFile->url().path().length());
arcDir.truncate(arcDir.tqfindRev("/"));
arcDir.truncate(arcDir.findRev("/"));
if(arcDir.right(1) != "/") arcDir = arcDir+"/";
return arcDir;
@ -825,7 +825,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
TQString arcDir = findArcDirectory(url);
if( arcDir.isEmpty() ) return 0;
UDSEntryList* dirList = dirDict.tqfind(arcDir);
UDSEntryList* dirList = dirDict.find(arcDir);
if( !dirList ){
return 0;
}
@ -833,7 +833,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
if( arcFile->url().path(-1) == url.path(-1) ) name = "."; // the "/" case
else{
if( name.right(1) == "/" ) name.truncate(name.length()-1);
name = name.mid(name.tqfindRev("/")+1);
name = name.mid(name.findRev("/")+1);
}
UDSEntryList::iterator entry;
@ -853,7 +853,7 @@ UDSEntry* kio_krarcProtocol::findFileEntry(const KURL& url){
TQString kio_krarcProtocol::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace();
int j=s.tqfind(d,0);
int j=s.find(d,0);
TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j);
return temp;
@ -885,14 +885,14 @@ UDSEntryList* kio_krarcProtocol::addNewDir(TQString path){
UDSEntryList* dir;
// check if the current dir exists
dir = dirDict.tqfind(path);
dir = dirDict.find(path);
if(dir != 0) return dir; // dir exists- return it !
// 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
TQString name = path.mid(path.tqfindRev("/",-2)+1);
TQString name = path.mid(path.findRev("/",-2)+1);
name = name.left(name.length()-1);
UDSEntry entry;
@ -1049,7 +1049,7 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
nextWord(line);
// full name
fullName = nextWord(line);
fullName = fullName.mid(fullName.tqfindRev("/")+1);
fullName = fullName.mid(fullName.findRev("/")+1);
}
if( arcType == "bzip2" ){
// 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
nextWord(line);
// 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 year = TQDate::tqcurrentDate().year();
TQString third = nextWord(line);
TQTime qtime;
if( third.tqcontains(":" ) )
if( third.contains(":" ) )
qtime = TQTime::fromString( third );
else
year = third.toInt();
@ -1126,9 +1126,9 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
// full name
fullName = nextWord( line, '\n' ).mid( 1 );
//if ( fullName.right( 1 ) == "/" ) return;
if( fullName.tqcontains("->") ){
symlinkDest = fullName.mid(fullName.tqfind("->")+2);
fullName = fullName.left(fullName.tqfind("->")-1);
if( fullName.contains("->") ){
symlinkDest = fullName.mid(fullName.find("->")+2);
fullName = fullName.left(fullName.find("->")-1);
}
}
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.startsWith("/") ) fullName = "/"+fullName;
TQString path = fullName.left(fullName.tqfindRev("/")+1);
TQString path = fullName.left(fullName.findRev("/")+1);
// set/create the directory UDSEntryList
dir = dirDict.tqfind(path);
dir = dirDict.find(path);
if(dir == 0) dir = addNewDir(path);
TQString name = fullName.mid(fullName.tqfindRev("/")+1);
TQString name = fullName.mid(fullName.findRev("/")+1);
// file name
atom.m_uds = UDS_NAME;
atom.m_str = name;
@ -1194,7 +1194,7 @@ void kio_krarcProtocol::parseLine(int lineNo, TQString line, TQFile*) {
}
if( S_ISDIR(mode) ){
fullName=fullName+"/";
if(dirDict.tqfind(fullName) == 0)
if(dirDict.find(fullName) == 0)
dirDict.insert(fullName,new UDSEntryList());
else {
// 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 ];
for( unsigned i=0; i != lines.count(); i++ ) {
TQString line = lines[ i ].stripWhiteSpace().lower();
int ndx = line.tqfind( "testing" );
int ndx = line.find( "testing" );
if( ndx >=0 )
line.truncate( ndx );
if( line.isEmpty() )
continue;
if( line.tqcontains( "password" ) && line.tqcontains( "enter" ) ) {
if( line.contains( "password" ) && line.contains( "enter" ) ) {
KRDEBUG( "Encrypted 7z archive found!" );
encrypted = true;
proc->kill();
@ -1588,7 +1588,7 @@ void kio_krarcProtocol::invalidatePassword() {
authInfo.verifyPath = true;
TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" );
authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ );
authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
password = TQString();
@ -1612,7 +1612,7 @@ TQString kio_krarcProtocol::getPassword() {
authInfo.verifyPath = true;
TQString fileName = arcFile->url().path(-1);
authInfo.url = KURL::fromPathOrURL( "/" );
authInfo.url.setHost( fileName /*.tqreplace('/','_')*/ );
authInfo.url.setHost( fileName /*.replace('/','_')*/ );
authInfo.url.setProtocol( "krarc" );
if( checkCachedAuthentication( authInfo ) && !authInfo.password.isNull() ) {
@ -1640,14 +1640,14 @@ TQString kio_krarcProtocol::fullPathName( TQString name ) {
TQString kio_krarcProtocol::convertFileName( TQString name ) {
if( arcType == "zip" )
name = name.tqreplace( "[", "[[]" );
name = name.replace( "[", "[[]" );
return convertName( name );
}
TQString kio_krarcProtocol::convertName( TQString name ) {
if( !name.tqcontains( '\'' ) )
if( !name.contains( '\'' ) )
return "'" + name + "'";
if( !name.tqcontains( '"' ) && !name.tqcontains( '$' ) )
if( !name.contains( '"' ) && !name.contains( '$' ) )
return "\"" + name + "\"";
return escape( name );
}
@ -1656,7 +1656,7 @@ TQString kio_krarcProtocol::escape( TQString name ) {
const TQString evilstuff = "\\\"'`()[]{}!?;$&<>| "; // stuff that should get escaped
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;
}

@ -151,7 +151,7 @@ ParameterDialog::ParameterDialog( const exp_placeholder* currentPlaceholder, TQW
_parameter.append( new ParameterNo( currentPlaceholder->parameter( i ), plainPage() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__file" )
_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() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__select" )
_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() ) );
else if ( currentPlaceholder->parameter( i ).preset() == "__panelprofile" )
_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() ) );
else
_parameter.append( new ParameterText( currentPlaceholder->parameter( i ), plainPage() ) );
@ -196,7 +196,7 @@ TQString ParameterDialog::getParameter() {
for ( int i = 0; i <= lastParameter; ++i ) {
if ( i > 0 )
parameter += ", ";
parameter += "\"" + _parameter[ i ]->text().tqreplace( "\"", "\\\"" ) + "\"";
parameter += "\"" + _parameter[ i ]->text().replace( "\"", "\\\"" ) + "\"";
}
parameter += ")";
return parameter;

@ -84,7 +84,7 @@ void KrBookmarkHandler::deleteBookmark(KrBookmark *bm) {
}
void KrBookmarkHandler::removeReferences( KrBookmark *root, KrBookmark *bmToRemove ) {
int index = root->tqchildren().tqfind( bmToRemove );
int index = root->tqchildren().find( bmToRemove );
if( index >= 0 )
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)),
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[ menu ])[ id ] = bm;
@ -308,7 +308,7 @@ void KrBookmarkHandler::buildMenu(KrBookmark *tqparent, KPopupMenu *menu) {
CONNECT_BM(bm);
int id = bm->itemId( itemIndex );
if( !_bookmarkIDTable.tqfind( menu ) )
if( !_bookmarkIDTable.find( menu ) )
_bookmarkIDTable.insert( menu, new TQMap<int, KrBookmark *> );
(*_bookmarkIDTable[ menu ])[ id ] = bm;
}
@ -437,12 +437,12 @@ bool KrBookmarkHandler::eventFilter( TQObject *obj, TQEvent *ev ) {
if( obj->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
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();
return true;
}
if( _bookmarkIDTable.tqfind( obj ) ) {
if( _bookmarkIDTable.find( obj ) ) {
TQMap<int, KrBookmark*> * table = _bookmarkIDTable[ obj ];
if( table && table->count( id ) ) {
KrBookmark *bm = (*table)[ id ];

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

@ -58,7 +58,7 @@ KrKeyDialog::~KrKeyDialog() {
}
void KrKeyDialog::slotImportShortcuts() {
// tqfind $KDEDIR/share/apps/krusader
// find $KDEDIR/share/apps/krusader
TQString basedir = KGlobal::dirs()->findResourceDir("appdata", "total_commander.keymap");
// let the user select a file to load
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 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 ) {
TQString uriUser = uri.left( uriStart );
TQString uriPsw = TQString();
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 ) {
uriPsw = uriUser.mid( pswStart + 1 );
uriUser = uriUser.left( pswStart );
@ -102,7 +102,7 @@ KURL KRSpWidgets::newFTP() {
TQString host = uri; /* separating the hostname and path from the uri */
TQString path = TQString();
int pathStart = uri.tqfind( "/" );
int pathStart = uri.find( "/" );
if( pathStart != -1 ) {
path = host.mid( pathStart );
host = host.left( pathStart );
@ -184,7 +184,7 @@ void KRMaskChoiceSub::accept() {
TQStrList list;
TQListBoxItem *i=preSelections->firstItem();
while (i!=0) {
if (i->text().tqfind(i18n("compare mode"))==-1)
if (i->text().find(i18n("compare mode"))==-1)
list.append(i->text().local8Bit());
i=i->next();
}
@ -211,7 +211,7 @@ void KRMaskChoiceSub::addSelection() {
void KRMaskChoiceSub::deleteSelection() {
if (preSelections->currentItem()!=-1 &&
preSelections->currentText().tqfind(i18n("compare mode"))==-1) {
preSelections->currentText().find(i18n("compare mode"))==-1) {
preSelections->removeItem(preSelections->currentItem());
preSelections->update();
}
@ -283,7 +283,7 @@ int QuickNavLineEdit::charCount(const TQMouseEvent * const m,TQString * const st
int numOfChars = findCharFromPos(tx, fontMetrics(), m->x() - 5);
if(str) *str=tx;
return tx.tqfind('/', numOfChars);
return tx.find('/', numOfChars);
}
void QuickNavLineEdit::mouseMoveEvent( TQMouseEvent *m) {

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

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

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

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

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

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

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

@ -78,7 +78,7 @@ GeneralFilter::GeneralFilter( FilterTabs *tabs, int properties, TQWidget *tqpare
searchForLabel->setBuddy( searchFor );
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(searchForLabel, s);

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

@ -158,11 +158,11 @@ void KCMDLine::slotRun() {
cmdLine->addToHistory(command1);
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 == "~" )
dir = TQDir::homeDirPath();
else
if ( dir.left( 1 ) != "/" && !dir.tqcontains( ":/" ) )
if ( dir.left( 1 ) != "/" && !dir.contains( ":/" ) )
dir = panelPath + ( panelPath == "/" ? "" : "/" ) + dir;
SLOTS->refresh( dir );
} else {

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

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

@ -169,11 +169,11 @@ bool KrViewer::eventFilter ( TQObject * /* watched */, TQEvent * e )
if( e->type() == TQEvent::AccelOverride )
{
TQKeyEvent* ke = (TQKeyEvent*) e;
if( reservedKeys.tqcontains( ke->key() ) )
if( reservedKeys.contains( ke->key() ) )
{
ke->accept();
int id = reservedKeyIDs[ reservedKeys.tqfindIndex( ke->key() ) ];
int id = reservedKeyIDs[ reservedKeys.findIndex( ke->key() ) ];
if( id != -1 )
{
// don't activate the close functions immediately!
@ -193,7 +193,7 @@ bool KrViewer::eventFilter ( TQObject * /* watched */, TQEvent * e )
else if( e->type() == TQEvent::KeyPress )
{
TQKeyEvent* ke = (TQKeyEvent*) e;
if( reservedKeys.tqcontains( ke->key() ) )
if( reservedKeys.contains( ke->key() ) )
{
ke->accept();
return true;
@ -606,7 +606,7 @@ bool KrViewer::viewGeneric() {
viewerMenu->setItemEnabled( 1, false );
if ( !generic_part ) {
if ( mimetype.tqcontains( "html" ) ) {
if ( mimetype.contains( "html" ) ) {
KHTMLPart * p = new KHTMLPart( this, 0, 0, 0, KHTMLPart::BrowserViewGUI );
connect( p->browserExtension(), TQT_SIGNAL( openURLRequest( 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 );
if( !isMediaProtocolPresent )
generals->tqfind( "DontUseMediaProt" )->setEnabled( false );
generals->find( "DontUseMediaProt" )->setEnabled( false );
generalGrid->addWidget( generals, 1, 0 );
@ -78,7 +78,7 @@ KgAdvanced::KgAdvanced( bool first, TQWidget* tqparent, const char* name ) :
#ifdef BSD
generals->tqfind( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */
generals->find( "AutoMount" )->setEnabled( false ); /* disable AutoMount on BSD */
#endif
kgAdvancedLayout->addWidget( generalGrp, 0 ,0 );

@ -119,20 +119,20 @@ void KgArchives::slotAutoConfigure()
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
cbs->tqfind( "Do Tar" )->setEnabled(PS("tar"));
cbs->tqfind( "Do GZip" )->setEnabled(PS("gzip"));
cbs->tqfind( "Do BZip2" )->setEnabled(PS("bzip2"));
cbs->tqfind( "Do UnZip" )->setEnabled(PS("unzip"));
cbs->tqfind( "Do Lha" )->setEnabled(PS("lha"));
cbs->tqfind( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio"));
cbs->tqfind( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") );
cbs->tqfind( "Do UnAce" )->setEnabled(PS("unace"));
cbs->tqfind( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") );
cbs->tqfind( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") );
cbs->tqfind( "Do 7z" )->setEnabled( PS("7z") );
cbs->find( "Do Tar" )->setEnabled(PS("tar"));
cbs->find( "Do GZip" )->setEnabled(PS("gzip"));
cbs->find( "Do BZip2" )->setEnabled(PS("bzip2"));
cbs->find( "Do UnZip" )->setEnabled(PS("unzip"));
cbs->find( "Do Lha" )->setEnabled(PS("lha"));
cbs->find( "Do RPM" )->setEnabled(PS("rpm") || PS("cpio"));
cbs->find( "Do UnRar" )->setEnabled(PS("unrar") || PS("rar") );
cbs->find( "Do UnAce" )->setEnabled(PS("unace"));
cbs->find( "Do Unarj" )->setEnabled(PS("unarj") || PS("arj") );
cbs->find( "Do DEB" )->setEnabled(PS("dpkg") && PS("tar") );
cbs->find( "Do 7z" )->setEnabled( PS("7z") );
krConfig->setGroup( "Archives" );
krConfig->writeEntry( "Supported Packers", lst );

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

@ -196,7 +196,7 @@ void KgGeneral::slotAddExtension()
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"));
else
listBox->addItem( atomExt );

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

@ -204,7 +204,7 @@ void KgProtocols::slotAddProtocol()
void KgProtocols::addProtocol( TQString name, bool changeCurrent )
{
TQListBoxItem *item = protocolList->tqfindItem( name, ExactMatch );
TQListBoxItem *item = protocolList->findItem( name, ExactMatch );
if( item )
{
protocolList->removeItem( protocolList->index( item ) );
@ -229,7 +229,7 @@ void KgProtocols::slotRemoveProtocol()
void KgProtocols::removeProtocol( TQString name )
{
TQListViewItem *item = linkList->tqfindItem( name, 0 );
TQListViewItem *item = linkList->findItem( name, 0 );
if( item )
{
while( item->childCount() != 0 )
@ -258,8 +258,8 @@ void KgProtocols::slotAddMime()
void KgProtocols::addMime( TQString name, TQString protocol )
{
TQListBoxItem *item = mimeList->tqfindItem( name, ExactMatch );
TQListViewItem *currentListItem = linkList->tqfindItem( protocol, 0 );
TQListBoxItem *item = mimeList->findItem( name, ExactMatch );
TQListViewItem *currentListItem = linkList->findItem( protocol, 0 );
if( item && currentListItem && currentListItem->tqparent() == 0 )
{
@ -283,7 +283,7 @@ void KgProtocols::slotRemoveMime()
void KgProtocols::removeMime( TQString name )
{
TQListViewItem *currentMimeItem = linkList->tqfindItem( name, 0 );
TQListViewItem *currentMimeItem = linkList->findItem( name, 0 );
if( currentMimeItem && currentMimeItem->tqparent() != 0 )
{
@ -351,7 +351,7 @@ bool KgProtocols::isChanged()
TQListViewItem *item = linkList->firstChild();
while( item )
{
if( !protList.tqcontains( item->text( 0 ) ) )
if( !protList.contains( item->text( 0 ) ) )
return true;
TQStringList mimes = krConfig->readListEntry( TQString( "Mimes For %1" ).tqarg( item->text( 0 ) ) );
@ -361,7 +361,7 @@ bool KgProtocols::isChanged()
TQListViewItem *childs = item->firstChild();
while( childs )
{
if( !mimes.tqcontains( childs->text( 0 ) ) )
if( !mimes.contains( childs->text( 0 ) ) )
return true;
childs = childs->nextSibling();
}
@ -405,7 +405,7 @@ bool KgProtocols::apply()
void KgProtocols::init()
{
if( !krConfig->groupList().tqcontains( "Protocols" ) )
if( !krConfig->groupList().contains( "Protocols" ) )
{
krConfig->setGroup( "Protocols" );
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" );
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" );
TQWhatsThis::add( label, 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 );
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 );
@ -107,11 +107,11 @@ KgStartup::KgStartup( bool first, TQWidget* tqparent, const char* name ) :
void KgStartup::slotDisable()
{
bool isUiSave = !uiCbGroup->tqfind( "UI Save Settings" )->isChecked();
bool isUiSave = !uiCbGroup->find( "UI Save Settings" )->isChecked();
int i=1;
while( uiCbGroup->tqfind( i ) )
uiCbGroup->tqfind( i++ )->setEnabled( isUiSave );
while( uiCbGroup->find( i ) )
uiCbGroup->find( i++ )->setEnabled( isUiSave );
}
#include "kgstartup.moc"

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

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

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

@ -363,7 +363,7 @@ public:
* maximum row number in one column. <br>
*
* 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>
* KONFIGURATOR_CHECKBOX_PARAM myCBArray[] =<br>
@ -371,7 +371,7 @@ public:
* &nbsp;&nbsp;{"CbClass","CbName2", true, i18n( "name2" ), false, "tooltip2"},<br>
* &nbsp;&nbsp;{"CbClass","CbName3", true, i18n( "name3" ), false, "tooltip3"}};<br><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>
*
* @param sizex the maximum column number at horizontal placing
@ -396,7 +396,7 @@ public:
* maximum row number in one column.<br>
*
* 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>
* KONFIGURATOR_NAME_VALUE_TIP radioInfo[] =<br>
@ -404,7 +404,7 @@ public:
* &nbsp;&nbsp;{ i18n( "radio text2" ), "value2", i18n( "tooltip2" ) },<br>
* &nbsp;&nbsp;{ i18n( "radio text3" ), "value3", i18n( "tooltip3" ) }};<br><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>
*
* @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.
*/
struct KONFIGURATOR_CHECKBOX_PARAM

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

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

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

@ -108,7 +108,7 @@ void KDiskFreeSp::dfDone()
if ( !s.isEmpty() ) {
//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
v=t.readLine();
s=s.append(v);
@ -118,30 +118,30 @@ void KDiskFreeSp::dfDone()
//kdDebug(kfile_area) << "[" << s << "]" << endl;
//TQString deviceName = s.left(s.tqfind(BLANK));
s=s.remove(0,s.tqfind(BLANK)+1 );
//TQString deviceName = s.left(s.find(BLANK));
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl;
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();
s=s.remove(0,s.tqfind(BLANK)+1 );
s=s.remove(0,s.find(BLANK)+1 );
//kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl;
u=s.left(s.tqfind(BLANK));
u=s.left(s.find(BLANK));
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;
u=s.left(s.tqfind(BLANK));
u=s.left(s.find(BLANK));
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;
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();
//kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl;

@ -90,12 +90,12 @@ KMountMan::KMountMan() : TQObject(), Operational( false ), waiting(false), mount
KMountMan::~KMountMan() {}
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...
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() {

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

@ -65,7 +65,7 @@ KrBriefViewToolTip::KrBriefViewToolTip( KrBriefView *lv, TQWidget *tqparent )
void KrBriefViewToolTip::maybeTip( const TQPoint &pos )
{
TQIconViewItem *item = view->tqfindItem( view->viewportToContents( pos ) );
TQIconViewItem *item = view->findItem( view->viewportToContents( pos ) );
if ( !item )
return;
@ -173,7 +173,7 @@ void KrBriefView::resizeEvent ( TQResizeEvent * resEvent )
TQRect viewportRect( pnt, resEvent->oldSize() );
bool visible = false;
if( currentItem() )
visible = viewportRect.tqcontains( currentItem()->rect() );
visible = viewportRect.contains( currentItem()->rect() );
KIconView::resizeEvent( resEvent );
redrawColumns();
@ -442,7 +442,7 @@ void KrBriefView::contentsMousePressEvent( TQMouseEvent * e ) {
e = transformMouseEvent( e );
TQIconViewItem * oldCurrent = currentItem();
TQIconViewItem *newCurrent = tqfindItem( e->pos() );
TQIconViewItem *newCurrent = findItem( e->pos() );
if (e->button() == Qt::RightButton)
{
if (KrSelectionMode::getSelectionHandler()->rightButtonSelects() ||
@ -596,7 +596,7 @@ void KrBriefView::contentsMousePressEvent( TQMouseEvent * 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...
} else {
// emitting the missing signals from TQIconView::contentsMousePressEvent();
@ -638,7 +638,7 @@ void KrBriefView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
if( pressedItem ) {
TQPoint vp = contentsToViewport( e->pos() );
TQIconViewItem *newCurrent = tqfindItem( e->pos() );
TQIconViewItem *newCurrent = findItem( e->pos() );
if( pressedItem == newCurrent ) {
// emitting the missing signals from TQIconView::contentsMouseReleaseEvent();
@ -659,7 +659,7 @@ void KrBriefView::contentsMouseReleaseEvent( TQMouseEvent * e ) {
void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
e = transformMouseEvent( e );
if ( ( singleClicked || renameTimer.isActive() ) && tqfindItem( e->pos() ) != clickedItem )
if ( ( singleClicked || renameTimer.isActive() ) && findItem( e->pos() ) != clickedItem )
CANCEL_TWO_CLICK_RENAME;
if ( dragStartPos != TQPoint( -1, -1 ) &&
@ -669,7 +669,7 @@ void KrBriefView::contentsMouseMoveEvent ( TQMouseEvent * e ) {
&& KrSelectionMode::getSelectionHandler()->rightButtonSelects()
&& KrSelectionMode::getSelectionHandler()->showContextMenu() >= 0 && e->state() == Qt::RightButton)
{
TQIconViewItem *newItem = tqfindItem( e->pos() );
TQIconViewItem *newItem = findItem( e->pos() );
e->accept();
if (newItem != lastSwushPosition && newItem)
{
@ -743,7 +743,7 @@ void KrBriefView::showContextMenu()
}
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 {
@ -1158,7 +1158,7 @@ void KrBriefView::renameCurrentItem() {
KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
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 )
{
if( tqfindItem( e->pos() ) != 0 )
if( findItem( e->pos() ) != 0 )
return e;
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 *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
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 delItem(const TQString &);
virtual TQString getCurrentItem() const;

@ -108,7 +108,7 @@ TQValueList<TQString> KrColorSettingNames::getColorNames()
bool KrColorSettingNames::isColorNameValid(const TQString & settingName)
{
initialize();
return s_colorNames.tqcontains(settingName);
return s_colorNames.contains(settingName);
}
TQValueList<TQString> KrColorSettingNames::getNumNames()
@ -120,7 +120,7 @@ TQValueList<TQString> KrColorSettingNames::getNumNames()
bool KrColorSettingNames::isNumNameValid(const TQString & settingName)
{
initialize();
return s_numNames.tqcontains(settingName);
return s_numNames.contains(settingName);
}
TQValueList<TQString> KrColorSettingNames::getBoolNames()
@ -132,7 +132,7 @@ TQValueList<TQString> KrColorSettingNames::getBoolNames()
bool KrColorSettingNames::isBoolNameValid(const TQString & settingName)
{
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;
return 0;
}
if (!m_impl->m_numValues.tqcontains(settingName))
if (!m_impl->m_numValues.contains(settingName))
return defaultValue;
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;
return false;
}
if (!m_impl->m_boolValues.tqcontains(settingName))
if (!m_impl->m_boolValues.contains(settingName))
return defaultValue;
return m_impl->m_boolValues[settingName];
}
@ -722,7 +722,7 @@ void KrColorCache::getColors(TQColorGroup & result, const KrColorItemType & typ
strcat(hashKey, "-Selected");
// 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
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
changed. These changes does not go into krConfig!

@ -682,7 +682,7 @@ void KrDetailedView::contentsMousePressEvent( TQMouseEvent * 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...
} else {
// emitting the missing signals from TQListView::contentsMousePressEvent();
@ -1215,7 +1215,7 @@ void KrDetailedView::renameCurrentItem() {
KConfigGroupSaver svr(krConfig,"Look&Feel");
if (!krConfig->readBoolEntry("Rename Selects Extension", true)) {
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
// 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 *getCurrentKrViewItem() { return dynamic_cast<KrViewItem*>( currentItem() ); }
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 TQString getCurrentItem() const;
virtual void makeItemVisible( const KrViewItem *item );

@ -76,7 +76,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent) : KPopupMenu(t
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
// have the same mimetype !
TQString mime = panel->func->getVFile(item)->vfile_getMime();
@ -177,7 +177,7 @@ KrPopupMenu::KrPopupMenu(ListPanel *thePanel, TQWidget *tqparent) : KPopupMenu(t
}
// --------- 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 );
}
@ -314,7 +314,7 @@ void KrPopupMenu::performAction(int id) {
for ( KrViewItemList::Iterator it2 = otherItems.begin(); it2 != otherItems.end(); ++it2 ) {
TQString name = ( *it2 ) ->name();
if( !selectedNames.tqcontains( name ) )
if( !selectedNames.contains( name ) )
selectedNames.append( name );
}
}
@ -330,7 +330,7 @@ void KrPopupMenu::performAction(int id) {
TQString term = krConfig->readEntry( "Terminal", _Terminal );
proc << KrServices::separateArgs( term );
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 */
proc << "&";
proc.setUseShell( true );

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

@ -19,7 +19,7 @@ KrViewItem::KrViewItem(vfile *vf, const KrViewProperties* properties):
if (vf) {
// check if the file has an extension
const TQString& vfName = vf->vfile_getName();
int loc = vfName.tqfindRev('.');
int loc = vfName.findRev('.');
if (loc>0) { // avoid mishandling of .bashrc and friend
// check if it has one of the predefined 'atomic extensions'
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);
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() );
} else
view->addItems( func->files(), false );

@ -329,7 +329,7 @@ void ListPanelFunc::krlink( bool sym ) {
if ( linkName.left( 1 ) != "/" )
linkName = files() ->vfs_workingDir() + "/" + linkName;
if ( linkName.tqcontains( "/" ) )
if ( linkName.contains( "/" ) )
name = files() ->vfs_getFile( name ).path( -1 );
if ( sym ) {
@ -370,7 +370,7 @@ void ListPanelFunc::terminal() {
TQString term = krConfig->readEntry( "Terminal", _Terminal );
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 */
proc << "&";
proc.setUseShell( true );
@ -777,7 +777,7 @@ void ListPanelFunc::pack() {
return ; // the user canceled
// 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;
}

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

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

@ -130,7 +130,7 @@ void remoteMan::refreshData() {
int l=temp.mid(2,1).toInt();
if ((++l)==10) { ++h; l=0; }
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);
} else currentItem->setText(0,currentItem->text(0)+"<02>");
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
// we find it (if it exists) and replace it with a ' character
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
temp.tqreplace(i,1,TQChar('\''));
i=temp.tqfind('`');
temp.replace(i,1,TQChar('\''));
i=temp.find('`');
}
con=temp+'`'+con;
iterator=iterator->tqparent();
@ -227,7 +227,7 @@ TQListViewItem* remoteMan::findItem(const TQString &name, TQListViewItem *p) {
TQListViewItem *it;
if (name.isEmpty()) return p; // the end of the recursion has been reached!!!
if (p==0) it=sessions->firstChild(); else it=p->firstChild();
int loc=name.tqfind('`');
int loc=name.find('`');
while (it) {
if (it->text(0)==name.left(loc)) break;
it=it->nextSibling();
@ -264,7 +264,7 @@ void remoteMan::config2tree() {
for( it = lst.begin(); it != lst.end(); ++it ) {
TQString t=(*it); // easier to work with
// 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);
// at this point we have the complete path to the object
// 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();
protocol = new TQComboBox( FALSE, this, "protocol" );
if( protocols.tqcontains("ftp") )
if( protocols.contains("ftp") )
protocol->insertItem( i18n( "ftp://" ) );
if( protocols.tqcontains("smb") )
if( protocols.contains("smb") )
protocol->insertItem( i18n( "smb://" ) );
if( protocols.tqcontains("fish") )
if( protocols.contains("fish") )
protocol->insertItem( i18n( "fish://" ));
if( protocols.tqcontains("sftp") )
if( protocols.contains("sftp") )
protocol->insertItem( i18n( "sftp://" ));
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);
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,
where.tqreplace(TQRegExp("\\\\"),"#"), size, tmp, perm);
where.replace(TQRegExp("\\\\"),"#"), size, tmp, perm);
TQString totals = TQString(i18n("Found %1 matches.")).tqarg(resultsList->childCount());
foundLabel->setText(totals);
@ -445,8 +445,8 @@ void KrSearchDialog::resultClicked(TQListViewItem* i) {
if (!it->foundText().isEmpty()) {
// ugly hack: find the <b> and </b> in the text, then
// use it to set the are which we don't want squeezed
int idx = it->foundText().tqfind("<b>")-4; // take "<qt>" into account
int length = it->foundText().tqfind("</b>")-idx+4;
int idx = it->foundText().find("<b>")-4; // take "<qt>" into account
int length = it->foundText().find("</b>")-idx+4;
foundTextLabel->setText(it->foundText(), idx, length);
}
}

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

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

@ -222,7 +222,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
file_name = left_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue;
if( !query->match( left_file ) )
@ -255,7 +255,7 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
file_name = right_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue;
if( !query->match( right_file ) )
@ -277,10 +277,10 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
{
TQString left_file_name = left_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( left_file_name ) )
if( checkIfSelected && !selectedFiles.contains( left_file_name ) )
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;
if( !query->matchDirName( left_file_name ) )
@ -321,10 +321,10 @@ void Synchronizer::compareDirectory( SynchronizerFileItem *tqparent, Synchronize
{
file_name = right_file->vfile_getName();
if( checkIfSelected && !selectedFiles.tqcontains( file_name ) )
if( checkIfSelected && !selectedFiles.contains( file_name ) )
continue;
if( excludedPaths.tqcontains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) )
if( excludedPaths.contains( rightDir.isEmpty() ? file_name : rightDir+"/"+file_name ) )
continue;
if( !query->matchDirName( file_name ) )
@ -547,7 +547,7 @@ void Synchronizer::addSingleDirectory( SynchronizerFileItem *tqparent, Synchroni
{
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;
if( !query->matchDirName( file_name ) )
@ -1029,7 +1029,7 @@ void Synchronizer::slotTaskFinished(KIO::Job *job )
KIO::filesize_t receivedSize = 0;
if( receivedMap.tqcontains( job ) ) {
if( receivedMap.contains( job ) ) {
receivedSize = receivedMap[ job ];
receivedMap.remove( job );
}
@ -1278,7 +1278,7 @@ void Synchronizer::slotProcessedSize( KIO::Job * job , KIO::filesize_t size)
SynchronizerFileItem * item = jobMap[ job ];
KIO::filesize_t lastProcessedSize = 0;
if( receivedMap.tqcontains( job ) )
if( receivedMap.contains( job ) )
lastProcessedSize = receivedMap[ job ];
receivedMap[ job ] = size;
@ -1422,7 +1422,7 @@ void Synchronizer::synchronizeWithKGet()
}
// 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() )
TQDir().mkdir( destDir.left(i) );
@ -1432,12 +1432,12 @@ void Synchronizer::synchronizeWithKGet()
TQFile( destURL.path() ).remove();
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 endString = source.mid( lastAt );
startString.tqreplace( "@", "%40" );
startString.replace( "@", "%40" );
source = startString+endString;
}

@ -1162,7 +1162,7 @@ void SynchronizerGUI::initGUI(TQWidget* /* tqparent */, TQString profileName, KU
grid->addWidget( fileFilter, 1 ,1 );
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(filterLabel, wtFilter);

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

@ -309,7 +309,7 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
available = false;
for ( TQStringList::Iterator it = _showonlyPath.begin(); it != _showonlyPath.end(); ++it ) {
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;
break;
}
@ -326,14 +326,14 @@ bool KrAction::isAvailable( const KURL& currentURL ) {
available = false;
KMimeType::Ptr mime = KMimeType::findByURL( currentURL );
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)
available = true;
break;
}
}
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;
break;
}

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

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

@ -60,7 +60,7 @@ TQStringList UserAction::allCategories() {
TQStringList actionCategories;
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() );
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"
if(type == "-rpm"){
//rpm can't handle files with " " in them so tqreplace " " with "\ "
arcFile.tqreplace(TQRegExp(" "),"\\ ");
//rpm can't handle files with " " in them so replace " " with "\ "
arcFile.replace(TQRegExp(" "),"\\ ");
cmd = KrServices::fullPathName( "rpm" );
listCmd = " --dump -lpq ";
@ -187,7 +187,7 @@ arc_vfs::arc_vfs(TQString origin,TQString type,TQObject* panel,bool write):
// return the working dir
TQString arc_vfs::vfs_workingDir(){
// 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;
TQDir().mkdir(tmpDir+path);
return tmpDir+path;
@ -215,7 +215,7 @@ bool arc_vfs::getDirs(){
proc.start(KProcess::Block);
if( !proc.normalExit() || !proc.exitStatus() == 0 ){
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;
return false;
}
@ -237,11 +237,11 @@ bool arc_vfs::getDirs(){
temp.readLine(line,10000); // skip the first line - it's garbage
if( vfs_type == "-rar" ){
while(temp.readLine(line,10000) != -1)
if ( line.tqcontains("----------") ) break;
if ( line.contains("----------") ) break;
}
while(temp.readLine(buf,1000) != -1){
line = TQString::fromLocal8Bit(buf);
if ( line.tqcontains("----------") ) break;
if ( line.contains("----------") ) break;
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;
// 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+"/";
if(dir != "" ) dir = "/"+dir;
if(path.left(1) != "/") path = "/"+path;
// 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));
}
@ -349,7 +349,7 @@ void arc_vfs::vfs_delFiles(TQStringList *fileNames){
// return a path to the file
TQString arc_vfs::vfs_getFile(TQString name){
// 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 != "") path = path+"/";
@ -364,7 +364,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
KURL::List* urls = new KURL::List();
// 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 != "") path = path+"/";
@ -387,7 +387,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
if( vfs_type == "-rar" ) file = files.remove(file--);
}
// don't unpack the same file twice
else if( extFiles.tqcontains(*file) ){
else if( extFiles.contains(*file) ){
file = files.remove(file--);
}
}
@ -420,7 +420,7 @@ KURL::List* arc_vfs::vfs_getFiles(TQStringList* names){
// make dir
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 != "") path = path+"/";
@ -433,7 +433,7 @@ void arc_vfs::vfs_mkdir(TQString name){
void arc_vfs::vfs_rename(TQString fileName,TQString newName){
KURL::List temp;
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 != "") path = path+"/";
@ -461,7 +461,7 @@ bool arc_vfs::vfs_refresh(TQString origin){
vfs_origin = origin;
// 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);
vfs_filesP = findDir(path);
@ -473,7 +473,7 @@ bool arc_vfs::vfs_refresh(TQString origin){
// service functions
TQString arc_vfs::nextWord(TQString &s,char d) {
s=s.stripWhiteSpace();
int j=s.tqfind(d,0);
int j=s.find(d,0);
TQString temp=s.left(j); // find the leftmost word.
s.remove(0,j);
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( newDir || !extFiles.tqcontains( dir_name+name ) ){
if( newDir || !extFiles.contains( dir_name+name ) ){
filesToPack->append( dir_name+name );
extFiles.append( temp );
} // 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 );
extFiles.remove( dir_name+name );
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.
// note: getFilesToPack() updates time + size !
else if( !extFiles.tqcontains( dir_name+name ) ){
else if( !extFiles.contains( dir_name+name ) ){
extFiles.append( temp );
}
}
@ -647,20 +647,20 @@ TQString arc_vfs::changeDir(TQString name){
name.remove(0,2);
}
if(!name.tqcontains('/')){
if(!name.contains('/')){
vfs_filesP = findDir("");
return name;
}
// seperate the path from the name
TQString path = name.left(name.tqfindRev('/'));
name = name.mid(name.tqfindRev('/')+1);
TQString path = name.left(name.findRev('/'));
name = name.mid(name.findRev('/')+1);
// see if the path exists
if ((vfs_filesP=findDir(path)) == 0){
//create a new dir entry
TQString Pname = path.mid(path.tqfindRev('/')+1);
TQString Pname = path.mid(path.findRev('/')+1);
if(Pname.isEmpty()) return name;
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,
qfi.owner(),qfi.group(),"inode/directory","",0 );
// 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);
// 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+"/";
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;
// 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+"/";
if(path.left(1) == "/") path.remove(0,1);
@ -761,7 +761,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
size = nextWord(line).toLong();
nextWord(line);
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) ;
owner = KRpermHandler::user2uid(qfi.owner());
group = KRpermHandler::group2gid(qfi.group());
@ -774,7 +774,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
KDE_stat(arcFile.local8Bit(),&stat_p);
name = qfi.fileName();
name = name.left(name.tqfindRev('.'));
name = name.left(name.findRev('.'));
//long size = qfi.size();
perm = KRpermHandler::mode2TQString(stat_p.st_mode) ;
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" ){
perm = nextWord(line);
TQString temp = nextWord(line);
owner = temp.left(temp.tqfindRev('/')).toInt();
group = temp.mid(temp.tqfind('/')+1,temp.length()).toInt();
owner = temp.left(temp.findRev('/')).toInt();
group = temp.mid(temp.find('/')+1,temp.length()).toInt();
size = nextWord(line).toLong();
temp = nextWord(line);
name = nextWord(line,'\n');
if (name.startsWith("/")) // fix full-paths problem in tar (thanks to Heiner!)
name.remove(0, 1);
if( name.tqcontains(" -> ") ){
if( name.contains(" -> ") ){
link = true;
dest = name.mid(name.tqfind(" -> ")+4);
name = name.left(name.tqfind(" -> "));
dest = name.mid(name.find(" -> ")+4);
name = name.left(name.find(" -> "));
}
}
@ -805,7 +805,7 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
perm = nextWord(line);
if(perm.length() != 10)
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);
size = nextWord(line).toLong();
nextWord(line);nextWord(line);
@ -820,13 +820,13 @@ void arc_vfs::parseLine(TQString line, TQFile* temp){
size = nextWord(line).toLong();
nextWord(line);nextWord(line);nextWord(line);
TQString tempName = arcFile;
TQFileInfo qfi(tempName.tqreplace(TQRegExp("\\"),""));
TQFileInfo qfi(tempName.replace(TQRegExp("\\"),""));
name = nextWord(line,'\n');
if ( name.left(1) == "/" ) name.remove(0,1);
if( name.tqcontains(" -> ") ){
if( name.contains(" -> ") ){
link = true;
dest = name.mid(name.tqfind(" -> ")+4);
name = name.left(name.tqfind(" -> "));
dest = name.mid(name.find(" -> ")+4);
name = name.left(name.find(" -> "));
}
}
// 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 );
else {
TQString currentUser = vfs_origin.user();
if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.tqfind( '@' ) );
if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.find( '@' ) );
if ( currentUser.isEmpty() ) {
if( vfs_origin.host().isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() );

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

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

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

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

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

@ -149,7 +149,7 @@ char vfile::vfile_isExecutable() const {
const TQString& vfile::vfile_getMime(bool fast){
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();
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;
}

@ -87,23 +87,23 @@ KURL vfs::fromPathOrURL( const TQString &originIn )
TQString password, loginName, origin = originIn;
bool bugfix = false;
if ( originIn.tqcontains( ":/" ) && !originIn.startsWith( "/" ) )
if ( originIn.contains( ":/" ) && !originIn.startsWith( "/" ) )
{
// breakdown the url;
/* FIXME: untill KDE fixes the bug we have to check for
passwords and users with @ in them... */
bugfix = origin.tqfind("@") != origin.tqfindRev("@");
bugfix = origin.find("@") != origin.findRev("@");
if(bugfix){
if(origin.tqfind(":") != origin.tqfindRev(":", origin.tqfindRev("@") )){
int passStart = origin.tqfind( ":",origin.tqfind(":")+1 )+1;
int passLen = origin.tqfindRev("@")-passStart;
if(origin.find(":") != origin.findRev(":", origin.findRev("@") )){
int passStart = origin.find( ":",origin.find(":")+1 )+1;
int passLen = origin.findRev("@")-passStart;
password = origin.mid(passStart,passLen);
origin = origin.remove(passStart-1,passLen+1);
}
if(origin.tqfind("@") != origin.tqfindRev("@")){
int usrStart = origin.tqfind( "/" )+1;
if(origin.find("@") != origin.findRev("@")){
int usrStart = origin.find( "/" )+1;
if(origin.at(usrStart) == '/') ++usrStart;
int usrLen = origin.tqfindRev("@")-usrStart;
int usrLen = origin.findRev("@")-usrStart;
loginName = origin.mid(usrStart,usrLen);
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){
if ( *stop ) return;
if (!name.tqcontains("/")) name = vfs_workingDir()+"/"+name;
if (!name.contains("/")) name = vfs_workingDir()+"/"+name;
if (name == "/proc") return;
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 ];
for( unsigned i=0; i != fileUrls->count(); i++ ) {
if( !urlList->tqcontains( (*fileUrls)[ i ] ) )
if( !urlList->contains( (*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 );
else {
TQString currentUser = url.user();
if ( currentUser.tqcontains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.tqfind( '@' ) );
if ( currentUser.contains( "@" ) ) /* remove the FTP proxy tags from the username */
currentUser.truncate( currentUser.find( '@' ) );
if ( currentUser.isEmpty() )
currentUser = KRpermHandler::uid2user( getuid() );
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();
while( file ) {
if( names->tqcontains( file->vfile_getName() ) ) {
if( names->contains( file->vfile_getName() ) ) {
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 ) {
list = new KURL::List();
m_filesToCopy.insert( relativeDir, list );
@ -65,7 +65,7 @@ VirtualCopyJob::VirtualCopyJob( const TQStringList *names, vfs * vfs, const KURL
m_subdirs[ relativeDir ] = 0;
}
if( !list->tqcontains( file->vfile_getUrl() ) ) {
if( !list->contains( file->vfile_getUrl() ) ) {
if( file->vfile_isDir() ) {
m_dirsToGetSize.append( file->vfile_getUrl() );
m_totalSubdirs++;

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

@ -101,7 +101,7 @@
void KRslots::sendFileByEmail(TQString filename) {
TQString mailProg;
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 {
KMessageBox::error(0,i18n("Krusader can't find a supported mail client. Please install one to your path. Hint: Krusader supports Kmail."));
return;
@ -111,7 +111,7 @@ void KRslots::sendFileByEmail(TQString filename) {
if ( vfs::fromPathOrURL( mailProg ).fileName() == "kmail") {
proc << "kmail" << "--subject \""+i18n("Sending file: ")+
filename.mid(filename.tqfindRev('/')+1)+"\"" << TQString() +
filename.mid(filename.findRev('/')+1)+"\"" << TQString() +
"--attach "+"\"" + filename + "\"";
}
@ -181,7 +181,7 @@ void KRslots::compareContent( KURL url1, KURL url2 )
{
TQString diffProg;
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 {
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;
@ -490,7 +490,7 @@ void KRslots::homeTerminal(){
TQString term = krConfig->readEntry("Terminal",_Terminal);
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 */
proc << "&";
proc.setUseShell( true );
@ -506,13 +506,13 @@ void KRslots::sysInfo(){
KProcess proc;
proc << "kcmshell" << "System/ksysctrl";
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(){
TQStringList lst = Krusader::supportedTools();
int i = lst.tqfindIndex("RENAME");
int i = lst.findIndex("RENAME");
if (i == -1){
KMessageBox::sorry(krApp,i18n("Can't find a batch rename tool.\nYou can get Krename at http://www.krename.net"));
return;
@ -726,7 +726,7 @@ void KRslots::slotCombine(){
if( !unixStyle )
{
TQString name = url.fileName();
int extPos = name.tqfindRev( '.' );
int extPos = name.findRev( '.' );
TQString ext = name.mid( extPos + 1 );
name.truncate( extPos );
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++ )
{
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 ];
}
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++ )
{
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 ];
}
startProfile = TQString();
@ -438,7 +438,7 @@ bool Krusader::versionControl() {
#if 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();
// older icompatible version
if ( oldVer <= 0.9 ) {
@ -689,9 +689,9 @@ void Krusader::setupActions() {
SLOTS, TQT_SLOT( runMountMan() ), actionCollection(), "mountman" );
#endif /* KDE 3.2 */
actFind = new KAction( i18n( "&Search..." ), "filetqfind", CTRL + Key_S,
SLOTS, TQT_SLOT( search() ), actionCollection(), "tqfind" );
actLocate = new KAction( i18n( "&Locate..." ), "tqfind", SHIFT+CTRL + Key_L,
actFind = new KAction( i18n( "&Search..." ), "filefind", CTRL + Key_S,
SLOTS, TQT_SLOT( search() ), actionCollection(), "find" );
actLocate = new KAction( i18n( "&Locate..." ), "find", SHIFT+CTRL + Key_L,
SLOTS, TQT_SLOT( locate() ), actionCollection(), "locate" );
actSyncDirs = new KAction( i18n( "Synchronize &Directories..." ), "kr_syncdirs", CTRL + Key_Y,
SLOTS, TQT_SLOT( slotSynchronizeDirs() ), actionCollection(), "sync dirs" );
@ -967,7 +967,7 @@ bool Krusader::queryClose() {
TQWidget *activeModal = TQT_TQWIDGET(TQApplication::activeModalWidget());
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;
else {
while(w && (w==this || w==sysTray || w->isHidden() || w==menuBar()) )
@ -1173,7 +1173,7 @@ TQString Krusader::getTempDir() {
TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
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 );
chmod( tmpDir.local8Bit(), 0777 );
@ -1203,7 +1203,7 @@ TQString Krusader::getTempFile() {
TQString tmpDir = krConfig->readEntry( "Temp Directory", _TempDirectory );
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 );
chmod( tmpDir.local8Bit(), 0777 );

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

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

@ -132,7 +132,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path ) {
fullPath += '/';
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 );
kdDebug( 7109 ) << fullPath << " trying " << tryPath << endl;
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 */ ){
TQString path = dest.path( -1 ).mid( 1 );
path = path.left(path.tqfindRev("/"));
path = path.left(path.findRev("/"));
if ( path.isEmpty() ) path = "/";
if( addDir(path) ){
@ -103,9 +103,9 @@ bool VirtProtocol::addDir(TQString& path){
if( kioVirtDict[ path ] ) return true;
TQString updir;
if( !path.tqcontains("/") ) updir = "/";
else updir = path.left(path.tqfindRev("/"));
TQString name = path.mid(path.tqfindRev("/")+1);
if( !path.contains("/") ) updir = "/";
else updir = path.left(path.findRev("/"));
TQString name = path.mid(path.findRev("/")+1);
if( addDir(updir) ){
KURL url;
@ -114,7 +114,7 @@ bool VirtProtocol::addDir(TQString& path){
kioVirtDict[ updir ]->append( url );
KURL::List* temp = new KURL::List();
kioVirtDict.tqreplace( path, temp );
kioVirtDict.replace( path, temp );
return true;
}
@ -254,12 +254,12 @@ bool VirtProtocol::load(){
KURL::List* urlList;
for ( it = map.begin(); it != map.end(); ++it ) {
urlList = new KURL::List( db->readListEntry(it.key()) );
kioVirtDict.tqreplace( it.key(),urlList );
kioVirtDict.replace( it.key(),urlList );
}
if( !kioVirtDict["/" ]){
urlList = new KURL::List();
kioVirtDict.tqreplace( "/", urlList );
kioVirtDict.replace( "/", urlList );
}
unlock();

Loading…
Cancel
Save