diff options
Diffstat (limited to 'kioslave')
53 files changed, 353 insertions, 353 deletions
diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp index 7af02aa58..7c92a1a76 100644 --- a/kioslave/cgi/cgi.cpp +++ b/kioslave/cgi/cgi.cpp @@ -117,7 +117,7 @@ void CgiProtocol::get( const KURL& url ) TQString file; - int pos = path.tqfindRev('/'); + int pos = path.findRev('/'); if ( pos >= 0 ) file = path.mid( pos + 1 ); else file = path; @@ -190,8 +190,8 @@ void CgiProtocol::get( const KURL& url ) // Access the buffer in-place by using setRawData() output.setRawData( buffer, n ); - int colon = output.tqfind( ':' ); - int newline = output.tqfind( '\n' ); + int colon = output.find( ':' ); + int newline = output.find( '\n' ); int semicolon = qByteArrayFindRev( output, ';', newline ); int end; if ( semicolon < 0 ) end = newline; diff --git a/kioslave/finger/kio_finger.cpp b/kioslave/finger/kio_finger.cpp index a8ea0b844..4e62b6bb5 100644 --- a/kioslave/finger/kio_finger.cpp +++ b/kioslave/finger/kio_finger.cpp @@ -112,7 +112,7 @@ void FingerProtocol::get(const KURL& url ) // Check the validity of the query TQRegExp regExp("?refreshRate=[0-9][0-9]*", true, true); - if (query.tqcontains(regExp)) { + if (query.contains(regExp)) { //kdDebug() << "looks like a valid query" << endl; TQRegExp regExp( "([0-9]+)" ); regExp.search(query); diff --git a/kioslave/fish/fish.cpp b/kioslave/fish/fish.cpp index 7290d13c6..2f0210dbd 100644 --- a/kioslave/fish/fish.cpp +++ b/kioslave/fish/fish.cpp @@ -558,7 +558,7 @@ int fishProtocol::establishConnection(char *buffer, KIO::fileoffset_t len) { buf.truncate(buf.length()-1); myDebug( << "establishing: got " << buf << endl); - while (childPid && ((pos = buf.tqfind('\n')) >= 0 || + while (childPid && ((pos = buf.find('\n')) >= 0 || buf.endsWith(":") || buf.endsWith("?"))) { pos++; TQString str = buf.left(pos); @@ -738,11 +738,11 @@ bool fishProtocol::sendCommand(fish_command_type cmd, ...) { TQString arg(va_arg(list, const char *)); int pos = -2; while ((pos = rx.search(arg,pos+2)) >= 0) { - arg.tqreplace(pos,0,TQString("\\")); + arg.replace(pos,0,TQString("\\")); } //myDebug( << "arg " << i << ": " << arg << endl); realCmd.append(" ").append(arg); - realAlt.tqreplace(TQRegExp("%"+TQString::number(i+1)),arg); + realAlt.replace(TQRegExp("%"+TQString::number(i+1)),arg); } TQString s("#"); s.append(realCmd).append("\n ").append(realAlt).append(" 2>&1;echo '### 000'\n"); @@ -790,7 +790,7 @@ int fishProtocol::makeTimeFromLs(const TQString &monthStr, const TQString &daySt break; } - int pos = timeyearStr.tqfind(':'); + int pos = timeyearStr.find(':'); if (timeyearStr.length() == 4 && pos == -1) { year = timeyearStr.toInt(); } else if (pos == -1) { @@ -820,7 +820,7 @@ void fishProtocol::manageConnection(const TQString &l) { case FISH_VER: if (line.startsWith("VER 0.0.3")) { line.append(" "); - hasAppend = line.tqcontains(" append "); + hasAppend = line.contains(" append "); } else { error(ERR_UNSUPPORTED_PROTOCOL,line); shutdownConnection(); @@ -897,7 +897,7 @@ void fishProtocol::manageConnection(const TQString &l) { atom.m_uds = UDS_USER; atom.m_long = 0; - pos = line.tqfind('.',12); + pos = line.find('.',12); if (pos < 0) { errorCount++; break; @@ -913,8 +913,8 @@ void fishProtocol::manageConnection(const TQString &l) { case 'd': atom.m_uds = UDS_MODIFICATION_TIME; - pos = line.tqfind(' '); - pos2 = line.tqfind(' ',pos+1); + pos = line.find(' '); + pos2 = line.find(' ',pos+1); if (pos < 0 || pos2 < 0) break; errorCount--; atom.m_long = makeTimeFromLs(line.mid(1,pos-1), line.mid(pos+1,pos2-pos), line.mid(pos2+1)); @@ -923,14 +923,14 @@ void fishProtocol::manageConnection(const TQString &l) { case 'D': atom.m_uds = UDS_MODIFICATION_TIME; - pos = line.tqfind(' '); - pos2 = line.tqfind(' ',pos+1); - pos3 = line.tqfind(' ',pos2+1); + pos = line.find(' '); + pos2 = line.find(' ',pos+1); + pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; dt.setDate(TQDate(line.mid(1,pos-1).toInt(),line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt())); pos = pos3; - pos2 = line.tqfind(' ',pos+1); - pos3 = line.tqfind(' ',pos2+1); + pos2 = line.find(' ',pos+1); + pos3 = line.find(' ',pos2+1); if (pos < 0 || pos2 < 0 || pos3 < 0) break; dt.setTime(TQTime(line.mid(pos+1,pos2-pos-1).toInt(),line.mid(pos2+1,pos3-pos2-1).toInt(),line.mid(pos3+1).toInt())); errorCount--; @@ -953,7 +953,7 @@ void fishProtocol::manageConnection(const TQString &l) { case ':': atom.m_uds = UDS_NAME; atom.m_long = 0; - pos = line.tqfindRev('/'); + pos = line.findRev('/'); atom.m_str = thisFn = line.mid(pos < 0?1:pos+1); if (fishCommand == FISH_LIST) udsEntry.append(atom); @@ -981,7 +981,7 @@ void fishProtocol::manageConnection(const TQString &l) { // This is getting ugly. file(1) makes some uneducated // guesses, so we must try to ignore them (#51274) else if (mimeAtom.m_str.isEmpty() && line.right(8) != "/unknown" && - (thisFn.tqfind('.') < 0 || (line.left(8) != "Mtext/x-" + (thisFn.find('.') < 0 || (line.left(8) != "Mtext/x-" && line != "Mtext/plain"))) { mimeAtom.m_str = type; } @@ -1186,7 +1186,7 @@ void fishProtocol::writeStdin(const TQString &line) if (writeReady) { writeReady = false; - //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().find('\n')) << endl); myDebug( << "Writing: " << qlist.first() << endl); myDebug( << "---------" << endl); writeChild((const char *)qlist.first().latin1(), qlist.first().length()); @@ -1218,7 +1218,7 @@ void fishProtocol::sent() if (qlist.count() == 0) { writeReady = true; } else { - //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().find('\n')) << endl); myDebug( << "Writing: " << qlist.first() << endl); myDebug( << "---------" << endl); writeChild((const char *)qlist.first().latin1(),qlist.first().length()); @@ -1364,7 +1364,7 @@ void fishProtocol::finished() { udsEntry.clear(); udsStatEntry.clear(); writeStdin(commandList.first()); - //if (fishCommand != FISH_APPEND && fishCommand != FISH_WRITE) infoMessage("Sending "+(commandList.first().mid(1,commandList.first().tqfind("\n")-1))+"..."); + //if (fishCommand != FISH_APPEND && fishCommand != FISH_WRITE) infoMessage("Sending "+(commandList.first().mid(1,commandList.first().find("\n")-1))+"..."); commandList.remove(commandList.begin()); commandCodes.remove(commandCodes.begin()); } else { diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp index bd24aca0c..a0c68a9d2 100644 --- a/kioslave/floppy/kio_floppy.cpp +++ b/kioslave/floppy/kio_floppy.cpp @@ -195,51 +195,51 @@ bool FloppyProtocol::stopAfterError(const KURL& url, const TQString& drive) TQTextIStream output(&outputString); TQString line=output.readLine(); kdDebug(7101)<<"line: -"<<line<<"-"<<endl; - if (line.tqfind("resource busy") > -1) + if (line.find("resource busy") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access drive %1.\nThe drive is still busy.\nWait until it is inactive and then try again.").arg(drive)); } - else if ((line.tqfind("Disk full") > -1) || (line.tqfind("No free cluster") > -1)) + else if ((line.find("Disk full") > -1) || (line.find("No free cluster") > -1)) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not write to file %1.\nThe disk in drive %2 is probably full.").arg(url.prettyURL(),drive)); } //file not found - else if (line.tqfind("not found") > -1) + else if (line.find("not found") > -1) { error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); } //no disk - else if (line.tqfind("not configured") > -1) + else if (line.find("not configured") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2").arg(url.prettyURL(),drive)); } - else if (line.tqfind("No such device") > -1) + else if (line.find("No such device") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThere is probably no disk in the drive %2 or you do not have enough permissions to access the drive.").arg(url.prettyURL(),drive)); } - else if (line.tqfind("not supported") > -1) + else if (line.find("not supported") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe drive %2 is not supported.").arg(url.prettyURL(),drive)); } //not supported or no such drive - else if (line.tqfind("Permission denied") > -1) + else if (line.find("Permission denied") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nMake sure the floppy in drive %2 is a DOS-formatted floppy disk \nand that the permissions of the device file (e.g. /dev/fd0) are set correctly (e.g. rwxrwxrwx).").arg(url.prettyURL(),drive)); } - else if (line.tqfind("non DOS media") > -1) + else if (line.find("non DOS media") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not access %1.\nThe disk in drive %2 is probably not a DOS-formatted floppy disk.").arg(url.prettyURL(),drive)); } - else if (line.tqfind("Read-only") > -1) + else if (line.find("Read-only") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Access denied.\nCould not write to %1.\nThe disk in drive %2 is probably write-protected.").arg(url.prettyURL(),drive)); } - else if ((outputString.tqfind("already exists") > -1) || (outputString.tqfind("Skipping ") > -1)) + else if ((outputString.find("already exists") > -1) || (outputString.find("Skipping ") > -1)) { error( KIO::ERR_FILE_ALREADY_EXIST,url.prettyURL()); //return false; } - else if (outputString.tqfind("could not read boot sector") > -1) + else if (outputString.find("could not read boot sector") > -1) { error( KIO::ERR_SLAVE_DEFINED, i18n("Could not read boot sector for %1.\nThere is probably not any disk in drive %2.").arg(url.prettyURL(),drive)); //return false; @@ -404,7 +404,7 @@ StatInfo FloppyProtocol::createStatInfo(const TQString line, bool makeStat, cons if (line.length()==41) { - int nameLength=line.tqfind(' '); + int nameLength=line.find(' '); kdDebug(7101)<<"Floppy::createStatInfo: line find: "<<nameLength <<"= -"<<line<<"-"<<endl; if (nameLength>0) { @@ -669,7 +669,7 @@ int FloppyProtocol::freeSpace(const KURL& url) while (!output.atEnd()) { line=output.readLine(); - if (line.tqfind("bytes free")==36) + if (line.find("bytes free")==36) { TQString tmp=line.mid(24,3); tmp=tmp.stripWhiteSpace(); diff --git a/kioslave/home/homeimpl.cpp b/kioslave/home/homeimpl.cpp index 6f4f86759..9d6d0d5bd 100644 --- a/kioslave/home/homeimpl.cpp +++ b/kioslave/home/homeimpl.cpp @@ -37,7 +37,7 @@ bool HomeImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); @@ -90,7 +90,7 @@ bool HomeImpl::listHomes(TQValueList<KIO::UDSEntry> &list) for(; it!=users_end; ++it) { if ((*it).uid()>=MINIMUM_UID - && !uid_list.tqcontains( (*it).uid() ) ) + && !uid_list.contains( (*it).uid() ) ) { uid_list.append( (*it).uid() ); KIO::UDSEntry entry; diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp index f2da9fcf7..823027fe2 100644 --- a/kioslave/home/kdedmodule/homedirnotify.cpp +++ b/kioslave/home/kdedmodule/homedirnotify.cpp @@ -53,7 +53,7 @@ void HomeDirNotify::init() for(; it!=users_end; ++it) { if ((*it).uid()>=MINIMUM_UID - && !uid_list.tqcontains( (*it).uid() ) ) + && !uid_list.contains( (*it).uid() ) ) { uid_list.append( (*it).uid() ); @@ -147,7 +147,7 @@ inline void evil_hack(const KURL::List &list) { KURL url = (*it).upURL(); - if (!notified.tqcontains(url)) + if (!notified.contains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/info/info.cc b/kioslave/info/info.cc index 418600ffa..ab35f282b 100644 --- a/kioslave/info/info.cc +++ b/kioslave/info/info.cc @@ -93,7 +93,7 @@ void InfoProtocol::get( const KURL& url ) decodeURL( url ); TQString path = KGlobal::iconLoader()->iconPath("up", KIcon::Toolbar, true); - int revindex = path.tqfindRev('/'); + int revindex = path.findRev('/'); path = path.left(revindex); TQString cmd = KProcess::quote(m_perl); @@ -205,7 +205,7 @@ void InfoProtocol::decodePath( TQString path ) } //kdDebug( 7108 ) << "Path: " << path << endl; - int slashPos = path.tqfind( "/" ); + int slashPos = path.find( "/" ); if( slashPos < 0 ) { diff --git a/kioslave/ldap/kio_ldap.cpp b/kioslave/ldap/kio_ldap.cpp index 92299b7a6..742d788bf 100644 --- a/kioslave/ldap/kio_ldap.cpp +++ b/kioslave/ldap/kio_ldap.cpp @@ -390,11 +390,11 @@ void LDAPProtocol::LDAPEntry2UDSEntry( const TQString &dn, UDSEntry &entry, atom.m_uds = UDS_NAME; atom.m_long = 0; TQString name = dn; - if ( (pos = name.tqfind(",")) > 0 ) + if ( (pos = name.find(",")) > 0 ) name = name.left( pos ); - if ( (pos = name.tqfind("=")) > 0 ) + if ( (pos = name.find("=")) > 0 ) name.remove( 0, pos+1 ); - name.tqreplace(' ', "_"); + name.replace(' ', "_"); if ( !dir ) name += ".ldif"; atom.m_str = name; entry.append( atom ); diff --git a/kioslave/mac/kio_mac.cpp b/kioslave/mac/kio_mac.cpp index 21b998ad1..245af6fcf 100644 --- a/kioslave/mac/kio_mac.cpp +++ b/kioslave/mac/kio_mac.cpp @@ -86,8 +86,8 @@ void MacProtocol::get(const KURL& url) { //find out if a mode has been specified in the query e.g. ?mode=t //or if it's a text file then set the mode to text - int modepos = query.tqfind("mode="); - int textpos = mime.tqfind("text"); + int modepos = query.find("mode="); + int textpos = mime.find("text"); if (modepos != -1) { mode += query.mid(modepos + 5, 1); if (mode != "-r" && mode != "-b" && mode != "-m" && mode != "-t" && mode != "-a") { @@ -157,7 +157,7 @@ void MacProtocol::listDir(const KURL& url) { while (line != NULL) { //1.0.4 puts this funny line in sometimes, we don't want it - if (line.tqcontains("Thread ") == 0) { + if (line.contains("Thread ") == 0) { entry = makeUDS(line); listEntry(entry, false); } @@ -207,11 +207,11 @@ TQValueList<KIO::UDSAtom> MacProtocol::doStat(const KURL& url) { this, TQT_SLOT(slotGetStdOutput(KProcess *, char *, int))); if (standardOutputStream.isEmpty()) { - filename.tqreplace("\\ ", " "); //get rid of escapes - filename.tqreplace("\\&", "&"); //mm, slashes... - filename.tqreplace("\\!", "!"); - filename.tqreplace("\\(", "("); - filename.tqreplace("\\)", ")"); + filename.replace("\\ ", " "); //get rid of escapes + filename.replace("\\&", "&"); //mm, slashes... + filename.replace("\\!", "!"); + filename.replace("\\(", "("); + filename.replace("\\)", ")"); error(ERR_DOES_NOT_EXIST, filename); } else { //remove trailing \n @@ -242,7 +242,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { KConfig* config = new KConfig("macrc"); TQString query = url.query(); - int modepos = query.tqfind("dev="); + int modepos = query.find("dev="); if (modepos == -1) { //no device specified, read from config or go with #define PARTITION device = config->readEntry("device",PARTITION); @@ -264,7 +264,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { bool version102 = true; - if (standardOutputStream.tqcontains("options") != 0) { + if (standardOutputStream.contains("options") != 0) { version102 = false; } @@ -297,15 +297,15 @@ TQString MacProtocol::prepareHP(const KURL& url) { //escape any funny characters //TODO are there any more characters to escape? - path.tqreplace(" ", "\\ "); - path.tqreplace("&", "\\&"); - path.tqreplace("!", "\\!"); - path.tqreplace("(", "\\("); - path.tqreplace(")", "\\)"); + path.replace(" ", "\\ "); + path.replace("&", "\\&"); + path.replace("!", "\\!"); + path.replace("(", "\\("); + path.replace(")", "\\)"); //then change to the right directory int s; TQString dir; - s = path.tqfind('/'); + s = path.find('/'); while (s != -1) { dir = path.left(s); path = path.mid(s+1); @@ -324,7 +324,7 @@ TQString MacProtocol::prepareHP(const KURL& url) { //clean up delete myKProcess; myKProcess = 0; - s = path.tqfind('/'); + s = path.find('/'); } return path; diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp index 20c0d45b8..7cec22c27 100644 --- a/kioslave/man/kio_man.cpp +++ b/kioslave/man/kio_man.cpp @@ -60,17 +60,17 @@ void stripExtension( TQString *name ) { int pos = name->length(); - if ( name->tqfind(".gz", -3) != -1 ) + if ( name->find(".gz", -3) != -1 ) pos -= 3; - else if ( name->tqfind(".z", -2, false) != -1 ) + else if ( name->find(".z", -2, false) != -1 ) pos -= 2; - else if ( name->tqfind(".bz2", -4) != -1 ) + else if ( name->find(".bz2", -4) != -1 ) pos -= 4; - else if ( name->tqfind(".bz", -3) != -1 ) + else if ( name->find(".bz", -3) != -1 ) pos -= 3; if ( pos > 0 ) - pos = name->tqfindRev('.', pos-1); + pos = name->findRev('.', pos-1); if ( pos > 0 ) name->truncate( pos ); @@ -98,7 +98,7 @@ bool parseUrl(const TQString& _url, TQString &title, TQString §ion) title = url; - int pos = url.tqfind('('); + int pos = url.find('('); if (pos < 0) return true; @@ -144,7 +144,7 @@ void MANProtocol::parseWhatIs( TQMap<TQString, TQString> &i, TQTextStream &t, co { TQString names = l.left(pos); TQString descr = l.mid(pos + re.matchedLength()); - while ((pos = names.tqfind(",")) != -1) + while ((pos = names.find(",")) != -1) { i[names.left(pos++)] = descr; while (names[pos] == ' ') @@ -172,9 +172,9 @@ TQMap<TQString, TQString> MANProtocol::buildIndexMap(const TQString §ion) TQStringList man_dirs = manDirectories(); // Supplementary places for whatis databases man_dirs += m_mandbpath; - if (man_dirs.tqfind("/var/cache/man")==man_dirs.end()) + if (man_dirs.find("/var/cache/man")==man_dirs.end()) man_dirs << "/var/cache/man"; - if (man_dirs.tqfind("/var/catman")==man_dirs.end()) + if (man_dirs.find("/var/catman")==man_dirs.end()) man_dirs << "/var/catman"; TQStringList names; @@ -238,14 +238,14 @@ TQStringList MANProtocol::manDirectories() && S_ISDIR( sbuf.st_mode ) ) { const TQString p = TQDir(dir).canonicalPath(); - if (!man_dirs.tqcontains(p)) man_dirs += p; + if (!man_dirs.contains(p)) man_dirs += p; } } } // Untranslated pages in "<mandir>" const TQString p = TQDir(*it_dir).canonicalPath(); - if (!man_dirs.tqcontains(p)) man_dirs += p; + if (!man_dirs.contains(p)) man_dirs += p; } return man_dirs; } @@ -331,7 +331,7 @@ TQStringList MANProtocol::findPages(const TQString &_section, if (sect.lower()==it_real) it_real = sect; // Only add sect if not already contained, avoid duplicates - if (!sect_list.tqcontains(sect) && _section.isEmpty()) { + if (!sect_list.contains(sect) && _section.isEmpty()) { kdDebug() << "another section " << sect << endl; sect_list += sect; } @@ -425,11 +425,11 @@ static TQString text2html(const TQString& txt) { TQString reply = txt; - reply = reply.tqreplace('&', "&"); - reply = reply.tqreplace('<', "<"); - reply = reply.tqreplace('>', ">"); - reply = reply.tqreplace('"', "&dquot;"); - reply = reply.tqreplace('\'', """); + reply = reply.replace('&', "&"); + reply = reply.replace('<', "<"); + reply = reply.replace('>', ">"); + reply = reply.replace('"', "&dquot;"); + reply = reply.replace('\'', """); return reply; } @@ -534,7 +534,7 @@ char *MANProtocol::readManPage(const char *_filename) * If the path name constains the string sman, assume that it's SGML and * convert it to roff format (used on Solaris). */ //TQString file_mimetype = KMimeType::findByPath(TQString(filename), 0, false)->name(); - if (filename.tqcontains("sman", false)) //file_mimetype == "text/html" || ) + if (filename.contains("sman", false)) //file_mimetype == "text/html" || ) { myStdStream =TQString::null; KProcess proc; @@ -560,14 +560,14 @@ char *MANProtocol::readManPage(const char *_filename) kdDebug(7107) << "relative " << filename << endl; filename = TQDir::cleanDirPath(lastdir + "/" + filename).utf8(); if (!KStandardDirs::exists(filename)) { // exists perhaps with suffix - lastdir = filename.left(filename.tqfindRev('/')); + lastdir = filename.left(filename.findRev('/')); TQDir mandir(lastdir); - mandir.setNameFilter(filename.mid(filename.tqfindRev('/') + 1) + ".*"); + mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*"); filename = lastdir + "/" + TQFile::encodeName(mandir.entryList().first()); } kdDebug(7107) << "resolved to " << filename << endl; } - lastdir = filename.left(filename.tqfindRev('/')); + lastdir = filename.left(filename.findRev('/')); myStdStream = TQString::null; KProcess proc; @@ -883,7 +883,7 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c } } /* sections are not used - else if ( section_regex.tqfind(line, 0) == 0 ) + else if ( section_regex.find(line, 0) == 0 ) { if ( !conf_section.isEmpty() ) conf_section += ':'; @@ -920,7 +920,7 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c int i = 0; while (manpaths[i]) { - if ( constr_path.tqfindIndex( TQString( manpaths[i] ) ) == -1 ) + if ( constr_path.findIndex( TQString( manpaths[i] ) ) == -1 ) constr_path += TQString( manpaths[i] ); i++; } @@ -944,35 +944,35 @@ void MANProtocol::constructPath(TQStringList& constr_path, TQStringList constr_c if ( !mandir.isEmpty() ) { // a path mapping exists - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; } else { // no manpath mapping, use "<path>/man" and "<path>/../man" mandir = dir + TQString( "/man" ); - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; - int pos = dir.tqfindRev( '/' ); + int pos = dir.findRev( '/' ); if ( pos > 0 ) { mandir = dir.left( pos ) + TQString("/man"); - if ( constr_path.tqfindIndex( mandir ) == -1 ) + if ( constr_path.findIndex( mandir ) == -1 ) constr_path += mandir; } } TQString catmandir = mandb_map[ mandir ]; if ( !mandir.isEmpty() ) { - if ( constr_catmanpath.tqfindIndex( catmandir ) == -1 ) + if ( constr_catmanpath.findIndex( catmandir ) == -1 ) constr_catmanpath += catmandir; } else { // What is the default mapping? catmandir = mandir; - catmandir.tqreplace("/usr/share/","/var/cache/"); - if ( constr_catmanpath.tqfindIndex( catmandir ) == -1 ) + catmandir.replace("/usr/share/","/var/cache/"); + if ( constr_catmanpath.findIndex( catmandir ) == -1 ) constr_catmanpath += catmandir; } } @@ -1001,7 +1001,7 @@ void MANProtocol::checkManPaths() if ( manpath_env.isEmpty() || manpath_env[0] == ':' || manpath_env[manpath_env.length()-1] == ':' - || manpath_env.tqcontains( "::" ) ) + || manpath_env.contains( "::" ) ) { construct_path = true; // need to read config file } @@ -1041,7 +1041,7 @@ void MANProtocol::checkManPaths() if ( !dir.isEmpty() ) { // Add dir to the man path if it exists - if ( m_manpath.tqfindIndex( dir ) == -1 ) { + if ( m_manpath.findIndex( dir ) == -1 ) { if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0 && S_ISDIR( sbuf.st_mode ) ) { @@ -1060,7 +1060,7 @@ void MANProtocol::checkManPaths() dir = (*it2); if ( !dir.isEmpty() ) { - if ( m_manpath.tqfindIndex( dir ) == -1 ) { + if ( m_manpath.findIndex( dir ) == -1 ) { if ( ::stat( TQFile::encodeName( dir ), &sbuf ) == 0 && S_ISDIR( sbuf.st_mode ) ) { @@ -1080,7 +1080,7 @@ void MANProtocol::checkManPaths() { "1", "2", "3", "4", "5", "6", "7", "8", "9", "n", 0L }; for ( int i = 0; default_sect[i] != 0L; i++ ) - if ( m_mansect.tqfindIndex( TQString( default_sect[i] ) ) == -1 ) + if ( m_mansect.findIndex( TQString( default_sect[i] ) ) == -1 ) m_mansect += TQString( default_sect[i] ); */ @@ -1239,7 +1239,7 @@ void MANProtocol::showIndex(const TQString& section) stripExtension( &fileName ); - pos = fileName.tqfindRev('/'); + pos = fileName.findRev('/'); if (pos > 0) fileName = fileName.mid(pos+1); @@ -1253,7 +1253,7 @@ void MANProtocol::showIndex(const TQString& section) { os << "<tr><td><a href=\"man:" << it.data() << "\">\n" << it.key() << "</a></td><td> </td><td> " - << (indexmap.tqcontains(it.key()) ? indexmap[it.key()] : "" ) + << (indexmap.contains(it.key()) ? indexmap[it.key()] : "" ) << "</td></tr>" << endl; } @@ -1415,7 +1415,7 @@ void MANProtocol::showIndex(const TQString& section) ((char *)manindex->manpage_begin)[manindex->manpage_len] = '\0'; os << manindex->manpage_begin << "</a></td><td> </td><td> " - << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "</td></tr>" << endl; last_index = manindex; } @@ -1457,7 +1457,7 @@ void MANProtocol::showIndex(const TQString& section) manindex->manpage_begin[manindex->manpage_len] = '\0'; os << manindex->manpage_begin << "</a></td><td> </td><td> " - << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "</td></tr>" << endl; last_index = manindex; } diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp index b83fba0a0..c08a51443 100644 --- a/kioslave/man/man2html.cpp +++ b/kioslave/man/man2html.cpp @@ -822,7 +822,7 @@ static void add_links(char *c) e=h+1; sec=f[1]; subsec=f[2]; - int index = fstr.tqfind(')', 2); + int index = fstr.find(')', 2); if (index != -1) subsec = fstr.mid(2, index - 2); else // No closing ')' found, take first character as subsection. @@ -1166,7 +1166,7 @@ static TQCString scan_named_character( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -1198,7 +1198,7 @@ static TQCString scan_named_character( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind('\''); + const int result = cstr.find('\''); if ( result == -1 ) name += cstr; else @@ -1223,7 +1223,7 @@ static TQCString scan_named_character( char*& c ) // Note: characters with a one character length name doe not exist, as they would collide with other escapes // Now we have the name, let us find it between the string names - TQMap<TQCString,StringDefinition>::iterator it=s_characterDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_characterDefinitionMap.find(name); if (it==s_characterDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find character with name: " << name << endl; @@ -1270,7 +1270,7 @@ static TQCString scan_named_string(char*& c) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -1299,7 +1299,7 @@ static TQCString scan_named_string(char*& c) c++; } // Now we have the name, let us find it between the string names - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string with name: " << name << endl; @@ -1514,7 +1514,7 @@ static int scan_number_register( char*& c) } else { - TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { return 0; // Undefined variable @@ -1560,7 +1560,7 @@ static TQCString scan_named_font( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.tqfind(']'); + const int result = cstr.find(']'); if ( result == -1 ) name += cstr; else @@ -3149,7 +3149,7 @@ static char *scan_request(char *c) int j = nlen; while (c[j] && c[j]==' ' || c[j]=='\t') j++; /* search macro database of self-defined macros */ - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(macroName); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(macroName); if (it!=s_stringDefinitionMap.end()) { kdDebug(7107) << "CALLING MACRO: " << macroName << endl; @@ -3241,7 +3241,7 @@ static char *scan_request(char *c) *c='\0'; char* result=0; scan_troff(h,0,&result); - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -3276,7 +3276,7 @@ static char *scan_request(char *c) curpos=0; char* result=0; c=scan_troff(c,1,&result); - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -4181,7 +4181,7 @@ static char *scan_request(char *c) } } c=skip_till_newline(c); - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to rename or remove: " << name << endl; @@ -4240,7 +4240,7 @@ static char *scan_request(char *c) c=scan_expression( c, &increment ); } c = skip_till_newline( c ); - TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { if ( sign < 1 ) @@ -4310,7 +4310,7 @@ static char *scan_request(char *c) sl++; } - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -5091,7 +5091,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rn) - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name2); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; @@ -5115,7 +5115,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.tqfind( name ); + TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name ); if ( it == s_numberDefinitionMap.end() ) { kdDebug(7107) << "EXCEPTION: trying to remove inexistant number register: " << endl; @@ -5145,7 +5145,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.tqfind(name); + TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find number register to rename: " << name << endl; @@ -5189,7 +5189,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rnn) - TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.tqfind(name2); + TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp index 5c4e4c357..d5e36cc50 100644 --- a/kioslave/media/kcmodule/notifiermodule.cpp +++ b/kioslave/media/kcmodule/notifiermodule.cpp @@ -212,7 +212,7 @@ void NotifierModule::slotToggleAuto() int index = m_view->actionsList->index( action_item ); - if ( action->autoMimetypes().tqcontains( m_mimetype ) ) + if ( action->autoMimetypes().contains( m_mimetype ) ) { m_settings.resetAutoAction( m_mimetype ); } diff --git a/kioslave/media/kcmodule/serviceconfigdialog.cpp b/kioslave/media/kcmodule/serviceconfigdialog.cpp index 76b342f92..61dd060f2 100644 --- a/kioslave/media/kcmodule/serviceconfigdialog.cpp +++ b/kioslave/media/kcmodule/serviceconfigdialog.cpp @@ -63,7 +63,7 @@ ServiceConfigDialog::ServiceConfigDialog(NotifierServiceAction *action, { TQListBox *list; - if ( action_mimetypes.tqcontains( *it ) ) + if ( action_mimetypes.contains( *it ) ) { list = m_view->mimetypesSelector->selectedListBox(); } diff --git a/kioslave/media/libmediacommon/actionlistboxitem.cpp b/kioslave/media/libmediacommon/actionlistboxitem.cpp index 42a724c75..271d2e487 100644 --- a/kioslave/media/libmediacommon/actionlistboxitem.cpp +++ b/kioslave/media/libmediacommon/actionlistboxitem.cpp @@ -29,7 +29,7 @@ ActionListBoxItem::ActionListBoxItem(NotifierAction *action, TQString mimetype, { TQString text = m_action->label(); - if ( m_action->autoMimetypes().tqcontains( mimetype ) ) + if ( m_action->autoMimetypes().contains( mimetype ) ) { text += " (" + i18n( "Auto Action" ) + ")"; } diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp index 703cb4a40..9fa7ab253 100644 --- a/kioslave/media/libmediacommon/medium.cpp +++ b/kioslave/media/libmediacommon/medium.cpp @@ -109,7 +109,7 @@ Medium::MList Medium::createList(const TQStringList &properties) l.append(m); TQStringList::iterator first = props.begin(); - TQStringList::iterator last = props.tqfind(SEPARATOR); + TQStringList::iterator last = props.find(SEPARATOR); ++last; props.erase(first, last); } diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h index 152d13f8d..b0eb86c33 100644 --- a/kioslave/media/libmediacommon/medium.h +++ b/kioslave/media/libmediacommon/medium.h @@ -111,8 +111,8 @@ namespace MediaManagerUtils { for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it) { - TQString key = (*it).left((*it).tqfind('=')); - TQString value = (*it).mid((*it).tqfind('=') + 1); + TQString key = (*it).left((*it).find('=')); + TQString value = (*it).mid((*it).find('=') + 1); valids[key] = value; } return valids; diff --git a/kioslave/media/libmediacommon/notifieraction.cpp b/kioslave/media/libmediacommon/notifieraction.cpp index 9a6572150..d10314701 100644 --- a/kioslave/media/libmediacommon/notifieraction.cpp +++ b/kioslave/media/libmediacommon/notifieraction.cpp @@ -69,7 +69,7 @@ TQString NotifierAction::label() const void NotifierAction::addAutoMimetype( const TQString &mimetype ) { - if ( !m_autoMimetypes.tqcontains( mimetype ) ) + if ( !m_autoMimetypes.contains( mimetype ) ) { m_autoMimetypes.append( mimetype ); } diff --git a/kioslave/media/libmediacommon/notifieropenaction.cpp b/kioslave/media/libmediacommon/notifieropenaction.cpp index 01c8b010f..4d6d8025c 100644 --- a/kioslave/media/libmediacommon/notifieropenaction.cpp +++ b/kioslave/media/libmediacommon/notifieropenaction.cpp @@ -40,6 +40,6 @@ void NotifierOpenAction::execute(KFileItem &medium) bool NotifierOpenAction::supportsMimetype( const TQString &mimetype ) const { - return !mimetype.tqcontains( "blank" ) && !mimetype.tqcontains( "encrypted" ); + return !mimetype.contains( "blank" ) && !mimetype.contains( "encrypted" ); } diff --git a/kioslave/media/libmediacommon/notifierserviceaction.cpp b/kioslave/media/libmediacommon/notifierserviceaction.cpp index 8cf916848..c7bece4f8 100644 --- a/kioslave/media/libmediacommon/notifierserviceaction.cpp +++ b/kioslave/media/libmediacommon/notifierserviceaction.cpp @@ -99,7 +99,7 @@ void NotifierServiceAction::updateFilePath() if ( !m_filePath.isEmpty() ) return; TQString action_name = m_service.m_strName; - action_name.tqreplace( " ", "_" ); + action_name.replace( " ", "_" ); TQDir actions_dir( locateLocal( "data", "konqueror/servicemenus/", true ) ); @@ -144,7 +144,7 @@ bool NotifierServiceAction::isWritable() const bool NotifierServiceAction::supportsMimetype(const TQString &mimetype) const { - return m_mimetypes.tqcontains(mimetype); + return m_mimetypes.contains(mimetype); } void NotifierServiceAction::save() const diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp index fd0aefc67..cc8261b8b 100644 --- a/kioslave/media/libmediacommon/notifiersettings.cpp +++ b/kioslave/media/libmediacommon/notifiersettings.cpp @@ -111,7 +111,7 @@ TQValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const TQStrin bool NotifierSettings::tqaddAction( NotifierServiceAction *action ) { - if ( !m_idMap.tqcontains( action->id() ) ) + if ( !m_idMap.contains( action->id() ) ) { m_actions.insert( --m_actions.end(), action ); m_idMap[ action->id() ] = action; @@ -153,7 +153,7 @@ void NotifierSettings::setAutoAction( const TQString &mimetype, NotifierAction * void NotifierSettings::resetAutoAction( const TQString &mimetype ) { - if ( m_autoMimetypesMap.tqcontains( mimetype ) ) + if ( m_autoMimetypesMap.contains( mimetype ) ) { NotifierAction *action = m_autoMimetypesMap[mimetype]; action->removeAutoMimetype( mimetype ); @@ -179,7 +179,7 @@ void NotifierSettings::clearAutoActions() NotifierAction *NotifierSettings::autoActionForMimetype( const TQString &mimetype ) { - if ( m_autoMimetypesMap.tqcontains( mimetype ) ) + if ( m_autoMimetypesMap.contains( mimetype ) ) { return m_autoMimetypesMap[mimetype]; } @@ -238,7 +238,7 @@ void NotifierSettings::reload() TQString mime = auto_it.key(); TQString action_id = auto_it.data(); - if ( m_idMap.tqcontains( action_id ) ) + if ( m_idMap.contains( action_id ) ) { setAutoAction( mime, m_idMap[action_id] ); } @@ -349,7 +349,7 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const TQString } } } - else if ( types.tqcontains(mimetype) ) + else if ( types.contains(mimetype) ) { return true; } diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp index 1448a756c..f8d298e27 100644 --- a/kioslave/media/mediaimpl.cpp +++ b/kioslave/media/mediaimpl.cpp @@ -43,7 +43,7 @@ bool MediaImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp index 71dbdb1f0..189f52aee 100644 --- a/kioslave/media/mediamanager/fstabbackend.cpp +++ b/kioslave/media/mediamanager/fstabbackend.cpp @@ -137,24 +137,24 @@ bool inExclusionPattern(KMountPoint *mount, bool networkSharesOnly) || mount->mountType() == "fdescfs" || mount->mountType() == "kernfs" || mount->mountType() == "usbfs" - || mount->mountType().tqcontains( "proc" ) + || mount->mountType().contains( "proc" ) || mount->mountType() == "unknown" || mount->mountType() == "none" || mount->mountType() == "sunrpc" || mount->mountedFrom() == "none" || mount->mountedFrom() == "tmpfs" - || mount->mountedFrom().tqfind("shm") != -1 + || mount->mountedFrom().find("shm") != -1 || mount->mountPoint() == "/dev/swap" || mount->mountPoint() == "/dev/pts" - || mount->mountPoint().tqfind("/proc") == 0 - || mount->mountPoint().tqfind("/sys") == 0 + || mount->mountPoint().find("/proc") == 0 + || mount->mountPoint().find("/sys") == 0 // We might want to display only network shares // since HAL doesn't handle them || ( networkSharesOnly - && mount->mountType().tqfind( "smb" ) == -1 - && mount->mountType().tqfind( "cifs" ) == -1 - && mount->mountType().tqfind( "nfs" ) == -1 + && mount->mountType().find( "smb" ) == -1 + && mount->mountType().find( "cifs" ) == -1 + && mount->mountType().find( "nfs" ) == -1 ) ) { @@ -187,7 +187,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) nothing has changed, do not stat the mount point. Avoids hang if network shares are stalling */ TQString mtabEntry = dev + "*" + mp + "*" + fs; - if(m_mtabEntries.tqcontains(mtabEntry)) { + if(m_mtabEntries.contains(mtabEntry)) { new_mtabIds += m_mtabEntries[mtabEntry]; continue; } @@ -196,7 +196,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) new_mtabIds+=id; m_mtabEntries[mtabEntry] = id; - if ( !m_mtabIds.tqcontains(id) && m_fstabIds.tqcontains(id) ) + if ( !m_mtabIds.contains(id) && m_fstabIds.contains(id) ) { TQString mime, icon, label; guess(dev, mp, fs, true, mime, icon, label); @@ -204,7 +204,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) mime, icon, label); } #if 0 - else if ( !m_mtabIds.tqcontains(id) ) + else if ( !m_mtabIds.contains(id) ) { TQString name = generateName(dev, fs); @@ -229,7 +229,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_mtabIds.tqcontains(*it2) && m_fstabIds.tqcontains(*it2) ) + if ( !new_mtabIds.contains(*it2) && m_fstabIds.contains(*it2) ) { const Medium *medium = m_mediaList.findById(*it2); @@ -248,7 +248,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) mime, icon, label); } #if 0 - else if ( !new_mtabIds.tqcontains(*it2) ) + else if ( !new_mtabIds.contains(*it2) ) { m_mediaList.removeMedium(*it2, allowNotification); } @@ -277,7 +277,7 @@ void FstabBackend::handleFstabChange(bool allowNotification) TQString id = generateId(dev, mp); new_fstabIds+=id; - if ( !m_fstabIds.tqcontains(id) ) + if ( !m_fstabIds.contains(id) ) { TQString name = generateName(dev, fs); @@ -301,7 +301,7 @@ void FstabBackend::handleFstabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_fstabIds.tqcontains(*it2) ) + if ( !new_fstabIds.contains(*it2) ) { m_mediaList.removeMedium(*it2, allowNotification); } @@ -317,8 +317,8 @@ TQString FstabBackend::generateId(const TQString &devNode, TQString m = KStandardDirs::realPath(mountPoint); return "/org/kde/mediamanager/fstab/" - +d.tqreplace("/", "") - +m.tqreplace("/", ""); + +d.replace("/", "") + +m.replace("/", ""); } TQString FstabBackend::generateName(const TQString &devNode, const TQString &fsType) @@ -363,7 +363,7 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, { TQString buf; m.readLine(buf, 1024); - if(buf.tqcontains("cdrom")) + if(buf.contains("cdrom")) isCd=true; m.close(); } @@ -387,37 +387,37 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } #endif if ( devType == CDWRITER - || devNode.tqfind("cdwriter")!=-1 || mountPoint.tqfind("cdwriter")!=-1 - || devNode.tqfind("cdrecorder")!=-1 || mountPoint.tqfind("cdrecorder")!=-1 - || devNode.tqfind("cdburner")!=-1 || mountPoint.tqfind("cdburner")!=-1 - || devNode.tqfind("cdrw")!=-1 || mountPoint.tqfind("cdrw")!=-1 - || devNode.tqfind("graveur")!=-1 + || devNode.find("cdwriter")!=-1 || mountPoint.find("cdwriter")!=-1 + || devNode.find("cdrecorder")!=-1 || mountPoint.find("cdrecorder")!=-1 + || devNode.find("cdburner")!=-1 || mountPoint.find("cdburner")!=-1 + || devNode.find("cdrw")!=-1 || mountPoint.find("cdrw")!=-1 + || devNode.find("graveur")!=-1 ) { mimeType = "media/cdwriter"; label = i18n("CD Recorder"); } else if ( devType == DVD || devType == DVDWRITER - || devNode.tqfind("dvd")!=-1 || mountPoint.tqfind("dvd")!=-1 ) + || devNode.find("dvd")!=-1 || mountPoint.find("dvd")!=-1 ) { mimeType = "media/dvd"; label = i18n("DVD"); } else if ( devType == CD - || devNode.tqfind("cdrom")!=-1 || mountPoint.tqfind("cdrom")!=-1 + || devNode.find("cdrom")!=-1 || mountPoint.find("cdrom")!=-1 // LINUX SPECIFIC - || devNode.tqfind("/dev/scd")!=-1 || devNode.tqfind("/dev/sr")!=-1 + || devNode.find("/dev/scd")!=-1 || devNode.find("/dev/sr")!=-1 // FREEBSD SPECIFIC - || devNode.tqfind("/acd")!=-1 || devNode.tqfind("/scd")!=-1 + || devNode.find("/acd")!=-1 || devNode.find("/scd")!=-1 ) { mimeType = "media/cdrom"; label = i18n("CD-ROM"); } - else if ( devNode.tqfind("fd")!=-1 || mountPoint.tqfind("fd")!=-1 - || devNode.tqfind("floppy")!=-1 || mountPoint.tqfind("floppy")!=-1 ) + else if ( devNode.find("fd")!=-1 || mountPoint.find("fd")!=-1 + || devNode.find("floppy")!=-1 || mountPoint.find("floppy")!=-1 ) { - if ( devNode.tqfind("360")!=-1 || devNode.tqfind("1200")!=-1 ) + if ( devNode.find("360")!=-1 || devNode.find("1200")!=-1 ) { mimeType = "media/floppy5"; } @@ -427,32 +427,32 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } label = i18n("Floppy"); } - else if ( mountPoint.tqfind("zip")!=-1 + else if ( mountPoint.find("zip")!=-1 // FREEBSD SPECIFIC - || devNode.tqfind("/afd")!=-1 + || devNode.find("/afd")!=-1 ) { mimeType = "media/zip"; label = i18n("Zip Disk"); } - else if ( mountPoint.tqfind("removable")!=-1 - || mountPoint.tqfind("hotplug")!=-1 - || mountPoint.tqfind("usb")!=-1 - || mountPoint.tqfind("firewire")!=-1 - || mountPoint.tqfind("ieee1394")!=-1 - || devNode.tqfind("/usb/")!= -1 + else if ( mountPoint.find("removable")!=-1 + || mountPoint.find("hotplug")!=-1 + || mountPoint.find("usb")!=-1 + || mountPoint.find("firewire")!=-1 + || mountPoint.find("ieee1394")!=-1 + || devNode.find("/usb/")!= -1 ) { mimeType = "media/removable"; label = i18n("Removable Device"); } - else if ( fsType.tqfind("nfs")!=-1 ) + else if ( fsType.find("nfs")!=-1 ) { mimeType = "media/nfs"; label = i18n("Remote Share"); } - else if ( fsType.tqfind("smb")!=-1 || fsType.tqfind("cifs")!=-1 - || devNode.tqfind("//")!=-1 ) + else if ( fsType.find("smb")!=-1 || fsType.find("cifs")!=-1 + || devNode.find("//")!=-1 ) { mimeType = "media/smb"; label = i18n("Remote Share"); diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp index d44826590..74f123c93 100644 --- a/kioslave/media/mediamanager/halbackend.cpp +++ b/kioslave/media/mediamanager/halbackend.cpp @@ -942,7 +942,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << TQString("automount=%1").arg(value ? "true" : "false"); - if (valids.tqcontains("ro")) + if (valids.contains("ro")) { value = config.readBoolEntry("ro", false); tmp = TQString("ro=%1").arg(value ? "true" : "false"); @@ -950,7 +950,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << tmp; } - if (valids.tqcontains("quiet")) + if (valids.contains("quiet")) { value = config.readBoolEntry("quiet", false); tmp = TQString("quiet=%1").arg(value ? "true" : "false"); @@ -958,28 +958,28 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << tmp; } - if (valids.tqcontains("flush")) + if (valids.contains("flush")) { value = config.readBoolEntry("flush", fstype.endsWith("fat")); tmp = TQString("flush=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("uid")) + if (valids.contains("uid")) { value = config.readBoolEntry("uid", true); tmp = TQString("uid=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("utf8")) + if (valids.contains("utf8")) { value = config.readBoolEntry("utf8", true); tmp = TQString("utf8=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) { TQString svalue = config.readEntry("shortname", "lower").lower(); if (svalue == "winnt") @@ -993,7 +993,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) } // pass our locale to the ntfs-3g driver so it can translate local characters - if (valids.tqcontains("locale") && fstype == "ntfs-3g") + if (valids.contains("locale") && fstype == "ntfs-3g") { // have to obtain LC_CTYPE as returned by the `locale` command // check in the same order as `locale` does @@ -1003,15 +1003,15 @@ TQStringList HALBackend::mountoptions(const TQString &name) } } - if (valids.tqcontains("sync")) + if (valids.contains("sync")) { - value = config.readBoolEntry("sync", ( valids.tqcontains("flush") && !fstype.endsWith("fat") ) && removable); + value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable); tmp = TQString("sync=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } - if (valids.tqcontains("noatime")) + if (valids.contains("noatime")) { value = config.readBoolEntry("atime", !fstype.endsWith("fat")); tmp = TQString("atime=%1").arg(value ? "true" : "false"); @@ -1031,7 +1031,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << TQString("mountpoint=%1").arg(mount_point); result << TQString("filesystem=%1").arg(fstype); - if (valids.tqcontains("data")) + if (valids.contains("data")) { TQString svalue = config.readEntry("journaling").lower(); if (svalue == "ordered") @@ -1058,19 +1058,19 @@ bool HALBackend::setMountoptions(const TQString &name, const TQStringList &optio const char *names[] = { "ro", "quiet", "atime", "uid", "utf8", "flush", "sync", 0 }; for (int index = 0; names[index]; ++index) - if (valids.tqcontains(names[index])) + if (valids.contains(names[index])) config.writeEntry(names[index], valids[names[index]] == "true"); - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) config.writeEntry("shortname", valids["shortname"]); - if (valids.tqcontains("journaling")) + if (valids.contains("journaling")) config.writeEntry("journaling", valids["journaling"]); - if (!mountoptions(name).tqcontains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) + if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) config.writeEntry("mountpoint", valids["mountpoint"]); - if (valids.tqcontains("automount")) { + if (valids.contains("automount")) { TQString drive_udi = libhal_device_get_property_QString(m_halContext, name.latin1(), "block.storage_device"); config.setGroup(drive_udi); config.writeEntry("automount", valids["automount"]); @@ -1376,7 +1376,7 @@ TQString HALBackend::isInFstab(const Medium *medium) if ((*it)->mountedFrom() == medium->deviceNode() || ( !medium->deviceNode().isEmpty() && reald == medium->deviceNode() ) ) { TQStringList opts = (*it)->mountOptions(); - if (opts.tqcontains("user") || opts.tqcontains("users")) + if (opts.contains("user") || opts.contains("users")) return (*it)->mountPoint(); } } @@ -1451,17 +1451,17 @@ TQString HALBackend::mount(const Medium *medium) if (mount_point.startsWith("/media/")) mount_point = mount_point.mid(7); - if (valids.tqcontains("shortname")) + if (valids.contains("shortname")) { soptions << TQString("shortname=%1").arg(valids["shortname"]); } - if (valids.tqcontains("locale")) + if (valids.contains("locale")) { soptions << TQString("locale=%1").arg(valids["locale"]); } - if (valids.tqcontains("journaling")) + if (valids.contains("journaling")) { TQString option = valids["journaling"]; if (option == "data") diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp index 5a1359b6d..0fcda8d0f 100644 --- a/kioslave/media/mediamanager/linuxcdpolling.cpp +++ b/kioslave/media/mediamanager/linuxcdpolling.cpp @@ -209,14 +209,14 @@ void LinuxCDPolling::slotMediumAdded(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl; - if (m_threads.tqcontains(id)) return; + if (m_threads.contains(id)) return; const Medium *medium = m_mediaList.findById(id); TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; - if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return; + if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; if (!medium->isMounted()) { @@ -234,7 +234,7 @@ void LinuxCDPolling::slotMediumRemoved(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumRemoved(" << id << ")" << endl; - if (!m_threads.tqcontains(id)) return; + if (!m_threads.contains(id)) return; PollingThread *thread = m_threads[id]; m_threads.remove(id); @@ -255,9 +255,9 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id) TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; - if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return; + if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; - if (!m_threads.tqcontains(id) && !medium->isMounted()) + if (!m_threads.contains(id) && !medium->isMounted()) { // It is just a mount state change, no need to notify m_excludeNotification.append( id ); @@ -268,7 +268,7 @@ void LinuxCDPolling::slotMediumStateChanged(const TQString &id) thread->start(); m_timer.start(500); } - else if (m_threads.tqcontains(id) && medium->isMounted()) + else if (m_threads.contains(id) && medium->isMounted()) { PollingThread *thread = m_threads[id]; m_threads.remove(id); @@ -319,7 +319,7 @@ static TQString baseType(const Medium *medium) FstabBackend::guess(devNode, mountPoint, fsType, mounted, mimeType, iconName, label); - if (devNode.tqfind("dvd")!=-1) + if (devNode.find("dvd")!=-1) { kdDebug(1219) << "=> dvd" << endl; return "dvd"; @@ -360,7 +360,7 @@ void LinuxCDPolling::applyType(DiscType type, const Medium *medium) TQString id = medium->id(); TQString dev = medium->deviceNode(); - bool notify = !m_excludeNotification.tqcontains(id); + bool notify = !m_excludeNotification.contains(id); m_excludeNotification.remove(id); switch (type) diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp index 2e766bb07..bb0de6248 100644 --- a/kioslave/media/mediamanager/medialist.cpp +++ b/kioslave/media/mediamanager/medialist.cpp @@ -38,7 +38,7 @@ const Medium *MediaList::findById(const TQString &id) const { kdDebug(1219) << "MediaList::findById(" << id << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return 0L; + if ( !m_idMap.contains(id) ) return 0L; return m_idMap[id]; } @@ -47,7 +47,7 @@ const Medium *MediaList::findByName(const TQString &name) const { kdDebug(1219) << "MediaList::findByName(" << name << ")" << endl; - if ( !m_nameMap.tqcontains(name) ) return 0L; + if ( !m_nameMap.contains(name) ) return 0L; return m_nameMap[name]; } @@ -70,13 +70,13 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification) kdDebug(1219) << "MediaList::addMedium(@" << medium->id() << ")" << endl; TQString id = medium->id(); - if ( m_idMap.tqcontains(id) ) return TQString::null; + if ( m_idMap.contains(id) ) return TQString::null; m_media.append( medium ); m_idMap[id] = medium; TQString name = medium->name(); - if ( !m_nameMap.tqcontains(name) ) + if ( !m_nameMap.contains(name) ) { m_nameMap[name] = medium; @@ -90,7 +90,7 @@ TQString MediaList::addMedium(Medium *medium, bool allowNotification) TQString base_name = name+"_"; int i = 1; - while ( m_nameMap.tqcontains(base_name+TQString::number(i)) ) + while ( m_nameMap.contains(base_name+TQString::number(i)) ) { i++; } @@ -109,7 +109,7 @@ bool MediaList::removeMedium(const TQString &id, bool allowNotification) { kdDebug(1219) << "MediaList::removeMedium(" << id << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; TQString name = medium->name(); @@ -126,7 +126,7 @@ bool MediaList::changeMediumState(const Medium &medium, bool allowNotification) { kdDebug(1219) << "MediaList::changeMediumState(const Medium &)" << endl; - if ( !m_idMap.tqcontains(medium.id()) ) return false; + if ( !m_idMap.contains(medium.id()) ) return false; Medium *m = m_idMap[medium.id()]; @@ -177,7 +177,7 @@ bool MediaList::changeMediumState(const TQString &id, << baseURL << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -218,7 +218,7 @@ bool MediaList::changeMediumState(const TQString &id, << mounted << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -255,7 +255,7 @@ bool MediaList::changeMediumState(const TQString &id, bool mounted, << mounted << ", " << mimeType << ", " << iconName << ")" << endl; - if ( !m_idMap.tqcontains(id) ) return false; + if ( !m_idMap.contains(id) ) return false; Medium *medium = m_idMap[id]; @@ -287,7 +287,7 @@ bool MediaList::setUserLabel(const TQString &name, const TQString &label) kdDebug(1219) << "MediaList::setUserLabel(" << name << ", " << label << ")" << endl; - if ( !m_nameMap.tqcontains(name) ) return false; + if ( !m_nameMap.contains(name) ) return false; Medium *medium = m_nameMap[name]; medium->setUserLabel(label); diff --git a/kioslave/media/mediamanager/removablebackend.cpp b/kioslave/media/mediamanager/removablebackend.cpp index 7db497c38..f307ee2f8 100644 --- a/kioslave/media/mediamanager/removablebackend.cpp +++ b/kioslave/media/mediamanager/removablebackend.cpp @@ -60,7 +60,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label) TQString name = generateName(devNode); TQString id = generateId(devNode); - if (!m_removableIds.tqcontains(id)) + if (!m_removableIds.contains(id)) { Medium *medium = new Medium(id, name); medium->mountableState(devNode, TQString::null, @@ -95,7 +95,7 @@ bool RemovableBackend::plug(const TQString &devNode, const TQString &label) bool RemovableBackend::unplug(const TQString &devNode) { TQString id = generateId(devNode); - if (m_removableIds.tqcontains(id)) + if (m_removableIds.contains(id)) { m_removableIds.remove(id); return m_mediaList.removeMedium(id); @@ -106,7 +106,7 @@ bool RemovableBackend::unplug(const TQString &devNode) bool RemovableBackend::camera(const TQString &devNode) { TQString id = generateId(devNode); - if (m_removableIds.tqcontains(id)) + if (m_removableIds.contains(id)) { return m_mediaList.changeMediumState(id, TQString("camera:/"), false, "media/gphoto2camera"); @@ -140,8 +140,8 @@ void RemovableBackend::handleMtabChange() TQString id = generateId(dev); new_mtabIds+=id; - if ( !m_mtabIds.tqcontains(id) - && m_removableIds.tqcontains(id) ) + if ( !m_mtabIds.contains(id) + && m_removableIds.contains(id) ) { m_mediaList.changeMediumState(id, dev, mp, fs, true, false, "media/removable_mounted"); @@ -153,8 +153,8 @@ void RemovableBackend::handleMtabChange() for (; it2!=end2; ++it2) { - if ( !new_mtabIds.tqcontains(*it2) - && m_removableIds.tqcontains(*it2) ) + if ( !new_mtabIds.contains(*it2) + && m_removableIds.contains(*it2) ) { m_mediaList.changeMediumState(*it2, false, false, "media/removable_unmounted"); @@ -169,7 +169,7 @@ TQString RemovableBackend::generateId(const TQString &devNode) TQString dev = KStandardDirs::realFilePath(devNode); return "/org/kde/mediamanager/removable/" - +dev.tqreplace("/", ""); + +dev.replace("/", ""); } TQString RemovableBackend::generateName(const TQString &devNode) diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp index f28c9ab95..d02f1c4b5 100644 --- a/kioslave/media/medianotifier/medianotifier.cpp +++ b/kioslave/media/medianotifier/medianotifier.cpp @@ -113,7 +113,7 @@ bool MediaNotifier::autostart( const KFileItem &medium ) TQString mimetype = medium.mimetype(); bool is_cdrom = mimetype.startsWith( "media/cd" ) || mimetype.startsWith( "media/dvd" ); - bool is_mounted = mimetype.tqcontains( "_mounted" ); + bool is_mounted = mimetype.contains( "_mounted" ); // We autorun only on CD/DVD or removable disks (USB, Firewire) if ( !( is_cdrom || is_mounted ) @@ -222,7 +222,7 @@ bool MediaNotifier::execAutoopen( const KFileItem &medium, const TQString &path, // The relative path MUST NOT contain path components that // refer to a parent directory ( ../ ) - if ( relative_path.startsWith( "/" ) || relative_path.tqcontains( "../" ) ) + if ( relative_path.startsWith( "/" ) || relative_path.contains( "../" ) ) { return false; } diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.cpp b/kioslave/media/mounthelper/kio_media_mounthelper.cpp index 83d57df85..07588e867 100644 --- a/kioslave/media/mounthelper/kio_media_mounthelper.cpp +++ b/kioslave/media/mounthelper/kio_media_mounthelper.cpp @@ -88,8 +88,8 @@ MountHelper::MountHelper() : KApplication() TQString device = medium.deviceNode(); TQString mount_point = medium.mountPoint(); - m_isCdrom = medium.mimeType().tqfind("dvd")!=-1 - || medium.mimeType().tqfind("cd")!=-1; + m_isCdrom = medium.mimeType().find("dvd")!=-1 + || medium.mimeType().find("cd")!=-1; if (args->isSet("d")) { diff --git a/kioslave/media/propsdlgplugin/propertiespage.cpp b/kioslave/media/propsdlgplugin/propertiespage.cpp index 209f350a8..14ac2b33f 100644 --- a/kioslave/media/propsdlgplugin/propertiespage.cpp +++ b/kioslave/media/propsdlgplugin/propertiespage.cpp @@ -54,55 +54,55 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { - TQString key = (*it).left((*it).tqfind('=')); - TQString value = (*it).mid((*it).tqfind('=') + 1); + TQString key = (*it).left((*it).find('=')); + TQString value = (*it).mid((*it).find('=') + 1); kdDebug() << "key '" << key << "' value '" << value << "'\n"; options[key] = value; } - if (!options.tqcontains("ro")) + if (!options.contains("ro")) option_ro->hide(); else option_ro->setChecked(options["ro"] == "true"); connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("quiet")) + if (!options.contains("quiet")) option_quiet->hide(); else option_quiet->setChecked(options["quiet"] == "true"); connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("sync")) + if (!options.contains("sync")) option_sync->hide(); else option_sync->setChecked(options["sync"] == "true"); connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("atime")) + if (!options.contains("atime")) option_atime->hide(); else option_atime->setChecked(options["atime"] == "true"); connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("flush")) + if (!options.contains("flush")) option_flush->hide(); else option_flush->setChecked(options["flush"] == "true"); connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("utf8")) + if (!options.contains("utf8")) option_utf8->hide(); else option_utf8->setChecked(options["utf8"] == "true"); connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("uid")) + if (!options.contains("uid")) option_uid->hide(); else option_uid->setChecked(options["uid"] == "true"); connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("shortname")) + if (!options.contains("shortname")) { option_shortname->hide(); text_shortname->hide(); @@ -118,7 +118,7 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) connect( option_shortname, TQT_SIGNAL( activated(int) ), TQT_SIGNAL( changed() ) ); } - if (!options.tqcontains("journaling")) + if (!options.contains("journaling")) { text_journaling->hide(); option_journaling->hide(); @@ -140,11 +140,11 @@ PropertiesPage::PropertiesPage(TQWidget* parent, const TQString &_id) option_automount->setChecked(options["automount"] == "true"); connect( option_automount, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.tqcontains("journaling") && - !options.tqcontains("shortname") && - !options.tqcontains("uid") && - !options.tqcontains("utf8") && - !options.tqcontains("flush")) + if (!options.contains("journaling") && + !options.contains("shortname") && + !options.contains("uid") && + !options.contains("utf8") && + !options.contains("flush")) groupbox_specific->hide(); } else { @@ -163,31 +163,31 @@ bool PropertiesPage::save() { TQStringList result; - if (options.tqcontains("ro")) + if (options.contains("ro")) result << TQString("ro=%1").arg(option_ro->isChecked() ? "true" : "false"); - if (options.tqcontains("quiet")) + if (options.contains("quiet")) result << TQString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false"); - if (options.tqcontains("sync")) + if (options.contains("sync")) result << TQString("sync=%1").arg(option_sync->isChecked() ? "true" : "false"); - if (options.tqcontains("atime")) + if (options.contains("atime")) result << TQString("atime=%1").arg(option_atime->isChecked() ? "true" : "false"); - if (options.tqcontains("flush")) + if (options.contains("flush")) result << TQString("flush=%1").arg(option_flush->isChecked() ? "true" : "false"); - if (options.tqcontains("utf8")) + if (options.contains("utf8")) result << TQString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false"); - if (options.tqcontains("uid")) + if (options.contains("uid")) result << TQString("uid=%1").arg(option_uid->isChecked() ? "true" : "false"); - if (options.tqcontains("shortname")) + if (options.contains("shortname")) result << TQString("shortname=%1").arg(short_names[option_shortname->currentItem()]); - if (options.tqcontains("journaling")) + if (options.contains("journaling")) result << TQString("journaling=%1").arg(journales[option_journaling->currentItem()]); TQString mp = option_mountpoint->text(); diff --git a/kioslave/nfs/kio_nfs.cpp b/kioslave/nfs/kio_nfs.cpp index 1869b4243..ad19f70a7 100644 --- a/kioslave/nfs/kio_nfs.cpp +++ b/kioslave/nfs/kio_nfs.cpp @@ -175,7 +175,7 @@ static void stripTrailingSlash(TQString& path) static void getLastPart(const TQString& path, TQString& lastPart, TQString& rest) { - int slashPos=path.tqfindRev("/"); + int slashPos=path.findRev("/"); lastPart=path.mid(slashPos+1); rest=path.left(slashPos+1); } @@ -185,7 +185,7 @@ static TQString removeFirstPart(const TQString& path) TQString result(""); if (path.isEmpty()) return result; result=path.mid(1); - int slashPos=result.tqfind("/"); + int slashPos=result.find("/"); return result.mid(slashPos+1); } @@ -293,7 +293,7 @@ void NFSProtocol::closeConnection() bool NFSProtocol::isExportedDir(const TQString& path) { - return (m_exportedDirs.tqfind(path.mid(1))!=m_exportedDirs.end()); + return (m_exportedDirs.find(path.mid(1))!=m_exportedDirs.end()); } /* This one works recursive. @@ -321,7 +321,7 @@ NFSFileHandle NFSProtocol::getFileHandle(TQString path) } //check wether we have this filehandle cached //the filehandles of the exported root dirs are always in the cache - if (m_handleCache.tqfind(path)!=m_handleCache.end()) + if (m_handleCache.find(path)!=m_handleCache.end()) { kdDebug(7121)<<"path is in the cache, returning the FH -"<<m_handleCache[path]<<"-"<<endl; return m_handleCache[path]; @@ -800,7 +800,7 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString& atom.m_uds = KIO::UDS_USER; uid_t uid = buff.st_uid; - TQString *temp = m_usercache.tqfind( uid ); + TQString *temp = m_usercache.find( uid ); if ( !temp ) { @@ -819,7 +819,7 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString& atom.m_uds = KIO::UDS_GROUP; gid_t gid = buff.st_gid; - temp = m_groupcache.tqfind( gid ); + temp = m_groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); @@ -893,7 +893,7 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes) atom.m_uds = KIO::UDS_USER; uid_t uid = attributes.uid; - TQString *temp = m_usercache.tqfind( uid ); + TQString *temp = m_usercache.find( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); @@ -911,7 +911,7 @@ void NFSProtocol::completeUDSEntry(UDSEntry& entry, fattr& attributes) atom.m_uds = KIO::UDS_GROUP; gid_t gid = attributes.gid; - temp = m_groupcache.tqfind( gid ); + temp = m_groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); @@ -1125,7 +1125,7 @@ void NFSProtocol::del( const KURL& url, bool isfile) (xdrproc_t) xdr_nfsstat, (char*)&nfsStat,total_timeout); if (!checkForError(clnt_stat,nfsStat,thePath)) return; kdDebug(7121)<<"removing "<<thePath<<" from cache"<<endl; - m_handleCache.remove(m_handleCache.tqfind(thePath)); + m_handleCache.remove(m_handleCache.find(thePath)); finished(); } else @@ -1143,7 +1143,7 @@ void NFSProtocol::del( const KURL& url, bool isfile) (xdrproc_t) xdr_nfsstat, (char*)&nfsStat,total_timeout); if (!checkForError(clnt_stat,nfsStat,thePath)) return; kdDebug(7121)<<"removing "<<thePath<<" from cache"<<endl; - m_handleCache.remove(m_handleCache.tqfind(thePath)); + m_handleCache.remove(m_handleCache.find(thePath)); finished(); } } @@ -1600,7 +1600,7 @@ bool NFSProtocol::isValidLink(const TQString& parentDir, const TQString& linkDes kdDebug(7121)<<"removed first part "<<absDest<<endl; absDest=TQDir::cleanDirPath(absDest); kdDebug(7121)<<"simplified to "<<absDest<<endl; - if (absDest.tqfind("../")==0) + if (absDest.find("../")==0) return FALSE; kdDebug(7121)<<"is inside the nfs tree"<<endl; diff --git a/kioslave/nntp/nntp.cpp b/kioslave/nntp/nntp.cpp index aa6425c23..b109bb58a 100644 --- a/kioslave/nntp/nntp.cpp +++ b/kioslave/nntp/nntp.cpp @@ -111,11 +111,11 @@ void NNTPProtocol::get(const KURL& url) { return; } - pos = path.tqfind('<'); + pos = path.find('<'); group = path.left(pos); msg_id = KURL::decode_string( path.right(path.length()-pos) ); if (group.left(1) == "/") group.remove(0,1); - if ((pos = group.tqfind('/')) > 0) group = group.left(pos); + if ((pos = group.find('/')) > 0) group = group.left(pos); DBG << "get group: " << group << " msg: " << msg_id << endl; if ( !nntp_open() ) @@ -228,7 +228,7 @@ bool NNTPProtocol::post_article() { pos += 2; } last_chunk_had_line_ending = (data.right(2) == "\r\n"); - while ((pos = data.tqfind("\r\n.",pos)) > 0) { + while ((pos = data.find("\r\n.",pos)) > 0) { data.insert(pos+2,'.'); pos += 4; } @@ -280,7 +280,7 @@ void NNTPProtocol::stat( const KURL& url ) { // /group = message list } else if (regGroup.search(path) == 0) { if (path.left(1) == "/") path.remove(0,1); - if ((pos = path.tqfind('/')) > 0) group = path.left(pos); + if ((pos = path.find('/')) > 0) group = path.left(pos); else group = path; DBG << "stat group: " << group << endl; // postingAllowed should be ored here with "group not moderated" flag @@ -289,11 +289,11 @@ void NNTPProtocol::stat( const KURL& url ) { // /group/<msg_id> = message } else if (regMsgId.search(path) == 0) { - pos = path.tqfind('<'); + pos = path.find('<'); group = path.left(pos); msg_id = KURL::decode_string( path.right(path.length()-pos) ); if (group.left(1) == "/") group.remove(0,1); - if ((pos = group.tqfind('/')) > 0) group = group.left(pos); + if ((pos = group.find('/')) > 0) group = group.left(pos); DBG << "stat group: " << group << " msg: " << msg_id << endl; fillUDSEntry(entry, msg_id, 0, false, true); @@ -332,7 +332,7 @@ void NNTPProtocol::listDir( const KURL& url ) { TQString group; if (path.left(1) == "/") path.remove(0,1); - if ((pos = path.tqfind('/')) > 0) + if ((pos = path.find('/')) > 0) group = path.left(pos); else group = path; @@ -383,15 +383,15 @@ void NNTPProtocol::fetchGroups( const TQString &since ) DBG << " fetchGroups -- data: " << line.stripWhiteSpace() << endl; // group name - if ((pos = line.tqfind(' ')) > 0) { + if ((pos = line.find(' ')) > 0) { group = line.left(pos); // number of messages line.remove(0,pos+1); long last = 0; - if (((pos = line.tqfind(' ')) > 0 || (pos = line.tqfind('\t')) > 0) && - ((pos2 = line.tqfind(' ',pos+1)) > 0 || (pos2 = line.tqfind('\t',pos+1)) > 0)) { + if (((pos = line.find(' ')) > 0 || (pos = line.find('\t')) > 0) && + ((pos2 = line.find(' ',pos+1)) > 0 || (pos2 = line.find('\t',pos+1)) > 0)) { last = line.left(pos).toLong(); long first = line.mid(pos+1,pos2-pos-1).toLong(); msg_cnt = abs(last-first+1); @@ -441,8 +441,8 @@ bool NNTPProtocol::fetchGroup( TQString &group, unsigned long first ) { int pos, pos2; unsigned long firstSerNum; resp_line = readBuffer; - if (((pos = resp_line.tqfind(' ',4)) > 0 || (pos = resp_line.tqfind('\t',4)) > 0) && - ((pos2 = resp_line.tqfind(' ',pos+1)) > 0 || (pos = resp_line.tqfind('\t',pos+1)) > 0)) + if (((pos = resp_line.find(' ',4)) > 0 || (pos = resp_line.find('\t',4)) > 0) && + ((pos2 = resp_line.find(' ',pos+1)) > 0 || (pos = resp_line.find('\t',pos+1)) > 0)) { firstSerNum = resp_line.mid(pos+1,pos2-pos-1).toLong(); } else { @@ -481,7 +481,7 @@ bool NNTPProtocol::fetchGroupRFC977( unsigned long first ) //STAT res_line: 223 nnn <msg_id> ... TQString msg_id; int pos, pos2; - if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',pos+1))) { + if ((pos = resp_line.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { msg_id = resp_line.mid(pos,pos2-pos+1); fillUDSEntry(entry, msg_id, 0, false, true); entryList.append(entry); @@ -506,7 +506,7 @@ bool NNTPProtocol::fetchGroupRFC977( unsigned long first ) //res_line: 223 nnn <msg_id> ... resp_line = readBuffer; - if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',pos+1))) { + if ((pos = resp_line.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { msg_id = resp_line.mid(pos,pos2-pos+1); fillUDSEntry(entry, msg_id, 0, false, true); entryList.append(entry); @@ -589,7 +589,7 @@ bool NNTPProtocol::fetchGroupXOVER( unsigned long first, bool ¬Supported ) TQStringList::ConstIterator it2 = fields.constBegin(); ++it2; // first entry is the serial number for ( ; it != headers.constEnd() && it2 != fields.constEnd(); ++it, ++it2 ) { - if ( (*it).tqcontains( "Message-ID:", false ) ) { + if ( (*it).contains( "Message-ID:", false ) ) { msgId = (*it2); continue; } diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc index 84744eb33..8782fb80b 100644 --- a/kioslave/pop3/pop3.cc +++ b/kioslave/pop3/pop3.cc @@ -537,7 +537,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai ) challenge.resize( 2049 ); resp = command( firstCommand.latin1(), challenge.data(), 2049 ); while( resp == Cont ) { - challenge.resize(challenge.tqfind(0)); + challenge.resize(challenge.find(0)); // POP3_DEBUG << "S: " << TQCString(challenge.data(),challenge.size()+1) << endl; KCodecs::base64Decode( challenge, tmp ); do { @@ -704,7 +704,7 @@ bool POP3Protocol::pop3_open() TQRegExp re("<[A-Za-z0-9\\.\\-_]+@[A-Za-z0-9\\.\\-_]+>$", false); POP3_DEBUG << "greeting: " << greeting << endl; - int apop_pos = greeting.tqfind(re); + int apop_pos = greeting.find(re); supports_apop = (bool) (apop_pos != -1); if (metaData("nologin") == "on") @@ -794,7 +794,7 @@ size_t POP3Protocol::realGetSize(unsigned int msg_num) return 0; } else { cmd = buf; - cmd.remove(0, cmd.tqfind(" ")); + cmd.remove(0, cmd.find(" ")); ret = cmd.toLong(); } delete[]buf; @@ -821,7 +821,7 @@ void POP3Protocol::special(const TQByteArray & aData) if (qstrcmp(buf, ".\r\n") == 0) break; result += " " + TQString(buf).left(strlen(buf) - 2) - .tqreplace(" ", "-"); + .replace(" ", "-"); } } if (supports_apop) @@ -866,15 +866,15 @@ void POP3Protocol::get(const KURL & url) return; } - if (((path.tqfind('/') == -1) && (path != "index") && (path != "uidl") + if (((path.find('/') == -1) && (path != "index") && (path != "uidl") && (path != "commit"))) { error(ERR_MALFORMED_URL, url.url()); m_cmd = CMD_NONE; return; } - cmd = path.left(path.tqfind('/')); - path.remove(0, path.tqfind('/') + 1); + cmd = path.left(path.find('/')); + path.remove(0, path.find('/') + 1); if (!pop3_open()) { POP3_DEBUG << "pop3_open failed" << endl; @@ -949,13 +949,13 @@ void POP3Protocol::get(const KURL & url) if ( command(list_cmd.ascii(), buf, sizeof(buf) - 1) == Ok ) { list_cmd = buf; // We need a space, otherwise we got an invalid reply - if (!list_cmd.tqfind(" ")) { + if (!list_cmd.find(" ")) { POP3_DEBUG << "List command needs a space? " << list_cmd << endl; closeConnection(); error(ERR_INTERNAL, i18n("Unexpected response from POP3 server.")); return; } - list_cmd.remove(0, list_cmd.tqfind(" ") + 1); + list_cmd.remove(0, list_cmd.find(" ") + 1); msg_len = list_cmd.toUInt(&ok); if (!ok) { POP3_DEBUG << "LIST command needs to return a number? :" << @@ -1134,13 +1134,13 @@ void POP3Protocol::listDir(const KURL &) } POP3_DEBUG << "The stat buf is :" << buf << ":" << endl; q_buf = buf; - if (q_buf.tqfind(" ") == -1) { + if (q_buf.find(" ") == -1) { error(ERR_INTERNAL, "Invalid POP3 response, we should have at least one space!"); closeConnection(); return; } - q_buf.remove(q_buf.tqfind(" "), q_buf.length()); + q_buf.remove(q_buf.find(" "), q_buf.length()); num_messages = q_buf.toUInt(&isINT); if (!isINT) { diff --git a/kioslave/remote/kdedmodule/remotedirnotify.cpp b/kioslave/remote/kdedmodule/remotedirnotify.cpp index f87c6bb96..e6e2359a6 100644 --- a/kioslave/remote/kdedmodule/remotedirnotify.cpp +++ b/kioslave/remote/kdedmodule/remotedirnotify.cpp @@ -105,7 +105,7 @@ inline void evil_hack(const KURL::List &list) { KURL url = (*it).upURL(); - if (!notified.tqcontains(url)) + if (!notified.contains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp index 68325fbb7..646a99d30 100644 --- a/kioslave/remote/kio_remote.cpp +++ b/kioslave/remote/kio_remote.cpp @@ -76,7 +76,7 @@ void RemoteProtocol::listDir(const KURL &url) return; } - int second_slash_idx = url.path().tqfind( '/', 1 ); + int second_slash_idx = url.path().find( '/', 1 ); TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); KURL target = m_impl.findBaseURL( root_dirname ); @@ -151,7 +151,7 @@ void RemoteProtocol::stat(const KURL &url) return; } - int second_slash_idx = url.path().tqfind( '/', 1 ); + int second_slash_idx = url.path().find( '/', 1 ); TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); if ( second_slash_idx==-1 || ( (int)url.path().length() )==second_slash_idx+1 ) diff --git a/kioslave/remote/remoteimpl.cpp b/kioslave/remote/remoteimpl.cpp index ed117d03f..47e41b821 100644 --- a/kioslave/remote/remoteimpl.cpp +++ b/kioslave/remote/remoteimpl.cpp @@ -74,7 +74,7 @@ void RemoteImpl::listRoot(TQValueList<KIO::UDSEntry> &list) const for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { entry.clear(); createEntry(entry, *dirpath, *name); diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp index 6dfdb2419..ac425212d 100644 --- a/kioslave/sftp/ksshprocess.cpp +++ b/kioslave/sftp/ksshprocess.cpp @@ -266,7 +266,7 @@ KSshProcess::SshVersion KSshProcess::version() { mVersion = UNKNOWN_VER; for(int i = 0; i < SSH_VER_MAX; i++) { - if( ver.tqfind(versionStrs[i]) != -1 ) { + if( ver.find(versionStrs[i]) != -1 ) { mVersion = (SshVersion)i; break; } @@ -380,8 +380,8 @@ bool KSshProcess::setOptions(const SshOptList& opts) { // since KSshProcess depends on specific setting of these for // preforming authentication correctly. tmp = (*it).str.latin1(); - if( tmp.tqcontains("NumberOfPasswordPrompts") || - tmp.tqcontains("StrictHostKeyChecking") ) { + if( tmp.contains("NumberOfPasswordPrompts") || + tmp.contains("StrictHostKeyChecking") ) { mError = ERR_INVALID_OPT; return false; } @@ -776,26 +776,26 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( line.tqfind(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { + else if( line.find(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { mConnectState = STATE_TRY_PASSWD; } - else if( line.tqfind(passphrasePrompt[mVersion]) != -1 ) { + else if( line.find(passphrasePrompt[mVersion]) != -1 ) { mConnectState = STATE_TRY_PASSPHRASE; } - else if( line.tqfind(authSuccessMsg[mVersion]) != -1 ) { + else if( line.find(authSuccessMsg[mVersion]) != -1 ) { return true; } - else if( line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1 ) { + else if( line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1 ) { mConnectState = STATE_AUTH_FAILED; } - else if( line.tqfind(hostKeyMissingMsg[mVersion]) != -1 ) { + else if( line.find(hostKeyMissingMsg[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; } - else if( line.tqfind(hostKeyChangedMsg[mVersion]) != -1 ) { + else if( line.find(hostKeyChangedMsg[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { //mConnectState = STATE_SEND_CONTINUE; kdDebug(KSSHPROC) << "KSshProcess:connect(): " "Got continue prompt where we shouldn't (STATE_WAIT_PROMPT)" @@ -804,12 +804,12 @@ bool KSshProcess::connect() { mErrorMsg = i18n("Error encountered while talking to ssh."); } - else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.tqfind(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { + else if( line.find(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { // always say yes to this. It always comes after commerical ssh // prints a "continue to connect prompt". We assume that if the // user choose to continue, then they also want to save the @@ -924,9 +924,9 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( (line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1) - || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1) + || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { mError = ERR_AUTH_FAILED_NEW_KEY; mErrorMsg = i18n( "The identity of the remote host '%1' could not be verified " @@ -948,15 +948,15 @@ bool KSshProcess::connect() { mConnectState = STATE_FATAL; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_CONTINUE; } - else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; @@ -996,9 +996,9 @@ bool KSshProcess::connect() { i18n("Error encountered while talking to ssh."); mConnectState = STATE_FATAL; } - else if( (line.tqfind(authFailedMsg[mVersion]) != -1 - && line.tqfind(tryAgainMsg[mVersion]) == -1) - || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.find(authFailedMsg[mVersion]) != -1 + && line.find(tryAgainMsg[mVersion]) == -1) + || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { mError = ERR_AUTH_FAILED_DIFF_KEY; mErrorMsg = i18n( "WARNING: The identity of the remote host '%1' has changed!\n\n" @@ -1011,15 +1011,15 @@ bool KSshProcess::connect() { ).arg(mHost).arg(mKeyFingerprint).arg(mKnownHostsFile); mConnectState = STATE_FATAL; } - else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { + else if( line.find(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_CONTINUE; } - else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.tqfind(knownHostsFileMsg[mVersion]) != -1 ) { + else if( line.find(knownHostsFileMsg[mVersion]) != -1 ) { mKnownHostsFile = (knownHostsFileMsg[mVersion]).cap(1); kdDebug(KSSHPROC) << "Found known hosts file name: " << mKnownHostsFile << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; diff --git a/kioslave/sftp/process.cpp b/kioslave/sftp/process.cpp index b97d5860b..ca99b36bb 100644 --- a/kioslave/sftp/process.cpp +++ b/kioslave/sftp/process.cpp @@ -107,7 +107,7 @@ TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block) if (!inbuf.isEmpty()) { - pos = inbuf.tqfind('\n'); + pos = inbuf.find('\n'); if (pos == -1) { @@ -155,7 +155,7 @@ TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block) buf[nbytes] = '\000'; inbuf += buf; - pos = inbuf.tqfind('\n'); + pos = inbuf.find('\n'); if (pos == -1) { ret = inbuf; @@ -260,7 +260,7 @@ int MyPtyProcess::exec(TQCString command, QCStringList args) // From now on, terminal output goes through the tty. TQCString path; - if (command.tqcontains('/')) + if (command.contains('/')) path = command; else { diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp index 12b8a1366..1d2ff05e4 100644 --- a/kioslave/smb/kio_smb_auth.cpp +++ b/kioslave/smb/kio_smb_auth.cpp @@ -118,7 +118,7 @@ bool SMBSlave::checkPassword(SMBUrl &url) info.url.setHost(url.host()); TQString share = url.path(); - int index = share.tqfind('/', 1); + int index = share.find('/', 1); if (index > 1) share = share.left(index); if (share.tqat(0) == '/') diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp index 81f08a94a..d8ac6d60d 100644 --- a/kioslave/smb/kio_smb_browse.cpp +++ b/kioslave/smb/kio_smb_browse.cpp @@ -208,13 +208,13 @@ KURL SMBSlave::checkURL(const KURL& kurl) const // smb:/ normaly have no userinfo // we must redirect ourself to remove the username and password - if (surl.tqcontains('@') && !surl.tqcontains("smb://")) { + if (surl.contains('@') && !surl.contains("smb://")) { KURL url(kurl); - url.setPath("/"+kurl.url().right( kurl.url().length()-kurl.url().tqfind('@') -1)); - TQString userinfo = kurl.url().mid(5, kurl.url().tqfind('@')-5); - if(userinfo.tqcontains(':')) { - url.setUser(userinfo.left(userinfo.tqfind(':'))); - url.setPass(userinfo.right(userinfo.length()-userinfo.tqfind(':')-1)); + url.setPath("/"+kurl.url().right( kurl.url().length()-kurl.url().find('@') -1)); + TQString userinfo = kurl.url().mid(5, kurl.url().find('@')-5); + if(userinfo.contains(':')) { + url.setUser(userinfo.left(userinfo.find(':'))); + url.setPass(userinfo.right(userinfo.length()-userinfo.find(':')-1)); } else { url.setUser(userinfo); } diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp index 97fcd3d0d..a3177b5c6 100644 --- a/kioslave/smb/kio_smb_mount.cpp +++ b/kioslave/smb/kio_smb_mount.cpp @@ -59,7 +59,7 @@ void SMBSlave::special( const TQByteArray & data) kdDebug(KIO_SMB)<<"special() host -"<< host <<"- share -" << share <<"-"<<endl; } - remotePath.tqreplace('\\', '/'); // smbmounterplugin sends \\host/share + remotePath.replace('\\', '/'); // smbmounterplugin sends \\host/share kdDebug(KIO_SMB) << "mounting: " << remotePath.local8Bit() << " to " << mountPoint.local8Bit() << endl; diff --git a/kioslave/smtp/capabilities.h b/kioslave/smtp/capabilities.h index e859f4055..919633d64 100644 --- a/kioslave/smtp/capabilities.h +++ b/kioslave/smtp/capabilities.h @@ -54,7 +54,7 @@ namespace KioSMTP { void clear() { mCapabilities.clear(); } bool have( const TQString & cap ) const { - return mCapabilities.tqfind( cap.upper() ) != mCapabilities.end(); + return mCapabilities.find( cap.upper() ) != mCapabilities.end(); } bool have( const TQCString & cap ) const { return have( TQString( cap.data() ) ); } bool have( const char * cap ) const { return have( TQString::tqfromLatin1( cap ) ); } diff --git a/kioslave/smtp/interactivesmtpserver.h b/kioslave/smtp/interactivesmtpserver.h index 556b3cb3d..39a07f6a9 100644 --- a/kioslave/smtp/interactivesmtpserver.h +++ b/kioslave/smtp/interactivesmtpserver.h @@ -49,10 +49,10 @@ static TQString err2str( int err ) { static TQString escape( TQString s ) { return s - .tqreplace( '&', "&" ) - .tqreplace( '>', ">" ) - .tqreplace( '<', "<" ) - .tqreplace( '"', """ ) + .replace( '&', "&" ) + .replace( '>', ">" ) + .replace( '<', "<" ) + .replace( '"', """ ) ; } diff --git a/kioslave/smtp/request.cc b/kioslave/smtp/request.cc index 22042769b..05f8bdc99 100644 --- a/kioslave/smtp/request.cc +++ b/kioslave/smtp/request.cc @@ -50,7 +50,7 @@ namespace KioSMTP { kdDebug(7112) << "Parsing request from query:\n" + query.join("\n" ) << endl; #endif for ( TQStringList::const_iterator it = query.begin() ; it != query.end() ; ++it ) { - int equalsPos = (*it).tqfind( '=' ); + int equalsPos = (*it).find( '=' ); if ( equalsPos <= 0 ) continue; @@ -101,7 +101,7 @@ namespace KioSMTP { static inline bool isSpecial( char ch ) { static const TQCString specials = "()<>[]:;@\\,.\""; - return specials.tqfind( ch ) >= 0; + return specials.find( ch ) >= 0; } diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc index 883ee3ebb..e493f5132 100644 --- a/kioslave/smtp/smtp.cc +++ b/kioslave/smtp/smtp.cc @@ -200,7 +200,7 @@ void SMTPProtocol::put(const KURL & url, int /*permissions */ , KURL open_url = url; if ( !request.hasProfile() ) { //kdDebug(7112) << "kio_smtp: Profile is null" << endl; - bool hasProfile = mset.profiles().tqcontains( open_url.host() ); + bool hasProfile = mset.profiles().contains( open_url.host() ); if ( hasProfile ) { mset.setProfile(open_url.host()); open_url.setHost(mset.getSetting(KEMailSettings::OutServer)); diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc index fd3adb949..23d7723ee 100644 --- a/kioslave/smtp/test_commands.cc +++ b/kioslave/smtp/test_commands.cc @@ -55,7 +55,7 @@ public: } bool usingSSL() const { return usesSSL; } bool usingTLS() const { return usesTLS; } - bool haveCapability( const char * cap ) const { return caps.tqcontains( cap ); } + bool haveCapability( const char * cap ) const { return caps.contains( cap ); } void error( int id, const TQString & msg ) { lastErrorCode = id; lastErrorMessage = msg; diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp index 70d9057a6..162d96621 100644 --- a/kioslave/system/kdedmodule/systemdirnotify.cpp +++ b/kioslave/system/kdedmodule/systemdirnotify.cpp @@ -59,7 +59,7 @@ void SystemDirNotify::init() for(; name!=endf; ++name) { - if (!names_found.tqcontains(*name)) + if (!names_found.contains(*name)) { KDesktopFile desktop(*dirpath+*name, true); diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp index 4dc5e3008..43792f8de 100644 --- a/kioslave/system/systemimpl.cpp +++ b/kioslave/system/systemimpl.cpp @@ -62,7 +62,7 @@ bool SystemImpl::listRoot(TQValueList<KIO::UDSEntry> &list) for(; filename!=endf; ++filename) { - if (!names_found.tqcontains(*filename)) + if (!names_found.contains(*filename)) { entry.clear(); createEntry(entry, *dirpath, *filename); @@ -82,7 +82,7 @@ bool SystemImpl::parseURL(const KURL &url, TQString &name, TQString &path) const { TQString url_path = url.path(); - int i = url_path.tqfind('/', 1); + int i = url_path.find('/', 1); if (i > 0) { name = url_path.mid(1, i-1); diff --git a/kioslave/tar/tar.cc b/kioslave/tar/tar.cc index b55fd317e..2079666a0 100644 --- a/kioslave/tar/tar.cc +++ b/kioslave/tar/tar.cc @@ -103,7 +103,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro kdDebug(7109) << "the full path is " << fullPath << endl; KDE_struct_stat statbuf; statbuf.st_mode = 0; // be sure to clear the directory bit - 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; diff --git a/kioslave/thumbnail/textcreator.cpp b/kioslave/thumbnail/textcreator.cpp index d2960fa7e..749dd4816 100644 --- a/kioslave/thumbnail/textcreator.cpp +++ b/kioslave/thumbnail/textcreator.cpp @@ -148,7 +148,7 @@ bool TextCreator::create(const TQString &path, int width, int height, TQImage &i // physical newline in the file if we don't come from one if ( !newLine ) { - int pos = text.tqfind( '\n', i ); + int pos = text.find( '\n', i ); if ( pos == -1 ) break; i = pos + 1; diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp index 55ac3c80b..1560a1431 100644 --- a/kioslave/thumbnail/thumbnail.cpp +++ b/kioslave/thumbnail/thumbnail.cpp @@ -417,7 +417,7 @@ void ThumbnailProtocol::get(const KURL &url) const TQImage& ThumbnailProtocol::getIcon() { - TQImage* icon = m_iconDict.tqfind(m_mimeType); + TQImage* icon = m_iconDict.find(m_mimeType); if ( !icon ) // generate it! { icon = new TQImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() ); diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp index 4f85ba50c..0c9710367 100644 --- a/kioslave/trash/ktrash.cpp +++ b/kioslave/trash/ktrash.cpp @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) TQCString restoreArg = args->getOption( "restore" ); if ( !restoreArg.isEmpty() ) { - if (restoreArg.tqfind("system:/trash")==0) { + if (restoreArg.find("system:/trash")==0) { restoreArg.remove(0, 13); restoreArg.prepend("trash:"); } diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp index c847d9302..fb6927d3e 100644 --- a/kioslave/trash/testtrash.cpp +++ b/kioslave/trash/testtrash.cpp @@ -152,10 +152,10 @@ void TestTrash::setup() for ( TrashImpl::TrashDirMap::ConstIterator it = trashDirs.begin(); it != trashDirs.end() ; ++it ) { if ( it.key() == 0 ) { assert( it.data() == m_trashDir ); - assert( topDirs.tqfind( 0 ) == topDirs.end() ); + assert( topDirs.find( 0 ) == topDirs.end() ); foundTrashDir = true; } else { - assert( topDirs.tqfind( it.key() ) != topDirs.end() ); + assert( topDirs.find( it.key() ) != topDirs.end() ); const TQString topdir = topDirs[it.key()]; if ( TQFileInfo( topdir ).isWritable() ) { writableTopDirs.append( it.key() ); @@ -383,7 +383,7 @@ static void checkInfoFile( const TQString& infoPath, const TQString& origFilePat assert( origPath == KURL::encode_string( origFilePath, KGlobal::locale()->fileEncodingMib() ) ); const TQString date = infoFile.readEntry( "DeletionDate" ); assert( !date.isEmpty() ); - assert( date.tqcontains( "T" ) ); + assert( date.contains( "T" ) ); } static void createTestFile( const TQString& path ) @@ -1104,7 +1104,7 @@ void TestTrash::listRootDir() assert( m_entryCount > 1 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once } void TestTrash::listRecursiveRootDir() @@ -1121,7 +1121,7 @@ void TestTrash::listRecursiveRootDir() assert( m_entryCount > 1 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once } void TestTrash::listSubDir() @@ -1138,8 +1138,8 @@ void TestTrash::listSubDir() assert( m_entryCount == 2 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once - assert( m_listResult.tqcontains( "testfile" ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once } void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp index 80343c98a..8718dfe5f 100644 --- a/kioslave/trash/trashimpl.cpp +++ b/kioslave/trash/trashimpl.cpp @@ -898,7 +898,7 @@ TQString TrashImpl::trashDirectoryPath( int trashId ) const // and reusing a directory listing from the earlier instance.) if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); - Q_ASSERT( m_trashDirectories.tqcontains( trashId ) ); + Q_ASSERT( m_trashDirectories.contains( trashId ) ); return m_trashDirectories[trashId]; } @@ -907,7 +907,7 @@ TQString TrashImpl::topDirectoryPath( int trashId ) const if ( !m_trashDirectoriesScanned ) scanTrashDirectories(); assert( trashId != 0 ); - Q_ASSERT( m_topDirectories.tqcontains( trashId ) ); + Q_ASSERT( m_topDirectories.contains( trashId ) ); return m_topDirectories[trashId]; } @@ -939,7 +939,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr int start = 0; if ( path[0] == '/' ) // always true I hope start = 1; - int slashPos = path.tqfind( '-', 0 ); // don't match leading slash + int slashPos = path.find( '-', 0 ); // don't match leading slash if ( slashPos <= 0 ) return false; bool ok = false; @@ -948,7 +948,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr if ( !ok ) return false; start = slashPos + 1; - slashPos = path.tqfind( '/', start ); + slashPos = path.find( '/', start ); if ( slashPos <= 0 ) { fileId = path.mid( start ); relativePath = TQString::null; |