diff options
Diffstat (limited to 'kioslave')
84 files changed, 658 insertions, 654 deletions
diff --git a/kioslave/cgi/cgi.cpp b/kioslave/cgi/cgi.cpp index 5f57c3fe8..7af02aa58 100644 --- a/kioslave/cgi/cgi.cpp +++ b/kioslave/cgi/cgi.cpp @@ -71,7 +71,8 @@ static TQCString extractQCString( const TQByteArray &ba, uint start, uint len = if ( ( ba.size() - start ) < len ) realLen = ba.size() - start; - return TQCString( &ba[ start ], realLen + 1 ); +// return TQCString( &ba[ start ], realLen + 1 ); + return TQCString( ba ).mid(start, realLen + 1); } /** @@ -80,7 +81,7 @@ static TQCString extractQCString( const TQByteArray &ba, uint start, uint len = */ static int qByteArrayFindStr( const TQByteArray &ba, const char *str ) { - int strLen = qstrlen( str ); + int strLen = tqstrlen( str ); int searchLen = ba.size() - strLen; for ( int i = 0; i <= searchLen; ++i ) { @@ -116,7 +117,7 @@ void CgiProtocol::get( const KURL& url ) TQString file; - int pos = path.findRev('/'); + int pos = path.tqfindRev('/'); if ( pos >= 0 ) file = path.mid( pos + 1 ); else file = path; @@ -189,8 +190,8 @@ void CgiProtocol::get( const KURL& url ) // Access the buffer in-place by using setRawData() output.setRawData( buffer, n ); - int colon = output.find( ':' ); - int newline = output.find( '\n' ); + int colon = output.tqfind( ':' ); + int newline = output.tqfind( '\n' ); int semicolon = qByteArrayFindRev( output, ';', newline ); int end; if ( semicolon < 0 ) end = newline; diff --git a/kioslave/cgi/kcmcgi/kcmcgi.cpp b/kioslave/cgi/kcmcgi/kcmcgi.cpp index 521c0fd95..d1a798aa2 100644 --- a/kioslave/cgi/kcmcgi/kcmcgi.cpp +++ b/kioslave/cgi/kcmcgi/kcmcgi.cpp @@ -48,7 +48,7 @@ KCMCgi::KCMCgi(TQWidget *parent, const char *name) TQVBoxLayout *topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint()); - TQGroupBox *topBox = new TQGroupBox( 1, Horizontal, i18n("Paths to Local CGI Programs"), this ); + TQGroupBox *topBox = new TQGroupBox( 1, Qt::Horizontal, i18n("Paths to Local CGI Programs"), this ); topLayout->addWidget( topBox ); mListBox = new TQListBox( topBox ); diff --git a/kioslave/filter/filter.cc b/kioslave/filter/filter.cc index 8392dd160..5ae1a8867 100644 --- a/kioslave/filter/filter.cc +++ b/kioslave/filter/filter.cc @@ -56,7 +56,7 @@ int kdemain( int argc, char ** argv) FilterProtocol::FilterProtocol( const TQCString & protocol, const TQCString &pool, const TQCString &app ) : KIO::SlaveBase( protocol, pool, app ) { - TQString mimetype = TQString::fromLatin1("application/x-") + TQString::fromLatin1(protocol); + TQString mimetype = TQString::tqfromLatin1("application/x-") + TQString::tqfromLatin1(protocol); filter = KFilterBase::findFilterByMimeType( mimetype ); Q_ASSERT(filter); } @@ -157,7 +157,7 @@ void FilterProtocol::get( const KURL & ) void FilterProtocol::put( const KURL &/*url*/, int, bool /*_overwrite*/, bool /*_resume*/ ) { - error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("put")); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::tqfromLatin1("put")); } void FilterProtocol::setSubURL(const KURL &url) diff --git a/kioslave/finger/kio_finger.cpp b/kioslave/finger/kio_finger.cpp index 8bfc25106..a8ea0b844 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.contains(regExp)) { + if (query.tqcontains(regExp)) { //kdDebug() << "looks like a valid query" << endl; TQRegExp regExp( "([0-9]+)" ); regExp.search(query); @@ -133,7 +133,7 @@ void FingerProtocol::get(const KURL& url ) myKProcess->start(KProcess::Block, KProcess::All); - data(TQCString(myStdStream->local8Bit())); + data(TQCString(TQString(*myStdStream).local8Bit())); data(TQByteArray()); finished(); diff --git a/kioslave/fish/fish.cpp b/kioslave/fish/fish.cpp index 77533964c..7290d13c6 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.find('\n')) >= 0 || + while (childPid && ((pos = buf.tqfind('\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.replace(pos,0,TQString("\\")); + arg.tqreplace(pos,0,TQString("\\")); } //myDebug( << "arg " << i << ": " << arg << endl); realCmd.append(" ").append(arg); - realAlt.replace(TQRegExp("%"+TQString::number(i+1)),arg); + realAlt.tqreplace(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.find(':'); + int pos = timeyearStr.tqfind(':'); 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.contains(" append "); + hasAppend = line.tqcontains(" 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.find('.',12); + pos = line.tqfind('.',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.find(' '); - pos2 = line.find(' ',pos+1); + pos = line.tqfind(' '); + pos2 = line.tqfind(' ',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.find(' '); - pos2 = line.find(' ',pos+1); - pos3 = line.find(' ',pos2+1); + pos = line.tqfind(' '); + pos2 = line.tqfind(' ',pos+1); + pos3 = line.tqfind(' ',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.find(' ',pos+1); - pos3 = line.find(' ',pos2+1); + pos2 = line.tqfind(' ',pos+1); + pos3 = line.tqfind(' ',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.findRev('/'); + pos = line.tqfindRev('/'); 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.find('.') < 0 || (line.left(8) != "Mtext/x-" + (thisFn.tqfind('.') < 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().find('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\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().find('\n')) << endl); + //myDebug( << "Writing: " << qlist.first().mid(0,qlist.first().tqfind('\n')) << endl); myDebug( << "Writing: " << qlist.first() << endl); myDebug( << "---------" << endl); writeChild((const char *)qlist.first().latin1(),qlist.first().length()); @@ -1236,7 +1236,7 @@ int fishProtocol::received(const char *buffer, KIO::fileoffset_t buflen) int dataSize = (rawRead > buflen?buflen:rawRead); if (!mimeTypeSent) { - int mimeSize = QMIN(dataSize, (int)mimeBuffer.size()-dataRead); + int mimeSize = TQMIN(dataSize, (int)mimeBuffer.size()-dataRead); memcpy(mimeBuffer.data()+dataRead,buffer,mimeSize); dataRead += mimeSize; rawRead -= mimeSize; @@ -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().find("\n")-1))+"..."); + //if (fishCommand != FISH_APPEND && fishCommand != FISH_WRITE) infoMessage("Sending "+(commandList.first().mid(1,commandList.first().tqfind("\n")-1))+"..."); commandList.remove(commandList.begin()); commandCodes.remove(commandCodes.begin()); } else { @@ -1436,7 +1436,7 @@ void fishProtocol::run() { if (rc > 0) { int noff = received(buf,rc+offset); if (noff > 0) memmove(buf,buf+offset+rc-noff,noff); - //myDebug( << "left " << noff << " bytes: " << TQString::fromLatin1(buf,offset) << endl); + //myDebug( << "left " << noff << " bytes: " << TQString::tqfromLatin1(buf,offset) << endl); offset = noff; } else { if (errno == EINTR) diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp index a0c68a9d2..bd24aca0c 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.find("resource busy") > -1) + if (line.tqfind("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.find("Disk full") > -1) || (line.find("No free cluster") > -1)) + else if ((line.tqfind("Disk full") > -1) || (line.tqfind("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.find("not found") > -1) + else if (line.tqfind("not found") > -1) { error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); } //no disk - else if (line.find("not configured") > -1) + else if (line.tqfind("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.find("No such device") > -1) + else if (line.tqfind("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.find("not supported") > -1) + else if (line.tqfind("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.find("Permission denied") > -1) + else if (line.tqfind("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.find("non DOS media") > -1) + else if (line.tqfind("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.find("Read-only") > -1) + else if (line.tqfind("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.find("already exists") > -1) || (outputString.find("Skipping ") > -1)) + else if ((outputString.tqfind("already exists") > -1) || (outputString.tqfind("Skipping ") > -1)) { error( KIO::ERR_FILE_ALREADY_EXIST,url.prettyURL()); //return false; } - else if (outputString.find("could not read boot sector") > -1) + else if (outputString.tqfind("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.find(' '); + int nameLength=line.tqfind(' '); 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.find("bytes free")==36) + if (line.tqfind("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 12a692319..6f4f86759 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.find('/', 1); + int i = url_path.tqfind('/', 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.contains( (*it).uid() ) ) + && !uid_list.tqcontains( (*it).uid() ) ) { uid_list.append( (*it).uid() ); KIO::UDSEntry entry; @@ -185,7 +185,7 @@ void HomeImpl::slotStatResult(KIO::Job *job) m_entryBuffer = stat_job->statResult(); } - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url) @@ -195,7 +195,7 @@ KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url) KIO::StatJob *job = KIO::stat(url, false); connect( job, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( slotStatResult(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); KIO::UDSEntry::iterator it = m_entryBuffer.begin(); KIO::UDSEntry::iterator end = m_entryBuffer.end(); diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp index 823027fe2..f2da9fcf7 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.contains( (*it).uid() ) ) + && !uid_list.tqcontains( (*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.contains(url)) + if (!notified.tqcontains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/info/info.cc b/kioslave/info/info.cc index ab35f282b..418600ffa 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.findRev('/'); + int revindex = path.tqfindRev('/'); 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.find( "/" ); + int slashPos = path.tqfind( "/" ); if( slashPos < 0 ) { diff --git a/kioslave/ldap/kio_ldap.cpp b/kioslave/ldap/kio_ldap.cpp index 7abc95509..872950a9b 100644 --- a/kioslave/ldap/kio_ldap.cpp +++ b/kioslave/ldap/kio_ldap.cpp @@ -166,22 +166,22 @@ void LDAPProtocol::controlsFromMetaData( LDAPControl ***serverctrls, { TQString oid; bool critical; TQByteArray value; int i = 0; - while ( hasMetaData( TQString::fromLatin1("SERVER_CTRL%1").arg(i) ) ) { - TQCString val = metaData( TQString::fromLatin1("SERVER_CTRL%1").arg(i) ).utf8(); + while ( hasMetaData( TQString::tqfromLatin1("SERVER_CTRL%1").arg(i) ) ) { + TQCString val = metaData( TQString::tqfromLatin1("SERVER_CTRL%1").arg(i) ).utf8(); LDIF::splitControl( val, oid, critical, value ); kdDebug(7125) << "server ctrl #" << i << " value: " << val << " oid: " << oid << " critical: " << critical << " value: " << - TQString::fromUtf8( value, value.size() ) << endl; + TQString(TQString::fromUtf8( value, value.size() )) << endl; addControlOp( serverctrls, oid, value, critical ); i++; } i = 0; - while ( hasMetaData( TQString::fromLatin1("CLIENT_CTRL%1").arg(i) ) ) { - TQCString val = metaData( TQString::fromLatin1("CLIENT_CTRL%1").arg(i) ).utf8(); + while ( hasMetaData( TQString::tqfromLatin1("CLIENT_CTRL%1").arg(i) ) ) { + TQCString val = metaData( TQString::tqfromLatin1("CLIENT_CTRL%1").arg(i) ).utf8(); LDIF::splitControl( val, oid, critical, value ); kdDebug(7125) << "client ctrl #" << i << " value: " << val << " oid: " << oid << " critical: " << critical << " value: " << - TQString::fromUtf8( value, value.size() ) << endl; + TQString(TQString::fromUtf8( value, value.size() )) << endl; addControlOp( clientctrls, oid, value, critical ); i++; } @@ -285,7 +285,7 @@ void LDAPProtocol::addControlOp( LDAPControl ***pctrls, const TQString &oid, ctrls = *pctrls; kdDebug(7125) << "addControlOp: oid:'" << oid << "' val: '" << - TQString::fromUtf8(value, value.size()) << "'" << endl; + TQString(TQString::fromUtf8(value, value.size())) << "'" << endl; int vallen = value.size(); ctrl->ldctl_value.bv_len = vallen; if ( vallen ) { @@ -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.find(",")) > 0 ) + if ( (pos = name.tqfind(",")) > 0 ) name = name.left( pos ); - if ( (pos = name.find("=")) > 0 ) + if ( (pos = name.tqfind("=")) > 0 ) name.remove( 0, pos+1 ); - name.replace(' ', "_"); + name.tqreplace(' ', "_"); if ( !dir ) name += ".ldif"; atom.m_str = name; entry.append( atom ); @@ -519,7 +519,7 @@ void LDAPProtocol::fillAuthInfo( AuthInfo &info ) info.url.setPort( mPort ); info.url.setUser( mUser ); info.caption = i18n("LDAP Login"); - info.comment = TQString::fromLatin1( mProtocol ) + "://" + mHost + ":" + + info.comment = TQString::tqfromLatin1( mProtocol ) + "://" + mHost + ":" + TQString::number( mPort ); info.commentLabel = i18n("site:"); info.username = mAuthSASL ? mUser : mBindName; diff --git a/kioslave/mac/kio_mac.cpp b/kioslave/mac/kio_mac.cpp index e64d22d65..21b998ad1 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.find("mode="); - int textpos = mime.find("text"); + int modepos = query.tqfind("mode="); + int textpos = mime.tqfind("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.contains("Thread ") == 0) { + if (line.tqcontains("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.replace("\\ ", " "); //get rid of escapes - filename.replace("\\&", "&"); //mm, slashes... - filename.replace("\\!", "!"); - filename.replace("\\(", "("); - filename.replace("\\)", ")"); + filename.tqreplace("\\ ", " "); //get rid of escapes + filename.tqreplace("\\&", "&"); //mm, slashes... + filename.tqreplace("\\!", "!"); + filename.tqreplace("\\(", "("); + filename.tqreplace("\\)", ")"); 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.find("dev="); + int modepos = query.tqfind("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.contains("options") != 0) { + if (standardOutputStream.tqcontains("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.replace(" ", "\\ "); - path.replace("&", "\\&"); - path.replace("!", "\\!"); - path.replace("(", "\\("); - path.replace(")", "\\)"); + path.tqreplace(" ", "\\ "); + path.tqreplace("&", "\\&"); + path.tqreplace("!", "\\!"); + path.tqreplace("(", "\\("); + path.tqreplace(")", "\\)"); //then change to the right directory int s; TQString dir; - s = path.find('/'); + s = path.tqfind('/'); 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.find('/'); + s = path.tqfind('/'); } return path; @@ -455,12 +455,12 @@ int MacProtocol::makeTime(TQString mday, TQString mon, TQString third) { // otherwise it only prints the year TQRegExp hourMin("(..):(..)"); if (hourMin.exactMatch(third)) { - TQDate currentDate(TQDate::currentDate()); + TQDate tqcurrentDate(TQDate::currentDate()); - if (month > currentDate.month()) { - year = currentDate.year() - 1; + if (month > tqcurrentDate.month()) { + year = tqcurrentDate.year() - 1; } else { - year = currentDate.year(); + year = tqcurrentDate.year(); } TQString h(hourMin.cap(1)); TQString m(hourMin.cap(2)); diff --git a/kioslave/man/kio_man.cpp b/kioslave/man/kio_man.cpp index 013a15248..2bce71229 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->find(".gz", -3) != -1 ) + if ( name->tqfind(".gz", -3) != -1 ) pos -= 3; - else if ( name->find(".z", -2, false) != -1 ) + else if ( name->tqfind(".z", -2, false) != -1 ) pos -= 2; - else if ( name->find(".bz2", -4) != -1 ) + else if ( name->tqfind(".bz2", -4) != -1 ) pos -= 4; - else if ( name->find(".bz", -3) != -1 ) + else if ( name->tqfind(".bz", -3) != -1 ) pos -= 3; if ( pos > 0 ) - pos = name->findRev('.', pos-1); + pos = name->tqfindRev('.', 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.find('('); + int pos = url.tqfind('('); 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.find(",")) != -1) + while ((pos = names.tqfind(",")) != -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.find("/var/cache/man")==man_dirs.end()) + if (man_dirs.tqfind("/var/cache/man")==man_dirs.end()) man_dirs << "/var/cache/man"; - if (man_dirs.find("/var/catman")==man_dirs.end()) + if (man_dirs.tqfind("/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.contains(p)) man_dirs += p; + if (!man_dirs.tqcontains(p)) man_dirs += p; } } } // Untranslated pages in "<mandir>" const TQString p = TQDir(*it_dir).canonicalPath(); - if (!man_dirs.contains(p)) man_dirs += p; + if (!man_dirs.tqcontains(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.contains(sect) && _section.isEmpty()) { + if (!sect_list.tqcontains(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.replace('&', "&"); - reply = reply.replace('<', "<"); - reply = reply.replace('>', ">"); - reply = reply.replace('"', "&dquot;"); - reply = reply.replace('\'', """); + reply = reply.tqreplace('&', "&"); + reply = reply.tqreplace('<', "<"); + reply = reply.tqreplace('>', ">"); + reply = reply.tqreplace('"', "&dquot;"); + reply = reply.tqreplace('\'', """); 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.contains("sman", false)) //file_mimetype == "text/html" || ) + if (filename.tqcontains("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.findRev('/')); + lastdir = filename.left(filename.tqfindRev('/')); TQDir mandir(lastdir); - mandir.setNameFilter(filename.mid(filename.findRev('/') + 1) + ".*"); + mandir.setNameFilter(filename.mid(filename.tqfindRev('/') + 1) + ".*"); filename = lastdir + "/" + TQFile::encodeName(mandir.entryList().first()); } kdDebug(7107) << "resolved to " << filename << endl; } - lastdir = filename.left(filename.findRev('/')); + lastdir = filename.left(filename.tqfindRev('/')); 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.find(line, 0) == 0 ) + else if ( section_regex.tqfind(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.findIndex( TQString( manpaths[i] ) ) == -1 ) + if ( constr_path.tqfindIndex( 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.findIndex( mandir ) == -1 ) + if ( constr_path.tqfindIndex( mandir ) == -1 ) constr_path += mandir; } else { // no manpath mapping, use "<path>/man" and "<path>/../man" mandir = dir + TQString( "/man" ); - if ( constr_path.findIndex( mandir ) == -1 ) + if ( constr_path.tqfindIndex( mandir ) == -1 ) constr_path += mandir; - int pos = dir.findRev( '/' ); + int pos = dir.tqfindRev( '/' ); if ( pos > 0 ) { mandir = dir.left( pos ) + TQString("/man"); - if ( constr_path.findIndex( mandir ) == -1 ) + if ( constr_path.tqfindIndex( mandir ) == -1 ) constr_path += mandir; } } TQString catmandir = mandb_map[ mandir ]; if ( !mandir.isEmpty() ) { - if ( constr_catmanpath.findIndex( catmandir ) == -1 ) + if ( constr_catmanpath.tqfindIndex( catmandir ) == -1 ) constr_catmanpath += catmandir; } else { // What is the default mapping? catmandir = mandir; - catmandir.replace("/usr/share/","/var/cache/"); - if ( constr_catmanpath.findIndex( catmandir ) == -1 ) + catmandir.tqreplace("/usr/share/","/var/cache/"); + if ( constr_catmanpath.tqfindIndex( 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.contains( "::" ) ) + || manpath_env.tqcontains( "::" ) ) { 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.findIndex( dir ) == -1 ) { + if ( m_manpath.tqfindIndex( 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.findIndex( dir ) == -1 ) { + if ( m_manpath.tqfindIndex( 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.findIndex( TQString( default_sect[i] ) ) == -1 ) + if ( m_mansect.tqfindIndex( 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.findRev('/'); + pos = fileName.tqfindRev('/'); 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.contains(it.key()) ? indexmap[it.key()] : "" ) + << (indexmap.tqcontains(it.key()) ? indexmap[it.key()] : "" ) << "</td></tr>" << endl; } @@ -1384,12 +1384,12 @@ void MANProtocol::showIndex(const TQString& section) { struct man_index_t *manindex = indexlist[i]; - // qstrncmp(): + // tqstrncmp(): // "last_man" has already a \0 string ending, but // "manindex->manpage_begin" has not, // so do compare at most "manindex->manpage_len" of the strings. if (last_index->manpage_len == manindex->manpage_len && - !qstrncmp(last_index->manpage_begin, + !tqstrncmp(last_index->manpage_begin, manindex->manpage_begin, manindex->manpage_len) ) @@ -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.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "</td></tr>" << endl; last_index = manindex; } @@ -1438,12 +1438,12 @@ void MANProtocol::showIndex(const TQString& section) { struct man_index_t *manindex = mit.current(); - // qstrncmp(): + // tqstrncmp(): // "last_man" has already a \0 string ending, but // "manindex->manpage_begin" has not, // so do compare at most "manindex->manpage_len" of the strings. if (last_index->manpage_len == manindex->manpage_len && - !qstrncmp(last_index->manpage_begin, + !tqstrncmp(last_index->manpage_begin, manindex->manpage_begin, manindex->manpage_len) ) @@ -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.contains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) + << (indexmap.tqcontains(manindex->manpage_begin) ? indexmap[manindex->manpage_begin] : "" ) << "</td></tr>" << endl; last_index = manindex; } diff --git a/kioslave/man/kmanpart.cpp b/kioslave/man/kmanpart.cpp index b52085596..e48754a55 100644 --- a/kioslave/man/kmanpart.cpp +++ b/kioslave/man/kmanpart.cpp @@ -50,10 +50,10 @@ KManPartFactory::~KManPartFactory() delete s_about; } -KParts::Part* KManPartFactory::createPartObject( TQWidget * parentWidget, const char* /*widgetName*/, TQObject *, +KParts::Part* KManPartFactory::createPartObject( TQWidget * tqparentWidget, const char* /*widgetName*/, TQObject *, const char* name, const char* /*className*/,const TQStringList & ) { - KManPart* part = new KManPart(parentWidget, name ); + KManPart* part = new KManPart(tqparentWidget, name ); return part; } diff --git a/kioslave/man/kmanpart.h b/kioslave/man/kmanpart.h index f2d9e3891..92d51e18b 100644 --- a/kioslave/man/kmanpart.h +++ b/kioslave/man/kmanpart.h @@ -44,7 +44,7 @@ class KManPartFactory: public KParts::Factory KManPartFactory( TQObject * parent = 0, const char * name = 0 ); virtual ~KManPartFactory(); - virtual KParts::Part* createPartObject( TQWidget * parentWidget, const char * widgetName , + virtual KParts::Part* createPartObject( TQWidget * tqparentWidget, const char * widgetName , TQObject* parent, const char* name, const char * classname, const TQStringList &args); diff --git a/kioslave/man/man2html.cpp b/kioslave/man/man2html.cpp index 089ba239b..e9e0c1f19 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.find(')', 2); + int index = fstr.tqfind(')', 2); if (index != -1) subsec = fstr.mid(2, index - 2); else // No closing ')' found, take first character as subsection. @@ -882,7 +882,7 @@ static void add_links(char *c) if (g-7>=c && g[-1]==':') { // We have perhaps an email address starting with mailto: - if (!qstrncmp("mailto:",g-7,7)) + if (!tqstrncmp("mailto:",g-7,7)) g-=7; } h=f+1; @@ -1166,7 +1166,7 @@ static TQCString scan_named_character( char*& c ) { TQCString cstr; c = scan_escape_direct( c+1, cstr ); - const int result = cstr.find(']'); + const int result = cstr.tqfind(']'); 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.find('\''); + const int result = cstr.tqfind('\''); 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.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_characterDefinitionMap.tqfind(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.find(']'); + const int result = cstr.tqfind(']'); 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.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(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.find( name ); + TQMap< TQCString, NumberDefinition >::iterator it = s_numberDefinitionMap.tqfind( 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.find(']'); + const int result = cstr.tqfind(']'); if ( result == -1 ) name += cstr; else @@ -2085,7 +2085,7 @@ static char *scan_table(char *c) /* scan table options */ while (c<h) { while (isspace(*c)) c++; - for (i=0; tableopt[i] && qstrncmp(tableopt[i],c,tableoptl[i]);i++); + for (i=0; tableopt[i] && tqstrncmp(tableopt[i],c,tableoptl[i]);i++); c=c+tableoptl[i]; switch (i) { case 0: center=1; break; @@ -2360,14 +2360,14 @@ static char *scan_expression( char *c, int *result, const unsigned int numLoop ) } c++; h=c; - while (*c!= sep && (!tcmp || qstrncmp(c,tcmp,4))) c++; + while (*c!= sep && (!tcmp || tqstrncmp(c,tcmp,4))) c++; *c='\n'; scan_troff(h, 1, &st1); *c=sep; if (tcmp) c=c+3; c++; h=c; - while (*c!=sep && (!tcmp || qstrncmp(c,tcmp,4))) c++; + while (*c!=sep && (!tcmp || tqstrncmp(c,tcmp,4))) c++; *c='\n'; scan_troff(h,1,&st2); *c=sep; @@ -3032,7 +3032,7 @@ static int get_request(char *req, int len) "%T", "An", "Aq", "Bq", "Qq", "UR", "UE", "UN", "troff", "nroff", "als", "rr", "rnn", "aln", "shift", "while", "do", "Dx", 0 }; int r = 0; - while (requests[r] && qstrncmp(req, requests[r], len)) r++; + while (requests[r] && tqstrncmp(req, requests[r], len)) r++; return requests[r] ? r : REQ_UNKNOWN; } @@ -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.find(macroName); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(macroName); if (it!=s_stringDefinitionMap.end()) { kdDebug(7107) << "CALLING MACRO: " << macroName << endl; @@ -3237,11 +3237,11 @@ static char *scan_request(char *c) while (*c && *c!='\n') c++; c++; h=c; - while (*c && qstrncmp(c,".di",3)) while (*c && *c++!='\n'); + while (*c && tqstrncmp(c,".di",3)) while (*c && *c++!='\n'); *c='\0'; char* result=0; scan_troff(h,0,&result); - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(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.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -3358,7 +3358,7 @@ static char *scan_request(char *c) { char *line=NULL; c=scan_troff(c,1, &line); - if (line && qstrncmp(line, "<BR>", 4)) + if (line && tqstrncmp(line, "<BR>", 4)) { out_html(line); out_html("<BR>\n"); @@ -3489,7 +3489,7 @@ static char *scan_request(char *c) while (*c && *c!='\n') c++,i++; } c++; - while (*c && qstrncmp(c,endwith,i)) while (*c++!='\n'); + while (*c && tqstrncmp(c,endwith,i)) while (*c++!='\n'); while (*c && *c++!='\n'); break; } @@ -4015,7 +4015,7 @@ static char *scan_request(char *c) out_html("\n<H3>"); else out_html("\n<H2>"); - mandoc_synopsis = qstrncmp(c, "SYNOPSIS", 8) == 0; + mandoc_synopsis = tqstrncmp(c, "SYNOPSIS", 8) == 0; c = mandoc_command ? scan_troff_mandoc(c,1,NULL) : scan_troff(c,1,NULL); if (mode) out_html("</H3>\n"); @@ -4064,8 +4064,8 @@ static char *scan_request(char *c) { if (wordlist[i][0] == '\007') wordlist[i]++; - if (wordlist[i][qstrlen(wordlist[i])-1] == '\007') - wordlist[i][qstrlen(wordlist[i])-1] = 0; + if (wordlist[i][tqstrlen(wordlist[i])-1] == '\007') + wordlist[i][tqstrlen(wordlist[i])-1] = 0; } output_possible=true; out_html( DOCTYPE"<HTML>\n<HEAD>\n"); @@ -4147,7 +4147,7 @@ static char *scan_request(char *c) out_html(set_font("I")); if (words>1) wordlist[1][-1]='\0'; const char *c2=lookup_abbrev(wordlist[0]); - curpos+=qstrlen(c2); + curpos+=tqstrlen(c2); out_html(c2); out_html(set_font("R")); if (words>1) @@ -4181,7 +4181,7 @@ static char *scan_request(char *c) } } c=skip_till_newline(c); - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(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.find( name ); + TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.tqfind( name ); if ( it == s_numberDefinitionMap.end() ) { if ( sign < 1 ) @@ -4293,8 +4293,8 @@ static char *scan_request(char *c) } c = next_line; sl=c; - const int length=qstrlen(endmacro); - while (*c && qstrncmp(c,endmacro,length)) + const int length=tqstrlen(endmacro); + while (*c && tqstrncmp(c,endmacro,length)) c=skip_till_newline(c); TQCString macro; @@ -4310,7 +4310,7 @@ static char *scan_request(char *c) sl++; } - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name); if (it==s_stringDefinitionMap.end()) { StringDefinition def; @@ -4322,7 +4322,8 @@ static char *scan_request(char *c) { // .am Append Macro (*it).m_length=0; // It could be formerly a string - if ((*it).m_output.right(1)!='\n') +// if ((*it).m_output.right(1)!='\n') + if (*((*it).m_output.right(1).data())!='\n') (*it).m_output+='\n'; (*it).m_output+=macro; } @@ -4401,7 +4402,7 @@ static char *scan_request(char *c) case REQ_It: // mdoc(7) "list ITem" { c=c+j; - if (qstrncmp(c, "Xo", 2) == 0 && isspace(*(c+2))) + if (tqstrncmp(c, "Xo", 2) == 0 && isspace(*(c+2))) c = skip_till_newline(c); if (dl_set[itemdepth] & BL_DESC_LIST) { @@ -5090,7 +5091,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rn) - TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.find(name2); + TQMap<TQCString,StringDefinition>::iterator it=s_stringDefinitionMap.tqfind(name2); if (it==s_stringDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; @@ -5114,7 +5115,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.find( name ); + TQMap <TQCString, NumberDefinition>::iterator it = s_numberDefinitionMap.tqfind( name ); if ( it == s_numberDefinitionMap.end() ) { kdDebug(7107) << "EXCEPTION: trying to remove inexistant number register: " << endl; @@ -5144,7 +5145,7 @@ static char *scan_request(char *c) break; } c = skip_till_newline( c ); - TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name); + TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.tqfind(name); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find number register to rename: " << name << endl; @@ -5188,7 +5189,7 @@ static char *scan_request(char *c) break; } // Second parametr is origin (unlike in .rnn) - TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.find(name2); + TQMap<TQCString,NumberDefinition>::iterator it=s_numberDefinitionMap.tqfind(name2); if (it==s_numberDefinitionMap.end()) { kdDebug(7107) << "EXCEPTION: cannot find string to make alias: " << name2 << endl; @@ -5303,7 +5304,7 @@ static char *scan_troff(char *c, bool san, char **result) if (result) { if (*result) { buffer=*result; - buffpos=qstrlen(buffer); + buffpos=tqstrlen(buffer); buffmax=buffpos; } else { buffer = stralloc(LARGE_STR_MAX); @@ -5528,7 +5529,7 @@ void scan_man_page(const char *man_page) s_dollarZero = ""; // No macro called yet! output_possible = false; - int strLength = qstrlen(man_page); + int strLength = tqstrlen(man_page); char *buf = new char[strLength + 2]; qstrcpy(buf+1, man_page); buf[0] = '\n'; diff --git a/kioslave/media/kcmodule/managermoduleview.ui b/kioslave/media/kcmodule/managermoduleview.ui index 598718389..d5d42a066 100644 --- a/kioslave/media/kcmodule/managermoduleview.ui +++ b/kioslave/media/kcmodule/managermoduleview.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ManagerModuleView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ManagerModuleView</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_HalBackendEnabled</cstring> </property> @@ -27,7 +27,7 @@ <string>Select this if you want to enable the Hardware Abstraction Layer (http://hal.freedesktop.org/wiki/Software/hal) support.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_CdPollingEnabled</cstring> </property> @@ -38,7 +38,7 @@ <string>Select this to enable the CD polling.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>kcfg_AutostartEnabled</cstring> </property> @@ -59,7 +59,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>360</height> diff --git a/kioslave/media/kcmodule/mimetypelistboxitem.h b/kioslave/media/kcmodule/mimetypelistboxitem.h index f61afba3d..e02f58b11 100644 --- a/kioslave/media/kcmodule/mimetypelistboxitem.h +++ b/kioslave/media/kcmodule/mimetypelistboxitem.h @@ -1,6 +1,6 @@ /* This file is part of the KDE Project Copyright (c) 2005 Jean-Remy Falleri <jr.falleri@laposte.net> - Copyright (c) 2005 Kévin Ottens <ervin ipsquad net> + Copyright (c) 2005 K�vin Ottens <ervin ipsquad net> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -23,7 +23,7 @@ #include <tqlistbox.h> #include <tqstring.h> -class MimetypeListBoxItem : public QListBoxText +class MimetypeListBoxItem : public TQListBoxText { public: MimetypeListBoxItem(const TQString &mimetype, TQListBox *parent); diff --git a/kioslave/media/kcmodule/notifiermodule.cpp b/kioslave/media/kcmodule/notifiermodule.cpp index c7871c953..5c4e4c357 100644 --- a/kioslave/media/kcmodule/notifiermodule.cpp +++ b/kioslave/media/kcmodule/notifiermodule.cpp @@ -159,7 +159,7 @@ void NotifierModule::slotAdd() if ( value == TQDialog::Accepted ) { - m_settings.addAction( action ); + m_settings.tqaddAction( action ); updateListBox(); emit changed( true ); } @@ -212,7 +212,7 @@ void NotifierModule::slotToggleAuto() int index = m_view->actionsList->index( action_item ); - if ( action->autoMimetypes().contains( m_mimetype ) ) + if ( action->autoMimetypes().tqcontains( m_mimetype ) ) { m_settings.resetAutoAction( m_mimetype ); } diff --git a/kioslave/media/kcmodule/notifiermoduleview.ui b/kioslave/media/kcmodule/notifiermoduleview.ui index 87edc0f36..50f93bc40 100644 --- a/kioslave/media/kcmodule/notifiermoduleview.ui +++ b/kioslave/media/kcmodule/notifiermoduleview.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NotifierModuleView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>NotifierModuleView</cstring> </property> @@ -16,7 +16,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -24,7 +24,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -32,7 +32,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>mediumType</cstring> </property> @@ -66,7 +66,7 @@ </widget> </hbox> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout3</cstring> </property> @@ -74,7 +74,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="1"> + <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> <cstring>layout1</cstring> </property> @@ -138,7 +138,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>70</width> <height>101</height> diff --git a/kioslave/media/kcmodule/serviceconfigdialog.cpp b/kioslave/media/kcmodule/serviceconfigdialog.cpp index 61dd060f2..76b342f92 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.contains( *it ) ) + if ( action_mimetypes.tqcontains( *it ) ) { list = m_view->mimetypesSelector->selectedListBox(); } diff --git a/kioslave/media/kcmodule/serviceview.ui b/kioslave/media/kcmodule/serviceview.ui index 938a9bf89..6ae357699 100644 --- a/kioslave/media/kcmodule/serviceview.ui +++ b/kioslave/media/kcmodule/serviceview.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>ServiceView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>ServiceView</cstring> </property> @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>640</width> <height>480</height> @@ -33,7 +33,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox1</cstring> </property> @@ -52,7 +52,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout8</cstring> </property> @@ -60,7 +60,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout6</cstring> </property> @@ -80,13 +80,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>40</width> <height>40</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>40</width> <height>40</height> @@ -99,7 +99,7 @@ <number>32</number> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout5</cstring> </property> @@ -117,7 +117,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -147,7 +147,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> @@ -194,7 +194,7 @@ <bool>false</bool> </property> </widget> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout7</cstring> </property> diff --git a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp index bda34bff2..580a678bc 100644 --- a/kioslave/media/kfile-plugin/kfilemediaplugin.cpp +++ b/kioslave/media/kfile-plugin/kfilemediaplugin.cpp @@ -140,7 +140,7 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/) group = appendGroup(info, "mediumSummary"); - appendItem(group, "percent", TQString("%1%").arg(percent)); + appendItem(group, "percent", TQString("%1%").tqarg(percent)); TQPixmap bar(150, 20); TQPainter p(&bar); @@ -148,9 +148,9 @@ bool KFileMediaPlugin::readInfo(KFileMetaInfo &info, uint /*what*/) p.fillRect(0, 0, length, 20, Qt::red); p.fillRect(length, 0, 150-length, 20, Qt::green); - TQColorGroup cg = TQApplication::palette().active(); + TQColorGroup cg = TQApplication::tqpalette().active(); - TQApplication::style().drawPrimitive(TQStyle::PE_Panel, &p, + TQApplication::tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &p, TQRect(0, 0, 150, 20), cg, TQStyle::Style_Sunken); diff --git a/kioslave/media/libmediacommon/actionlistboxitem.cpp b/kioslave/media/libmediacommon/actionlistboxitem.cpp index 271d2e487..42a724c75 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().contains( mimetype ) ) + if ( m_action->autoMimetypes().tqcontains( mimetype ) ) { text += " (" + i18n( "Auto Action" ) + ")"; } diff --git a/kioslave/media/libmediacommon/actionlistboxitem.h b/kioslave/media/libmediacommon/actionlistboxitem.h index 0378e1d6f..254f065de 100644 --- a/kioslave/media/libmediacommon/actionlistboxitem.h +++ b/kioslave/media/libmediacommon/actionlistboxitem.h @@ -1,6 +1,6 @@ /* This file is part of the KDE Project Copyright (c) 2005 Jean-Remy Falleri <jr.falleri@laposte.net> - Copyright (c) 2005 Kévin Ottens <ervin ipsquad net> + Copyright (c) 2005 K�vin Ottens <ervin ipsquad net> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -25,7 +25,7 @@ #include "notifieraction.h" -class ActionListBoxItem : public QListBoxPixmap +class ActionListBoxItem : public TQListBoxPixmap { public: ActionListBoxItem(NotifierAction *action, TQString mimetype, TQListBox *parent); diff --git a/kioslave/media/libmediacommon/medium.cpp b/kioslave/media/libmediacommon/medium.cpp index e7e91dd54..2aa7359ad 100644 --- a/kioslave/media/libmediacommon/medium.cpp +++ b/kioslave/media/libmediacommon/medium.cpp @@ -109,7 +109,7 @@ Medium::List Medium::createList(const TQStringList &properties) l.append(m); TQStringList::iterator first = props.begin(); - TQStringList::iterator last = props.find(SEPARATOR); + TQStringList::iterator last = props.tqfind(SEPARATOR); ++last; props.erase(first, last); } diff --git a/kioslave/media/libmediacommon/medium.h b/kioslave/media/libmediacommon/medium.h index 54e1556dc..eeef12eb2 100644 --- a/kioslave/media/libmediacommon/medium.h +++ b/kioslave/media/libmediacommon/medium.h @@ -109,8 +109,8 @@ namespace MediaManagerUtils { for (TQStringList::ConstIterator it = options.begin(); it != options.end(); ++it) { - TQString key = (*it).left((*it).find('=')); - TQString value = (*it).mid((*it).find('=') + 1); + TQString key = (*it).left((*it).tqfind('=')); + TQString value = (*it).mid((*it).tqfind('=') + 1); valids[key] = value; } return valids; diff --git a/kioslave/media/libmediacommon/notifieraction.cpp b/kioslave/media/libmediacommon/notifieraction.cpp index d10314701..9a6572150 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.contains( mimetype ) ) + if ( !m_autoMimetypes.tqcontains( mimetype ) ) { m_autoMimetypes.append( mimetype ); } diff --git a/kioslave/media/libmediacommon/notifieropenaction.cpp b/kioslave/media/libmediacommon/notifieropenaction.cpp index 4d6d8025c..01c8b010f 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.contains( "blank" ) && !mimetype.contains( "encrypted" ); + return !mimetype.tqcontains( "blank" ) && !mimetype.tqcontains( "encrypted" ); } diff --git a/kioslave/media/libmediacommon/notifierserviceaction.cpp b/kioslave/media/libmediacommon/notifierserviceaction.cpp index c7bece4f8..8cf916848 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.replace( " ", "_" ); + action_name.tqreplace( " ", "_" ); 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.contains(mimetype); + return m_mimetypes.tqcontains(mimetype); } void NotifierServiceAction::save() const diff --git a/kioslave/media/libmediacommon/notifiersettings.cpp b/kioslave/media/libmediacommon/notifiersettings.cpp index d1ab55d87..fd0aefc67 100644 --- a/kioslave/media/libmediacommon/notifiersettings.cpp +++ b/kioslave/media/libmediacommon/notifiersettings.cpp @@ -109,9 +109,9 @@ TQValueList<NotifierAction*> NotifierSettings::actionsForMimetype( const TQStrin return result; } -bool NotifierSettings::addAction( NotifierServiceAction *action ) +bool NotifierSettings::tqaddAction( NotifierServiceAction *action ) { - if ( !m_idMap.contains( action->id() ) ) + if ( !m_idMap.tqcontains( 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.contains( mimetype ) ) + if ( m_autoMimetypesMap.tqcontains( 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.contains( mimetype ) ) + if ( m_autoMimetypesMap.tqcontains( 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.contains( action_id ) ) + if ( m_idMap.tqcontains( action_id ) ) { setAutoAction( mime, m_idMap[action_id] ); } @@ -349,7 +349,7 @@ bool NotifierSettings::shouldLoadActions( KDesktopFile &desktop, const TQString } } } - else if ( types.contains(mimetype) ) + else if ( types.tqcontains(mimetype) ) { return true; } diff --git a/kioslave/media/libmediacommon/notifiersettings.h b/kioslave/media/libmediacommon/notifiersettings.h index dee5c440b..a1f46f961 100644 --- a/kioslave/media/libmediacommon/notifiersettings.h +++ b/kioslave/media/libmediacommon/notifiersettings.h @@ -36,7 +36,7 @@ public: TQValueList<NotifierAction*> actions(); TQValueList<NotifierAction*> actionsForMimetype( const TQString &mimetype ); - bool addAction( NotifierServiceAction *action ); + bool tqaddAction( NotifierServiceAction *action ); bool deleteAction( NotifierServiceAction *action ); void setAutoAction( const TQString &mimetype, NotifierAction *action ); diff --git a/kioslave/media/mediaimpl.cpp b/kioslave/media/mediaimpl.cpp index b55b37e5d..c097fcca4 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.find('/', 1); + int i = url_path.tqfind('/', 1); if (i > 0) { name = url_path.mid(1, i-1); @@ -267,7 +267,7 @@ bool MediaImpl::ensureMediumMounted(Medium &medium) if (!m_lastErrorMessage.isEmpty()) m_lastErrorCode = KIO::ERR_SLAVE_DEFINED; else { - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); } mp_mounting = 0L; @@ -304,7 +304,7 @@ void MediaImpl::slotMountResult(KIO::Job *job) { m_lastErrorCode = job->error(); m_lastErrorMessage = job->errorText(); - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } } @@ -317,7 +317,7 @@ void MediaImpl::slotMediumChanged(const TQString &name) kdDebug(1219) << "MediaImpl::slotMediumChanged: updating mp_mounting" << endl; bool ok; *mp_mounting = findMediumByName(name, ok); - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } } @@ -351,7 +351,7 @@ void MediaImpl::slotStatResult(KIO::Job *job) m_entryBuffer = stat_job->statResult(); } - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url) @@ -364,7 +364,7 @@ KIO::UDSEntry MediaImpl::extractUrlInfos(const KURL &url) this, TQT_SLOT( slotStatResult(KIO::Job *) ) ); connect( job, TQT_SIGNAL( warning( KIO::Job *, const TQString & ) ), this, TQT_SLOT( slotWarning( KIO::Job *, const TQString & ) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); KIO::UDSEntry::iterator it = m_entryBuffer.begin(); KIO::UDSEntry::iterator end = m_entryBuffer.end(); diff --git a/kioslave/media/mediamanager/fstabbackend.cpp b/kioslave/media/mediamanager/fstabbackend.cpp index 189f52aee..71dbdb1f0 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().contains( "proc" ) + || mount->mountType().tqcontains( "proc" ) || mount->mountType() == "unknown" || mount->mountType() == "none" || mount->mountType() == "sunrpc" || mount->mountedFrom() == "none" || mount->mountedFrom() == "tmpfs" - || mount->mountedFrom().find("shm") != -1 + || mount->mountedFrom().tqfind("shm") != -1 || mount->mountPoint() == "/dev/swap" || mount->mountPoint() == "/dev/pts" - || mount->mountPoint().find("/proc") == 0 - || mount->mountPoint().find("/sys") == 0 + || mount->mountPoint().tqfind("/proc") == 0 + || mount->mountPoint().tqfind("/sys") == 0 // We might want to display only network shares // since HAL doesn't handle them || ( networkSharesOnly - && mount->mountType().find( "smb" ) == -1 - && mount->mountType().find( "cifs" ) == -1 - && mount->mountType().find( "nfs" ) == -1 + && mount->mountType().tqfind( "smb" ) == -1 + && mount->mountType().tqfind( "cifs" ) == -1 + && mount->mountType().tqfind( "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.contains(mtabEntry)) { + if(m_mtabEntries.tqcontains(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.contains(id) && m_fstabIds.contains(id) ) + if ( !m_mtabIds.tqcontains(id) && m_fstabIds.tqcontains(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.contains(id) ) + else if ( !m_mtabIds.tqcontains(id) ) { TQString name = generateName(dev, fs); @@ -229,7 +229,7 @@ void FstabBackend::handleMtabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_mtabIds.contains(*it2) && m_fstabIds.contains(*it2) ) + if ( !new_mtabIds.tqcontains(*it2) && m_fstabIds.tqcontains(*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.contains(*it2) ) + else if ( !new_mtabIds.tqcontains(*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.contains(id) ) + if ( !m_fstabIds.tqcontains(id) ) { TQString name = generateName(dev, fs); @@ -301,7 +301,7 @@ void FstabBackend::handleFstabChange(bool allowNotification) for (; it2!=end2; ++it2) { - if ( !new_fstabIds.contains(*it2) ) + if ( !new_fstabIds.tqcontains(*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.replace("/", "") - +m.replace("/", ""); + +d.tqreplace("/", "") + +m.tqreplace("/", ""); } 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.contains("cdrom")) + if(buf.tqcontains("cdrom")) isCd=true; m.close(); } @@ -387,37 +387,37 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } #endif if ( devType == CDWRITER - || 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 + || 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 ) { mimeType = "media/cdwriter"; label = i18n("CD Recorder"); } else if ( devType == DVD || devType == DVDWRITER - || devNode.find("dvd")!=-1 || mountPoint.find("dvd")!=-1 ) + || devNode.tqfind("dvd")!=-1 || mountPoint.tqfind("dvd")!=-1 ) { mimeType = "media/dvd"; label = i18n("DVD"); } else if ( devType == CD - || devNode.find("cdrom")!=-1 || mountPoint.find("cdrom")!=-1 + || devNode.tqfind("cdrom")!=-1 || mountPoint.tqfind("cdrom")!=-1 // LINUX SPECIFIC - || devNode.find("/dev/scd")!=-1 || devNode.find("/dev/sr")!=-1 + || devNode.tqfind("/dev/scd")!=-1 || devNode.tqfind("/dev/sr")!=-1 // FREEBSD SPECIFIC - || devNode.find("/acd")!=-1 || devNode.find("/scd")!=-1 + || devNode.tqfind("/acd")!=-1 || devNode.tqfind("/scd")!=-1 ) { mimeType = "media/cdrom"; label = i18n("CD-ROM"); } - else if ( devNode.find("fd")!=-1 || mountPoint.find("fd")!=-1 - || devNode.find("floppy")!=-1 || mountPoint.find("floppy")!=-1 ) + else if ( devNode.tqfind("fd")!=-1 || mountPoint.tqfind("fd")!=-1 + || devNode.tqfind("floppy")!=-1 || mountPoint.tqfind("floppy")!=-1 ) { - if ( devNode.find("360")!=-1 || devNode.find("1200")!=-1 ) + if ( devNode.tqfind("360")!=-1 || devNode.tqfind("1200")!=-1 ) { mimeType = "media/floppy5"; } @@ -427,32 +427,32 @@ void FstabBackend::guess(const TQString &devNode, const TQString &mountPoint, } label = i18n("Floppy"); } - else if ( mountPoint.find("zip")!=-1 + else if ( mountPoint.tqfind("zip")!=-1 // FREEBSD SPECIFIC - || devNode.find("/afd")!=-1 + || devNode.tqfind("/afd")!=-1 ) { mimeType = "media/zip"; label = i18n("Zip Disk"); } - 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 + 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 ) { mimeType = "media/removable"; label = i18n("Removable Device"); } - else if ( fsType.find("nfs")!=-1 ) + else if ( fsType.tqfind("nfs")!=-1 ) { mimeType = "media/nfs"; label = i18n("Remote Share"); } - else if ( fsType.find("smb")!=-1 || fsType.find("cifs")!=-1 - || devNode.find("//")!=-1 ) + else if ( fsType.tqfind("smb")!=-1 || fsType.tqfind("cifs")!=-1 + || devNode.tqfind("//")!=-1 ) { mimeType = "media/smb"; label = i18n("Remote Share"); diff --git a/kioslave/media/mediamanager/halbackend.cpp b/kioslave/media/mediamanager/halbackend.cpp index 7b56d46ad..d44826590 100644 --- a/kioslave/media/mediamanager/halbackend.cpp +++ b/kioslave/media/mediamanager/halbackend.cpp @@ -447,7 +447,7 @@ const char* HALBackend::findMediumUdiFromUdi(const char* udi) void HALBackend::ResetProperties(const char* mediumUdi, bool allowNotification) { kdDebug(1219) << "HALBackend::setProperties" << endl; - if ( TQString::fromLatin1( mediumUdi ).startsWith( "/org/kde/" ) ) + if ( TQString::tqfromLatin1( mediumUdi ).startsWith( "/org/kde/" ) ) { const Medium *cmedium = m_mediaList.findById(mediumUdi); if ( cmedium ) @@ -942,7 +942,7 @@ TQStringList HALBackend::mountoptions(const TQString &name) result << TQString("automount=%1").arg(value ? "true" : "false"); - if (valids.contains("ro")) + if (valids.tqcontains("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.contains("quiet")) + if (valids.tqcontains("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.contains("flush")) + if (valids.tqcontains("flush")) { value = config.readBoolEntry("flush", fstype.endsWith("fat")); tmp = TQString("flush=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.contains("uid")) + if (valids.tqcontains("uid")) { value = config.readBoolEntry("uid", true); tmp = TQString("uid=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.contains("utf8")) + if (valids.tqcontains("utf8")) { value = config.readBoolEntry("utf8", true); tmp = TQString("utf8=%1").arg(value ? "true" : "false"); result << tmp; } - if (valids.contains("shortname")) + if (valids.tqcontains("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.contains("locale") && fstype == "ntfs-3g") + if (valids.tqcontains("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.contains("sync")) + if (valids.tqcontains("sync")) { - value = config.readBoolEntry("sync", ( valids.contains("flush") && !fstype.endsWith("fat") ) && removable); + value = config.readBoolEntry("sync", ( valids.tqcontains("flush") && !fstype.endsWith("fat") ) && removable); tmp = TQString("sync=%1").arg(value ? "true" : "false"); if (fstype != "iso9660") // makes no sense result << tmp; } - if (valids.contains("noatime")) + if (valids.tqcontains("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.contains("data")) + if (valids.tqcontains("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.contains(names[index])) + if (valids.tqcontains(names[index])) config.writeEntry(names[index], valids[names[index]] == "true"); - if (valids.contains("shortname")) + if (valids.tqcontains("shortname")) config.writeEntry("shortname", valids["shortname"]); - if (valids.contains("journaling")) + if (valids.tqcontains("journaling")) config.writeEntry("journaling", valids["journaling"]); - if (!mountoptions(name).contains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) + if (!mountoptions(name).tqcontains(TQString("mountpoint=%1").arg(valids["mountpoint"]))) config.writeEntry("mountpoint", valids["mountpoint"]); - if (valids.contains("automount")) { + if (valids.tqcontains("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.contains("user") || opts.contains("users")) + if (opts.tqcontains("user") || opts.tqcontains("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.contains("shortname")) + if (valids.tqcontains("shortname")) { soptions << TQString("shortname=%1").arg(valids["shortname"]); } - if (valids.contains("locale")) + if (valids.tqcontains("locale")) { soptions << TQString("locale=%1").arg(valids["locale"]); } - if (valids.contains("journaling")) + if (valids.tqcontains("journaling")) { TQString option = valids["journaling"]; if (option == "data") diff --git a/kioslave/media/mediamanager/linuxcdpolling.cpp b/kioslave/media/mediamanager/linuxcdpolling.cpp index 945fd950a..5a1359b6d 100644 --- a/kioslave/media/mediamanager/linuxcdpolling.cpp +++ b/kioslave/media/mediamanager/linuxcdpolling.cpp @@ -110,7 +110,7 @@ DiscType::operator int() const } -class PollingThread : public QThread +class PollingThread : public TQThread { public: PollingThread(const TQCString &devNode) : m_dev(devNode) @@ -209,14 +209,14 @@ void LinuxCDPolling::slotMediumAdded(const TQString &id) { kdDebug(1219) << "LinuxCDPolling::slotMediumAdded(" << id << ")" << endl; - if (m_threads.contains(id)) return; + if (m_threads.tqcontains(id)) return; const Medium *medium = m_mediaList.findById(id); TQString mime = medium->mimeType(); kdDebug(1219) << "mime == " << mime << endl; - if (mime.find("dvd")==-1 && mime.find("cd")==-1) return; + if (mime.tqfind("dvd")==-1 && mime.tqfind("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.contains(id)) return; + if (!m_threads.tqcontains(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.find("dvd")==-1 && mime.find("cd")==-1) return; + if (mime.tqfind("dvd")==-1 && mime.tqfind("cd")==-1) return; - if (!m_threads.contains(id) && !medium->isMounted()) + if (!m_threads.tqcontains(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.contains(id) && medium->isMounted()) + else if (m_threads.tqcontains(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.find("dvd")!=-1) + if (devNode.tqfind("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.contains(id); + bool notify = !m_excludeNotification.tqcontains(id); m_excludeNotification.remove(id); switch (type) diff --git a/kioslave/media/mediamanager/medialist.cpp b/kioslave/media/mediamanager/medialist.cpp index bb0de6248..2e766bb07 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.contains(id) ) return 0L; + if ( !m_idMap.tqcontains(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.contains(name) ) return 0L; + if ( !m_nameMap.tqcontains(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.contains(id) ) return TQString::null; + if ( m_idMap.tqcontains(id) ) return TQString::null; m_media.append( medium ); m_idMap[id] = medium; TQString name = medium->name(); - if ( !m_nameMap.contains(name) ) + if ( !m_nameMap.tqcontains(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.contains(base_name+TQString::number(i)) ) + while ( m_nameMap.tqcontains(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.contains(id) ) return false; + if ( !m_idMap.tqcontains(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.contains(medium.id()) ) return false; + if ( !m_idMap.tqcontains(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.contains(id) ) return false; + if ( !m_idMap.tqcontains(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.contains(id) ) return false; + if ( !m_idMap.tqcontains(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.contains(id) ) return false; + if ( !m_idMap.tqcontains(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.contains(name) ) return false; + if ( !m_nameMap.tqcontains(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 f307ee2f8..7db497c38 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.contains(id)) + if (!m_removableIds.tqcontains(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.contains(id)) + if (m_removableIds.tqcontains(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.contains(id)) + if (m_removableIds.tqcontains(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.contains(id) - && m_removableIds.contains(id) ) + if ( !m_mtabIds.tqcontains(id) + && m_removableIds.tqcontains(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.contains(*it2) - && m_removableIds.contains(*it2) ) + if ( !new_mtabIds.tqcontains(*it2) + && m_removableIds.tqcontains(*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.replace("/", ""); + +dev.tqreplace("/", ""); } TQString RemovableBackend::generateName(const TQString &devNode) diff --git a/kioslave/media/medianotifier/medianotifier.cpp b/kioslave/media/medianotifier/medianotifier.cpp index b0596e31d..ad9d00db8 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.contains( "_mounted" ); + bool is_mounted = mimetype.tqcontains( "_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.contains( "../" ) ) + if ( relative_path.startsWith( "/" ) || relative_path.tqcontains( "../" ) ) { return false; } @@ -369,7 +369,7 @@ void MediaNotifier::slotFreeCancel() void MediaNotifier::slotFreeFinished( KMessageBox::ButtonCode res ) { - TQCheckBox *checkbox = ::qt_cast<TQCheckBox*>( m_freeDialog->child( 0, "TQCheckBox" ) ); + TQCheckBox *checkbox = ::tqqt_cast<TQCheckBox*>( m_freeDialog->child( 0, "TQCheckBox" ) ); if ( checkbox && checkbox->isChecked() ) KMessageBox::saveDontShowAgainYesNo("dontagainfreespace", res); m_freeDialog->delayedDestruct(); diff --git a/kioslave/media/medianotifier/notificationdialog.cpp b/kioslave/media/medianotifier/notificationdialog.cpp index 7ba172601..9913f033d 100644 --- a/kioslave/media/medianotifier/notificationdialog.cpp +++ b/kioslave/media/medianotifier/notificationdialog.cpp @@ -53,7 +53,7 @@ NotificationDialog::NotificationDialog( KFileItem medium, NotifierSettings *sett updateActionsListBox(); - resize( TQSize(400,400).expandedTo( minimumSizeHint() ) ); + resize( TQSize(400,400).expandedTo( tqminimumSizeHint() ) ); m_actionWatcher = new KDirWatch(); diff --git a/kioslave/media/medianotifier/notificationdialogview.ui b/kioslave/media/medianotifier/notificationdialogview.ui index f37a007b2..032ea1f10 100644 --- a/kioslave/media/medianotifier/notificationdialogview.ui +++ b/kioslave/media/medianotifier/notificationdialogview.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>NotificationDialogView</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>NotificationDialogView</cstring> </property> @@ -19,7 +19,7 @@ <property name="spacing"> <number>15</number> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout2</cstring> </property> @@ -30,7 +30,7 @@ <property name="spacing"> <number>20</number> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>iconLabel</cstring> </property> @@ -42,13 +42,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>64</width> <height>64</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>64</width> <height>64</height> @@ -61,7 +61,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -74,7 +74,7 @@ </widget> </hbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>mimetypeLabel</cstring> </property> @@ -95,7 +95,7 @@ <cstring>actionsList</cstring> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>autoActionCheck</cstring> </property> diff --git a/kioslave/media/mounthelper/decryptdialog.ui b/kioslave/media/mounthelper/decryptdialog.ui index 15790c8ef..dfb8c17d0 100644 --- a/kioslave/media/mounthelper/decryptdialog.ui +++ b/kioslave/media/mounthelper/decryptdialog.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>DecryptDialog</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>DecryptDialog</cstring> </property> @@ -27,7 +27,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget" row="0" column="0"> + <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> <cstring>layout5</cstring> </property> @@ -35,7 +35,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLayoutWidget"> + <widget class="TQLayoutWidget"> <property name="name"> <cstring>layout4</cstring> </property> @@ -43,7 +43,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>encryptedIcon</cstring> </property> @@ -55,13 +55,13 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>48</width> <height>48</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32</width> <height>32</height> @@ -70,7 +70,7 @@ <property name="scaledContents"> <bool>true</bool> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignTop</set> </property> </widget> @@ -84,7 +84,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>31</width> <height>41</height> @@ -93,7 +93,7 @@ </spacer> </vbox> </widget> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>descLabel</cstring> </property> @@ -109,13 +109,13 @@ <string><p><b>%1</b> is an encrypted storage device.</p> <p>Please enter the password to decrypt the storage device.</p></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> </hbox> </widget> - <widget class="QLayoutWidget" row="1" column="0"> + <widget class="TQLayoutWidget" row="1" column="0"> <property name="name"> <cstring>layout4</cstring> </property> @@ -123,7 +123,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel"> + <widget class="TQLabel"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -134,7 +134,7 @@ <cstring>passwordEdit</cstring> </property> </widget> - <widget class="QLineEdit"> + <widget class="TQLineEdit"> <property name="name"> <cstring>passwordEdit</cstring> </property> @@ -155,7 +155,7 @@ </widget> </hbox> </widget> - <widget class="QGroupBox" row="2" column="0"> + <widget class="TQGroupBox" row="2" column="0"> <property name="name"> <cstring>errorBox</cstring> </property> @@ -174,7 +174,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>errorLabel</cstring> </property> @@ -189,7 +189,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>WordBreak|AlignTop</set> </property> </widget> diff --git a/kioslave/media/mounthelper/kio_media_mounthelper.cpp b/kioslave/media/mounthelper/kio_media_mounthelper.cpp index 01448f79d..83d57df85 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().find("dvd")!=-1 - || medium.mimeType().find("cd")!=-1; + m_isCdrom = medium.mimeType().tqfind("dvd")!=-1 + || medium.mimeType().tqfind("cd")!=-1; if (args->isSet("d")) { @@ -182,7 +182,7 @@ MountHelper::MountHelper() : KApplication() void MountHelper::invokeEject(const TQString &device, bool quiet) { - KProcess *proc = new KProcess(this); + KProcess *proc = new KProcess(TQT_TQOBJECT(this)); *proc << "kdeeject"; if (quiet) { diff --git a/kioslave/media/propsdlgplugin/propertiespage.cpp b/kioslave/media/propsdlgplugin/propertiespage.cpp index 14ac2b33f..209f350a8 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).find('=')); - TQString value = (*it).mid((*it).find('=') + 1); + TQString key = (*it).left((*it).tqfind('=')); + TQString value = (*it).mid((*it).tqfind('=') + 1); kdDebug() << "key '" << key << "' value '" << value << "'\n"; options[key] = value; } - if (!options.contains("ro")) + if (!options.tqcontains("ro")) option_ro->hide(); else option_ro->setChecked(options["ro"] == "true"); connect( option_ro, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("quiet")) + if (!options.tqcontains("quiet")) option_quiet->hide(); else option_quiet->setChecked(options["quiet"] == "true"); connect( option_quiet, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("sync")) + if (!options.tqcontains("sync")) option_sync->hide(); else option_sync->setChecked(options["sync"] == "true"); connect( option_sync, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("atime")) + if (!options.tqcontains("atime")) option_atime->hide(); else option_atime->setChecked(options["atime"] == "true"); connect( option_atime, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("flush")) + if (!options.tqcontains("flush")) option_flush->hide(); else option_flush->setChecked(options["flush"] == "true"); connect( option_flush, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("utf8")) + if (!options.tqcontains("utf8")) option_utf8->hide(); else option_utf8->setChecked(options["utf8"] == "true"); connect( option_utf8, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("uid")) + if (!options.tqcontains("uid")) option_uid->hide(); else option_uid->setChecked(options["uid"] == "true"); connect( option_uid, TQT_SIGNAL( stateChanged(int) ), TQT_SIGNAL( changed() ) ); - if (!options.contains("shortname")) + if (!options.tqcontains("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.contains("journaling")) + if (!options.tqcontains("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.contains("journaling") && - !options.contains("shortname") && - !options.contains("uid") && - !options.contains("utf8") && - !options.contains("flush")) + if (!options.tqcontains("journaling") && + !options.tqcontains("shortname") && + !options.tqcontains("uid") && + !options.tqcontains("utf8") && + !options.tqcontains("flush")) groupbox_specific->hide(); } else { @@ -163,31 +163,31 @@ bool PropertiesPage::save() { TQStringList result; - if (options.contains("ro")) + if (options.tqcontains("ro")) result << TQString("ro=%1").arg(option_ro->isChecked() ? "true" : "false"); - if (options.contains("quiet")) + if (options.tqcontains("quiet")) result << TQString("quiet=%1").arg(option_quiet->isChecked() ? "true" : "false"); - if (options.contains("sync")) + if (options.tqcontains("sync")) result << TQString("sync=%1").arg(option_sync->isChecked() ? "true" : "false"); - if (options.contains("atime")) + if (options.tqcontains("atime")) result << TQString("atime=%1").arg(option_atime->isChecked() ? "true" : "false"); - if (options.contains("flush")) + if (options.tqcontains("flush")) result << TQString("flush=%1").arg(option_flush->isChecked() ? "true" : "false"); - if (options.contains("utf8")) + if (options.tqcontains("utf8")) result << TQString("utf8=%1").arg(option_utf8->isChecked() ? "true" : "false"); - if (options.contains("uid")) + if (options.tqcontains("uid")) result << TQString("uid=%1").arg(option_uid->isChecked() ? "true" : "false"); - if (options.contains("shortname")) + if (options.tqcontains("shortname")) result << TQString("shortname=%1").arg(short_names[option_shortname->currentItem()]); - if (options.contains("journaling")) + if (options.tqcontains("journaling")) result << TQString("journaling=%1").arg(journales[option_journaling->currentItem()]); TQString mp = option_mountpoint->text(); diff --git a/kioslave/media/propsdlgplugin/propertiespagegui.ui b/kioslave/media/propsdlgplugin/propertiespagegui.ui index c4de4c059..416c85c13 100644 --- a/kioslave/media/propsdlgplugin/propertiespagegui.ui +++ b/kioslave/media/propsdlgplugin/propertiespagegui.ui @@ -352,7 +352,7 @@ Display the short name as is; store a long name when the short name is not all u <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> diff --git a/kioslave/nfs/kio_nfs.cpp b/kioslave/nfs/kio_nfs.cpp index debe19d3d..1869b4243 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.findRev("/"); + int slashPos=path.tqfindRev("/"); 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.find("/"); + int slashPos=result.tqfind("/"); return result.mid(slashPos+1); } @@ -293,7 +293,7 @@ void NFSProtocol::closeConnection() bool NFSProtocol::isExportedDir(const TQString& path) { - return (m_exportedDirs.find(path.mid(1))!=m_exportedDirs.end()); + return (m_exportedDirs.tqfind(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.find(path)!=m_handleCache.end()) + if (m_handleCache.tqfind(path)!=m_handleCache.end()) { kdDebug(7121)<<"path is in the cache, returning the FH -"<<m_handleCache[path]<<"-"<<endl; return m_handleCache[path]; @@ -800,14 +800,14 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString& atom.m_uds = KIO::UDS_USER; uid_t uid = buff.st_uid; - TQString *temp = m_usercache.find( uid ); + TQString *temp = m_usercache.tqfind( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { - m_usercache.insert( uid, new TQString(TQString::fromLatin1(user->pw_name)) ); + m_usercache.insert( uid, new TQString(TQString::tqfromLatin1(user->pw_name)) ); atom.m_str = user->pw_name; } else @@ -819,13 +819,13 @@ void NFSProtocol::completeAbsoluteLinkUDSEntry(UDSEntry& entry, const TQCString& atom.m_uds = KIO::UDS_GROUP; gid_t gid = buff.st_gid; - temp = m_groupcache.find( gid ); + temp = m_groupcache.tqfind( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { - m_groupcache.insert( gid, new TQString(TQString::fromLatin1(grp->gr_name)) ); + m_groupcache.insert( gid, new TQString(TQString::tqfromLatin1(grp->gr_name)) ); atom.m_str = grp->gr_name; } else @@ -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.find( uid ); + TQString *temp = m_usercache.tqfind( 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.find( gid ); + temp = m_groupcache.tqfind( 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.find(thePath)); + m_handleCache.remove(m_handleCache.tqfind(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.find(thePath)); + m_handleCache.remove(m_handleCache.tqfind(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.find("../")==0) + if (absDest.tqfind("../")==0) return FALSE; kdDebug(7121)<<"is inside the nfs tree"<<endl; diff --git a/kioslave/nntp/nntp.cpp b/kioslave/nntp/nntp.cpp index b109bb58a..aa6425c23 100644 --- a/kioslave/nntp/nntp.cpp +++ b/kioslave/nntp/nntp.cpp @@ -111,11 +111,11 @@ void NNTPProtocol::get(const KURL& url) { return; } - pos = path.find('<'); + pos = path.tqfind('<'); 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.find('/')) > 0) group = group.left(pos); + if ((pos = group.tqfind('/')) > 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.find("\r\n.",pos)) > 0) { + while ((pos = data.tqfind("\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.find('/')) > 0) group = path.left(pos); + if ((pos = path.tqfind('/')) > 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.find('<'); + pos = path.tqfind('<'); 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.find('/')) > 0) group = group.left(pos); + if ((pos = group.tqfind('/')) > 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.find('/')) > 0) + if ((pos = path.tqfind('/')) > 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.find(' ')) > 0) { + if ((pos = line.tqfind(' ')) > 0) { group = line.left(pos); // number of messages line.remove(0,pos+1); long last = 0; - if (((pos = line.find(' ')) > 0 || (pos = line.find('\t')) > 0) && - ((pos2 = line.find(' ',pos+1)) > 0 || (pos2 = line.find('\t',pos+1)) > 0)) { + if (((pos = line.tqfind(' ')) > 0 || (pos = line.tqfind('\t')) > 0) && + ((pos2 = line.tqfind(' ',pos+1)) > 0 || (pos2 = line.tqfind('\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.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)) + 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)) { 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.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { + if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',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.find('<')) > 0 && (pos2 = resp_line.find('>',pos+1))) { + if ((pos = resp_line.tqfind('<')) > 0 && (pos2 = resp_line.tqfind('>',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).contains( "Message-ID:", false ) ) { + if ( (*it).tqcontains( "Message-ID:", false ) ) { msgId = (*it2); continue; } diff --git a/kioslave/pop3/pop3.cc b/kioslave/pop3/pop3.cc index 0ab27f63b..ed0664919 100644 --- a/kioslave/pop3/pop3.cc +++ b/kioslave/pop3/pop3.cc @@ -242,8 +242,8 @@ POP3Protocol::Resp POP3Protocol::getResponse(char *r_buf, unsigned int r_len, QMIN(r_len, (buf[4] == ' ' ? recv_len - 5 : recv_len - 4))); } - TQString command = TQString::fromLatin1(cmd); - TQString serverMsg = TQString::fromLatin1(buf).mid(5).stripWhiteSpace(); + TQString command = TQString::tqfromLatin1(cmd); + TQString serverMsg = TQString::tqfromLatin1(buf).mid(5).stripWhiteSpace(); if (command.left(4) == "PASS") { command = i18n("PASS <your password>"); @@ -353,7 +353,7 @@ int POP3Protocol::loginAPOP( char *challenge, KIO::AuthInfo &ai ) { char buf[512]; - TQString apop_string = TQString::fromLatin1("APOP "); + TQString apop_string = TQString::tqfromLatin1("APOP "); if (m_sUser.isEmpty() || m_sPass.isEmpty()) { // Prompt for usernames if (!openPassDlg(ai)) { @@ -461,7 +461,7 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai ) { #ifdef HAVE_LIBSASL2 char buf[512]; - TQString sasl_buffer = TQString::fromLatin1("AUTH"); + TQString sasl_buffer = TQString::tqfromLatin1("AUTH"); int result; sasl_conn_t *conn = NULL; @@ -525,19 +525,19 @@ int POP3Protocol::loginSASL( KIO::AuthInfo &ai ) TQByteArray challenge, tmp; - TQString firstCommand = "AUTH " + TQString::fromLatin1( mechusing ); + TQString firstCommand = "AUTH " + TQString::tqfromLatin1( mechusing ); challenge.setRawData( out, outlen ); KCodecs::base64Encode( challenge, tmp ); challenge.resetRawData( out, outlen ); if ( !tmp.isEmpty() ) { firstCommand += " "; - firstCommand += TQString::fromLatin1( tmp.data(), tmp.size() ); + firstCommand += TQString::tqfromLatin1( tmp.data(), tmp.size() ); } challenge.resize( 2049 ); resp = command( firstCommand.latin1(), challenge.data(), 2049 ); while( resp == Cont ) { - challenge.resize(challenge.find(0)); + challenge.resize(challenge.tqfind(0)); // POP3_DEBUG << "S: " << TQCString(challenge.data(),challenge.size()+1) << endl; KCodecs::base64Decode( challenge, tmp ); do { @@ -624,7 +624,7 @@ bool POP3Protocol::loginPASS( KIO::AuthInfo &ai ) m_sOldUser = m_sUser; m_sOldPass = m_sPass; - TQString one_string = TQString::fromLatin1("USER "); + TQString one_string = TQString::tqfromLatin1("USER "); one_string.append( m_sUser ); if ( command(one_string.local8Bit(), buf, sizeof(buf)) != Ok ) { @@ -638,7 +638,7 @@ bool POP3Protocol::loginPASS( KIO::AuthInfo &ai ) return false; } - one_string = TQString::fromLatin1("PASS "); + one_string = TQString::tqfromLatin1("PASS "); one_string.append(m_sPass); if ( command(one_string.local8Bit(), buf, sizeof(buf)) != Ok ) { @@ -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.find(re); + int apop_pos = greeting.tqfind(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.find(" ")); + cmd.remove(0, cmd.tqfind(" ")); 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) - .replace(" ", "-"); + .tqreplace(" ", "-"); } } if (supports_apop) @@ -866,15 +866,15 @@ void POP3Protocol::get(const KURL & url) return; } - if (((path.find('/') == -1) && (path != "index") && (path != "uidl") + if (((path.tqfind('/') == -1) && (path != "index") && (path != "uidl") && (path != "commit"))) { error(ERR_MALFORMED_URL, url.url()); m_cmd = CMD_NONE; return; } - cmd = path.left(path.find('/')); - path.remove(0, path.find('/') + 1); + cmd = path.left(path.tqfind('/')); + path.remove(0, path.tqfind('/') + 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.find(" ")) { + if (!list_cmd.tqfind(" ")) { 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.find(" ") + 1); + list_cmd.remove(0, list_cmd.tqfind(" ") + 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.find(" ") == -1) { + if (q_buf.tqfind(" ") == -1) { error(ERR_INTERNAL, "Invalid POP3 response, we should have at least one space!"); closeConnection(); return; } - q_buf.remove(q_buf.find(" "), q_buf.length()); + q_buf.remove(q_buf.tqfind(" "), q_buf.length()); num_messages = q_buf.toUInt(&isINT); if (!isINT) { @@ -1176,7 +1176,7 @@ void POP3Protocol::listDir(const KURL &) uds_url.setUser(m_sUser); uds_url.setPass(m_sPass); uds_url.setHost(m_sServer); - uds_url.setPath(TQString::fromLatin1("/download/%1").arg(i + 1)); + uds_url.setPath(TQString::tqfromLatin1("/download/%1").arg(i + 1)); atom.m_str = uds_url.url(); atom.m_long = 0; entry.append(atom); diff --git a/kioslave/remote/kdedmodule/remotedirnotify.cpp b/kioslave/remote/kdedmodule/remotedirnotify.cpp index e6e2359a6..f87c6bb96 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.contains(url)) + if (!notified.tqcontains(url)) { notifier.FilesAdded(url); notified.append(url); diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp index 646a99d30..68325fbb7 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().find( '/', 1 ); + int second_slash_idx = url.path().tqfind( '/', 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().find( '/', 1 ); + int second_slash_idx = url.path().tqfind( '/', 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 47e41b821..ed117d03f 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.contains(*name)) + if (!names_found.tqcontains(*name)) { entry.clear(); createEntry(entry, *dirpath, *name); diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp index 456d47084..2c8f995a5 100644 --- a/kioslave/sftp/kio_sftp.cpp +++ b/kioslave/sftp/kio_sftp.cpp @@ -348,7 +348,7 @@ sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t off } KIO::filesize_t fileSize = attr.fileSize(); - Q_UINT32 pflags = SSH2_FXF_READ; + TQ_UINT32 pflags = SSH2_FXF_READ; attr.clear(); TQByteArray handle; @@ -368,7 +368,7 @@ sftpProtocol::Status sftpProtocol::sftpGet( const KURL& src, KIO::filesize_t off // How big should each data packet be? Definitely not bigger than 64kb or // you will overflow the 2 byte size variable in a sftp packet. - Q_UINT32 len = 60*1024; + TQ_UINT32 len = 60*1024; code = SSH2_FX_OK; kdDebug(KIO_SFTP_DB) << "sftpGet(): offset = " << offset << endl; @@ -449,7 +449,7 @@ void sftpProtocol::get(const KURL& url) { return; // Get resume offset - Q_UINT64 offset = config()->readUnsignedLongNumEntry("resume"); + TQ_UINT64 offset = config()->readUnsignedLongNumEntry("resume"); if( offset > 0 ) { canResume(); kdDebug(KIO_SFTP_DB) << "get(): canResume(), offset = " << offset << endl; @@ -772,16 +772,16 @@ void sftpProtocol::openConnection() { kdDebug(KIO_SFTP_DB) << "openConnection(): Sending SSH2_FXP_INIT packet." << endl; TQByteArray p; TQDataStream packet(p, IO_WriteOnly); - packet << (Q_UINT32)5; // packet length - packet << (Q_UINT8) SSH2_FXP_INIT; // packet type - packet << (Q_UINT32)SSH2_FILEXFER_VERSION; // client version + packet << (TQ_UINT32)5; // packet length + packet << (TQ_UINT8) SSH2_FXP_INIT; // packet type + packet << (TQ_UINT32)SSH2_FILEXFER_VERSION; // client version putPacket(p); getPacket(p); TQDataStream s(p, IO_ReadOnly); - Q_UINT32 version; - Q_UINT8 type; + TQ_UINT32 version; + TQ_UINT8 type; s >> type; kdDebug(KIO_SFTP_DB) << "openConnection(): Got type " << type << endl; @@ -910,7 +910,7 @@ void sftpProtocol::sftpPut( const KURL& dest, int permissions, bool resume, bool KURL partUrl( origUrl ); partUrl.setFileName( partUrl.fileName() + ".part" ); - Q_UINT64 offset = 0; + TQ_UINT64 offset = 0; bool partExists = false; bool markPartial = config()->readBoolEntry("MarkPartial", true); @@ -974,7 +974,7 @@ void sftpProtocol::sftpPut( const KURL& dest, int permissions, bool resume, bool // Determine the url we will actually write to... KURL writeUrl (markPartial ? partUrl:origUrl); - Q_UINT32 pflags = 0; + TQ_UINT32 pflags = 0; if( overwrite && !resume ) pflags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_TRUNC; else if( !overwrite && !resume ) @@ -1157,7 +1157,7 @@ void sftpProtocol::mimetype ( const KURL& url ){ if( !mConnected ) return; - Q_UINT32 pflags = SSH2_FXF_READ; + TQ_UINT32 pflags = SSH2_FXF_READ; TQByteArray handle, mydata; sftpFileAttr attr(remoteEncoding()); int code; @@ -1166,8 +1166,8 @@ void sftpProtocol::mimetype ( const KURL& url ){ return; } - Q_UINT32 len = 1024; // Get first 1k for determining mimetype - Q_UINT64 offset = 0; + TQ_UINT32 len = 1024; // Get first 1k for determining mimetype + TQ_UINT64 offset = 0; code = SSH2_FX_OK; while( offset < len && code == SSH2_FX_OK ) { if( (code = sftpRead(handle, offset, len, mydata)) == SSH2_FX_OK ) { @@ -1256,13 +1256,13 @@ void sftpProtocol::mkdir(const KURL&url, int permissions){ if (permissions != -1) attr.setPermissions(permissions); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << Q_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size()); - s << (Q_UINT8)SSH2_FXP_MKDIR; + s << TQ_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size()); + s << (TQ_UINT8)SSH2_FXP_MKDIR; s << id; s.writeBytes(path.data(), len); s << attr; @@ -1272,7 +1272,7 @@ void sftpProtocol::mkdir(const KURL&url, int permissions){ putPacket(p); getPacket(p); - Q_UINT8 type; + TQ_UINT8 type; TQDataStream r(p, IO_ReadOnly); r >> type >> id; @@ -1484,7 +1484,7 @@ bool sftpProtocol::getPacket(TQByteArray& msg) { b.open( IO_WriteOnly ); while( msgLen ) { - len = atomicio(ssh.stdioFd(), buf.data(), kMin(buf.size(), msgLen), true /*read*/); + len = atomicio(ssh.stdioFd(), buf.data(), kMin((uint)buf.size(), msgLen), true /*read*/); if( len == 0 || len == -1) { TQString errmsg; @@ -1538,20 +1538,20 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){ TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << Q_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); - s << (Q_UINT8)SSH2_FXP_REALPATH; + s << TQ_UINT32(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); + s << (TQ_UINT8)SSH2_FXP_REALPATH; s << id; s.writeBytes(path.data(), len); putPacket(p); getPacket(p); - Q_UINT8 type; + TQ_UINT8 type; TQDataStream r(p, IO_ReadOnly); r >> type >> id; @@ -1561,7 +1561,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){ } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 code; + TQ_UINT32 code; r >> code; return code; } @@ -1571,7 +1571,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){ return -1; } - Q_UINT32 count; + TQ_UINT32 count; r >> count; if( count != 1 ) { kdError(KIO_SFTP_DB) << "sftpRealPath(): Bad number of file attributes for realpath command" << endl; @@ -1589,7 +1589,7 @@ int sftpProtocol::sftpRealPath(const KURL& url, KURL& newUrl){ return SSH2_FX_OK; } -sftpProtocol::Status sftpProtocol::doProcessStatus(Q_UINT8 code, const TQString& message) +sftpProtocol::Status sftpProtocol::doProcessStatus(TQ_UINT8 code, const TQString& message) { Status res; res.code = 0; @@ -1628,7 +1628,7 @@ sftpProtocol::Status sftpProtocol::doProcessStatus(Q_UINT8 code, const TQString& } /** Process SSH_FXP_STATUS packets. */ -void sftpProtocol::processStatus(Q_UINT8 code, const TQString& message){ +void sftpProtocol::processStatus(TQ_UINT8 code, const TQString& message){ Status st = doProcessStatus( code, message ); if( st.code != 0 ) error( st.code, st.text ); @@ -1642,21 +1642,21 @@ int sftpProtocol::sftpOpenDirectory(const KURL& url, TQByteArray& handle){ TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); - s << (Q_UINT8)SSH2_FXP_OPENDIR; - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); + s << (TQ_UINT8)SSH2_FXP_OPENDIR; + s << (TQ_UINT32)id; s.writeBytes(path.data(), len); putPacket(p); getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -1666,7 +1666,7 @@ int sftpProtocol::sftpOpenDirectory(const KURL& url, TQByteArray& handle){ } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 errCode; + TQ_UINT32 errCode; r >> errCode; return errCode; } @@ -1691,21 +1691,21 @@ int sftpProtocol::sftpClose(const TQByteArray& handle){ kdDebug(KIO_SFTP_DB) << "sftpClose()" << endl; - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size()); - s << (Q_UINT8)SSH2_FXP_CLOSE; - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size()); + s << (TQ_UINT8)SSH2_FXP_CLOSE; + s << (TQ_UINT32)id; s << handle; putPacket(p); getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -1718,7 +1718,7 @@ int sftpProtocol::sftpClose(const TQByteArray& handle){ return -1; } - Q_UINT32 code; + TQ_UINT32 code; r >> code; if( code != SSH2_FX_OK ) { kdError(KIO_SFTP_DB) << "sftpClose: close failed with err code " << code << endl; @@ -1735,14 +1735,14 @@ int sftpProtocol::sftpSetStat(const KURL& url, const sftpFileAttr& attr){ TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size()); - s << (Q_UINT8)SSH2_FXP_SETSTAT; - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + attr.size()); + s << (TQ_UINT8)SSH2_FXP_SETSTAT; + s << (TQ_UINT32)id; s.writeBytes(path.data(), len); s << attr; @@ -1750,7 +1750,7 @@ int sftpProtocol::sftpSetStat(const KURL& url, const sftpFileAttr& attr){ getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -1764,7 +1764,7 @@ int sftpProtocol::sftpSetStat(const KURL& url, const sftpFileAttr& attr){ return -1; } - Q_UINT32 code; + TQ_UINT32 code; r >> code; if( code != SSH2_FX_OK ) { kdError(KIO_SFTP_DB) << "sftpSetStat(): set stat failed with err code " << code << endl; @@ -1781,21 +1781,21 @@ int sftpProtocol::sftpRemove(const KURL& url, bool isfile){ TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); - s << (Q_UINT8)(isfile ? SSH2_FXP_REMOVE : SSH2_FXP_RMDIR); - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); + s << (TQ_UINT8)(isfile ? SSH2_FXP_REMOVE : SSH2_FXP_RMDIR); + s << (TQ_UINT32)id; s.writeBytes(path.data(), len); putPacket(p); getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -1808,7 +1808,7 @@ int sftpProtocol::sftpRemove(const KURL& url, bool isfile){ return -1; } - Q_UINT32 code; + TQ_UINT32 code; r >> code; if( code != SSH2_FX_OK ) { kdError(KIO_SFTP_DB) << "del(): del failed with err code " << code << endl; @@ -1828,16 +1828,16 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){ uint slen = srcPath.length(); uint dlen = destPath.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + slen + 4 /*str length*/ + dlen); - s << (Q_UINT8)SSH2_FXP_RENAME; - s << (Q_UINT32)id; + s << (TQ_UINT8)SSH2_FXP_RENAME; + s << (TQ_UINT32)id; s.writeBytes(srcPath.data(), slen); s.writeBytes(destPath.data(), dlen); @@ -1845,7 +1845,7 @@ int sftpProtocol::sftpRename(const KURL& src, const KURL& dest){ getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -1871,8 +1871,8 @@ int sftpProtocol::sftpReadDir(const TQByteArray& handle, const KURL& url){ // url is needed so we can lookup the link destination kdDebug(KIO_SFTP_DB) << "sftpReadDir(): " << url << endl; - Q_UINT32 id, expectedId, count; - Q_UINT8 type; + TQ_UINT32 id, expectedId, count; + TQ_UINT8 type; sftpFileAttr attr (remoteEncoding()); attr.setDirAttrsFlag(true); @@ -1880,9 +1880,9 @@ int sftpProtocol::sftpReadDir(const TQByteArray& handle, const KURL& url){ TQByteArray p; TQDataStream s(p, IO_WriteOnly); id = expectedId = mMsgId++; - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size()); - s << (Q_UINT8)SSH2_FXP_READDIR; - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size()); + s << (TQ_UINT8)SSH2_FXP_READDIR; + s << (TQ_UINT32)id; s << handle; putPacket(p); @@ -1943,13 +1943,13 @@ int sftpProtocol::sftpReadLink(const KURL& url, TQString& target){ //kdDebug(KIO_SFTP_DB) << "sftpReadLink(): Encoded Path: " << path << endl; //kdDebug(KIO_SFTP_DB) << "sftpReadLink(): Encoded Size: " << len << endl; - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); - s << (Q_UINT8)SSH2_FXP_READLINK; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); + s << (TQ_UINT8)SSH2_FXP_READLINK; s << id; s.writeBytes(path.data(), len); @@ -1957,7 +1957,7 @@ int sftpProtocol::sftpReadLink(const KURL& url, TQString& target){ putPacket(p); getPacket(p); - Q_UINT8 type; + TQ_UINT8 type; TQDataStream r(p, IO_ReadOnly); r >> type >> id; @@ -1967,7 +1967,7 @@ int sftpProtocol::sftpReadLink(const KURL& url, TQString& target){ } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 code; + TQ_UINT32 code; r >> code; kdDebug(KIO_SFTP_DB) << "sftpReadLink(): read link failed with code " << code << endl; return code; @@ -1978,7 +1978,7 @@ int sftpProtocol::sftpReadLink(const KURL& url, TQString& target){ return -1; } - Q_UINT32 count; + TQ_UINT32 count; r >> count; if( count != 1 ) { kdError(KIO_SFTP_DB) << "sftpReadLink(): Bad number of file attributes for realpath command" << endl; @@ -2005,16 +2005,16 @@ int sftpProtocol::sftpSymLink(const TQString& _target, const KURL& dest){ kdDebug(KIO_SFTP_DB) << "sftpSymLink(" << target << " -> " << destPath << ")" << endl; - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + tlen + 4 /*str length*/ + dlen); - s << (Q_UINT8)SSH2_FXP_SYMLINK; - s << (Q_UINT32)id; + s << (TQ_UINT8)SSH2_FXP_SYMLINK; + s << (TQ_UINT32)id; s.writeBytes(target.data(), tlen); s.writeBytes(destPath.data(), dlen); @@ -2022,7 +2022,7 @@ int sftpProtocol::sftpSymLink(const TQString& _target, const KURL& dest){ getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -2035,7 +2035,7 @@ int sftpProtocol::sftpSymLink(const TQString& _target, const KURL& dest){ return -1; } - Q_UINT32 code; + TQ_UINT32 code; r >> code; if( code != SSH2_FX_OK ) { kdError(KIO_SFTP_DB) << "sftpSymLink(): rename failed with err code " << code << endl; @@ -2052,21 +2052,21 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) { TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); - s << (Q_UINT8)SSH2_FXP_LSTAT; - s << (Q_UINT32)id; + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len); + s << (TQ_UINT8)SSH2_FXP_LSTAT; + s << (TQ_UINT32)id; s.writeBytes(path.data(), len); putPacket(p); getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -2075,7 +2075,7 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) { } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 errCode; + TQ_UINT32 errCode; r >> errCode; kdError(KIO_SFTP_DB) << "sftpStat(): stat failed with code " << errCode << endl; return errCode; @@ -2133,23 +2133,23 @@ int sftpProtocol::sftpStat(const KURL& url, sftpFileAttr& attr) { } -int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags, +int sftpProtocol::sftpOpen(const KURL& url, const TQ_UINT32 pflags, const sftpFileAttr& attr, TQByteArray& handle) { kdDebug(KIO_SFTP_DB) << "sftpOpen(" << url << ", handle" << endl; TQCString path = remoteEncoding()->encode(url.path()); uint len = path.length(); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + len + 4 /*pflags*/ + attr.size()); - s << (Q_UINT8)SSH2_FXP_OPEN; - s << (Q_UINT32)id; + s << (TQ_UINT8)SSH2_FXP_OPEN; + s << (TQ_UINT32)id; s.writeBytes(path.data(), len); s << pflags; s << attr; @@ -2158,7 +2158,7 @@ int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags, getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -2167,7 +2167,7 @@ int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags, } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 errCode; + TQ_UINT32 errCode; r >> errCode; return errCode; } @@ -2188,19 +2188,19 @@ int sftpProtocol::sftpOpen(const KURL& url, const Q_UINT32 pflags, } -int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, TQByteArray& data) +int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data) { // kdDebug(KIO_SFTP_DB) << "sftpRead( offset = " << offset << ", len = " << len << ")" << endl; TQByteArray p; TQDataStream s(p, IO_WriteOnly); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size() + 8 /*offset*/ + 4 /*length*/); - s << (Q_UINT8)SSH2_FXP_READ; - s << (Q_UINT32)id; + s << (TQ_UINT8)SSH2_FXP_READ; + s << (TQ_UINT32)id; s << handle; s << offset; // we don't have a convienient 64 bit int so set upper int to zero s << len; @@ -2209,7 +2209,7 @@ int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_ getPacket(p); TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -2218,7 +2218,7 @@ int sftpProtocol::sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_ } if( type == SSH2_FXP_STATUS ) { - Q_UINT32 errCode; + TQ_UINT32 errCode; r >> errCode; kdError(KIO_SFTP_DB) << "sftpRead: read failed with code " << errCode << endl; return errCode; @@ -2241,14 +2241,14 @@ int sftpProtocol::sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, c TQByteArray p; TQDataStream s(p, IO_WriteOnly); - Q_UINT32 id, expectedId; + TQ_UINT32 id, expectedId; id = expectedId = mMsgId++; - s << (Q_UINT32)(1 /*type*/ + 4 /*id*/ + + s << (TQ_UINT32)(1 /*type*/ + 4 /*id*/ + 4 /*str length*/ + handle.size() + 8 /*offset*/ + 4 /* data size */ + data.size()); - s << (Q_UINT8)SSH2_FXP_WRITE; - s << (Q_UINT32)id; + s << (TQ_UINT8)SSH2_FXP_WRITE; + s << (TQ_UINT32)id; s << handle; s << offset; // we don't have a convienient 64 bit int so set upper int to zero s << data; @@ -2264,7 +2264,7 @@ int sftpProtocol::sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, c // kdDebug(KIO_SFTP_DB) << "sftpWrite(): received packet [" << p << "]" << endl; TQDataStream r(p, IO_ReadOnly); - Q_UINT8 type; + TQ_UINT8 type; r >> type >> id; if( id != expectedId ) { @@ -2278,7 +2278,7 @@ int sftpProtocol::sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, c return -1; } - Q_UINT32 code; + TQ_UINT32 code; r >> code; return code; } diff --git a/kioslave/sftp/kio_sftp.h b/kioslave/sftp/kio_sftp.h index 22cd4764a..951d3e46e 100644 --- a/kioslave/sftp/kio_sftp.h +++ b/kioslave/sftp/kio_sftp.h @@ -109,9 +109,9 @@ private: // private methods /** Send an sftp packet to stdin of the ssh process. */ bool putPacket(TQByteArray& p); /** Process SSH_FXP_STATUS packets. */ - void processStatus(Q_UINT8, const TQString& message = TQString::null); + void processStatus(TQ_UINT8, const TQString& message = TQString::null); /** Process SSH_FXP_STATUS packes and return the result. */ - Status doProcessStatus(Q_UINT8, const TQString& message = TQString::null); + Status doProcessStatus(TQ_UINT8, const TQString& message = TQString::null); /** Opens a directory handle for url.path. Returns true if succeeds. */ int sftpOpenDirectory(const KURL& url, TQByteArray& handle); /** Closes a directory or file handle. */ @@ -131,9 +131,9 @@ private: // private methods /** Stats a file. */ int sftpStat(const KURL& url, sftpFileAttr& attr); /** No descriptions */ - int sftpOpen(const KURL& url, const Q_UINT32 pflags, const sftpFileAttr& attr, TQByteArray& handle); + int sftpOpen(const KURL& url, const TQ_UINT32 pflags, const sftpFileAttr& attr, TQByteArray& handle); /** No descriptions */ - int sftpRead(const TQByteArray& handle, KIO::filesize_t offset, Q_UINT32 len, TQByteArray& data); + int sftpRead(const TQByteArray& handle, KIO::filesize_t offset, TQ_UINT32 len, TQByteArray& data); /** No descriptions */ int sftpWrite(const TQByteArray& handle, KIO::filesize_t offset, const TQByteArray& data); diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp index 9b2323bd6..6dfdb2419 100644 --- a/kioslave/sftp/ksshprocess.cpp +++ b/kioslave/sftp/ksshprocess.cpp @@ -206,7 +206,7 @@ void KSshProcess::removeSignalHandlers() { KSshProcess::KSshProcess() : mVersion(UNKNOWN_VER), mConnected(false), mRunning(false), mConnectState(0) { - mSshPath = KStandardDirs::findExe(TQString::fromLatin1("ssh")); + mSshPath = KStandardDirs::findExe(TQString::tqfromLatin1("ssh")); kdDebug(KSSHPROC) << "KSshProcess::KSshProcess(): ssh path [" << mSshPath << "]" << endl; @@ -266,7 +266,7 @@ KSshProcess::SshVersion KSshProcess::version() { mVersion = UNKNOWN_VER; for(int i = 0; i < SSH_VER_MAX; i++) { - if( ver.find(versionStrs[i]) != -1 ) { + if( ver.tqfind(versionStrs[i]) != -1 ) { mVersion = (SshVersion)i; break; } @@ -292,7 +292,7 @@ TQString KSshProcess::versionStr() { return TQString::null; } - return TQString::fromLatin1(versionStrs[mVersion]); + return TQString::tqfromLatin1(versionStrs[mVersion]); } */ @@ -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.contains("NumberOfPasswordPrompts") || - tmp.contains("StrictHostKeyChecking") ) { + if( tmp.tqcontains("NumberOfPasswordPrompts") || + tmp.tqcontains("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.find(TQString::fromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { + else if( line.tqfind(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { mConnectState = STATE_TRY_PASSWD; } - else if( line.find(passphrasePrompt[mVersion]) != -1 ) { + else if( line.tqfind(passphrasePrompt[mVersion]) != -1 ) { mConnectState = STATE_TRY_PASSPHRASE; } - else if( line.find(authSuccessMsg[mVersion]) != -1 ) { + else if( line.tqfind(authSuccessMsg[mVersion]) != -1 ) { return true; } - else if( line.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1 ) { + else if( line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1 ) { mConnectState = STATE_AUTH_FAILED; } - else if( line.find(hostKeyMissingMsg[mVersion]) != -1 ) { + else if( line.tqfind(hostKeyMissingMsg[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; } - else if( line.find(hostKeyChangedMsg[mVersion]) != -1 ) { + else if( line.tqfind(hostKeyChangedMsg[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(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.find(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.find(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { + else if( line.tqfind(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.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1) - || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1) + || line.tqfind(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.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_CONTINUE; } - else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.tqfind(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.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1) - || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1) + || line.tqfind(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.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_CONTINUE; } - else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.find(knownHostsFileMsg[mVersion]) != -1 ) { + else if( line.tqfind(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/ksshprocess.h b/kioslave/sftp/ksshprocess.h index 7fe8dd814..5130628e4 100644 --- a/kioslave/sftp/ksshprocess.h +++ b/kioslave/sftp/ksshprocess.h @@ -116,9 +116,9 @@ public: */ class SshOpt { public: - Q_UINT32 opt; + TQ_UINT32 opt; TQString str; - Q_INT32 num; + TQ_INT32 num; bool boolean; }; diff --git a/kioslave/sftp/process.cpp b/kioslave/sftp/process.cpp index ca99b36bb..b97d5860b 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.find('\n'); + pos = inbuf.tqfind('\n'); if (pos == -1) { @@ -155,7 +155,7 @@ TQCString MyPtyProcess::readLineFrom(int fd, TQCString& inbuf, bool block) buf[nbytes] = '\000'; inbuf += buf; - pos = inbuf.find('\n'); + pos = inbuf.tqfind('\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.contains('/')) + if (command.tqcontains('/')) path = command; else { diff --git a/kioslave/sftp/sftpfileattr.cpp b/kioslave/sftp/sftpfileattr.cpp index 42148ac28..9b7bf9b34 100644 --- a/kioslave/sftp/sftpfileattr.cpp +++ b/kioslave/sftp/sftpfileattr.cpp @@ -44,7 +44,7 @@ sftpFileAttr::sftpFileAttr(KRemoteEncoding* encoding){ /** Constructor to initialize the file attributes on declaration. */ sftpFileAttr::sftpFileAttr(Q_ULLONG size, uid_t uid, gid_t gid, mode_t permissions, time_t atime, - time_t mtime, Q_UINT32 extendedCount) { + time_t mtime, TQ_UINT32 extendedCount) { clear(); mDirAttrs = false; mSize = size; @@ -124,22 +124,22 @@ UDSEntry sftpFileAttr::entry() { /** Use to output the file attributes to a sftp packet */ TQDataStream& operator<< (TQDataStream& s, const sftpFileAttr& fa) { - s << (Q_UINT32)fa.mFlags; + s << (TQ_UINT32)fa.mFlags; if( fa.mFlags & SSH2_FILEXFER_ATTR_SIZE ) { s << (Q_ULLONG)fa.mSize; } if( fa.mFlags & SSH2_FILEXFER_ATTR_UIDGID ) - { s << (Q_UINT32)fa.mUid << (Q_UINT32)fa.mGid; } + { s << (TQ_UINT32)fa.mUid << (TQ_UINT32)fa.mGid; } if( fa.mFlags & SSH2_FILEXFER_ATTR_PERMISSIONS ) - { s << (Q_UINT32)fa.mPermissions; } + { s << (TQ_UINT32)fa.mPermissions; } if( fa.mFlags & SSH2_FILEXFER_ATTR_ACMODTIME ) - { s << (Q_UINT32)fa.mAtime << (Q_UINT32)fa.mMtime; } + { s << (TQ_UINT32)fa.mAtime << (TQ_UINT32)fa.mMtime; } if( fa.mFlags & SSH2_FILEXFER_ATTR_EXTENDED ) { - s << (Q_UINT32)fa.mExtendedCount; + s << (TQ_UINT32)fa.mExtendedCount; // XXX: Write extensions to data stream here // s.writeBytes(extendedtype).writeBytes(extendeddata); } @@ -175,7 +175,7 @@ TQDataStream& operator>> (TQDataStream& s, sftpFileAttr& fa) { fa.setFileSize(fileSize); } - Q_UINT32 x; + TQ_UINT32 x; if( fa.mFlags & SSH2_FILEXFER_ATTR_UIDGID ) { s >> x; fa.setUid(x); @@ -295,8 +295,8 @@ void sftpFileAttr::clear(){ } /** Return the size of the sftp attribute. */ -Q_UINT32 sftpFileAttr::size() const{ - Q_UINT32 size = 4; // for the attr flag +TQ_UINT32 sftpFileAttr::size() const{ + TQ_UINT32 size = 4; // for the attr flag if( mFlags & SSH2_FILEXFER_ATTR_SIZE ) size += 8; diff --git a/kioslave/sftp/sftpfileattr.h b/kioslave/sftp/sftpfileattr.h index a2a9cf87e..006f1d124 100644 --- a/kioslave/sftp/sftpfileattr.h +++ b/kioslave/sftp/sftpfileattr.h @@ -42,7 +42,7 @@ private: // Private attributes TQString mFilename; /** Specifies which fields of the file attribute are available. */ - Q_UINT32 mFlags; + TQ_UINT32 mFlags; /** Size of the file in bytes. Should be 64 bit safe. */ Q_ULLONG mSize; @@ -64,7 +64,7 @@ private: // Private attributes /** Number of file attribute extensions. Not currently implemented */ - Q_UINT32 mExtendedCount; + TQ_UINT32 mExtendedCount; /** Longname of the file as found in a SSH_FXP_NAME sftp packet. These contents are parse to return the file's owner name and @@ -95,10 +95,10 @@ public: /** Constructor to initialize the file attributes on declaration. */ sftpFileAttr(Q_ULLONG size_, uid_t uid_, gid_t gid_, mode_t permissions_, - time_t atime_, time_t mtime_, Q_UINT32 extendedCount_ = 0); + time_t atime_, time_t mtime_, TQ_UINT32 extendedCount_ = 0); /** Return the size of the sftp attribute not including filename or longname*/ - Q_UINT32 size() const; + TQ_UINT32 size() const; /** Clear all attributes and flags. */ void clear(); diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp index d4a48239f..d82301e94 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.find('/', 1); + int index = share.tqfind('/', 1); if (index > 1) share = share.left(index); if (share.at(0) == '/') diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp index e9a216fd3..cab3fe9be 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.contains('@') && !surl.contains("smb://")) { + if (surl.tqcontains('@') && !surl.tqcontains("smb://")) { KURL url(kurl); - 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)); + 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)); } else { url.setUser(userinfo); } @@ -409,7 +409,7 @@ void SMBSlave::listDir( const KURL& kurl ) udsentry.append(atom); atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = TQString::fromLatin1("application/x-smb-server"); + atom.m_str = TQString::tqfromLatin1("application/x-smb-server"); udsentry.append(atom); } @@ -429,7 +429,7 @@ void SMBSlave::listDir( const KURL& kurl ) udsentry.append(atom); atom.m_uds = KIO::UDS_MIME_TYPE; - atom.m_str = TQString::fromLatin1("application/x-smb-workgroup"); + atom.m_str = TQString::tqfromLatin1("application/x-smb-workgroup"); udsentry.append(atom); atom.m_uds = KIO::UDS_URL; diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp index f9c366235..04d4f56fd 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.replace('\\', '/'); // smbmounterplugin sends \\host/share + remotePath.tqreplace('\\', '/'); // smbmounterplugin sends \\host/share kdDebug(KIO_SMB) << "mounting: " << remotePath.local8Bit() << " to " << mountPoint.local8Bit() << endl; diff --git a/kioslave/smtp/capabilities.cc b/kioslave/smtp/capabilities.cc index 5b2856837..0172934dd 100644 --- a/kioslave/smtp/capabilities.cc +++ b/kioslave/smtp/capabilities.cc @@ -126,7 +126,7 @@ namespace KioSMTP { if ( it.key() == "AUTH" ) result += it.data(); else if ( it.key().startsWith( "AUTH=" ) ) { - result.push_back( it.key().mid( qstrlen("AUTH=") ) ); + result.push_back( it.key().mid( tqstrlen("AUTH=") ) ); result += it.data(); } } diff --git a/kioslave/smtp/capabilities.h b/kioslave/smtp/capabilities.h index 9f9464104..e859f4055 100644 --- a/kioslave/smtp/capabilities.h +++ b/kioslave/smtp/capabilities.h @@ -54,10 +54,10 @@ namespace KioSMTP { void clear() { mCapabilities.clear(); } bool have( const TQString & cap ) const { - return mCapabilities.find( cap.upper() ) != mCapabilities.end(); + return mCapabilities.tqfind( cap.upper() ) != mCapabilities.end(); } bool have( const TQCString & cap ) const { return have( TQString( cap.data() ) ); } - bool have( const char * cap ) const { return have( TQString::fromLatin1( cap ) ); } + bool have( const char * cap ) const { return have( TQString::tqfromLatin1( cap ) ); } TQString asMetaDataString() const; diff --git a/kioslave/smtp/command.cc b/kioslave/smtp/command.cc index 2771baf82..41c9cf78a 100644 --- a/kioslave/smtp/command.cc +++ b/kioslave/smtp/command.cc @@ -321,14 +321,14 @@ static sasl_callback_t callbacks[] = { cmd = mUngetSASLResponse; mUngetSASLResponse = 0; } else if ( mFirstTime ) { - TQString firstCommand = "AUTH " + TQString::fromLatin1( mMechusing ); + TQString firstCommand = "AUTH " + TQString::tqfromLatin1( mMechusing ); tmp.setRawData( mOut, mOutlen ); KCodecs::base64Encode( tmp, challenge ); tmp.resetRawData( mOut, mOutlen ); if ( !challenge.isEmpty() ) { firstCommand += " "; - firstCommand += TQString::fromLatin1( challenge.data(), challenge.size() ); + firstCommand += TQString::tqfromLatin1( challenge.data(), challenge.size() ); } cmd = firstCommand.latin1(); diff --git a/kioslave/smtp/interactivesmtpserver.h b/kioslave/smtp/interactivesmtpserver.h index 39a07f6a9..556b3cb3d 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 - .replace( '&', "&" ) - .replace( '>', ">" ) - .replace( '<', "<" ) - .replace( '"', """ ) + .tqreplace( '&', "&" ) + .tqreplace( '>', ">" ) + .tqreplace( '<', "<" ) + .tqreplace( '"', """ ) ; } diff --git a/kioslave/smtp/request.cc b/kioslave/smtp/request.cc index ab02abc1c..22042769b 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).find( '=' ); + int equalsPos = (*it).tqfind( '=' ); if ( equalsPos <= 0 ) continue; @@ -93,7 +93,7 @@ namespace KioSMTP { static bool isUsAscii( const TQString & s ) { for ( uint i = 0 ; i < s.length() ; ++i ) - if ( s[i].unicode() > 127 ) return false; + if ( s[i].tqunicode() > 127 ) return false; return true; } @@ -101,7 +101,7 @@ namespace KioSMTP { static inline bool isSpecial( char ch ) { static const TQCString specials = "()<>[]:;@\\,.\""; - return specials.find( ch ) >= 0; + return specials.tqfind( ch ) >= 0; } @@ -159,7 +159,7 @@ namespace KioSMTP { static TQCString formatSubject( TQString s ) { if ( isUsAscii( s ) ) - return s.remove( '\n' ).latin1(); // don't break header folding, + return TQString(s.remove( '\n' )).latin1(); // don't break header folding, // so remove any line break // that happen to be around else diff --git a/kioslave/smtp/response.cc b/kioslave/smtp/response.cc index ec5067871..8ae8cdceb 100644 --- a/kioslave/smtp/response.cc +++ b/kioslave/smtp/response.cc @@ -103,10 +103,10 @@ namespace KioSMTP { TQString msg; if ( lines().count() > 1 ) msg = i18n("The server responded:\n%1") - .arg( join( '\n', lines() ) ); + .arg( static_cast<const char *>(join( '\n', lines()) ) ); else msg = i18n("The server responded: \"%1\"") - .arg( lines().front() ); + .arg( static_cast<const char *>(lines().front()) ); if ( first() == 4 ) msg += '\n' + i18n("This is a temporary failure. " "You may try again later."); diff --git a/kioslave/smtp/response.h b/kioslave/smtp/response.h index 26c79b9c1..2fd48ebf3 100644 --- a/kioslave/smtp/response.h +++ b/kioslave/smtp/response.h @@ -49,7 +49,7 @@ namespace KioSMTP { mWellFormed(true) {} void parseLine( const char * line ) { - parseLine( line, qstrlen( line ) ); + parseLine( line, tqstrlen( line ) ); } void parseLine( const char * line, int len ); diff --git a/kioslave/smtp/smtp.cc b/kioslave/smtp/smtp.cc index e493f5132..883ee3ebb 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().contains( open_url.host() ); + bool hasProfile = mset.profiles().tqcontains( open_url.host() ); if ( hasProfile ) { mset.setProfile(open_url.host()); open_url.setHost(mset.getSetting(KEMailSettings::OutServer)); diff --git a/kioslave/smtp/smtp.h b/kioslave/smtp/smtp.h index 18f489c2c..bcdcaaae3 100644 --- a/kioslave/smtp/smtp.h +++ b/kioslave/smtp/smtp.h @@ -1,6 +1,6 @@ /* -*- c++ -*- * Copyright (c) 2000, 2001 Alex Zepeda <zipzippy@sonic.net> - * Copyright (c) 2001 Michael Häckel <Michael@Haeckel.Net> + * Copyright (c) 2001 Michael H�ckel <Michael@Haeckel.Net> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,7 +39,9 @@ class KURL; class TQCString; template <typename T> class TQMemArray; +#ifdef USE_QT3 typedef TQMemArray<char> TQByteArray; +#endif // USE_QT3 namespace KioSMTP { class Response; diff --git a/kioslave/smtp/test_commands.cc b/kioslave/smtp/test_commands.cc index 680514b10..fd3adb949 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.contains( cap ); } + bool haveCapability( const char * cap ) const { return caps.tqcontains( cap ); } void error( int id, const TQString & msg ) { lastErrorCode = id; lastErrorMessage = msg; @@ -82,16 +82,16 @@ public: using namespace KioSMTP; static const char * foobarbaz = ".Foo bar baz"; -static const unsigned int foobarbaz_len = qstrlen( foobarbaz ); +static const unsigned int foobarbaz_len = tqstrlen( foobarbaz ); static const char * foobarbaz_dotstuffed = "..Foo bar baz"; -static const unsigned int foobarbaz_dotstuffed_len = qstrlen( foobarbaz_dotstuffed ); +static const unsigned int foobarbaz_dotstuffed_len = tqstrlen( foobarbaz_dotstuffed ); static const char * foobarbaz_lf = ".Foo bar baz\n"; -static const unsigned int foobarbaz_lf_len = qstrlen( foobarbaz_lf ); +static const unsigned int foobarbaz_lf_len = tqstrlen( foobarbaz_lf ); static const char * foobarbaz_crlf = "..Foo bar baz\r\n"; -static const unsigned int foobarbaz_crlf_len = qstrlen( foobarbaz_crlf ); +static const unsigned int foobarbaz_crlf_len = tqstrlen( foobarbaz_crlf ); static void checkSuccessfulTransferCommand( bool, bool, bool, bool, bool ); @@ -657,10 +657,10 @@ void checkSuccessfulTransferCommand( bool error, bool preload, bool ungetLast, mailEndsInNewline ? foobarbaz_lf : foobarbaz : mailEndsInNewline ? foobarbaz_crlf : foobarbaz_dotstuffed ; - const unsigned int s_pre_len = qstrlen( s_pre ); + const unsigned int s_pre_len = tqstrlen( s_pre ); const char * s_post = mailEndsInNewline ? foobarbaz_crlf : foobarbaz_dotstuffed ; - //const unsigned int s_post_len = qstrlen( s_post ); + //const unsigned int s_post_len = tqstrlen( s_post ); TransferCommand xfer( &smtp, preload ? s_post : 0 ); diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp index 162d96621..70d9057a6 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.contains(*name)) + if (!names_found.tqcontains(*name)) { KDesktopFile desktop(*dirpath+*name, true); diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp index 63171009a..4dc5e3008 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.contains(*filename)) + if (!names_found.tqcontains(*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.find('/', 1); + int i = url_path.tqfind('/', 1); if (i > 0) { name = url_path.mid(1, i-1); @@ -285,7 +285,7 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry, const KIO::UDSEntryList &) ) ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( slotResult(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); if (m_lastListingEmpty) icon = empty_icon; } @@ -299,13 +299,13 @@ void SystemImpl::slotEntries(KIO::Job *job, const KIO::UDSEntryList &list) { job->kill(true); m_lastListingEmpty = false; - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } } void SystemImpl::slotResult(KIO::Job *) { - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } diff --git a/kioslave/system/systemimpl.h b/kioslave/system/systemimpl.h index 45de39b3b..31dc2daad 100644 --- a/kioslave/system/systemimpl.h +++ b/kioslave/system/systemimpl.h @@ -29,7 +29,7 @@ #include <tqobject.h> #include <tqstring.h> -class SystemImpl : public QObject +class SystemImpl : public TQObject { Q_OBJECT public: diff --git a/kioslave/tar/tar.cc b/kioslave/tar/tar.cc index 8afc1d0e8..b55fd317e 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.find( '/', pos+1 )) != -1 ) + while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 ) { TQString tryPath = fullPath.left( pos ); kdDebug(7109) << fullPath << " trying " << tryPath << endl; @@ -125,7 +125,7 @@ bool ArchiveProtocol::checkNewFile( const KURL & url, TQString & path, KIO::Erro path.truncate( len - 1 ); } else - path = TQString::fromLatin1("/"); + path = TQString::tqfromLatin1("/"); kdDebug(7109) << "Found. archiveFile=" << archiveFile << " path=" << path << endl; break; } @@ -248,9 +248,9 @@ void ArchiveProtocol::listDir( const KURL & url ) if ( path.isEmpty() ) { - KURL redir( url.protocol() + TQString::fromLatin1( ":/") ); + KURL redir( url.protocol() + TQString::tqfromLatin1( ":/") ); kdDebug( 7109 ) << "url.path()==" << url.path() << endl; - redir.setPath( url.path() + TQString::fromLatin1("/") ); + redir.setPath( url.path() + TQString::tqfromLatin1("/") ); kdDebug( 7109 ) << "ArchiveProtocol::listDir: redirection " << redir.url() << endl; redirection( redir ); finished(); @@ -264,7 +264,7 @@ void ArchiveProtocol::listDir( const KURL & url ) const KArchiveDirectory* dir; if (!path.isEmpty() && path != "/") { - kdDebug(7109) << TQString("Looking for entry %1").arg(path) << endl; + kdDebug(7109) << TQString(TQString("Looking for entry %1").arg(path)) << endl; const KArchiveEntry* e = root->entry( path ); if ( !e ) { @@ -360,7 +360,7 @@ void ArchiveProtocol::stat( const KURL & url ) const KArchiveEntry* archiveEntry; if ( path.isEmpty() ) { - path = TQString::fromLatin1( "/" ); + path = TQString::tqfromLatin1( "/" ); archiveEntry = root; } else { path = TQString::fromLocal8Bit(remoteEncoding()->encode(path)); @@ -504,9 +504,9 @@ void ArchiveProtocol::get( const KURL & url ) if ( !firstRead ) { bufferSize = kMin( maxSize, fileSize ); - buffer.resize( bufferSize, TQGArray::SpeedOptim ); + buffer.tqresize( bufferSize, TQGArray::SpeedOptim ); } - const Q_LONG read = io->readBlock( buffer.data(), buffer.size() ); // Avoid to use bufferSize here, in case something went wrong. + const TQ_LONG read = io->readBlock( buffer.data(), buffer.size() ); // Avoid to use bufferSize here, in case something went wrong. if ( read != bufferSize ) { kdWarning(7109) << "Read " << read << " bytes but expected " << bufferSize << endl; diff --git a/kioslave/thumbnail/cursorcreator.cpp b/kioslave/thumbnail/cursorcreator.cpp index d77629acf..a8f6a2eb9 100644 --- a/kioslave/thumbnail/cursorcreator.cpp +++ b/kioslave/thumbnail/cursorcreator.cpp @@ -48,14 +48,14 @@ bool CursorCreator::create( const TQString &path, int width, int height, TQImage img.setAlphaBuffer( true ); // Convert the image to non-premultiplied alpha - Q_UINT32 *pixels = reinterpret_cast<Q_UINT32 *>( img.bits() ); + TQ_UINT32 *pixels = reinterpret_cast<TQ_UINT32 *>( img.bits() ); for ( int i = 0; i < (img.width() * img.height()); i++ ) { - float alpha = qAlpha( pixels[i] ) / 255.0; + float alpha = tqAlpha( pixels[i] ) / 255.0; if ( alpha > 0.0 && alpha < 1.0 ) - pixels[i] = qRgba( int( qRed(pixels[i]) / alpha ), - int( qGreen(pixels[i]) / alpha ), - int( qBlue(pixels[i]) / alpha ), - qAlpha(pixels[i]) ); + pixels[i] = tqRgba( int( tqRed(pixels[i]) / alpha ), + int( tqGreen(pixels[i]) / alpha ), + int( tqBlue(pixels[i]) / alpha ), + tqAlpha(pixels[i]) ); } // Create a deep copy of the image so the image data is preserved diff --git a/kioslave/thumbnail/exrcreator.cpp b/kioslave/thumbnail/exrcreator.cpp index 633ad5095..d0edbd38e 100644 --- a/kioslave/thumbnail/exrcreator.cpp +++ b/kioslave/thumbnail/exrcreator.cpp @@ -50,7 +50,7 @@ bool EXRCreator::create(const TQString &path, int, int, TQImage &img) for ( unsigned int y=0; y < preview.height(); y++ ) { for ( unsigned int x=0; x < preview.width(); x++ ) { const Imf::PreviewRgba &q = preview.pixels()[x+(y*preview.width())]; - qpreview.setPixel( x, y, qRgba(q.r, q.g, q.b, q.a) ); + qpreview.setPixel( x, y, tqRgba(q.r, q.g, q.b, q.a) ); } } img = qpreview; diff --git a/kioslave/thumbnail/htmlcreator.cpp b/kioslave/thumbnail/htmlcreator.cpp index c9ddf0204..43aec5f39 100644 --- a/kioslave/thumbnail/htmlcreator.cpp +++ b/kioslave/thumbnail/htmlcreator.cpp @@ -63,7 +63,7 @@ bool HTMLCreator::create(const TQString &path, int width, int height, TQImage &i int t = startTimer(5000); - qApp->enter_loop(); + tqApp->enter_loop(); killTimer(t); @@ -101,12 +101,12 @@ bool HTMLCreator::create(const TQString &path, int width, int height, TQImage &i void HTMLCreator::timerEvent(TQTimerEvent *) { - qApp->exit_loop(); + tqApp->exit_loop(); } void HTMLCreator::slotCompleted() { - qApp->exit_loop(); + tqApp->exit_loop(); } ThumbCreator::Flags HTMLCreator::flags() const diff --git a/kioslave/thumbnail/textcreator.cpp b/kioslave/thumbnail/textcreator.cpp index 31f4c4254..db39e9652 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.find( '\n', i ); + int pos = text.tqfind( '\n', i ); if ( pos == -1 ) break; i = pos + 1; @@ -174,7 +174,7 @@ bool TextCreator::create(const TQString &path, int width, int height, TQImage &i rect = m_splitter->coordinates( ch ); if ( !rect.isEmpty() ) { - bitBlt( &m_pixmap, TQPoint(x,y), fontPixmap, rect, Qt::CopyROP ); + bitBlt( &m_pixmap, TQPoint(x,y), fontPixmap, rect, TQt::CopyROP ); } x += xOffset; // next character diff --git a/kioslave/thumbnail/thumbnail.cpp b/kioslave/thumbnail/thumbnail.cpp index 272e34eed..55ac3c80b 100644 --- a/kioslave/thumbnail/thumbnail.cpp +++ b/kioslave/thumbnail/thumbnail.cpp @@ -298,9 +298,9 @@ void ThumbnailProtocol::get(const KURL &url) { double imgRatio = (double)img.height() / (double)img.width(); if (imgRatio > (double)m_height / (double)m_width) - img = img.smoothScale( int(QMAX((double)m_height / imgRatio, 1)), m_height); + img = img.smoothScale( int(TQMAX((double)m_height / imgRatio, 1)), m_height); else - img = img.smoothScale(m_width, int(QMAX((double)m_width * imgRatio, 1))); + img = img.smoothScale(m_width, int(TQMAX((double)m_width * imgRatio, 1))); } // ### FIXME @@ -322,7 +322,7 @@ void ThumbnailProtocol::get(const KURL &url) p.drawLine( 0, 0, 0, y2 ); p.end(); - const TQBitmap *mask = pix.mask(); + const TQBitmap *mask = pix.tqmask(); if ( mask ) // need to update it so we can see the frame { TQBitmap bitmap( *mask ); @@ -417,7 +417,7 @@ void ThumbnailProtocol::get(const KURL &url) const TQImage& ThumbnailProtocol::getIcon() { - TQImage* icon = m_iconDict.find(m_mimeType); + TQImage* icon = m_iconDict.tqfind(m_mimeType); if ( !icon ) // generate it! { icon = new TQImage( KMimeType::mimeType(m_mimeType)->pixmap( KIcon::Desktop, m_iconSize ).convertToImage() ); diff --git a/kioslave/trash/kio_trash.cpp b/kioslave/trash/kio_trash.cpp index 1210bb59a..4d4330ea9 100644 --- a/kioslave/trash/kio_trash.cpp +++ b/kioslave/trash/kio_trash.cpp @@ -78,10 +78,10 @@ TrashProtocol::TrashProtocol( const TQCString& protocol, const TQCString &pool, { struct passwd *user = getpwuid( getuid() ); if ( user ) - m_userName = TQString::fromLatin1(user->pw_name); + m_userName = TQString::tqfromLatin1(user->pw_name); struct group *grp = getgrgid( getgid() ); if ( grp ) - m_groupName = TQString::fromLatin1(grp->gr_name); + m_groupName = TQString::tqfromLatin1(grp->gr_name); } TrashProtocol::~TrashProtocol() @@ -540,7 +540,7 @@ void TrashProtocol::get( const KURL& url ) this, TQT_SLOT( slotMimetype( KIO::Job*, const TQString& ) ) ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( jobFinished(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); } void TrashProtocol::slotData( KIO::Job*, const TQByteArray&arr ) @@ -559,7 +559,7 @@ void TrashProtocol::jobFinished( KIO::Job* job ) error( job->error(), job->errorText() ); else finished(); - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } #if 0 diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp index 0c9710367..4f85ba50c 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.find("system:/trash")==0) { + if (restoreArg.tqfind("system:/trash")==0) { restoreArg.remove(0, 13); restoreArg.prepend("trash:"); } diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp index fb6927d3e..c847d9302 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.find( 0 ) == topDirs.end() ); + assert( topDirs.tqfind( 0 ) == topDirs.end() ); foundTrashDir = true; } else { - assert( topDirs.find( it.key() ) != topDirs.end() ); + assert( topDirs.tqfind( 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.contains( "T" ) ); + assert( date.tqcontains( "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.contains( "." ) == 1 ); // found it, and only once + assert( m_listResult.tqcontains( "." ) == 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.contains( "." ) == 1 ); // found it, and only once + assert( m_listResult.tqcontains( "." ) == 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.contains( "." ) == 1 ); // found it, and only once - assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once + assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.tqcontains( "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 f43e7929f..80343c98a 100644 --- a/kioslave/trash/trashimpl.cpp +++ b/kioslave/trash/trashimpl.cpp @@ -262,7 +262,7 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi info += KURL::encode_string( makeRelativePath( topDirectoryPath( trashId ), origPath ), m_mibEnum ).latin1(); info += "\n"; info += "DeletionDate="; - info += TQDateTime::currentDateTime().toString( Qt::ISODate ).latin1(); + info += TQDateTime::tqcurrentDateTime().toString( Qt::ISODate ).latin1(); info += "\n"; size_t sz = info.size() - 1; // avoid trailing 0 from QCString @@ -372,7 +372,7 @@ bool TrashImpl::move( const TQString& src, const TQString& dest ) #endif connect( job, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( jobFinished(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); return m_lastErrorCode == 0; } @@ -381,7 +381,7 @@ void TrashImpl::jobFinished(KIO::Job* job) { kdDebug() << k_funcinfo << " error=" << job->error() << endl; error( job->error(), job->errorText() ); - qApp->eventLoop()->exitLoop(); + tqApp->eventLoop()->exitLoop(); } bool TrashImpl::copyToTrash( const TQString& origPath, int trashId, const TQString& fileId ) @@ -419,7 +419,7 @@ bool TrashImpl::copy( const TQString& src, const TQString& dest ) #endif connect( job, TQT_SIGNAL( result( KIO::Job* ) ), this, TQT_SLOT( jobFinished( KIO::Job* ) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); return m_lastErrorCode == 0; } @@ -429,7 +429,7 @@ bool TrashImpl::directRename( const TQString& src, const TQString& dest ) kdDebug() << k_funcinfo << src << " -> " << dest << endl; if ( ::rename( TQFile::encodeName( src ), TQFile::encodeName( dest ) ) != 0 ) { if (errno == EXDEV) { - error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename") ); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::tqfromLatin1("rename") ); } else { if (( errno == EACCES ) || (errno == EPERM)) { error( KIO::ERR_ACCESS_DENIED, dest ); @@ -508,14 +508,14 @@ bool TrashImpl::synchronousDel( const TQString& path, bool setLastErrorCode, boo KIO::ChmodJob* chmodJob = KIO::chmod( fileItemList, 0200, 0200, TQString::null, TQString::null, true /*recursive*/, false /*showProgressInfo*/ ); connect( chmodJob, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( jobFinished(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); } kdDebug() << k_funcinfo << "deleting " << url << endl; KIO::DeleteJob *job = KIO::del( url, false, false ); connect( job, TQT_SIGNAL( result(KIO::Job *) ), this, TQT_SLOT( jobFinished(KIO::Job *) ) ); - qApp->eventLoop()->enterLoop(); + tqApp->eventLoop()->enterLoop(); bool ok = m_lastErrorCode == 0; if ( !setLastErrorCode ) { m_lastErrorCode = oldErrorCode; @@ -630,7 +630,7 @@ bool TrashImpl::readInfoFile( const TQString& infoPath, TrashedFileInfo& info, i } TQString line = cfg.readEntry( "DeletionDate" ); if ( !line.isEmpty() ) { - info.deletionDate = TQDateTime::fromString( line, Qt::ISODate ); + info.deletionDate = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( line, Qt::ISODate )); } return true; } @@ -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.contains( trashId ) ); + Q_ASSERT( m_trashDirectories.tqcontains( 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.contains( trashId ) ); + Q_ASSERT( m_topDirectories.tqcontains( 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.find( '-', 0 ); // don't match leading slash + int slashPos = path.tqfind( '-', 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.find( '/', start ); + slashPos = path.tqfind( '/', start ); if ( slashPos <= 0 ) { fileId = path.mid( start ); relativePath = TQString::null; diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h index 027864456..fb34e5be0 100644 --- a/kioslave/trash/trashimpl.h +++ b/kioslave/trash/trashimpl.h @@ -34,7 +34,7 @@ * Implementation of all low-level operations done by kio_trash * The structure of the trash directory follows the freedesktop.org standard <TODO URL> */ -class TrashImpl : public QObject +class TrashImpl : public TQObject { Q_OBJECT public: |