diff options
469 files changed, 2191 insertions, 2191 deletions
diff --git a/arts/kde/kplayobjectfactory.cc b/arts/kde/kplayobjectfactory.cc index 3e83d54da..29ee20e3d 100644 --- a/arts/kde/kplayobjectfactory.cc +++ b/arts/kde/kplayobjectfactory.cc @@ -155,7 +155,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons } // decide if it's a local file. mpeglib provides cdda reading and decoding, so we prefer that over kio_audiocd - if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().tqcontains( "application/x-cda" ) ) ) + if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) ) { // we rely on the delivered mimetype if it's a local file d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false ); diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 7195f9271..c080ba30b 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -351,13 +351,13 @@ void KNotify::notify(const TQString &event, const TQString &fromApp, if ( !event.isEmpty() ) { // get config file - if ( d->events.tqcontains( fromApp ) ) { + if ( d->events.contains( fromApp ) ) { eventsFile = d->events[fromApp]; } else { eventsFile=new KConfig(locate("data", fromApp+"/eventsrc"),true,false); d->events.insert( fromApp, eventsFile ); } - if ( d->configs.tqcontains( fromApp) ) { + if ( d->configs.contains( fromApp) ) { configFile = d->configs[fromApp]; } else { configFile=new KConfig(fromApp+".eventsrc",true,false); @@ -695,7 +695,7 @@ void KNotify::playTimeout() ++it; if ( (*current)->state() != Arts::posPlaying ) { - TQMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.tqfind( *current ); + TQMap<KDE::PlayObject*,int>::Iterator eit = d->playObjectEventMap.find( *current ); if ( eit != d->playObjectEventMap.end() ) { soundFinished( *eit, PlayedOK ); @@ -730,7 +730,7 @@ void KNotify::slotPlayerProcessExited( KProcess *proc ) void KNotify::abortFirstPlayObject() { #ifndef WITHOUT_ARTS - TQMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.tqfind( d->playObjects.getFirst() ); + TQMap<KDE::PlayObject*,int>::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() ); if ( it != d->playObjectEventMap.end() ) { soundFinished( it.data(), Aborted ); diff --git a/dcop/client/dcop.cpp b/dcop/client/dcop.cpp index c58945904..4086d75b3 100644 --- a/dcop/client/dcop.cpp +++ b/dcop/client/dcop.cpp @@ -159,8 +159,8 @@ void queryFunctions( const char* app, const char* obj ) int callFunction( const char* app, const char* obj, const char* func, const QCStringList args ) { TQString f = func; // Qt is better with tqunicode strings, so use one. - int left = f.tqfind( '(' ); - int right = f.tqfind( ')' ); + int left = f.find( '(' ); + int right = f.find( ')' ); if ( right < left ) { @@ -181,12 +181,12 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt return( 1 ); } for ( QCStringList::Iterator it = funcs.begin(); it != funcs.end(); ++it ) { - int l = (*it).tqfind( '(' ); + int l = (*it).find( '(' ); int s; if (l > 0) - s = (*it).tqfindRev( ' ', l); + s = (*it).findRev( ' ', l); else - s = (*it).tqfind( ' ' ); + s = (*it).find( ' ' ); if ( s < 0 ) s = 0; @@ -195,8 +195,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt if ( l > 0 && (*it).mid( s, l - s ) == func ) { realfunc = (*it).mid( s ); - const TQString arguments = (*it).mid(l+1,(*it).tqfind( ')' )-l-1); - uint a = arguments.tqcontains(','); + const TQString arguments = (*it).mid(l+1,(*it).find( ')' )-l-1); + uint a = arguments.contains(','); if ( (a==0 && !arguments.isEmpty()) || a>0) a++; if ( a == args.count() ) @@ -209,8 +209,8 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt return( 1 ); } f = realfunc; - left = f.tqfind( '(' ); - right = f.tqfind( ')' ); + left = f.find( '(' ); + right = f.find( ')' ); } doit: @@ -230,7 +230,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { TQString lt = (*it).simplifyWhiteSpace(); - int s = lt.tqfind(' '); + int s = lt.find(' '); // If there are spaces in the name, there may be two // reasons: the parameter name is still there, ie. @@ -250,7 +250,7 @@ int callFunction( const char* app, const char* obj, const char* func, const QCSt // s=1; - while (s < static_cast<int>(partl.count()) && intTypes.tqcontains(partl[s])) + while (s < static_cast<int>(partl.count()) && intTypes.contains(partl[s])) { s++; } @@ -464,9 +464,9 @@ int runDCOP( QCStringList args, UserList users, Session session, QCStringList params; DCOPClient *client = 0L; int retval = 0; - if ( !args.isEmpty() && args[ 0 ].tqfind( "DCOPRef(" ) == 0 ) + if ( !args.isEmpty() && args[ 0 ].find( "DCOPRef(" ) == 0 ) { - int delimPos = args[ 0 ].tqfindRev( ',' ); + int delimPos = args[ 0 ].findRev( ',' ); if( delimPos == -1 ) { cerr_ << "Error: '" << args[ 0 ] @@ -569,7 +569,7 @@ int runDCOP( QCStringList args, UserList users, Session session, } else if( !sessionName.isEmpty() ) { - if( sessions.tqcontains( sessionName ) ) + if( sessions.contains( sessionName ) ) { sessions.clear(); sessions.append( sessionName ); @@ -861,7 +861,7 @@ int main( int argc, char** argv ) if (prog[prog.length()-1] != '*') { // Strip a trailing -<PID> part. - int i = prog.tqfindRev('-'); + int i = prog.findRev('-'); if ((i >= 0) && prog.mid(i+1).toLong()) { prog = prog.left(i); diff --git a/dcop/client/dcopfind.cpp b/dcop/client/dcopfind.cpp index 9d5e6182f..bde116f65 100644 --- a/dcop/client/dcopfind.cpp +++ b/dcop/client/dcopfind.cpp @@ -41,8 +41,8 @@ static bool bLaunchApp = 0; bool findObject( const char* app, const char* obj, const char* func, QCStringList args ) { TQString f = func; // Qt is better with tqunicode strings, so use one. - int left = f.tqfind( '(' ); - int right = f.tqfind( ')' ); + int left = f.find( '(' ); + int right = f.find( ')' ); if ( right < left ) { @@ -66,7 +66,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis for ( TQStringList::Iterator it = types.begin(); it != types.end(); ++it ) { TQString lt = (*it).simplifyWhiteSpace(); - int s = lt.tqfind(' '); + int s = lt.find(' '); // If there are spaces in the name, there may be two // reasons: the parameter name is still there, ie. @@ -86,7 +86,7 @@ bool findObject( const char* app, const char* obj, const char* func, QCStringLis // s=1; - while (s < (int)partl.count() && intTypes.tqcontains(partl[s])) + while (s < (int)partl.count() && intTypes.contains(partl[s])) { s++; } diff --git a/dcop/client/marshall.cpp b/dcop/client/marshall.cpp index 27a73495b..9defa6d47 100644 --- a/dcop/client/marshall.cpp +++ b/dcop/client/marshall.cpp @@ -205,7 +205,7 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) result = r.url().local8Bit(); } else if ( type.left( 11 ) == "TQValueList<" ) { - if ( (uint)type.tqfind( '>', 11 ) != type.length() - 1 ) + if ( (uint)type.find( '>', 11 ) != type.length() - 1 ) return result; TQString nestedType = type.mid( 11, type.length() - 12 ); @@ -227,12 +227,12 @@ TQCString demarshal( TQDataStream &stream, const TQString &type ) } } else if ( type.left( 5 ) == "TQMap<" ) { - int commaPos = type.tqfind( ',', 5 ); + int commaPos = type.find( ',', 5 ); if ( commaPos == -1 ) return result; - if ( (uint)type.tqfind( '>', commaPos ) != type.length() - 1 ) + if ( (uint)type.find( '>', commaPos ) != type.length() - 1 ) return result; TQString keyType = type.mid( 5, commaPos - 5 ); diff --git a/dcop/dcopclient.cpp b/dcop/dcopclient.cpp index 892884af3..6a2bb3c98 100644 --- a/dcop/dcopclient.cpp +++ b/dcop/dcopclient.cpp @@ -97,13 +97,13 @@ client_map_t *cliMap() DCOPClient *DCOPClient::findLocalClient( const TQCString &_appId ) { - return cliMap()->tqfind(_appId.data()); + return cliMap()->find(_appId.data()); } static void registerLocalClient( const TQCString &_appId, DCOPClient *client ) { - cliMap()->tqreplace(_appId.data(), client); + cliMap()->replace(_appId.data(), client); } static @@ -263,12 +263,12 @@ static TQCString dcopServerFile(const TQCString &hostname, bool old) disp = "NODISPLAY"; int i; - if((i = disp.tqfindRev('.')) > disp.tqfindRev(KPATH_SEPARATOR) && i >= 0) + if((i = disp.findRev('.')) > disp.findRev(KPATH_SEPARATOR) && i >= 0) disp.truncate(i); if (!old) { - while( (i = disp.tqfind(KPATH_SEPARATOR)) >= 0) + while( (i = disp.find(KPATH_SEPARATOR)) >= 0) disp[i] = '_'; } @@ -790,7 +790,7 @@ bool DCOPClient::attachInternal( bool registerAsAnonymous ) // Should we abort ? } contents[size] = '\0'; - int pos = contents.tqfind('\n'); + int pos = contents.find('\n'); if ( pos == -1 ) // Shouldn't happen { qDebug("Only one line in dcopserver file !: %s", contents.data()); @@ -1399,7 +1399,7 @@ static TQObject* findQtObject( TQCString id ) for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) { if ( (*it).s == id ) // exact match return (*it).o; - if ( !firstContains && (*it).s.tqcontains( expr ) ) { + if ( !firstContains && (*it).s.contains( expr ) ) { firstContains = (*it).o; } } @@ -1413,7 +1413,7 @@ static QCStringList findQtObjects( TQCString id ) fillQtObjectsEx( l, 0, "qt" ); QCStringList result; for ( TQValueList<O>::ConstIterator it = l.begin(); it != l.end(); ++it ) { - if ( (*it).s.tqcontains( expr ) ) + if ( (*it).s.contains( expr ) ) result << (*it).s; } return result; @@ -1501,7 +1501,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const TQStrList lst = o->tqmetaObject()->propertyNames( true ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { TQMetaObject *mo = o->tqmetaObject(); - const TQMetaProperty* p = mo->property( mo->tqfindProperty( it.current(), true ), true ); + const TQMetaProperty* p = mo->property( mo->findProperty( it.current(), true ), true ); if ( !p ) continue; TQCString prop = p->type(); @@ -1532,7 +1532,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const reply << (TQ_INT8) o->setProperty( name, value ); return true; } else { - int slot = o->tqmetaObject()->tqfindSlot( fun, true ); + int slot = o->tqmetaObject()->findSlot( fun, true ); if ( slot != -1 ) { replyType = "void"; TQUObject uo[ 1 ]; diff --git a/dcop/dcopidl/scanner.cc b/dcop/dcopidl/scanner.cc index f118a67e9..e91b21d68 100644 --- a/dcop/dcopidl/scanner.cc +++ b/dcop/dcopidl/scanner.cc @@ -1226,8 +1226,8 @@ YY_RULE_SETUP #line 170 "scanner.ll" { TQString s( yytext ); - int i = s.tqfind(TQRegExp("[\"<]"))+1; - int j = s.tqfind(TQRegExp("[\">]"), i); + int i = s.find(TQRegExp("[\"<]"))+1; + int j = s.find(TQRegExp("[\">]"), i); yylval._str = new TQString( s.mid( i, j - i ) ); idl_line_no++; return T_INCLUDE; diff --git a/dcop/dcopidl/yacc.cc b/dcop/dcopidl/yacc.cc index 1fbc4c0bd..d41fa6dbd 100644 --- a/dcop/dcopidl/yacc.cc +++ b/dcop/dcopidl/yacc.cc @@ -1643,7 +1643,7 @@ yyreduce: case 15: #line 221 "yacc.yy" { - int pos = in_namespace.tqfindRev( "::", -3 ); + int pos = in_namespace.findRev( "::", -3 ); if( pos >= 0 ) in_namespace = in_namespace.left( pos + 2 ); else diff --git a/dcop/dcopidl/yacc.yy b/dcop/dcopidl/yacc.yy index 7870eb6e9..ca22c65e1 100644 --- a/dcop/dcopidl/yacc.yy +++ b/dcop/dcopidl/yacc.yy @@ -219,7 +219,7 @@ declaration } main T_RIGHT_CURLY_BRACKET opt_semicolon { - int pos = in_namespace.tqfindRev( "::", -3 ); + int pos = in_namespace.findRev( "::", -3 ); if( pos >= 0 ) in_namespace = in_namespace.left( pos + 2 ); else diff --git a/dcop/dcopidl2cpp/main.cpp b/dcop/dcopidl2cpp/main.cpp index c0fb786c8..5e0f27525 100644 --- a/dcop/dcopidl2cpp/main.cpp +++ b/dcop/dcopidl2cpp/main.cpp @@ -104,11 +104,11 @@ int main( int argc, char** argv ) TQString base( argv[argpos] ); TQString idl = base; - int pos = base.tqfindRev( '.' ); + int pos = base.findRev( '.' ); if ( pos != -1 ) base = base.left( pos ); - pos = idl.tqfindRev('/'); + pos = idl.findRev('/'); if ( pos != -1 ) idl = idl.mid( pos+1 ); @@ -118,7 +118,7 @@ int main( int argc, char** argv ) if ( generate_stub ) { TQString header = base; generateStub( idl, header + "_stub.h", de ); - pos = header.tqfindRev('/'); + pos = header.findRev('/'); if ( pos != -1 ) header = header.mid( pos+1 ); generateStubImpl( idl, header + "_stub.h", base+".h", base + "_stub." + suffix, de); diff --git a/dcop/dcopidl2cpp/skel.cpp b/dcop/dcopidl2cpp/skel.cpp index 7c26e5647..5cc30de3e 100644 --- a/dcop/dcopidl2cpp/skel.cpp +++ b/dcop/dcopidl2cpp/skel.cpp @@ -177,7 +177,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d TQString namespace_tmp = className; str << endl; for(;;) { - int pos = namespace_tmp.tqfind( "::" ); + int pos = namespace_tmp.find( "::" ); if( pos < 0 ) { className = namespace_tmp; break; @@ -223,7 +223,7 @@ void generateSkel( const TQString& idl, const TQString& filename, TQDomElement d str << "\t fdict->insert( " << className << "_ftable[i][1], new int( i ) );" << endl; str << " }" << endl; - str << " int* fp = fdict->tqfind( fun );" << endl; + str << " int* fp = fdict->find( fun );" << endl; str << " switch ( fp?*fp:-1) {" << endl; } s = n.nextSibling().toElement(); diff --git a/dcop/dcopidl2cpp/stub.cpp b/dcop/dcopidl2cpp/stub.cpp index 5191abde8..887945262 100644 --- a/dcop/dcopidl2cpp/stub.cpp +++ b/dcop/dcopidl2cpp/stub.cpp @@ -54,7 +54,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d str << endl; TQString ifdefstring = idl.upper(); - int pos = idl.tqfindRev( '.' ); + int pos = idl.findRev( '.' ); if ( pos != -1 ) ifdefstring = ifdefstring.left( pos ); @@ -107,13 +107,13 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d } if( DCOPParent != "DCOPObject" ) { // we need to include the .h file for the base stub - if( all_includes.tqcontains( DCOPParent + ".h" )) + if( all_includes.contains( DCOPParent + ".h" )) str << "#include <" << DCOPParent << "_stub.h>" << endl; - else if( all_includes.tqcontains( DCOPParent.lower() + ".h" )) + else if( all_includes.contains( DCOPParent.lower() + ".h" )) str << "#include <" << DCOPParent.lower() << "_stub.h>" << endl; else {// damn ... let's assume it's the last include TQString stub_h = all_includes.last(); - unsigned int pos = stub_h.tqfind( ".h" ); + unsigned int pos = stub_h.find( ".h" ); if( pos > 0 ) { stub_h = stub_h.remove( pos, 100000 ); str << "#include <" << stub_h << "_stub.h>" << endl; @@ -128,7 +128,7 @@ void generateStub( const TQString& idl, const TQString& filename, TQDomElement d int namespace_count = 0; TQString namespace_tmp = className; for(;;) { - int pos = namespace_tmp.tqfind( "::" ); + int pos = namespace_tmp.find( "::" ); if( pos < 0 ) { className = namespace_tmp; break; diff --git a/dcop/dcopidl2cpp/stubimpl.cpp b/dcop/dcopidl2cpp/stubimpl.cpp index 7e9990e61..5cdd2a00d 100644 --- a/dcop/dcopidl2cpp/stubimpl.cpp +++ b/dcop/dcopidl2cpp/stubimpl.cpp @@ -98,7 +98,7 @@ void generateStubImpl( const TQString& idl, const TQString& header, const TQStri TQString namespace_tmp = className_stub; str << endl; for(;;) { - int pos = namespace_tmp.tqfind( "::" ); + int pos = namespace_tmp.find( "::" ); if( pos < 0 ) { className_stub = namespace_tmp; break; diff --git a/dcop/dcopobject.cpp b/dcop/dcopobject.cpp index 348f13d4a..f02d07325 100644 --- a/dcop/dcopobject.cpp +++ b/dcop/dcopobject.cpp @@ -116,7 +116,7 @@ TQCString DCOPObject::objId() const bool DCOPObject::hasObject(const TQCString &_objId) { - if (objMap()->tqcontains(_objId)) + if (objMap()->contains(_objId)) return true; else return false; diff --git a/dcop/dcopref.cpp b/dcop/dcopref.cpp index c446eb0ee..bb39c109b 100644 --- a/dcop/dcopref.cpp +++ b/dcop/dcopref.cpp @@ -62,9 +62,9 @@ DCOPReply DCOPRef::callInternal( const TQCString& fun, const TQCString& args, co return reply; } TQCString sig = fun; - if ( fun.tqfind('(') == -1 ) { + if ( fun.find('(') == -1 ) { sig += args; - if( args.tqfind( "<unknown" ) != -1 ) + if( args.find( "<unknown" ) != -1 ) qWarning("DCOPRef: unknown type error " "<\"%s\",\"%s\">::call(\"%s\",%s", STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); @@ -87,9 +87,9 @@ bool DCOPRef::sendInternal( const TQCString& fun, const TQCString& args, const T } Q_UNUSED( data ); TQCString sig = fun; - if ( fun.tqfind('(') == -1 ) { + if ( fun.find('(') == -1 ) { sig += args; - if( args.tqfind( "<unknown" ) != -1 ) + if( args.find( "<unknown" ) != -1 ) qWarning("DCOPRef: unknown type error " "<\"%s\",\"%s\">::send(\"%s\",%s", STR(m_app), STR(m_obj), STR(fun), args.data()+1 ); diff --git a/dcop/dcopserver.cpp b/dcop/dcopserver.cpp index c78664f9a..8da59df04 100644 --- a/dcop/dcopserver.cpp +++ b/dcop/dcopserver.cpp @@ -320,7 +320,7 @@ void DCOPServer::slotOutputReady(int socket) qWarning("DCOPServer: slotOutputReady fd = %d", socket); #endif // Find out connection. - DCOPConnection *conn = fd_clients.tqfind(socket); + DCOPConnection *conn = fd_clients.find(socket); //assert(conn); //assert(conn->outputBlocked); //assert(conn->socket() == socket); @@ -711,7 +711,7 @@ void DCOPProcessMessage( IceConn iceConn, IcePointer /*clientData*/, void DCOPServer::processMessage( IceConn iceConn, int opcode, unsigned long length, Bool /*swap*/) { - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if ( !conn ) { qWarning("DCOPServer::processMessage message from unknown connection. [opcode = %d]", opcode); return; @@ -1110,7 +1110,7 @@ DCOPConnection* DCOPServer::findApp( const TQCString& appId ) { if ( appId.isNull() ) return 0; - DCOPConnection* conn = appIds.tqfind( appId ); + DCOPConnection* conn = appIds.find( appId ); return conn; } @@ -1205,7 +1205,7 @@ void DCOPServer::removeConnection( void* data ) while (!conn->waitingForReply.isEmpty()) { IceConn iceConn = conn->waitingForReply.take(0); if (iceConn) { - DCOPConnection* target = clients.tqfind( iceConn ); + DCOPConnection* target = clients.find( iceConn ); qWarning("DCOP aborting call from '%s' to '%s'", target ? target->appId.data() : "<unknown>" , conn->appId.data() ); TQByteArray reply; DCOPMsg *pMsg; @@ -1227,7 +1227,7 @@ void DCOPServer::removeConnection( void* data ) while (!conn->waitingForDelayedReply.isEmpty()) { IceConn iceConn = conn->waitingForDelayedReply.take(0); if (iceConn) { - DCOPConnection* target = clients.tqfind( iceConn ); + DCOPConnection* target = clients.find( iceConn ); qWarning("DCOP aborting (delayed) call from '%s' to '%s'", target ? target->appId.data() : "<unknown>", conn->appId.data() ); TQByteArray reply; DCOPMsg *pMsg; @@ -1248,7 +1248,7 @@ void DCOPServer::removeConnection( void* data ) { IceConn iceConn = conn->waitingOnReply.take(0); if (iceConn) { - DCOPConnection* target = clients.tqfind( iceConn ); + DCOPConnection* target = clients.find( iceConn ); if (!target) { qWarning("DCOP Error: still waiting for answer from non-existing client."); @@ -1360,7 +1360,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if ( obj == "emit") { - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if (conn) { //qDebug("DCOPServer: %s emits %s", conn->appId.data(), fun.data()); dcopSignals->emitSignal(conn, fun, data, false); @@ -1377,7 +1377,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, daemon = static_cast<bool>( iDaemon ); - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if ( conn && !conn->appId.isNull() ) { if ( daemon ) { if ( !conn->daemon ) @@ -1415,10 +1415,10 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if (!args.atEnd()) { TQCString app2 = readQCString(args); TQDataStream reply( replyData, IO_WriteOnly ); - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if ( conn && !app2.isEmpty() ) { if ( !conn->appId.isNull() && - appIds.tqfind( conn->appId ) == conn ) { + appIds.find( conn->appId ) == conn ) { appIds.remove( conn->appId ); } @@ -1441,7 +1441,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, #endif conn->appId = app2; - if ( appIds.tqfind( app2 ) != 0 ) { + if ( appIds.find( app2 ) != 0 ) { // we already have this application, unify int n = 1; TQCString tmp; @@ -1450,12 +1450,12 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, tmp.setNum( n ); tmp.prepend("-"); tmp.prepend( app2 ); - } while ( appIds.tqfind( tmp ) != 0 ); + } while ( appIds.find( tmp ) != 0 ); conn->appId = tmp; } appIds.insert( conn->appId, conn ); - int c = conn->appId.tqfind( '-' ); + int c = conn->appId.find( '-' ); if ( c > 0 ) conn->plainAppId = conn->appId.left( c ); else @@ -1497,7 +1497,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, if (!args.atEnd()) { TQ_INT8 notifyActive; args >> notifyActive; - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if ( conn ) { if ( notifyActive ) conn->notifyRegister++; @@ -1508,7 +1508,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, return true; } } else if ( fun == "connectSignal(TQCString,TQCString,TQCString,TQCString,TQCString,bool)") { - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if (!conn) return false; TQDataStream args(data, IO_ReadOnly ); if (args.atEnd()) return false; @@ -1528,7 +1528,7 @@ bool DCOPServer::receive(const TQCString &/*app*/, const TQCString &obj, reply << (TQ_INT8) (b?1:0); return true; } else if ( fun == "disconnectSignal(TQCString,TQCString,TQCString,TQCString,TQCString)") { - DCOPConnection* conn = clients.tqfind( iceConn ); + DCOPConnection* conn = clients.find( iceConn ); if (!conn) return false; TQDataStream args(data, IO_ReadOnly ); if (args.atEnd()) return false; @@ -1623,7 +1623,7 @@ static bool isRunning(const TQCString &fName, bool printNetworkId = false) TQCString contents( size+1 ); bool ok = f.readBlock( contents.data(), size ) == size; contents[size] = '\0'; - int pos = contents.tqfind('\n'); + int pos = contents.find('\n'); ok = ok && ( pos != -1 ); pid_t pid = ok ? contents.mid(pos+1).toUInt(&ok) : 0; f.close(); diff --git a/dcop/dcopserver.h b/dcop/dcopserver.h index 0a5d96f0e..f5d0ea9f0 100644 --- a/dcop/dcopserver.h +++ b/dcop/dcopserver.h @@ -130,7 +130,7 @@ public: DCOPConnection *findApp(const TQCString &appId); DCOPConnection *findConn(IceConn iceConn) - { return clients.tqfind(iceConn); } + { return clients.find(iceConn); } void sendMessage(DCOPConnection *conn, const TQCString &sApp, const TQCString &rApp, const TQCString &rObj, diff --git a/dcop/dcopsignals.cpp b/dcop/dcopsignals.cpp index 1e0eee354..437051a55 100644 --- a/dcop/dcopsignals.cpp +++ b/dcop/dcopsignals.cpp @@ -39,14 +39,14 @@ DCOPSignals::emitSignal( DCOPConnection *conn, const TQCString &_fun, const TQBy { TQCString senderObj; TQCString fun = _fun; - int i = fun.tqfind('#'); + int i = fun.find('#'); if (i > -1) { senderObj = fun.left(i); fun = fun.mid(i+1); } - DCOPSignalConnectionList *list = connections.tqfind(fun); + DCOPSignalConnectionList *list = connections.find(fun); if (!list) return; for(DCOPSignalConnection *current = list->first(); current; current = list->next()) { @@ -102,16 +102,16 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj, // TODO: Check if signal and slot match TQCString signalArgs, slotArgs; int i,j; - i = signal.tqfind('('); + i = signal.find('('); if (i < 0) return false; signalArgs = signal.mid(i+1); - j = signalArgs.tqfind(')'); + j = signalArgs.find(')'); if (j < 0) return false; signalArgs.truncate(j); - i = slot.tqfind('('); + i = slot.find('('); if (i < 0) return false; slotArgs = slot.mid(i+1); - j = slotArgs.tqfind(')'); + j = slotArgs.find(')'); if (j < 0) return false; slotArgs.truncate(j); @@ -142,7 +142,7 @@ DCOPSignals::connectSignal( const TQCString &sender, const TQCString &senderObj, current->recvObj = receiverObj; current->slot = slot; - DCOPSignalConnectionList *list = connections.tqfind(signal); + DCOPSignalConnectionList *list = connections.find(signal); if (!list) { list = new DCOPSignalConnectionList; @@ -177,7 +177,7 @@ DCOPSignals::disconnectSignal( const TQCString &sender, const TQCString &senderO return true; } - DCOPSignalConnectionList *list = connections.tqfind(signal); + DCOPSignalConnectionList *list = connections.find(signal); if (!list) return false; // Not found... @@ -255,7 +255,7 @@ DCOPSignals::removeConnections(DCOPConnection *conn, const TQCString &obj) if (current->recvConn != conn) current->recvConn->signalConnectionList()->removeRef(current); - DCOPSignalConnectionList *signalList = connections.tqfind(current->signal); + DCOPSignalConnectionList *signalList = connections.find(current->signal); if (signalList) { signalList->removeRef(current); diff --git a/dnssd/domainbrowser.cpp b/dnssd/domainbrowser.cpp index 6cab652ac..8a24f11b6 100644 --- a/dnssd/domainbrowser.cpp +++ b/dnssd/domainbrowser.cpp @@ -125,7 +125,7 @@ void DomainBrowser::startBrowse() void DomainBrowser::gotNewDomain(const TQString& domain) { - if (d->m_domains.tqcontains(domain)) return; + if (d->m_domains.contains(domain)) return; d->m_domains.append(domain); emit domainAdded(domain); } diff --git a/dnssd/servicebase.cpp b/dnssd/servicebase.cpp index 544b56fbb..6782c822d 100644 --- a/dnssd/servicebase.cpp +++ b/dnssd/servicebase.cpp @@ -51,14 +51,14 @@ void ServiceBase::decode(const TQString& name) } else { // normal service or domain TQString decoded_name=name; decoded_name=decoded_name.replace("\\\\","\\"); - int i = decoded_name.tqfind(TQRegExp("[^\\\\]\\.")); + int i = decoded_name.find(TQRegExp("[^\\\\]\\.")); if (i==-1) return; // first find service name rest = decoded_name.mid(i+2); m_serviceName=decoded_name.left(i+1).replace("\\.","."); } m_type = rest.section('.',0,1); // does it really have a type? - if (m_type[0]=='_' && m_type[m_type.tqfind('.')+1]=='_') + if (m_type[0]=='_' && m_type[m_type.find('.')+1]=='_') m_domain = rest.section('.',2,-1,TQString::SectionIncludeTrailingSep); else { m_type=""; diff --git a/interfaces/kimproxy/library/kimproxy.cpp b/interfaces/kimproxy/library/kimproxy.cpp index 38462a158..44f828a02 100644 --- a/interfaces/kimproxy/library/kimproxy.cpp +++ b/interfaces/kimproxy/library/kimproxy.cpp @@ -248,7 +248,7 @@ bool KIMProxy::initialize() { m_apps_available = true; //kdDebug( 790 ) << " app name: " << (*offer)->name() << ", has instance " << *app << ", dcopService: " << dcopService << endl; - if ( !m_im_client_stubs.tqfind( dcopService ) ) + if ( !m_im_client_stubs.find( dcopService ) ) { kdDebug( 790 ) << "App " << *app << ", dcopObjectId " << dcopObjectId << " found, using it for presence info." << endl; m_im_client_stubs.insert( *app, new KIMIface_stub( d->dc, *app, dcopObjectId ) ); @@ -284,7 +284,7 @@ void KIMProxy::registeredToDCOP( const TQCString& appId ) if ( appId.left( dcopService.length() ) == dcopService ) { // if it's not already known, insert it - if ( !m_im_client_stubs.tqfind( appId ) ) + if ( !m_im_client_stubs.find( appId ) ) { newApp = true; kdDebug( 790 ) << "App: " << appId << ", dcopService: " << dcopService << " started, using it for presence info."<< endl; @@ -301,7 +301,7 @@ void KIMProxy::registeredToDCOP( const TQCString& appId ) void KIMProxy::unregisteredFromDCOP( const TQCString& appId ) { //kdDebug( 790 ) << k_funcinfo << appId << endl; - if ( m_im_client_stubs.tqfind( appId ) ) + if ( m_im_client_stubs.find( appId ) ) { kdDebug( 790 ) << appId << " quit, removing its presence info." << endl; @@ -618,7 +618,7 @@ KIMIface_stub * KIMProxy::stubForUid( const TQString &uid ) // get best appPresence AppPresenceCurrent ap = d->presence_map[ uid ].best(); // look up the presence string from that app - return m_im_client_stubs.tqfind( ap.appId ); + return m_im_client_stubs.find( ap.appId ); } KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol) @@ -626,7 +626,7 @@ KIMIface_stub * KIMProxy::stubForProtocol( const TQString &protocol) KIMIface_stub * app; // see if the preferred client supports this protocol TQString preferred = preferredApp(); - if ( ( app = m_im_client_stubs.tqfind( preferred ) ) ) + if ( ( app = m_im_client_stubs.find( preferred ) ) ) { if ( app->protocols().grep( protocol ).count() > 0 ) return app; diff --git a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp index ec42f6db9..fd70f8b61 100644 --- a/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp +++ b/interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp @@ -110,7 +110,7 @@ void KFileAudioPreview::showPreview( const KURL &url ) return; KMimeType::Ptr mt = KMimeType::findByURL( url ); - bool supported = m_supportedFormats.tqfind( mt->name() ); + bool supported = m_supportedFormats.find( mt->name() ); d->player->view()->setEnabled( supported ); if ( !supported ) return; diff --git a/interfaces/ktexteditor/editorchooser.cpp b/interfaces/ktexteditor/editorchooser.cpp index 2da9e252f..ed0ab0cbb 100644 --- a/interfaces/ktexteditor/editorchooser.cpp +++ b/interfaces/ktexteditor/editorchooser.cpp @@ -82,7 +82,7 @@ void EditorChooser::readAppSetting(const TQString& postfix){ if (editor.isEmpty()) d->chooser->editorCombo->setCurrentItem(0); else { - int idx=d->elements.tqfindIndex(editor); + int idx=d->elements.findIndex(editor); idx=idx+1; d->chooser->editorCombo->setCurrentItem(idx); } diff --git a/interfaces/ktexteditor/templateinterface.cpp b/interfaces/ktexteditor/templateinterface.cpp index a22e5edce..c5ea93931 100644 --- a/interfaces/ktexteditor/templateinterface.cpp +++ b/interfaces/ktexteditor/templateinterface.cpp @@ -173,7 +173,7 @@ bool TemplateInterface::insertTemplateText ( uint line, uint column, const TQStr } } TQString placeholder = rx.cap( 1 ); - if ( ! enhancedInitValues.tqcontains( placeholder ) ) + if ( ! enhancedInitValues.contains( placeholder ) ) enhancedInitValues[ placeholder ] = ""; pos += rx.matchedLength(); diff --git a/kab/qconfigDB.cc b/kab/qconfigDB.cc index d1a676887..b084ccab0 100644 --- a/kab/qconfigDB.cc +++ b/kab/qconfigDB.cc @@ -73,7 +73,7 @@ static void tokenize(list<TQCString>& res, const TQCString& text, char tr, bool while(zwei!=-1) { teil=""; - zwei=text.tqfind(tr, eins); + zwei=text.find(tr, eins); if(zwei!=-1) { teil=text.mid(eins, zwei-eins); @@ -573,7 +573,7 @@ KeyValueMap::insertLine(TQCString line, bool force, bool relax, bool encode) return false; } // ----- - index=line.tqfind('='); + index=line.find('='); if(index==-1) // not found { kdDebug() << "KeyValueMap::insertLine: no \"=\" found in \""<<line<<"\".\n"; @@ -1015,7 +1015,7 @@ KeyValueMap::get(const TQCString& key, list<TQCString>& values) const second=first; for(;;) { - second=raw.tqfind('\\', second); + second=raw.find('\\', second); // ----- this may never be the last and also not the second last // character in a complex string: if(second!=-1) @@ -1124,7 +1124,7 @@ KeyValueMap::get(const TQCString& key, TQStrList& values) const second=first; for(;;) { - second=raw.tqfind('\\', second); + second=raw.find('\\', second); // ----- this may never be the last and also not the second last // character in a complex string: if(second!=-1) @@ -1975,7 +1975,7 @@ QConfigDB::stringToKeylist(const TQCString& desc) } for(;;) { - second=desc.tqfind('/', first); + second=desc.find('/', first); if(second==-1) { if((unsigned)first<desc.length()+1) diff --git a/kabc/address.cpp b/kabc/address.cpp index b653d168f..714dd571e 100644 --- a/kabc/address.cpp +++ b/kabc/address.cpp @@ -399,7 +399,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, bool ret = false; // first check for brackets that have to be evaluated first - int fpos = result.tqfind( KABC_FMTTAG_purgeempty, stpos ); + int fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); while ( -1 != fpos ) { int bpos1 = fpos + KABC_FMTTAG_purgeempty.length(); int bpos2; @@ -430,7 +430,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, stpos = bpos1; } } - fpos = result.tqfind( KABC_FMTTAG_purgeempty, stpos ); + fpos = result.find( KABC_FMTTAG_purgeempty, stpos ); } // after sorting out all purge tags, we just search'n'replace the rest, @@ -438,7 +438,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, // The following macro needs TQString for R_FIELD // It substitutes !_P_! for empty fields so conditional tags work later #define REPLTAG(R_TAG,R_FIELD) \ - if ( result.tqfind(R_TAG, false) != -1 ) { \ + if ( result.find(R_TAG, false) != -1 ) { \ TQString rpl = R_FIELD.isEmpty() ? TQString("!_P_!") : R_FIELD; \ result.replace( R_TAG, rpl ); \ if ( !R_FIELD.isEmpty() ) { \ @@ -461,7 +461,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, #undef REPLTAG // conditional comma - fpos = result.tqfind( KABC_FMTTAG_condcomma, 0 ); + fpos = result.find( KABC_FMTTAG_condcomma, 0 ); while ( -1 != fpos ) { TQString str1 = result.mid( fpos - 5, 5 ); TQString str2 = result.mid( fpos + 2, 5 ); @@ -470,10 +470,10 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, } else { result.remove( fpos, 2 ); } - fpos = result.tqfind( KABC_FMTTAG_condcomma, fpos ); + fpos = result.find( KABC_FMTTAG_condcomma, fpos ); } // conditional whitespace - fpos = result.tqfind( KABC_FMTTAG_condwhite, 0 ); + fpos = result.find( KABC_FMTTAG_condwhite, 0 ); while ( -1 != fpos ) { TQString str1 = result.mid( fpos - 5, 5 ); TQString str2 = result.mid( fpos + 2, 5 ); @@ -482,7 +482,7 @@ bool Address::parseAddressTemplateSection( const TQString &tsection, } else { result.remove( fpos, 2 ); } - fpos = result.tqfind( KABC_FMTTAG_condwhite, fpos ); + fpos = result.find( KABC_FMTTAG_condwhite, fpos ); } // remove purged: @@ -560,7 +560,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname ) TQString strbuf = s.readLine(); int pos; while ( !strbuf.isEmpty() ) { - if ( (pos = strbuf.tqfind( searchStr )) != -1 ) { + if ( (pos = strbuf.find( searchStr )) != -1 ) { file.close(); return i18n( strbuf.left( pos ).utf8() ); } diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index b1d3e4137..ec8e7be05 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -152,7 +152,7 @@ void AddresseeDialog::selectItem( const TQString &str ) { if ( str.isEmpty() ) return; - TQListViewItem *item = mItemDict.tqfind( str ); + TQListViewItem *item = mItemDict.find( str ); if ( item ) { mAddresseeList->blockSignals( true ); mAddresseeList->setSelected( item, true ); @@ -174,7 +174,7 @@ void AddresseeDialog::addSelected( TQListViewItem *item ) Addressee a = addrItem->addressee(); - TQListViewItem *selectedItem = mSelectedDict.tqfind( a.uid() ); + TQListViewItem *selectedItem = mSelectedDict.find( a.uid() ); if ( !selectedItem ) { selectedItem = new AddresseeItem( mSelectedList, a ); mSelectedDict.insert( a.uid(), selectedItem ); diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 8ac43081d..fe9d1f602 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -219,13 +219,13 @@ void AddressLineEdit::insert(const TQString &t) KURL u(newText); newText = u.path(); } - else if (newText.tqfind(" at ") != -1) + else if (newText.find(" at ") != -1) { // Anti-spam stuff newText.replace( " at ", "@" ); newText.replace( " dot ", "." ); } - else if (newText.tqfind("(at)") != -1) + else if (newText.find("(at)") != -1) { newText.replace( TQRegExp("\\s*\\(at\\)\\s*"), "@" ); } @@ -293,7 +293,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) TQString prevAddr; TQString s(text()); - int n = s.tqfindRev(','); + int n = s.findRev(','); if (n >= 0) { @@ -343,7 +343,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) items += s_completion->substringCompletion( '<' + s ); uint beforeDollarCompletionCount = items.count(); - if( s.tqfind( ' ' ) == -1 ) // one word, possibly given name + if( s.find( ' ' ) == -1 ) // one word, possibly given name items += s_completion->allMatches( "$$" + s ); if ( !items.isEmpty() ) @@ -355,7 +355,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) it != items.end(); ++it ) { - int pos = (*it).tqfind( '$', 2 ); + int pos = (*it).find( '$', 2 ); if( pos < 0 ) // ??? continue; (*it)=(*it).mid( pos + 1 ); @@ -373,7 +373,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) if (!autoSuggest) { - int index = items.first().tqfind( s ); + int index = items.first().find( s ); TQString newText = prevAddr + items.first().mid( index ); //kdDebug() << "OLD TEXT: " << text() << endl; //kdDebug() << "NEW TEXT: " << newText << endl; @@ -437,11 +437,11 @@ void AddressLineEdit::loadAddresses() void AddressLineEdit::addAddress( const TQString& adr ) { s_completion->addItem( adr ); - int pos = adr.tqfind( '<' ); + int pos = adr.find( '<' ); if( pos >= 0 ) { ++pos; - int pos2 = adr.tqfind( pos, '>' ); + int pos2 = adr.find( pos, '>' ); if( pos2 >= 0 ) s_completion->addItem( adr.mid( pos, pos2 - pos )); } @@ -465,7 +465,7 @@ void AddressLineEdit::startLoadingLDAPEntries() TQString s( *s_LDAPText ); // TODO cache last? TQString prevAddr; - int n = s.tqfindRev(','); + int n = s.findRev(','); if (n>= 0) { prevAddr = s.left(n+1) + ' '; @@ -484,8 +484,8 @@ void AddressLineEdit::slotLDAPSearchData( const TQStringList& adrs ) return; for( TQStringList::ConstIterator it = adrs.begin(); it != adrs.end(); ++it ) { TQString name(*it); - int pos = name.tqfind( " <" ); - int pos_comma = name.tqfind( ',' ); + int pos = name.find( " <" ); + int pos_comma = name.find( ',' ); // put name in quotes, if we have a comma in the name if (pos>0 && pos_comma>0 && pos_comma<pos) { name.insert(pos, '\"'); @@ -577,18 +577,18 @@ TQStringList AddressLineEdit::addresses() for ( mit = emails.begin(); mit != emails.end(); ++mit ) { email = *mit; if (!email.isEmpty()) { - if (n.isEmpty() || (email.tqfind( '<' ) != -1)) + if (n.isEmpty() || (email.find( '<' ) != -1)) addr = TQString::null; else { /* do we really need quotes around this name ? */ - if (n.tqfind(needQuotes) != -1) + if (n.find(needQuotes) != -1) addr = '"' + n + endQuote; else addr = n + space; } - if (!addr.isEmpty() && (email.tqfind( '<' ) == -1) - && (email.tqfind( '>' ) == -1) - && (email.tqfind( ',' ) == -1)) + if (!addr.isEmpty() && (email.find( '<' ) == -1) + && (email.find( '>' ) == -1) + && (email.find( ',' ) == -1)) addr += '<' + email + '>'; else addr += email; diff --git a/kabc/distributionlist.cpp b/kabc/distributionlist.cpp index 1802cb0a1..bb89b6d00 100644 --- a/kabc/distributionlist.cpp +++ b/kabc/distributionlist.cpp @@ -250,7 +250,7 @@ bool DistributionListManager::save() value.append( (*it).email ); } - if ( d->mMissingEntries.tqfind( list->name() ) != d->mMissingEntries.end() ) { + if ( d->mMissingEntries.find( list->name() ) != d->mMissingEntries.end() ) { const MissingEntryList missList = d->mMissingEntries[ list->name() ]; MissingEntryList::ConstIterator missIt; for ( missIt = missList.begin(); missIt != missList.end(); ++missIt ) { diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index 26adeea56..2a3683597 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -58,7 +58,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) TQString comment; if ( entry.tqat( entry.length() -1 ) == ')' ) { - int br = entry.tqfindRev( '(' ); + int br = entry.findRev( '(' ); if ( br >= 0 ) { comment = entry.mid( br + 1, entry.length() - br - 2 ); entry.truncate( br ); @@ -68,7 +68,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) } } - int posSpace = entry.tqfindRev( ' ' ); + int posSpace = entry.findRev( ' ' ); if ( posSpace < 0 ) { email = entry; if ( !comment.isEmpty() ) { @@ -91,7 +91,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) } if ( name.tqat( name.length() -1 ) == ')' ) { - int br = name.tqfindRev( '(' ); + int br = name.findRev( '(' ); if ( br >= 0 ) { comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; name.truncate( br ); @@ -180,7 +180,7 @@ void readKAddressBookEntries( const TQString &dataString, Addressee &a ) TQStringList::ConstIterator it; for ( it = entries.begin(); it != entries.end(); ++it ) { - int pos = (*it).tqfind( "\n" ); + int pos = (*it).find( "\n" ); TQString fieldName = (*it).left( pos ); TQString fieldValue = (*it).mid( pos + 2 ); @@ -325,7 +325,7 @@ void importKab( KABC::AddressBook *ab, bool override, bool quiet ) TQStringList::ConstIterator customIt; for ( customIt = entry.custom.begin(); customIt != entry.custom.end(); ++customIt ) { if ( (*customIt).startsWith( "X-KABC-UID:" ) ) { - a.setUid( (*customIt).mid( (*customIt).tqfind( ":" ) + 1 ) ); + a.setUid( (*customIt).mid( (*customIt).find( ":" ) + 1 ) ); idFound = true; } else if ( (*customIt).startsWith( "KMail:1.0\n" ) ) { readKAddressBookEntries( *customIt, a ); diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 637d77da6..6ce467a46 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -306,11 +306,11 @@ void LdapSearch::startSearch( const TQString& txt ) cancelSearch(); - int pos = txt.tqfind( '\"' ); + int pos = txt.find( '\"' ); if( pos >= 0 ) { ++pos; - int pos2 = txt.tqfind( '\"', pos ); + int pos2 = txt.find( '\"', pos ); if( pos2 >= 0 ) mSearchText = txt.mid( pos , pos2 - pos ); else @@ -408,7 +408,7 @@ void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) } LdapResult sr; - sr.clientNumber = mClients.tqfindIndex( (*it1).client ); + sr.clientNumber = mClients.findIndex( (*it1).client ); sr.name = name; sr.email = mail; resList.append( sr ); diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp index 6bca31b39..9032c16d3 100644 --- a/kabc/ldapurl.cpp +++ b/kabc/ldapurl.cpp @@ -58,14 +58,14 @@ void LDAPUrl::setDn( const TQString &dn) bool LDAPUrl::hasExtension( const TQString &key ) const { - return m_extensions.tqcontains( key ); + return m_extensions.contains( key ); } LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const { TQMap<TQString, Extension>::const_iterator it; - it = m_extensions.tqfind( key ); + it = m_extensions.find( key ); if ( it != m_extensions.constEnd() ) return (*it); else { diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp index 3be20c48a..9d007b7ff 100644 --- a/kabc/ldif.cpp +++ b/kabc/ldif.cpp @@ -112,7 +112,7 @@ bool LDIF::splitLine( const TQCString &line, TQString &fieldname, TQByteArray &v // kdDebug(5700) << "splitLine line: " << TQString::fromUtf8(line) << endl; - position = line.tqfind( ":" ); + position = line.find( ":" ); if ( position == -1 ) { // strange: we did not find a fieldname fieldname = ""; diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp index ee242b332..d4c7b22df 100644 --- a/kabc/ldifconverter.cpp +++ b/kabc/ldifconverter.cpp @@ -271,7 +271,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, } if ( fieldname == TQString::tqfromLatin1( "mail" ) || fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla - if ( a.emails().tqfindIndex( value ) == -1 ) + if ( a.emails().findIndex( value ) == -1 ) a.insertEmail( value ); return true; } @@ -528,7 +528,7 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, return TQString(); // append format if not given - if (formatStr.tqfind(':') == -1) + if (formatStr.find(':') == -1) formatStr.append(": %1\n"); // check if base64-encoding is needed @@ -543,12 +543,12 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, } if (printable) // always encode if we find special chars... - printable = (value.tqfind('\n') == -1); + printable = (value.find('\n') == -1); if (!printable && allowEncode) { // encode to base64 value = KCodecs::base64Encode( value.utf8() ); - int p = formatStr.tqfind(':'); + int p = formatStr.find(':'); if (p>=0) formatStr.insert(p, ':'); } diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp index 41774b593..819d75d96 100644 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ b/kabc/plugins/dir/resourcedirconfig.cpp @@ -82,7 +82,7 @@ void ResourceDirConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); mFileNameEdit->setURL( resource->path() ); if ( mFileNameEdit->url().isEmpty() ) diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp index 51cfdcfcf..92b07594f 100644 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ b/kabc/plugins/file/resourcefileconfig.cpp @@ -86,7 +86,7 @@ void ResourceFileConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); mFileNameEdit->setURL( resource->fileName() ); if ( mFileNameEdit->url().isEmpty() ) diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp index 893a4a90f..0385f541c 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -330,49 +330,49 @@ void ResourceLDAPKIO::init() handle them in the load() method below. These are the default values */ - if ( !mAttributes.tqcontains("objectClass") ) + if ( !mAttributes.contains("objectClass") ) mAttributes.insert( "objectClass", "inetOrgPerson" ); - if ( !mAttributes.tqcontains("commonName") ) + if ( !mAttributes.contains("commonName") ) mAttributes.insert( "commonName", "cn" ); - if ( !mAttributes.tqcontains("formattedName") ) + if ( !mAttributes.contains("formattedName") ) mAttributes.insert( "formattedName", "displayName" ); - if ( !mAttributes.tqcontains("familyName") ) + if ( !mAttributes.contains("familyName") ) mAttributes.insert( "familyName", "sn" ); - if ( !mAttributes.tqcontains("givenName") ) + if ( !mAttributes.contains("givenName") ) mAttributes.insert( "givenName", "givenName" ); - if ( !mAttributes.tqcontains("mail") ) + if ( !mAttributes.contains("mail") ) mAttributes.insert( "mail", "mail" ); - if ( !mAttributes.tqcontains("mailAlias") ) + if ( !mAttributes.contains("mailAlias") ) mAttributes.insert( "mailAlias", "" ); - if ( !mAttributes.tqcontains("phoneNumber") ) + if ( !mAttributes.contains("phoneNumber") ) mAttributes.insert( "phoneNumber", "homePhone" ); - if ( !mAttributes.tqcontains("telephoneNumber") ) + if ( !mAttributes.contains("telephoneNumber") ) mAttributes.insert( "telephoneNumber", "telephoneNumber" ); - if ( !mAttributes.tqcontains("facsimileTelephoneNumber") ) + if ( !mAttributes.contains("facsimileTelephoneNumber") ) mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - if ( !mAttributes.tqcontains("mobile") ) + if ( !mAttributes.contains("mobile") ) mAttributes.insert( "mobile", "mobile" ); - if ( !mAttributes.tqcontains("pager") ) + if ( !mAttributes.contains("pager") ) mAttributes.insert( "pager", "pager" ); - if ( !mAttributes.tqcontains("description") ) + if ( !mAttributes.contains("description") ) mAttributes.insert( "description", "description" ); - if ( !mAttributes.tqcontains("title") ) + if ( !mAttributes.contains("title") ) mAttributes.insert( "title", "title" ); - if ( !mAttributes.tqcontains("street") ) + if ( !mAttributes.contains("street") ) mAttributes.insert( "street", "street" ); - if ( !mAttributes.tqcontains("state") ) + if ( !mAttributes.contains("state") ) mAttributes.insert( "state", "st" ); - if ( !mAttributes.tqcontains("city") ) + if ( !mAttributes.contains("city") ) mAttributes.insert( "city", "l" ); - if ( !mAttributes.tqcontains("organization") ) + if ( !mAttributes.contains("organization") ) mAttributes.insert( "organization", "o" ); - if ( !mAttributes.tqcontains("postalcode") ) + if ( !mAttributes.contains("postalcode") ) mAttributes.insert( "postalcode", "postalCode" ); - if ( !mAttributes.tqcontains("uid") ) + if ( !mAttributes.contains("uid") ) mAttributes.insert( "uid", "uid" ); - if ( !mAttributes.tqcontains("jpegPhoto") ) + if ( !mAttributes.contains("jpegPhoto") ) mAttributes.insert( "jpegPhoto", "jpegPhoto" ); d->mLDAPUrl = KURL(); diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index c23bd22da..271328525 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -281,7 +281,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, for ( i = 1; i < mMapCombo->count(); i++ ) { TQDictIterator<KLineEdit> it2( mLineEditDict ); for ( ; it2.current(); ++it2 ) { - if ( mMapList[ i ].tqcontains( it2.currentKey() ) ) { + if ( mMapList[ i ].contains( it2.currentKey() ) ) { if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; } else { if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp index 325d99377..b441fbd98 100644 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ b/kabc/plugins/net/resourcenetconfig.cpp @@ -79,7 +79,7 @@ void ResourceNetConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); mUrlEdit->setURL( resource->url().url() ); } diff --git a/kabc/plugins/sql/resourcesql.cpp b/kabc/plugins/sql/resourcesql.cpp index 7dae03d22..55f02bae7 100644 --- a/kabc/plugins/sql/resourcesql.cpp +++ b/kabc/plugins/sql/resourcesql.cpp @@ -317,8 +317,8 @@ bool ResourceSql::save( Ticket * ) TQStringList list = (*it).customs(); TQStringList::ConstIterator it; for( it = list.begin(); it != list.end(); ++it ) { - int dashPos = (*it).tqfind( '-' ); - int colonPos = (*it).tqfind( ':' ); + int dashPos = (*it).find( '-' ); + int colonPos = (*it).find( ':' ); TQString app = (*it).left( dashPos ); TQString name = (*it).mid( dashPos + 1, colonPos - dashPos - 1 ); TQString value = (*it).right( (*it).length() - colonPos - 1 ); diff --git a/kabc/resource.cpp b/kabc/resource.cpp index 9807d53a3..d43c68320 100644 --- a/kabc/resource.cpp +++ b/kabc/resource.cpp @@ -268,7 +268,7 @@ void Resource::removeAddressee( const Addressee &addr ) Addressee Resource::findByUid( const TQString &uid ) { - Addressee::Map::ConstIterator it = mAddrMap.tqfind( uid ); + Addressee::Map::ConstIterator it = mAddrMap.find( uid ); if ( it != mAddrMap.end() ) return it.data(); diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp index 9be85b22b..db956bc14 100644 --- a/kabc/scripts/addressee.src.cpp +++ b/kabc/scripts/addressee.src.cpp @@ -225,7 +225,7 @@ void Addressee::setNameFromString( const TQString &s ) TQString emptyStr = ""; AddresseeHelper *helper = AddresseeHelper::self(); - int i = str.tqfind( ',' ); + int i = str.find( ',' ); if( i < 0 ) { TQStringList parts = TQStringList::split( spaceStr, str ); int leftOffset = 0; @@ -398,7 +398,7 @@ TQString Addressee::fullEmail( const TQString &email ) const text = e; else { TQRegExp needQuotes( "[^ 0-9A-Za-z\\x0080-\\xFFFF]" ); - if ( realName().tqfind( needQuotes ) != -1 ) { + if ( realName().find( needQuotes ) != -1 ) { TQString name = realName(); name.replace( "\"", "\\\"" ); text = "\"" + name + "\" <" + e + ">"; @@ -417,7 +417,7 @@ void Addressee::insertEmail( const TQString &email, bool preferred ) detach(); mData->empty = false; - TQStringList::Iterator it = mData->emails.tqfind( email ); + TQStringList::Iterator it = mData->emails.find( email ); if ( it != mData->emails.end() ) { if ( !preferred || it == mData->emails.begin() ) return; @@ -436,7 +436,7 @@ void Addressee::removeEmail( const TQString &email ) { detach(); - TQStringList::Iterator it = mData->emails.tqfind( email ); + TQStringList::Iterator it = mData->emails.find( email ); if ( it == mData->emails.end() ) return; mData->emails.remove( it ); @@ -755,7 +755,7 @@ void Addressee::insertCategory( const TQString &c ) detach(); mData->empty = false; - if ( mData->categories.tqfindIndex( c ) != -1 ) return; + if ( mData->categories.findIndex( c ) != -1 ) return; mData->categories.append( c ); } @@ -764,7 +764,7 @@ void Addressee::removeCategory( const TQString &c ) { detach(); - TQStringList::Iterator it = mData->categories.tqfind( c ); + TQStringList::Iterator it = mData->categories.find( c ); if ( it == mData->categories.end() ) return; mData->categories.remove( it ); @@ -772,7 +772,7 @@ void Addressee::removeCategory( const TQString &c ) bool Addressee::hasCategory( const TQString &c ) const { - return ( mData->categories.tqfindIndex( c ) != -1 ); + return ( mData->categories.findIndex( c ) != -1 ); } void Addressee::setCategories( const TQStringList &c ) @@ -832,7 +832,7 @@ TQString Addressee::custom( const TQString &app, const TQString &name ) const TQStringList::ConstIterator it; for( it = mData->custom.constBegin(); it != mData->custom.constEnd(); ++it ) { if ( (*it).startsWith( qualifiedName ) ) { - value = (*it).mid( (*it).tqfind( ":" ) + 1 ); + value = (*it).mid( (*it).find( ":" ) + 1 ); break; } } @@ -1104,7 +1104,7 @@ bool listEquals( const TQValueList<L> &list, const TQValueList<L> &pattern ) return false; for ( uint i = 0; i < list.count(); ++i ) - if ( pattern.tqfind( list[ i ] ) == pattern.end() ) + if ( pattern.find( list[ i ] ) == pattern.end() ) return false; return true; @@ -1120,7 +1120,7 @@ bool emailsEquals( const TQStringList &list, const TQStringList &pattern ) TQStringList::ConstIterator it; for ( it = list.begin(); it != list.end(); ++it ) - if ( pattern.tqfind( *it ) == pattern.end() ) + if ( pattern.find( *it ) == pattern.end() ) return false; return true; diff --git a/kabc/vcard/AdrParam.cpp b/kabc/vcard/AdrParam.cpp index 899912553..5ad56f4fb 100644 --- a/kabc/vcard/AdrParam.cpp +++ b/kabc/vcard/AdrParam.cpp @@ -80,7 +80,7 @@ AdrParam::operator == (AdrParam & x) TQStrListIterator it(x.adrTypeList_); for (; it.current(); ++it) - if (!adrTypeList_.tqfind(it.current())) + if (!adrTypeList_.find(it.current())) return false; return true; diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 8babc9292..034cb1d32 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -122,7 +122,7 @@ ContentLine::operator == (ContentLine & x) TQPtrListIterator<Param> it(x.paramList()); - if (!paramList_.tqfind(it.current())) + if (!paramList_.find(it.current())) return false; return true; @@ -140,9 +140,9 @@ ContentLine::_parse() vDebug("parse"); // Unqote newlines - strRep_ = strRep_.tqreplace( TQRegExp( "\\\\n" ), "\n" ); + strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); - int split = strRep_.tqfind(':'); + int split = strRep_.find(':'); if (split == -1) { // invalid content line vDebug("No ':'"); @@ -152,7 +152,7 @@ ContentLine::_parse() TQCString firstPart(strRep_.left(split)); TQCString valuePart(strRep_.mid(split + 1)); - split = firstPart.tqfind('.'); + split = firstPart.find('.'); if (split != -1) { group_ = firstPart.left(split); @@ -193,7 +193,7 @@ ContentLine::_parse() TQCString str = *it; - split = str.tqfind("="); + split = str.find("="); if (split < 0 ) { vDebug("No '=' in parameter."); continue; @@ -275,7 +275,7 @@ ContentLine::_assemble() } // Quote newlines - line = line.tqreplace( TQRegExp( "\n" ), "\\n" ); + line = line.replace( TQRegExp( "\n" ), "\\n" ); // Fold lines longer than 72 chars const int maxLen = 72; diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp index 6828380fc..9f578a158 100644 --- a/kabc/vcard/DateValue.cpp +++ b/kabc/vcard/DateValue.cpp @@ -152,7 +152,7 @@ DateValue::_parse() // time = time-hour [":"] time-minute [":"] time-second [":"] // [time-secfrac] [time-zone] - int timeSep = strRep_.tqfind('T'); + int timeSep = strRep_.find('T'); TQCString dateStr; TQCString timeStr; @@ -173,7 +173,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// DATE - dateStr.tqreplace(TQRegExp("-"), ""); + dateStr.replace(TQRegExp("-"), ""); kdDebug(5710) << "dateStr: " << dateStr << endl; @@ -192,7 +192,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// ZONE - int zoneSep = timeStr.tqfind('Z'); + int zoneSep = timeStr.find('Z'); if (zoneSep != -1 && timeStr.length() - zoneSep > 3) { @@ -208,7 +208,7 @@ DateValue::_parse() //////////////////////////////////////////////////// SECOND FRACTION - int secFracSep = timeStr.tqfindRev(','); + int secFracSep = timeStr.findRev(','); if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); @@ -217,7 +217,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// HMS - timeStr.tqreplace(TQRegExp(":"), ""); + timeStr.replace(TQRegExp(":"), ""); hour_ = timeStr.left(2).toInt(); minute_ = timeStr.mid(2, 2).toInt(); diff --git a/kabc/vcard/GeoValue.cpp b/kabc/vcard/GeoValue.cpp index 3021bbdb1..2bac28c1e 100644 --- a/kabc/vcard/GeoValue.cpp +++ b/kabc/vcard/GeoValue.cpp @@ -84,7 +84,7 @@ GeoValue::clone() void GeoValue::_parse() { - int semiColon = strRep_.tqfind( ";" ); + int semiColon = strRep_.find( ";" ); if ( semiColon == -1 ) // invalid return; diff --git a/kabc/vcard/SourceParam.cpp b/kabc/vcard/SourceParam.cpp index 7041acd9e..d66d87498 100644 --- a/kabc/vcard/SourceParam.cpp +++ b/kabc/vcard/SourceParam.cpp @@ -80,7 +80,7 @@ SourceParam::~SourceParam() void SourceParam::_parse() { - int i = strRep_.tqfind('='); + int i = strRep_.find('='); if (i == -1) // Invalid return; diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp index 9b13119d3..bba8db0fa 100644 --- a/kabc/vcard/URIValue.cpp +++ b/kabc/vcard/URIValue.cpp @@ -89,7 +89,7 @@ URIValue::~URIValue() void URIValue::_parse() { - int split = strRep_.tqfind(':'); + int split = strRep_.find(':'); if (split == -1) return; diff --git a/kabc/vcard/UTCValue.cpp b/kabc/vcard/UTCValue.cpp index 445af4fd7..30473661f 100644 --- a/kabc/vcard/UTCValue.cpp +++ b/kabc/vcard/UTCValue.cpp @@ -93,7 +93,7 @@ UTCValue::_parse() positive_ = ( strRep_[0] == '+' ); - int colon = strRep_.tqfind( ':' ); + int colon = strRep_.find( ':' ); if ( colon == -1 ) // Not valid. return; diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp index 25d3a7a2d..a1a9d1ba1 100644 --- a/kabc/vcard/VCard.cpp +++ b/kabc/vcard/VCard.cpp @@ -113,7 +113,7 @@ VCard::_parse() /////////////////////////////////////////////////////////////// // FIRST LINE - int split = beginLine.tqfind(':'); + int split = beginLine.find(':'); if (split == -1) { // invalid, no BEGIN vDebug("No split"); @@ -123,7 +123,7 @@ VCard::_parse() TQCString firstPart(beginLine.left(split)); TQCString valuePart(beginLine.mid(split + 1)); - split = firstPart.tqfind('.'); + split = firstPart.find('.'); if (split != -1) { group_ = firstPart.left(split); @@ -188,7 +188,7 @@ VCard::_parse() /////////////////////////////////////////////////////////////// // LAST LINE - split = endLine.tqfind(':'); + split = endLine.find(':'); if (split == -1) // invalid, no END return; @@ -196,7 +196,7 @@ VCard::_parse() firstPart = endLine.left(split); valuePart = endLine.right(firstPart.length() - split - 1); - split = firstPart.tqfind('.'); + split = firstPart.find('.'); if (split != -1) { group_ = firstPart.left(split); diff --git a/kabc/vcard/VCardEntity.cpp b/kabc/vcard/VCardEntity.cpp index 4c987bffe..1f8cea5b1 100644 --- a/kabc/vcard/VCardEntity.cpp +++ b/kabc/vcard/VCardEntity.cpp @@ -76,11 +76,11 @@ VCardEntity::_parse() vDebug("parse"); TQCString s(strRep_); - int i = s.tqfind(TQRegExp("BEGIN:VCARD", false)); + int i = s.find(TQRegExp("BEGIN:VCARD", false)); while (i != -1) { - i = s.tqfind(TQRegExp("BEGIN:VCARD", false), 11); + i = s.find(TQRegExp("BEGIN:VCARD", false), 11); TQCString cardStr(s.left(i)); diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 64696003a..566553261 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp @@ -41,12 +41,12 @@ bool VCardLineX::isValid() const switch( name[0] ) { case 'a': if ( name == VCARD_ADR && qualified && - (qualifiers.tqcontains(VCARD_ADR_DOM) || - qualifiers.tqcontains(VCARD_ADR_INTL) || - qualifiers.tqcontains(VCARD_ADR_POSTAL) || - qualifiers.tqcontains(VCARD_ADR_HOME) || - qualifiers.tqcontains(VCARD_ADR_WORK) || - qualifiers.tqcontains(VCARD_ADR_PREF) + (qualifiers.contains(VCARD_ADR_DOM) || + qualifiers.contains(VCARD_ADR_INTL) || + qualifiers.contains(VCARD_ADR_POSTAL) || + qualifiers.contains(VCARD_ADR_HOME) || + qualifiers.contains(VCARD_ADR_WORK) || + qualifiers.contains(VCARD_ADR_PREF) ) ) return true; @@ -63,18 +63,18 @@ bool VCardLineX::isValid() const if ( name == VCARD_CATEGORIES ) return true; if ( name == VCARD_CLASS && qualified && - (qualifiers.tqcontains(VCARD_CLASS_PUBLIC) || - qualifiers.tqcontains(VCARD_CLASS_PRIVATE) || - qualifiers.tqcontains(VCARD_CLASS_CONFIDENTIAL) + (qualifiers.contains(VCARD_CLASS_PUBLIC) || + qualifiers.contains(VCARD_CLASS_PRIVATE) || + qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) ) ) return true; break; case 'e': if ( name == VCARD_EMAIL && qualified && - (qualifiers.tqcontains(VCARD_EMAIL_INTERNET) || - qualifiers.tqcontains(VCARD_EMAIL_PREF) || - qualifiers.tqcontains(VCARD_EMAIL_X400) + (qualifiers.contains(VCARD_EMAIL_INTERNET) || + qualifiers.contains(VCARD_EMAIL_PREF) || + qualifiers.contains(VCARD_EMAIL_X400) ) ) return true; break; @@ -91,8 +91,8 @@ bool VCardLineX::isValid() const case 'k': if ( name == VCARD_KEY && qualified && - (qualifiers.tqcontains(VCARD_KEY_X509) || - qualifiers.tqcontains(VCARD_KEY_PGP) + (qualifiers.contains(VCARD_KEY_X509) || + qualifiers.contains(VCARD_KEY_PGP) ) ) return true; break; @@ -150,20 +150,20 @@ bool VCardLineX::isValid() const case 't': if ( name == VCARD_TEL && qualified && - (qualifiers.tqcontains(VCARD_TEL_HOME) || - qualifiers.tqcontains(VCARD_TEL_WORK) || - qualifiers.tqcontains(VCARD_TEL_PREF) || - qualifiers.tqcontains(VCARD_TEL_VOICE) || - qualifiers.tqcontains(VCARD_TEL_FAX) || - qualifiers.tqcontains(VCARD_TEL_MSG) || - qualifiers.tqcontains(VCARD_TEL_CELL) || - qualifiers.tqcontains(VCARD_TEL_PAGER) || - qualifiers.tqcontains(VCARD_TEL_BBS) || - qualifiers.tqcontains(VCARD_TEL_MODEM) || - qualifiers.tqcontains(VCARD_TEL_CAR) || - qualifiers.tqcontains(VCARD_TEL_ISDN) || - qualifiers.tqcontains(VCARD_TEL_VIDEO) || - qualifiers.tqcontains(VCARD_TEL_PCS) + (qualifiers.contains(VCARD_TEL_HOME) || + qualifiers.contains(VCARD_TEL_WORK) || + qualifiers.contains(VCARD_TEL_PREF) || + qualifiers.contains(VCARD_TEL_VOICE) || + qualifiers.contains(VCARD_TEL_FAX) || + qualifiers.contains(VCARD_TEL_MSG) || + qualifiers.contains(VCARD_TEL_CELL) || + qualifiers.contains(VCARD_TEL_PAGER) || + qualifiers.contains(VCARD_TEL_BBS) || + qualifiers.contains(VCARD_TEL_MODEM) || + qualifiers.contains(VCARD_TEL_CAR) || + qualifiers.contains(VCARD_TEL_ISDN) || + qualifiers.contains(VCARD_TEL_VIDEO) || + qualifiers.contains(VCARD_TEL_PCS) ) ) return true; if ( name == VCARD_TZ ) @@ -266,33 +266,33 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) if ( (*i).name == VCARD_TEL ) { int type = 0; if ( (*i).qualified ) { - if ( (*i).qualifiers.tqcontains( VCARD_TEL_HOME ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) type |= PhoneNumber::Home; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_WORK ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) type |= PhoneNumber::Work; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_PREF ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) type |= PhoneNumber::Pref; - // if ( (*i).qualifiers.tqcontains( VCARD_TEL_VOICE ) ) + // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) // type |= PhoneNumber::Voice; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_FAX ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) type |= PhoneNumber::Fax; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_MSG ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) type |= PhoneNumber::Msg; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_CELL ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) type |= PhoneNumber::Cell; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_PAGER ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) type |= PhoneNumber::Pager; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_BBS ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) type |= PhoneNumber::Bbs; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_MODEM ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) type |= PhoneNumber::Modem; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_CAR ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) type |= PhoneNumber::Car; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_ISDN ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) type |= PhoneNumber::Isdn; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_VIDEO ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) type |= PhoneNumber::Video; - if ( (*i).qualifiers.tqcontains( VCARD_TEL_PCS ) ) + if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) type |= PhoneNumber::Pcs; } addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); @@ -304,19 +304,19 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) if ( (*i).name == VCARD_ADR ) { int type = 0; if ( (*i).qualified ) { - if ( (*i).qualifiers.tqcontains( VCARD_ADR_DOM ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) type |= Address::Dom; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_INTL ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) type |= Address::Intl; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_POSTAL ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) type |= Address::Postal; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_PARCEL ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) type |= Address::Parcel; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_HOME ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) type |= Address::Home; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_WORK ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) type |= Address::Work; - if ( (*i).qualifiers.tqcontains( VCARD_ADR_PREF ) ) + if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) type |= Address::Pref; } addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); @@ -430,7 +430,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) } // split into two tokens - int colon = (*j).tqfind( ':' ); + int colon = (*j).find( ':' ); if ( colon < 0 ) { _err = VC_ERR_INVALID_LINE; break; @@ -556,7 +556,7 @@ TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& quali const TQString lowqualifier = qualifier.lower(); for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier)) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { if ((*i).parameters.count() > 0) return (*i).parameters[0]; else return failed; @@ -598,7 +598,7 @@ TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& const TQString lowname = name.lower(); const TQString lowqualifier = qualifier.lower(); for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier)) + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) return (*i).parameters; } // failed. diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index 8c0b551e5..ebaf337b0 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -123,7 +123,7 @@ bool VCardFormatImpl::loadAddressee( Addressee& addressee, VCARD::VCard &v ) TQCString n = cl->name(); if ( n.left( 2 ) == "X-" ) { n = n.mid( 2 ); - int posDash = n.tqfind( "-" ); + int posDash = n.find( "-" ); addressee.insertCustom( TQString::fromUtf8( n.left( posDash ) ), TQString::fromUtf8( n.mid( posDash + 1 ) ), TQString::fromUtf8( cl->value()->asString() ) ); @@ -351,8 +351,8 @@ void VCardFormatImpl::addCustomValue( VCARD::VCard *v, const TQString &txt ) if ( txt.isEmpty() ) return; ContentLine cl; - cl.setName( "X-" + txt.left( txt.tqfind( ":" ) ).utf8() ); - TQString value = txt.mid( txt.tqfind( ":" ) + 1 ); + cl.setName( "X-" + txt.left( txt.find( ":" ) ).utf8() ); + TQString value = txt.mid( txt.find( ":" ) + 1 ); if ( value.isEmpty() ) return; cl.setValue( new TextValue( value.utf8() ) ); diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp index 8b6c9570a..30a8e1c49 100644 --- a/kabc/vcardparser/vcard.cpp +++ b/kabc/vcardparser/vcard.cpp @@ -62,7 +62,7 @@ void VCard::addLine( const VCardLine& line ) VCardLine::List VCard::lines( const TQString& identifier ) const { - LineMap::ConstIterator it = mLineMap.tqfind( identifier ); + LineMap::ConstIterator it = mLineMap.find( identifier ); if ( it == mLineMap.end() ) return VCardLine::List(); @@ -71,7 +71,7 @@ VCardLine::List VCard::lines( const TQString& identifier ) const VCardLine VCard::line( const TQString& identifier ) const { - LineMap::ConstIterator it = mLineMap.tqfind( identifier ); + LineMap::ConstIterator it = mLineMap.find( identifier ); if ( it == mLineMap.end() ) return VCardLine(); @@ -97,7 +97,7 @@ void VCard::setVersion( Version version ) VCard::Version VCard::version() const { - LineMap::ConstIterator versionEntry = mLineMap.tqfind( "VERSION" ); + LineMap::ConstIterator versionEntry = mLineMap.find( "VERSION" ); if ( versionEntry == mLineMap.end() ) return v3_0; diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp index 50e9fa53e..6680cf7d0 100644 --- a/kabc/vcardparser/vcardline.cpp +++ b/kabc/vcardparser/vcardline.cpp @@ -124,13 +124,13 @@ TQStringList VCardLine::parameterList() const void VCardLine::addParameter( const TQString& param, const TQString& value ) { TQStringList &list = mParamMap[ param ]; - if ( list.tqfindIndex( value ) == -1 ) // not included yet + if ( list.findIndex( value ) == -1 ) // not included yet list.append( value ); } TQStringList VCardLine::parameters( const TQString& param ) const { - ParamMap::ConstIterator it = mParamMap.tqfind( param ); + ParamMap::ConstIterator it = mParamMap.find( param ); if ( it == mParamMap.end() ) return TQStringList(); else @@ -139,7 +139,7 @@ TQStringList VCardLine::parameters( const TQString& param ) const TQString VCardLine::parameter( const TQString& param ) const { - ParamMap::ConstIterator it = mParamMap.tqfind( param ); + ParamMap::ConstIterator it = mParamMap.find( param ); if ( it == mParamMap.end() ) return TQString::null; else { diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index b92f341a0..82ab96714 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -81,7 +81,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) continue; } else { if ( inVCard && !currentLine.isEmpty() ) { // now parse the line - int colon = currentLine.tqfind( ':' ); + int colon = currentLine.find( ':' ); if ( colon == -1 ) { // invalid line currentLine = (*it); continue; @@ -94,7 +94,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) TQStringList params = TQStringList::split( ';', key ); // check for group - if ( params[0].tqfind( '.' ) != -1 ) { + if ( params[0].find( '.' ) != -1 ) { const TQStringList groupList = TQStringList::split( '.', params[0] ); vCardLine.setGroup( groupList[0] ); vCardLine.setIdentifier( groupList[1] ); @@ -118,7 +118,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) } } // This is pretty much a faster pair[1].contains( ',' )... - if ( pair[1].tqfind( ',' ) != -1 ) { // parameter in type=x,y,z format + if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format const TQStringList args = TQStringList::split( ',', pair[ 1 ] ); TQStringList::ConstIterator argIt; for ( argIt = args.begin(); argIt != args.end(); ++argIt ) @@ -134,7 +134,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) bool wasBase64Encoded = false; params = vCardLine.parameterList(); - if ( params.tqfindIndex( "encoding" ) != -1 ) { // have to decode the data + if ( params.findIndex( "encoding" ) != -1 ) { // have to decode the data TQByteArray input; input = TQCString(value.latin1()); if ( vCardLine.parameter( "encoding" ).lower() == "b" || @@ -155,7 +155,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) output = TQCString(value.latin1()); } - if ( params.tqfindIndex( "charset" ) != -1 ) { // have to convert the data + if ( params.findIndex( "charset" ) != -1 ) { // have to convert the data TQTextCodec *codec = TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); if ( codec ) { diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp index 44d3f1464..08bcf93e4 100644 --- a/kabc/vcardtool.cpp +++ b/kabc/vcardtool.cpp @@ -335,8 +335,8 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // X- const TQStringList customs = (*addrIt).customs(); for ( strIt = customs.begin(); strIt != customs.end(); ++strIt ) { - TQString identifier = "X-" + (*strIt).left( (*strIt).tqfind( ":" ) ); - TQString value = (*strIt).mid( (*strIt).tqfind( ":" ) + 1 ); + TQString identifier = "X-" + (*strIt).left( (*strIt).find( ":" ) ); + TQString value = (*strIt).mid( (*strIt).find( ":" ) + 1 ); if ( value.isEmpty() ) continue; @@ -428,7 +428,7 @@ Addressee::List VCardTool::parseVCards( const TQString& vcard ) // EMAIL else if ( identifier == "email" ) { const TQStringList types = (*lineIt).parameters( "type" ); - addr.insertEmail( (*lineIt).value().asString(), types.tqfindIndex( "PREF" ) != -1 ); + addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); } // FN @@ -594,7 +594,7 @@ Addressee::List VCardTool::parseVCards( const TQString& vcard ) // X- else if ( identifier.startsWith( "x-" ) ) { const TQString key = (*lineIt).identifier().mid( 2 ); - int dash = key.tqfind( "-" ); + int dash = key.find( "-" ); addr.insertCustom( key.left( dash ), key.mid( dash + 1 ), (*lineIt).value().asString() ); } } @@ -610,11 +610,11 @@ TQDateTime VCardTool::parseDateTime( const TQString &str ) { TQDateTime dateTime; - if ( str.tqfind( '-' ) == -1 ) { // is base format (yyyymmdd) + if ( str.find( '-' ) == -1 ) { // is base format (yyyymmdd) dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 4, 2 ).toInt(), str.mid( 6, 2 ).toInt() ) ); - if ( str.tqfind( 'T' ) ) // has time information yyyymmddThh:mm:ss + if ( str.find( 'T' ) ) // has time information yyyymmddThh:mm:ss dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), str.mid( 17, 2 ).toInt() ) ); @@ -622,7 +622,7 @@ TQDateTime VCardTool::parseDateTime( const TQString &str ) dateTime.setDate( TQDate( str.left( 4 ).toInt(), str.mid( 5, 2 ).toInt(), str.mid( 8, 2 ).toInt() ) ); - if ( str.tqfind( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss + if ( str.find( 'T' ) ) // has time information yyyy-mm-ddThh:mm:ss dateTime.setTime( TQTime( str.mid( 11, 2 ).toInt(), str.mid( 14, 2 ).toInt(), str.mid( 17, 2 ).toInt() ) ); } @@ -653,16 +653,16 @@ Picture VCardTool::parsePicture( const VCardLine &line ) Picture pic; const TQStringList params = line.parameterList(); - if ( params.tqfindIndex( "encoding" ) != -1 ) { + if ( params.findIndex( "encoding" ) != -1 ) { TQImage img; img.loadFromData( line.value().asByteArray() ); pic.setData( img ); - } else if ( params.tqfindIndex( "value" ) != -1 ) { + } else if ( params.findIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) pic.setUrl( line.value().asString() ); } - if ( params.tqfindIndex( "type" ) != -1 ) + if ( params.findIndex( "type" ) != -1 ) pic.setType( line.parameter( "type" ) ); return pic; @@ -700,9 +700,9 @@ Sound VCardTool::parseSound( const VCardLine &line ) Sound snd; const TQStringList params = line.parameterList(); - if ( params.tqfindIndex( "encoding" ) != -1 ) + if ( params.findIndex( "encoding" ) != -1 ) snd.setData( line.value().asByteArray() ); - else if ( params.tqfindIndex( "value" ) != -1 ) { + else if ( params.findIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) snd.setUrl( line.value().asString() ); } @@ -738,12 +738,12 @@ Key VCardTool::parseKey( const VCardLine &line ) Key key; const TQStringList params = line.parameterList(); - if ( params.tqfindIndex( "encoding" ) != -1 ) + if ( params.findIndex( "encoding" ) != -1 ) key.setBinaryData( line.value().asByteArray() ); else key.setTextData( line.value().asString() ); - if ( params.tqfindIndex( "type" ) != -1 ) { + if ( params.findIndex( "type" ) != -1 ) { if ( line.parameter( "type" ).lower() == "x509" ) key.setType( Key::X509 ); else if ( line.parameter( "type" ).lower() == "pgp" ) @@ -814,7 +814,7 @@ Agent VCardTool::parseAgent( const VCardLine &line ) Agent agent; const TQStringList params = line.parameterList(); - if ( params.tqfindIndex( "value" ) != -1 ) { + if ( params.findIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) agent.setUrl( line.value().asString() ); } else { @@ -866,7 +866,7 @@ TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) TQString value( str ); int start = 0; - int pos = value.tqfind( sep, start ); + int pos = value.find( sep, start ); while ( pos != -1 ) { if ( value[ pos - 1 ] != '\\' ) { @@ -876,13 +876,13 @@ TQStringList VCardTool::splitString( const TQChar &sep, const TQString &str ) list << TQString::null; start = pos + 1; - pos = value.tqfind( sep, start ); + pos = value.find( sep, start ); } else { if ( pos != 0 ) { value.replace( pos - 1, 2, sep ); - pos = value.tqfind( sep, pos ); + pos = value.find( sep, pos ); } else - pos = value.tqfind( sep, pos + 1 ); + pos = value.find( sep, pos + 1 ); } } diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp index a1600b307..a9a4fe37c 100644 --- a/kate/part/katearbitraryhighlight.cpp +++ b/kate/part/katearbitraryhighlight.cpp @@ -90,7 +90,7 @@ void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateVi } void KateArbitraryHighlight::slotRangeListDeleted(TQObject* obj) { - int id=m_docHLs.tqfindRef(static_cast<KateSuperRangeList*>(obj)); + int id=m_docHLs.findRef(static_cast<KateSuperRangeList*>(obj)); if (id>=0) m_docHLs.take(id); for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) @@ -152,7 +152,7 @@ KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range) { for (TQMap<KateView*, TQPtrList<KateSuperRangeList>* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) - if (l->tqcontains(range)) + if (l->contains(range)) return it.key(); // This must belong to a document-global highlight diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp index 48c6b29c6..0aabde874 100644 --- a/kate/part/kateautoindent.cpp +++ b/kate/part/kateautoindent.cpp @@ -224,55 +224,55 @@ void KateNormalIndent::updateConfig () for (uint i=0; i<items.count(); i++) { TQString name = items.tqat(i)->name; - if (name.tqfind("Comment") != -1 && commentAttrib == 255) + if (name.find("Comment") != -1 && commentAttrib == 255) { commentAttrib = i; } - else if (name.tqfind("Region Marker") != -1 && regionAttrib == 255) + else if (name.find("Region Marker") != -1 && regionAttrib == 255) { regionAttrib = i; } - else if (name.tqfind("Symbol") != -1 && symbolAttrib == 255) + else if (name.find("Symbol") != -1 && symbolAttrib == 255) { symbolAttrib = i; } - else if (name.tqfind("Alert") != -1) + else if (name.find("Alert") != -1) { alertAttrib = i; } - else if (name.tqfind("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255) + else if (name.find("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255) { doxyCommentAttrib = i; } - else if (name.tqfind("Tags") != -1 && tagAttrib == 255) + else if (name.find("Tags") != -1 && tagAttrib == 255) { tagAttrib = i; } - else if (name.tqfind("Word") != -1 && wordAttrib == 255) + else if (name.find("Word") != -1 && wordAttrib == 255) { wordAttrib = i; } - else if (name.tqfind("Keyword") != -1 && keywordAttrib == 255) + else if (name.find("Keyword") != -1 && keywordAttrib == 255) { keywordAttrib = i; } - else if (name.tqfind("Normal") != -1 && normalAttrib == 255) + else if (name.find("Normal") != -1 && normalAttrib == 255) { normalAttrib = i; } - else if (name.tqfind("Extensions") != -1 && extensionAttrib == 255) + else if (name.find("Extensions") != -1 && extensionAttrib == 255) { extensionAttrib = i; } - else if (name.tqfind("Preprocessor") != -1 && preprocessorAttrib == 255) + else if (name.find("Preprocessor") != -1 && preprocessorAttrib == 255) { preprocessorAttrib = i; } - else if (name.tqfind("String") != -1 && stringAttrib == 255) + else if (name.find("String") != -1 && stringAttrib == 255) { stringAttrib = i; } - else if (name.tqfind("Char") != -1 && charAttrib == 255) + else if (name.find("Char") != -1 && charAttrib == 255) { charAttrib = i; } @@ -583,7 +583,7 @@ bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin) if (last <= 0 || !(justAfterDoxygen = textLine->stringAtPos(last-1, "*/"))) insideDoxygen = true; if (justAfterDoxygen) - justAfterDoxygen &= textLine->string().tqfind("/**") < 0; + justAfterDoxygen &= textLine->string().find("/**") < 0; while (textLine->attribute(first) != doxyCommentAttrib && first <= textLine->lastChar()) first++; if (textLine->stringAtPos(first, "//")) @@ -700,7 +700,7 @@ static inline bool colonPermitsReindent(const KateNormalIndent &indenter, { const TQString txt = line->string(0,curCol); // do we have any significant preceding colon? - for (int pos = 0; (pos = txt.tqfind(':', pos)) >= 0; pos++) { + for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) { if (line->attribute(pos) == indenter.symbolAttrib) // yes, it has already contributed to this line's indentation, don't // indent again @@ -722,7 +722,7 @@ void KateCSmartIndent::processChar(TQChar c) static const TQString triggers("}{)/:#n"); static const TQString firstTriggers("}{)/:#"); static const TQString lastTriggers(":n"); - if (triggers.tqfind(c) < 0) + if (triggers.find(c) < 0) return; KateView *view = doc->activeView(); @@ -775,8 +775,8 @@ void KateCSmartIndent::processChar(TQChar c) // of the line const TQChar lastChar = textLine->getChar(textLine->lastChar()); int pos; - if (((c == firstChar && firstTriggers.tqfind(firstChar) >= 0) - || (c == lastChar && lastTriggers.tqfind(lastChar) >= 0)) + if (((c == firstChar && firstTriggers.find(firstChar) >= 0) + || (c == lastChar && lastTriggers.find(lastChar) >= 0)) && (c != ':' || colonPermitsReindent(*this, textLine, curCol))) processLine(begin); } @@ -1176,7 +1176,7 @@ uint KateCSmartIndent::findOpeningComment(KateDocCursor &start) { KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); - int pos = textLine->string().tqfind("/*", false); + int pos = textLine->string().find("/*", false); if (pos >= 0) { KateDocCursor temp(cur.line(), pos, doc); @@ -1359,7 +1359,7 @@ void KateXmlIndent::processChar (TQChar c) // only alter lines that start with a close element KateView *view = doc->activeView(); TQString text = doc->plainKateTextLine(view->cursorLine())->string(); - if(text.tqfind(startsWithCloseTag) == -1) return; + if(text.find(startsWithCloseTag) == -1) return; // process it processLine(view->cursorLine()); @@ -1404,7 +1404,7 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, // <a> // </a> <!-- indentation *already* decreased --> // requires that we discount the </a> from the number of closed tags - if(text.tqfind(startsWithCloseTag) != -1) ++numTags; + if(text.find(startsWithCloseTag) != -1) ++numTags; // count the number of open and close tags int lastCh = 0; @@ -1445,10 +1445,10 @@ void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, for(uint backLine = line; backLine; ) { // find first line with an open tag KateTextLine::Ptr x = doc->plainKateTextLine(--backLine); - if(x->string().tqfind('<') == -1) continue; + if(x->string().find('<') == -1) continue; // recalculate the indent - if(x->string().tqfind(unclosedDoctype) != -1) --numTags; + if(x->string().find(unclosedDoctype) != -1) --numTags; getLineInfo(backLine, prevIndent, numTags, attrCol, unclosedTag); break; } @@ -1499,7 +1499,7 @@ uint KateXmlIndent::processLine (uint line) if(indent < 0) indent = 0; // unindent lines that start with a close tag - if(kateLine->string().tqfind(startsWithCloseTag) != -1) { + if(kateLine->string().find(startsWithCloseTag) != -1) { indent -= indentWidth; } if(indent < 0) indent = 0; @@ -1606,7 +1606,7 @@ TQString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &st { KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); - int pos = textLine->string().tqfindRev("/*"); + int pos = textLine->string().findRev("/*"); // FIXME: /* inside /* is possible. This screws up in that case... if (pos >= 0) return initialWhitespace(textLine, pos); @@ -1760,7 +1760,7 @@ int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line ) // find a possible start-of-comment int p = -2; // so the first find starts at position 0 - do p = str.tqfind( "//", p + 2 ); + do p = str.find( "//", p + 2 ); while ( p >= 0 && textLine->attribute(p) != commentAttrib && textLine->attribute(p) != doxyCommentAttrib ); // no // found? use whole string @@ -2112,7 +2112,7 @@ void KateCSAndSIndent::processChar(TQChar c) { // 'n' trigger is for c# regions. static const TQString triggers("}{)]/:;#n"); - if (triggers.tqfind(c) == -1) + if (triggers.find(c) == -1) return; // for historic reasons, processChar doesn't get a cursor @@ -2372,9 +2372,9 @@ void KateVarIndent::slotVariableChanged( const TQString &var, const TQString &va { d->couples = 0; TQStringList l = TQStringList::split( " ", val ); - if ( l.tqcontains("parens") ) d->couples |= Parens; - if ( l.tqcontains("braces") ) d->couples |= Braces; - if ( l.tqcontains("brackets") ) d->couples |= Brackets; + if ( l.contains("parens") ) d->couples |= Parens; + if ( l.contains("braces") ) d->couples |= Braces; + if ( l.contains("brackets") ) d->couples |= Brackets; } else if ( var == "var-indent-couple-attribute" ) { diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp index 2d1be2c20..6498d9936 100644 --- a/kate/part/katebookmarks.cpp +++ b/kate/part/katebookmarks.cpp @@ -176,7 +176,7 @@ void KateBookmarks::insertBookmarks( TQPopupMenu& menu ) { sortArray[i] = (*it)->line; ssort( sortArray, i ); - idx = sortArray.tqfind( (*it)->line ) + 3; + idx = sortArray.find( (*it)->line ) + 3; } menu.insertItem( diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp index 210d461a2..d4879cfda 100644 --- a/kate/part/katecmds.cpp +++ b/kate/part/katecmds.cpp @@ -303,7 +303,7 @@ static void replace(TQString &s, const TQString &needle, const TQString &with) int pos=0; while (1) { - pos=s.tqfind(needle, pos); + pos=s.find(needle, pos); if (pos==-1) break; s.replace(pos, needle.length(), with); pos+=with.length(); @@ -442,7 +442,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, // TODO if replace contains \n, // change the line number and // check for text that needs be searched behind the last inserted newline. - int lns = rep.tqcontains('\n'); + int lns = rep.contains('\n'); if ( lns ) { line += lns; @@ -451,7 +451,7 @@ int KateCommands::SedReplace::sedMagic( KateDocument *doc, int &line, { // if ( endcol >= startcol + len ) endcol -= (startcol + len); - uint sc = rep.length() - rep.tqfindRev('\n') - 1; + uint sc = rep.length() - rep.findRev('\n') - 1; matches += sedMagic( doc, line, find, repOld, delim, noCase, repeat, sc, endcol ); } } diff --git a/kate/part/katecodefoldinghelpers.h b/kate/part/katecodefoldinghelpers.h index d90757986..7feee384e 100644 --- a/kate/part/katecodefoldinghelpers.h +++ b/kate/part/katecodefoldinghelpers.h @@ -79,7 +79,7 @@ class KateCodeFoldingNode inline KateCodeFoldingNode *child (uint index) const { return m_children[index]; } - inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.tqfind (node, start); } + inline int findChild (KateCodeFoldingNode *node, uint start = 0) const { return m_children.find (node, start); } inline void appendChild (KateCodeFoldingNode *node) { m_children.resize(m_children.size()+1); m_children[m_children.size()-1] = node; } diff --git a/kate/part/katedialogs.cpp b/kate/part/katedialogs.cpp index 80a47cbe9..f9c5dadb1 100644 --- a/kate/part/katedialogs.cpp +++ b/kate/part/katedialogs.cpp @@ -1388,10 +1388,10 @@ void KateHlConfigPage::hlChanged(int z) return; } - if ( !hlDataDict.tqfind( z ) ) + if ( !hlDataDict.find( z ) ) hlDataDict.insert( z, hl->getData() ); - hlData = hlDataDict.tqfind( z ); + hlData = hlDataDict.find( z ); wildcards->setText(hlData->wildcards); mimetypes->setText(hlData->mimetypes); priority->setValue(hlData->priority); diff --git a/kate/part/katedocument.cpp b/kate/part/katedocument.cpp index cc6a462ac..dcbb5936c 100644 --- a/kate/part/katedocument.cpp +++ b/kate/part/katedocument.cpp @@ -1176,10 +1176,10 @@ bool KateDocument::editInsertText ( uint line, uint col, const TQString &str ) uint tw = config()->tabWidth(); int pos = 0; uint l = 0; - while ( (pos = s.tqfind('\t')) > -1 ) + while ( (pos = s.find('\t')) > -1 ) { l = tw - ( (col + pos)%tw ); - s.tqreplace( pos, 1, TQString().fill( ' ', l ) ); + s.replace( pos, 1, TQString().fill( ' ', l ) ); } } @@ -2151,12 +2151,12 @@ void KateDocument::clearMarks() void KateDocument::setPixmap( MarkInterface::MarkTypes type, const TQPixmap& pixmap ) { - m_markPixmaps.tqreplace( type, new TQPixmap( pixmap ) ); + m_markPixmaps.replace( type, new TQPixmap( pixmap ) ); } void KateDocument::setDescription( MarkInterface::MarkTypes type, const TQString& description ) { - m_markDescriptions.tqreplace( type, new TQString( description ) ); + m_markDescriptions.replace( type, new TQString( description ) ); } TQPixmap *KateDocument::markPixmap( MarkInterface::MarkTypes type ) @@ -2395,7 +2395,7 @@ bool KateDocument::openFile(KIO::Job * job) // service type magic to get encoding right // TQString serviceType = m_extension->urlArgs().serviceType.simplifyWhiteSpace(); - int pos = serviceType.tqfind(';'); + int pos = serviceType.find(';'); if (pos != -1) setEncoding (serviceType.mid(pos+1)); @@ -2934,7 +2934,7 @@ void KateDocument::removeSuperCursor(KateSuperCursor *cursor, bool privateC) { bool KateDocument::ownedView(KateView *view) { // do we own the given view? - return (m_views.tqcontainsRef(view) > 0); + return (m_views.containsRef(view) > 0); } bool KateDocument::isLastView(int numViews) { @@ -3232,7 +3232,7 @@ void KateDocument::paste ( KateView* view ) if (s.isEmpty()) return; - uint lines = s.tqcontains (TQChar ('\n')); + uint lines = s.contains (TQChar ('\n')); m_undoDontMerge = true; @@ -4634,7 +4634,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { // simple check first, no regex // no kate inside, no vars, simple... - if (t.tqfind("kate") < 0) + if (t.find("kate") < 0) return; // found vars, if any @@ -4672,7 +4672,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) TQStringList types (TQStringList::split(';', kvLineMime.cap(1))); // no matching type found - if (!types.tqcontains (mimeType ())) + if (!types.contains (mimeType ())) return; s = kvLineMime.cap(2); @@ -4708,7 +4708,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) // only apply view & renderer config stuff if (onlyViewAndRenderer) { - if ( vvl.tqcontains( var ) ) // FIXME define above + if ( vvl.contains( var ) ) // FIXME define above setViewVariable( var, val ); } else @@ -4773,7 +4773,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) { TQStringList l; l << "unix" << "dos" << "mac"; - if ( (n = l.tqfindIndex( val.lower() )) != -1 ) + if ( (n = l.findIndex( val.lower() )) != -1 ) m_config->setEol( n ); } else if ( var == "encoding" ) @@ -4791,7 +4791,7 @@ void KateDocument::readVariableLine( TQString t, bool onlyViewAndRenderer ) } // VIEW SETTINGS - else if ( vvl.tqcontains( var ) ) + else if ( vvl.contains( var ) ) setViewVariable( var, val ); else { @@ -4862,14 +4862,14 @@ bool KateDocument::checkBoolValue( TQString val, bool *result ) val = val.stripWhiteSpace().lower(); TQStringList l; l << "1" << "on" << "true"; - if ( l.tqcontains( val ) ) + if ( l.contains( val ) ) { *result = true; return true; } l.clear(); l << "0" << "off" << "false"; - if ( l.tqcontains( val ) ) + if ( l.contains( val ) ) { *result = false; return true; @@ -4893,7 +4893,7 @@ bool KateDocument::checkColorValue( TQString val, TQColor &c ) // KTextEditor::variable TQString KateDocument::variable( const TQString &name ) const { - if ( m_storedVariables.tqcontains( name ) ) + if ( m_storedVariables.contains( name ) ) return m_storedVariables[ name ]; return ""; diff --git a/kate/part/katefiletype.cpp b/kate/part/katefiletype.cpp index 461c6c994..c29b8641e 100644 --- a/kate/part/katefiletype.cpp +++ b/kate/part/katefiletype.cpp @@ -126,7 +126,7 @@ void KateFileTypeManager::save (TQPtrList<KateFileType> *v) for (uint z=0; z < g.count(); z++) { - if (newg.tqfindIndex (g[z]) == -1) + if (newg.findIndex (g[z]) == -1) config.deleteGroup (g[z]); } @@ -187,7 +187,7 @@ int KateFileTypeManager::fileType (KateDocument *doc) for (uint z=0; z < m_types.count(); z++) { - if (m_types.tqat(z)->mimetypes.tqfindIndex (mt->name()) > -1) + if (m_types.tqat(z)->mimetypes.findIndex (mt->name()) > -1) types.append (m_types.tqat(z)); } @@ -539,9 +539,9 @@ void KateViewFileTypeAction::slotAboutToShow() TQString hlName = KateFactory::self()->fileTypeManager()->list()->tqat(z)->name; TQString hlSection = KateFactory::self()->fileTypeManager()->list()->tqat(z)->section; - if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) { - if (subMenusName.tqcontains(hlSection) < 1) + if (subMenusName.contains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -549,11 +549,11 @@ void KateViewFileTypeAction::slotAboutToShow() popupMenu()->insertItem (hlSection, menu); } - int m = subMenusName.tqfindIndex (hlSection); + int m = subMenusName.findIndex (hlSection); names << hlName; subMenus.tqat(m)->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); } - else if (names.tqcontains(hlName) < 1) + else if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setType(int)), 0, z+1); @@ -576,7 +576,7 @@ void KateViewFileTypeAction::slotAboutToShow() const KateFileType *t = 0; if ((t = KateFactory::self()->fileTypeManager()->fileType (doc->fileType()))) { - int i = subMenusName.tqfindIndex (t->section); + int i = subMenusName.findIndex (t->section); if (i >= 0 && subMenus.tqat(i)) subMenus.tqat(i)->setItemChecked (doc->fileType()+1, true); else diff --git a/kate/part/katehighlight.cpp b/kate/part/katehighlight.cpp index 3799f645d..7f5bcc882 100644 --- a/kate/part/katehighlight.cpp +++ b/kate/part/katehighlight.cpp @@ -661,7 +661,7 @@ int KateHlKeyword::checkHgl(const TQString& text, int offset, int len) if (wordLen < minLen) return 0; - if ( dict[wordLen] && dict[wordLen]->tqfind(TQConstString(text.tqunicode() + offset, wordLen).string()) ) + if ( dict[wordLen] && dict[wordLen]->find(TQConstString(text.tqunicode() + offset, wordLen).string()) ) return offset2; return 0; @@ -1293,7 +1293,7 @@ int KateHighlighting::makeDynamicContext(KateHlContext *model, const TQStringLis QPair<KateHlContext *, TQString> key(model, args->front()); short value; - if (dynamicCtxs.tqcontains(key)) + if (dynamicCtxs.contains(key)) value = dynamicCtxs[key]; else { @@ -1931,12 +1931,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!beginRegionStr.isEmpty()) { - regionId = RegionList->tqfindIndex(beginRegionStr); + regionId = RegionList->findIndex(beginRegionStr); if (regionId==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<beginRegionStr; - regionId = RegionList->tqfindIndex(beginRegionStr); + regionId = RegionList->findIndex(beginRegionStr); } regionId++; @@ -1946,12 +1946,12 @@ KateHlItem *KateHighlighting::createKateHlItem(KateSyntaxContextData *data, if (!endRegionStr.isEmpty()) { - regionId2 = RegionList->tqfindIndex(endRegionStr); + regionId2 = RegionList->findIndex(endRegionStr); if (regionId2==-1) // if the region name doesn't already exist, add it to the list { (*RegionList)<<endRegionStr; - regionId2 = RegionList->tqfindIndex(endRegionStr); + regionId2 = RegionList->findIndex(endRegionStr); } regionId2 = -regionId2 - 1; @@ -2088,14 +2088,14 @@ TQString KateHighlighting::hlKeyForAttrib( int i ) const bool KateHighlighting::isInWord( TQChar c, int attrib ) const { - return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.tqfind(c) < 0 + return m_additionalData[ hlKeyForAttrib( attrib ) ]->deliminator.find(c) < 0 && !c.isSpace() && c != '"' && c != '\''; } bool KateHighlighting::canBreakAt( TQChar c, int attrib ) const { static const TQString& sq = KGlobal::staticQString("\"'"); - return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.tqfind(c) != -1) && (sq.tqfind(c) == -1); + return (m_additionalData[ hlKeyForAttrib( attrib ) ]->wordWrapDeliminator.find(c) != -1) && (sq.find(c) == -1); } signed char KateHighlighting::commentRegion(int attr) const { @@ -2206,7 +2206,7 @@ void KateHighlighting::readGlobalKeywordConfig() // remove any weakDelimitars (if any) from the default list and store this list. for (uint s=0; s < weakDeliminator.length(); s++) { - int f = deliminator.tqfind (weakDeliminator[s]); + int f = deliminator.find (weakDeliminator[s]); if (f > -1) deliminator.remove (f, 1); @@ -2365,20 +2365,20 @@ int KateHighlighting::getIdFromString(TQStringList *ContextNameList, TQString tm } } - else if ( tmpLineEndContext.tqcontains("##")) + else if ( tmpLineEndContext.contains("##")) { - int o = tmpLineEndContext.tqfind("##"); + int o = tmpLineEndContext.find("##"); // FIXME at least with 'foo##bar'-style contexts the rules are picked up // but the default attribute is not TQString tmp=tmpLineEndContext.mid(o+2); - if (!embeddedHls.tqcontains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); + if (!embeddedHls.contains(tmp)) embeddedHls.insert(tmp,KateEmbeddedHlInfo()); unres=tmp+':'+tmpLineEndContext.left(o); context=0; } else { - context=ContextNameList->tqfindIndex(buildPrefix+tmpLineEndContext); + context=ContextNameList->findIndex(buildPrefix+tmpLineEndContext); if (context==-1) { context=tmpLineEndContext.toInt(); @@ -2477,7 +2477,7 @@ void KateHighlighting::makeContextList() kdDebug(13010)<<"Looking up context0 for ruleset "<<incCtx<<endl; incCtx = incCtx.left(incCtx.length()-1); //try to find the context0 id for a given unresolvedReference - KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.tqfind(incCtx); + KateEmbeddedHlInfos::const_iterator hlIt=embeddedHls.find(incCtx); if (hlIt!=embeddedHls.end()) *(unresIt.key())=hlIt.data().context0; } @@ -2765,7 +2765,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) // only context refernces of type Name, ##Name, and Subname##Name are allowed if (incCtx.startsWith("##") || (!incCtx.startsWith("#"))) { - int incCtxi = incCtx.tqfind("##"); + int incCtxi = incCtx.find("##"); //#stay, #pop is not interesting here if (incCtxi >= 0) { @@ -2777,7 +2777,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) KateHlIncludeRule *ir=new KateHlIncludeRule(i,m_contexts[i]->items.count(),incCtxN,includeAttrib); //use the same way to determine cross hl file references as other items do - if (!embeddedHls.tqcontains(incSet)) + if (!embeddedHls.contains(incSet)) embeddedHls.insert(incSet,KateEmbeddedHlInfo()); else kdDebug(13010)<<"Skipping embeddedHls.insert for "<<incCtxN<<endl; @@ -2850,7 +2850,7 @@ int KateHighlighting::addToContextList(const TQString &ident, int ctx0) //BEGIN Resolve multiline region if possible if (!m_additionalData[ ident ]->multiLineRegion.isEmpty()) { - long commentregionid=RegionList.tqfindIndex( m_additionalData[ ident ]->multiLineRegion ); + long commentregionid=RegionList.findIndex( m_additionalData[ ident ]->multiLineRegion ); if (-1==commentregionid) { errorsAndWarnings+=i18n( "<B>%1</B>: Specified multiline comment region (%2) could not be resolved<BR>" @@ -3086,7 +3086,7 @@ int KateHlManager::realWildcardFind(const TQString &fileName) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.tqfindRef (highlight); + hl = hlList.findRef (highlight); } } return hl; @@ -3124,7 +3124,7 @@ int KateHlManager::mimeFind( KateDocument *doc ) if (highlight->priority() > pri) { pri = highlight->priority(); - hl = hlList.tqfindRef (highlight); + hl = hlList.findRef (highlight); } } @@ -3421,9 +3421,9 @@ void KateViewHighlightAction::slotAboutToShow() if (!KateHlManager::self()->hlHidden(z)) { - if ( !hlSection.isEmpty() && (names.tqcontains(hlName) < 1) ) + if ( !hlSection.isEmpty() && (names.contains(hlName) < 1) ) { - if (subMenusName.tqcontains(hlSection) < 1) + if (subMenusName.contains(hlSection) < 1) { subMenusName << hlSection; TQPopupMenu *menu = new TQPopupMenu (); @@ -3431,11 +3431,11 @@ void KateViewHighlightAction::slotAboutToShow() popupMenu()->insertItem ( '&' + hlSection, menu); } - int m = subMenusName.tqfindIndex (hlSection); + int m = subMenusName.findIndex (hlSection); names << hlName; subMenus.tqat(m)->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); } - else if (names.tqcontains(hlName) < 1) + else if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( '&' + hlName, this, TQT_SLOT(setHl(int)), 0, z); @@ -3454,7 +3454,7 @@ void KateViewHighlightAction::slotAboutToShow() } popupMenu()->setItemChecked (0, false); - int i = subMenusName.tqfindIndex (KateHlManager::self()->hlSection(doc->hlMode())); + int i = subMenusName.findIndex (KateHlManager::self()->hlSection(doc->hlMode())); if (i >= 0 && subMenus.tqat(i)) subMenus.tqat(i)->setItemChecked (doc->hlMode(), true); else diff --git a/kate/part/katehighlight.h b/kate/part/katehighlight.h index 9cb4a62c6..e312e4a01 100644 --- a/kate/part/katehighlight.h +++ b/kate/part/katehighlight.h @@ -357,7 +357,7 @@ class KateHlManager : public TQObject int detectHighlighting (class KateDocument *doc); - int findHl(KateHighlighting *h) {return hlList.tqfind(h);} + int findHl(KateHighlighting *h) {return hlList.find(h);} TQString identifierForName(const TQString&); // methodes to get the default style count + names diff --git a/kate/part/kateprinter.cpp b/kate/part/kateprinter.cpp index 05f360497..837d773e5 100644 --- a/kate/part/kateprinter.cpp +++ b/kate/part/kateprinter.cpp @@ -425,7 +425,7 @@ bool KatePrinter::print (KateDocument *doc) for (int i=0; i<3; i++) { s = headerTagList[i]; - if (s.tqfind("%p") != -1) s.replace("%p", TQString::number(currentPage)); + if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage)); paint.drawText(marg, 0, headerWidth-(marg*2), headerHeight, align, s); align = valign|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight); } @@ -453,7 +453,7 @@ bool KatePrinter::print (KateDocument *doc) for (int i=0; i<3; i++) { s = footerTagList[i]; - if (s.tqfind("%p") != -1) s.replace("%p", TQString::number(currentPage)); + if (s.find("%p") != -1) s.replace("%p", TQString::number(currentPage)); paint.drawText(marg, maxHeight+innerMargin, headerWidth-(marg*2), footerHeight, align, s); align = Qt::AlignVCenter|(i == 0 ? Qt::AlignHCenter : Qt::AlignRight); } diff --git a/kate/part/kateschema.cpp b/kate/part/kateschema.cpp index 6b4f149fc..fb42ea72d 100644 --- a/kate/part/kateschema.cpp +++ b/kate/part/kateschema.cpp @@ -244,7 +244,7 @@ uint KateSchemaManager::number (const TQString &name) return 1; int i; - if ((i = m_schemas.tqfindIndex(name)) > -1) + if ((i = m_schemas.findIndex(name)) > -1) return i; return 0; @@ -416,7 +416,7 @@ void KateSchemaConfigColorTab::schemaChanged ( int newSchema ) m_linenumber->disconnect( TQT_SIGNAL( changed( const TQColor & ) ) ); // If we havent this schema, read in from config file - if ( ! m_schemas.tqcontains( newSchema ) ) + if ( ! m_schemas.contains( newSchema ) ) { // fallback defaults TQColor tmp0 (KGlobalSettings::baseColor()); @@ -746,7 +746,7 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_hlDict[m_schema]->setAutoDelete (true); } - if (!m_hlDict[m_schema]->tqfind(m_hl)) + if (!m_hlDict[m_schema]->find(m_hl)) { kdDebug(13030) << "NEW HL, create list" << endl; @@ -775,20 +775,20 @@ void KateSchemaConfigHighlightTab::schemaChanged (uint schema) m_styles->viewport()->setPalette( p ); TQDict<KateStyleListCaption> prefixes; - for ( KateHlItemData *itemData = m_hlDict[m_schema]->tqfind(m_hl)->last(); + for ( KateHlItemData *itemData = m_hlDict[m_schema]->find(m_hl)->last(); itemData != 0L; - itemData = m_hlDict[m_schema]->tqfind(m_hl)->prev()) + itemData = m_hlDict[m_schema]->find(m_hl)->prev()) { kdDebug(13030) << "insert items " << itemData->name << endl; // All stylenames have their language mode prefixed, e.g. HTML:Comment // split them and put them into nice substructures. - int c = itemData->name.tqfind(':'); + int c = itemData->name.find(':'); if ( c > 0 ) { TQString prefix = itemData->name.left(c); TQString name = itemData->name.mid(c+1); - KateStyleListCaption *parent = prefixes.tqfind( prefix ); + KateStyleListCaption *parent = prefixes.find( prefix ); if ( ! parent ) { parent = new KateStyleListCaption( m_styles, prefix ); @@ -969,7 +969,7 @@ void KateSchemaConfigPage::newSchema () // soft update, no load from disk KateFactory::self()->schemaManager()->update (false); - int i = KateFactory::self()->schemaManager()->list ().tqfindIndex (t); + int i = KateFactory::self()->schemaManager()->list ().findIndex (t); update (); if (i > -1) @@ -1021,7 +1021,7 @@ void KateViewSchemaAction::slotAboutToShow() { TQString hlName = KateFactory::self()->schemaManager()->list().operator[](z); - if (names.tqcontains(hlName) < 1) + if (names.contains(hlName) < 1) { names << hlName; popupMenu()->insertItem ( hlName, this, TQT_SLOT(setSchema(int)), 0, z+1); diff --git a/kate/part/katesearch.cpp b/kate/part/katesearch.cpp index 951316671..5b3629347 100644 --- a/kate/part/katesearch.cpp +++ b/kate/part/katesearch.cpp @@ -81,7 +81,7 @@ void KateSearch::createActions( KActionCollection* ac ) void KateSearch::addToList( TQStringList& list, const TQString& s ) { if( list.count() > 0 ) { - TQStringList::Iterator it = list.tqfind( s ); + TQStringList::Iterator it = list.find( s ); if( *it != 0L ) list.remove( it ); if( list.count() >= 16 ) @@ -418,13 +418,13 @@ void KateSearch::replaceOne() replaces++; // if we inserted newlines, we better adjust. - uint newlines = replaceWith.tqcontains('\n'); + uint newlines = replaceWith.contains('\n'); if ( newlines ) { if ( ! s.flags.backward ) { s.cursor.setLine( s.cursor.line() + newlines ); - s.cursor.setCol( replaceWith.length() - replaceWith.tqfindRev('\n') ); + s.cursor.setCol( replaceWith.length() - replaceWith.findRev('\n') ); } // selection? if ( s.flags.selected ) @@ -851,7 +851,7 @@ bool SearchCommand::exec(class Kate::View *view, const TQString &cmd, TQString & // Else, it's just one or two (space separated) words TQRegExp re_rep2("replace(?::([bceprsw]*))?\\s+(\\S+)(.*)"); #define unbackslash(s) p=0;\ -while ( (p = pattern.tqfind( '\\' + delim, p )) > -1 )\ +while ( (p = pattern.find( '\\' + delim, p )) > -1 )\ {\ if ( !p || pattern[p-1] != '\\' )\ pattern.remove( p, 1 );\ diff --git a/kate/part/katespell.cpp b/kate/part/katespell.cpp index 26134b9b2..6ce2b2a72 100644 --- a/kate/part/katespell.cpp +++ b/kate/part/katespell.cpp @@ -113,7 +113,7 @@ void KateSpell::spellcheck( const KateTextCursor &from, const KateTextCursor &to << "ISO 8859-9" << "ISO 8859-13" << "ISO 8859-15" << "UTF-8" << "KOI8-R" << "KOI8-U" << "CP1251" << "CP1255"; - int enc = ksEncodings.tqfindIndex( m_view->doc()->encoding() ); + int enc = ksEncodings.findIndex( m_view->doc()->encoding() ); if ( enc > -1 ) { ksc->setEncoding( enc ); diff --git a/kate/part/katesupercursor.cpp b/kate/part/katesupercursor.cpp index 46e385e91..89860d496 100644 --- a/kate/part/katesupercursor.cpp +++ b/kate/part/katesupercursor.cpp @@ -662,7 +662,7 @@ void KateSuperRangeList::slotDeleted(TQObject* range) m_columnBoundaries.removeRef(r->m_end); } - int index = tqfindRef(r); + int index = findRef(r); if (index != -1) take(index); //else kdDebug(13020)<<"Range not found in list"<<endl; diff --git a/kate/part/katetextline.cpp b/kate/part/katetextline.cpp index 687c54b9c..dbb827003 100644 --- a/kate/part/katetextline.cpp +++ b/kate/part/katetextline.cpp @@ -282,12 +282,12 @@ bool KateTextLine::searchText (uint startCol, const TQString &text, uint *foundA if ( col == (int) m_text.length() ) ++startCol; do { - index = m_text.tqfindRev( text, col, casesensitive ); + index = m_text.findRev( text, col, casesensitive ); col--; } while ( col >= 0 && l + index >= startCol ); } else - index = m_text.tqfind (text, startCol, casesensitive); + index = m_text.find (text, startCol, casesensitive); if (index > -1) { diff --git a/kate/part/kateview.cpp b/kate/part/kateview.cpp index cfe6288a7..a0310ecb5 100644 --- a/kate/part/kateview.cpp +++ b/kate/part/kateview.cpp @@ -1748,7 +1748,7 @@ void KateView::lineAsHTML (KateTextLine::Ptr line, uint startCol, uint length, T charAttributes = m_renderer->attribute(line->attribute(curPos)); - if ( ! stylecache.tqcontains( line->attribute(curPos) ) ) + if ( ! stylecache.contains( line->attribute(curPos) ) ) { TQString textdecoration; TQString style; diff --git a/kate/part/test_regression.cpp b/kate/part/test_regression.cpp index 9a2e88548..b20328c72 100644 --- a/kate/part/test_regression.cpp +++ b/kate/part/test_regression.cpp @@ -869,7 +869,7 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) int pos = 0; do { pos++; - int newpos = absBase.tqfind('/', pos); + int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); diff --git a/kate/plugins/kdatatool/kate_kdatatool.cpp b/kate/plugins/kdatatool/kate_kdatatool.cpp index db28f8084..3678c26f4 100644 --- a/kate/plugins/kdatatool/kate_kdatatool.cpp +++ b/kate/plugins/kdatatool/kate_kdatatool.cpp @@ -108,7 +108,7 @@ void KDataToolPluginView::aboutToShow() if ( selectionInterface(m_view->document())->hasSelection() ) { word = selectionInterface(m_view->document())->selection(); - if ( word.tqfind(' ') == -1 && word.tqfind('\t') == -1 && word.tqfind('\n') == -1 ) + if ( word.find(' ') == -1 && word.find('\t') == -1 && word.find('\n') == -1 ) m_singleWord = true; else m_singleWord = false; @@ -206,7 +206,7 @@ void KDataToolPluginView::slotToolActivated( const KDataToolInfo &info, const TQ TQString datatype = TQSTRING_OBJECT_NAME_STRING; // If unsupported (and if we have a single word indeed), try application/x-singleword - if ( !info.mimeTypes().tqcontains( mimetype ) && m_singleWord ) + if ( !info.mimeTypes().contains( mimetype ) && m_singleWord ) mimetype = "application/x-singleword"; kdDebug() << "Running tool with datatype=" << datatype << " mimetype=" << mimetype << endl; diff --git a/kcert/kcertpart.cc b/kcert/kcertpart.cc index a73eb1fd8..8a0481a40 100644 --- a/kcert/kcertpart.cc +++ b/kcert/kcertpart.cc @@ -524,7 +524,7 @@ if (whatType == "application/x-pkcs12") { const char *signature = "-----BEGIN CERTIFICATE-----"; theFile[(uint)(qf.size()-1)] = 0; - isPEM = (TQCString(theFile.data()).tqfind(signature) >= 0); + isPEM = (TQCString(theFile.data()).find(signature) >= 0); } fp = fopen(m_file.local8Bit(), "r"); diff --git a/kconf_update/kconf_update.cpp b/kconf_update/kconf_update.cpp index ec4447abb..4d3846f2c 100644 --- a/kconf_update/kconf_update.cpp +++ b/kconf_update/kconf_update.cpp @@ -218,7 +218,7 @@ TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly) struct stat buff; if (stat( TQFile::encodeName(file), &buff) == 0) { - int i = file.tqfindRev('/'); + int i = file.findRev('/'); if (i != -1) file = file.mid(i+1); config->setGroup(file); @@ -237,7 +237,7 @@ TQStringList KonfUpdate::findUpdateFiles(bool dirtyOnly) bool KonfUpdate::checkFile(const TQString &filename) { currentFilename = filename; - int i = currentFilename.tqfindRev('/'); + int i = currentFilename.findRev('/'); if (i != -1) currentFilename = currentFilename.mid(i+1); skip = true; @@ -268,7 +268,7 @@ bool KonfUpdate::checkFile(const TQString &filename) void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id) { TQString file; - int i = _file.tqfind(','); + int i = _file.find(','); if (i == -1) { file = _file.stripWhiteSpace(); @@ -283,7 +283,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id) KSimpleConfig cfg(file); cfg.setGroup("$Version"); TQStringList ids = cfg.readListEntry("update_info"); - if (ids.tqcontains(id)) + if (ids.contains(id)) return; ids.append(id); cfg.writeEntry("update_info", ids); @@ -311,7 +311,7 @@ void KonfUpdate::checkGotFile(const TQString &_file, const TQString &id) bool KonfUpdate::updateFile(const TQString &filename) { currentFilename = filename; - int i = currentFilename.tqfindRev('/'); + int i = currentFilename.findRev('/'); if (i != -1) currentFilename = currentFilename.mid(i+1); skip = true; @@ -398,7 +398,7 @@ void KonfUpdate::gotId(const TQString &_id) { config->setGroup(currentFilename); TQStringList ids = config->readListEntry("done"); - if (!ids.tqcontains(id)) + if (!ids.contains(id)) { ids.append(id); config->writeEntry("done", ids); @@ -413,7 +413,7 @@ void KonfUpdate::gotId(const TQString &_id) TQStringList ids = config->readListEntry("done"); if (!_id.isEmpty()) { - if (ids.tqcontains(_id)) + if (ids.contains(_id)) { //qDebug("Id '%s' was already in done-list", _id.latin1()); if (!m_bUseConfigInfo) @@ -445,7 +445,7 @@ void KonfUpdate::gotFile(const TQString &_file) oldConfig2->setGroup("$Version"); TQStringList ids = oldConfig2->readListEntry("update_info"); TQString cfg_id = currentFilename + ":" + id; - if (!ids.tqcontains(cfg_id) && !skip) + if (!ids.contains(cfg_id) && !skip) { ids.append(cfg_id); oldConfig2->writeEntry("update_info", ids); @@ -473,7 +473,7 @@ void KonfUpdate::gotFile(const TQString &_file) newConfig->setGroup("$Version"); TQStringList ids = newConfig->readListEntry("update_info"); TQString cfg_id = currentFilename + ":" + id; - if (!ids.tqcontains(cfg_id) && !skip) + if (!ids.contains(cfg_id) && !skip) { ids.append(cfg_id); newConfig->writeEntry("update_info", ids); @@ -486,7 +486,7 @@ void KonfUpdate::gotFile(const TQString &_file) } newConfig = 0; - int i = _file.tqfind(','); + int i = _file.find(','); if (i == -1) { oldFile = _file.stripWhiteSpace(); @@ -505,7 +505,7 @@ void KonfUpdate::gotFile(const TQString &_file) TQString cfg_id = currentFilename + ":" + id; oldConfig2->setGroup("$Version"); TQStringList ids = oldConfig2->readListEntry("update_info"); - if (ids.tqcontains(cfg_id)) + if (ids.contains(cfg_id)) { skip = true; newFile = TQString::null; @@ -517,7 +517,7 @@ void KonfUpdate::gotFile(const TQString &_file) newConfig = new KConfig(newFile, false, false); newConfig->setGroup("$Version"); ids = newConfig->readListEntry("update_info"); - if (ids.tqcontains(cfg_id)) + if (ids.contains(cfg_id)) { skip = true; log() << currentFilename << ": Skipping update '" << id << "'" << endl; @@ -541,7 +541,7 @@ void KonfUpdate::gotFile(const TQString &_file) void KonfUpdate::gotGroup(const TQString &_group) { - int i = _group.tqfind(','); + int i = _group.find(','); if (i == -1) { oldGroup = _group.stripWhiteSpace(); @@ -574,7 +574,7 @@ void KonfUpdate::gotRemoveGroup(const TQString &_group) void KonfUpdate::gotKey(const TQString &_key) { - int i = _key.tqfind(','); + int i = _key.find(','); if (i == -1) { oldKey = _key.stripWhiteSpace(); @@ -724,7 +724,7 @@ void KonfUpdate::gotScriptArguments(const TQString &_arguments) void KonfUpdate::gotScript(const TQString &_script) { TQString script, interpreter; - int i = _script.tqfind(','); + int i = _script.find(','); if (i == -1) { script = _script.stripWhiteSpace(); @@ -860,7 +860,7 @@ void KonfUpdate::gotScript(const TQString &_script) TQString line = ts.readLine(); if (line.startsWith("[")) { - int j = line.tqfind(']')+1; + int j = line.find(']')+1; if (j > 0) group = line.mid(1, j-2); } @@ -869,7 +869,7 @@ void KonfUpdate::gotScript(const TQString &_script) TQString key = line.mid(9); if (key[0] == '[') { - int j = key.tqfind(']')+1; + int j = key.find(']')+1; if (j > 0) { group = key.mid(1,j-2); @@ -888,7 +888,7 @@ void KonfUpdate::gotScript(const TQString &_script) TQString key = line.mid(13).stripWhiteSpace(); if (key[0] == '[') { - int j = key.tqfind(']')+1; + int j = key.find(']')+1; if (j > 0) { group = key.mid(1,j-2); diff --git a/kdecore/kaccel.cpp b/kdecore/kaccel.cpp index 81bdf6295..75cd7aecf 100644 --- a/kdecore/kaccel.cpp +++ b/kdecore/kaccel.cpp @@ -303,7 +303,7 @@ void KAccelPrivate::slotKeyPressed( int id ) { kdDebug(125) << "KAccelPrivate::slotKeyPressed( " << id << " )" << endl; - if( m_mapIDToKey.tqcontains( id ) ) { + if( m_mapIDToKey.contains( id ) ) { KKey key = m_mapIDToKey[id]; KKeySequence seq( key ); TQPopupMenu* pMenu = createPopupMenu( m_pWatch, seq ); @@ -357,7 +357,7 @@ bool KAccelPrivate::eventFilter( TQObject* /*pWatched*/, TQEvent* pEvent ) if( (*it) == keyCodeQt ) { int nID = it.key(); kdDebug(125) << "shortcut found!" << endl; - if( m_mapIDToAction.tqcontains( nID ) ) { + if( m_mapIDToAction.contains( nID ) ) { // TODO: reduce duplication between here and slotMenuActivated KAccelAction* pAction = m_mapIDToAction[nID]; if( !pAction->isEnabled() ) @@ -608,7 +608,7 @@ void KAccel::changeMenuAccel( TQPopupMenu *menu, int id, const TQString& action if( !pAction || s.isEmpty() ) return; - int i = s.tqfind( '\t' ); + int i = s.find( '\t' ); TQString k = pAction->shortcut().seq(0).toString(); if( k.isEmpty() ) diff --git a/kdecore/kaccelbase.cpp b/kdecore/kaccelbase.cpp index 7f604b2b6..4ba4c9c3b 100644 --- a/kdecore/kaccelbase.cpp +++ b/kdecore/kaccelbase.cpp @@ -77,7 +77,7 @@ const KAccelAction* KAccelBase::actionPtr( const TQString& sAction ) const KAccelAction* KAccelBase::actionPtr( const KKeyServer::Key& key ) { - if( !m_mapKeyToAction.tqcontains( key ) ) + if( !m_mapKeyToAction.contains( key ) ) return 0; // Note: If more than one action is connected to a single key, nil will be returned. return m_mapKeyToAction[key].pAction; @@ -355,7 +355,7 @@ bool KAccelBase::updateConnections() if( bNonUnique ) { // Remove connection to single action if there is one - if( m_mapKeyToAction.tqcontains( key ) ) { + if( m_mapKeyToAction.contains( key ) ) { KAccelAction* pAction = m_mapKeyToAction[key].pAction; if( pAction ) { m_mapKeyToAction.remove( key ); @@ -378,7 +378,7 @@ bool KAccelBase::updateConnections() const KKeyServer::Key& key = it.key(); KAccelAction* pAction = (*it).pAction; // If this key is longer used or it points to a different action now, - if( !mapKeyToAction.tqcontains( key ) || mapKeyToAction[key].pAction != pAction ) { + if( !mapKeyToAction.contains( key ) || mapKeyToAction[key].pAction != pAction ) { if( pAction ) { disconnectKey( *pAction, key ); pAction->decConnections(); @@ -393,7 +393,7 @@ bool KAccelBase::updateConnections() for( KKeyToActionMap::iterator it = mapKeyToAction.begin(); it != mapKeyToAction.end(); ++it ) { const KKeyServer::Key& key = it.key(); KAccelAction* pAction = (*it).pAction; - if( !m_mapKeyToAction.tqcontains( key ) || m_mapKeyToAction[key].pAction != pAction ) { + if( !m_mapKeyToAction.contains( key ) || m_mapKeyToAction[key].pAction != pAction ) { // TODO: Decide what to do if connect fails. // Probably should remove this item from map. if( pAction ) { @@ -470,7 +470,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) //if( !key.isNull() ) { if( key.sym() ) { - if( !m_mapKeyToAction.tqcontains( key ) ) { + if( !m_mapKeyToAction.contains( key ) ) { // If this is a single-key shortcut, if( pAction->shortcut().seq(iSeq).count() == 1 ) { m_mapKeyToAction[key] = ActionInfo( pAction, iSeq, iVari ); @@ -481,7 +481,7 @@ bool KAccelBase::insertConnection( KAccelAction* pAction ) else { m_mapKeyToAction[key] = ActionInfo( 0, 0, 0 ); // Insert into non-unique list if it's not already there. - if( m_rgActionsNonUnique.tqfindIndex( pAction ) == -1 ) + if( m_rgActionsNonUnique.findIndex( pAction ) == -1 ) m_rgActionsNonUnique.append( pAction ); if( connectKey( key ) ) pAction->incConnections(); @@ -523,7 +523,7 @@ bool KAccelBase::removeConnection( KAccelAction* pAction ) //for( KKeyToActionMap::iterator it = m_mapKeyToAction.begin(); it != m_mapKeyToAction.end(); ++it ) // kdDebug(125) << "\tKey: " << it.key().toString() << " => '" << (*it)->m_sName << "'" << " " << *it << endl; - if( m_rgActionsNonUnique.tqfindIndex( pAction ) >= 0 ) { + if( m_rgActionsNonUnique.findIndex( pAction ) >= 0 ) { mtemp_pActionRemoving = pAction; bool b = updateConnections(); mtemp_pActionRemoving = 0; @@ -591,7 +591,7 @@ TQPopupMenu* KAccelBase::createPopupMenu( TQWidget* pParent, const KKeySequence& // If an action has already been inserted into the menu // and we have a label instead of an action here, // then indicate that we should insert a separator before the next menu entry. - if( bActionInserted && !pAction->isConfigurable() && pAction->name().tqcontains( ':' ) ) + if( bActionInserted && !pAction->isConfigurable() && pAction->name().contains( ':' ) ) bInsertSeparator = true; for( uint iSeq = 0; iSeq < pAction->shortcut().count(); iSeq++ ) { diff --git a/kdecore/kaccelmanager.cpp b/kdecore/kaccelmanager.cpp index 40e3710c8..7dc49ce78 100644 --- a/kdecore/kaccelmanager.cpp +++ b/kdecore/kaccelmanager.cpp @@ -145,7 +145,7 @@ bool KAcceleratorManagerPrivate::standardName(const TQString &str) { if (!kaccmp_sns) kaccmp_sns_d.setObject(kaccmp_sns, new TQStringList(KStdAction::internal_stdNames())); - return kaccmp_sns->tqcontains(str); + return kaccmp_sns->contains(str); } KAcceleratorManagerPrivate::Item::~Item() @@ -224,7 +224,7 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use { if (it->m_index >= 0) { - TQMenuItem *mitem = menuBar->tqfindItem(menuBar->idAt(it->m_index)); + TQMenuItem *mitem = menuBar->findItem(menuBar->idAt(it->m_index)); if (mitem) { checkChange(contents[cnt]); @@ -240,12 +240,12 @@ void KAcceleratorManagerPrivate::calculateAccelerators(Item *item, TQString &use if ( dynamic_cast<TQLabel*>( it->m_widget ) && it->m_widget->inherits("KURLLabel") ) continue; - int tprop = it->m_widget->tqmetaObject()->tqfindProperty("text", true); + int tprop = it->m_widget->tqmetaObject()->findProperty("text", true); if (tprop != -1) { if (checkChange(contents[cnt])) it->m_widget->setProperty("text", contents[cnt].accelerated()); } else { - tprop = it->m_widget->tqmetaObject()->tqfindProperty("title", true); + tprop = it->m_widget->tqmetaObject()->findProperty("title", true); if (tprop != -1 && checkChange(contents[cnt])) it->m_widget->setProperty("title", contents[cnt].accelerated()); } @@ -271,7 +271,7 @@ void KAcceleratorManagerPrivate::traverseChildren(TQWidget *widget, Item *item) if ( !w->isVisibleTo( widget ) || ( w->isTopLevel() && dynamic_cast<TQPopupMenu*>(w) == NULL ) ) continue; - if ( KAcceleratorManagerPrivate::ignored_widgets.tqfind( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) + if ( KAcceleratorManagerPrivate::ignored_widgets.find( w ) != KAcceleratorManagerPrivate::ignored_widgets.end() ) continue; manageWidget(w, item); @@ -341,7 +341,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) { TQString content; TQVariant variant; - int tprop = w->tqmetaObject()->tqfindProperty("text", true); + int tprop = w->tqmetaObject()->findProperty("text", true); if (tprop != -1) { const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); if ( p && p->isValid() ) @@ -351,7 +351,7 @@ void KAcceleratorManagerPrivate::manageWidget(TQWidget *w, Item *item) } if (tprop == -1) { - tprop = w->tqmetaObject()->tqfindProperty("title", true); + tprop = w->tqmetaObject()->findProperty("title", true); if (tprop != -1) { const TQMetaProperty* p = w->tqmetaObject()->property( tprop, true ); if ( p && p->isValid() ) @@ -410,7 +410,7 @@ void KAcceleratorManagerPrivate::manageMenuBar(TQMenuBar *mbar, Item *item) for (uint i=0; i<mbar->count(); ++i) { - mitem = mbar->tqfindItem(mbar->idAt(i)); + mitem = mbar->findItem(mbar->idAt(i)); if (!mitem) continue; @@ -479,18 +479,18 @@ void KAcceleratorManager::last_manage(TQString &added, TQString &changed, TQStr KAccelString::KAccelString(const TQString &input, int initialWeight) : m_pureText(input), m_weight() { - m_orig_accel = m_pureText.tqfind("(!)&"); + m_orig_accel = m_pureText.find("(!)&"); if (m_orig_accel != -1) m_pureText.remove(m_orig_accel, 4); - m_orig_accel = m_pureText.tqfind("(&&)"); + m_orig_accel = m_pureText.find("(&&)"); if (m_orig_accel != -1) m_pureText.replace(m_orig_accel, 4, "&"); m_origText = m_pureText; if (m_pureText.contains('\t')) - m_pureText = m_pureText.left(m_pureText.tqfind('\t')); + m_pureText = m_pureText.left(m_pureText.find('\t')); m_orig_accel = m_accel = stripAccelerator(m_pureText); @@ -599,7 +599,7 @@ int KAccelString::stripAccelerator(TQString &text) while (p >= 0) { - p = text.tqfind('&', p)+1; + p = text.find('&', p)+1; if (p <= 0 || p >= (int)text.length()) return -1; @@ -627,7 +627,7 @@ int KAccelString::maxWeight(int &index, const TQString &used) index = -1; for (uint pos=0; pos<m_pureText.length(); ++pos) - if (used.tqfind(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0) + if (used.find(m_pureText[pos], 0, FALSE) == -1 && m_pureText[pos].latin1() != 0) if (m_weight[pos] > max) { max = m_weight[pos]; @@ -786,7 +786,7 @@ void KPopupAccelManager::findMenuEntries(KAccelStringList &list) // read out the menu entries for (uint i=0; i<m_popup->count(); i++) { - mitem = m_popup->tqfindItem(m_popup->idAt(i)); + mitem = m_popup->findItem(m_popup->idAt(i)); if (mitem->isSeparator()) continue; @@ -813,7 +813,7 @@ void KPopupAccelManager::setMenuEntries(const KAccelStringList &list) uint cnt = 0; for (uint i=0; i<m_popup->count(); i++) { - mitem = m_popup->tqfindItem(m_popup->idAt(i)); + mitem = m_popup->findItem(m_popup->idAt(i)); if (mitem->isSeparator()) continue; diff --git a/kdecore/kapplication.cpp b/kdecore/kapplication.cpp index a1df33463..292105835 100644 --- a/kdecore/kapplication.cpp +++ b/kdecore/kapplication.cpp @@ -1185,9 +1185,9 @@ void KApplication::propagateSessionManager() TQCString fName = TQFile::encodeName(locateLocal("socket", "KSMserver")); TQCString display = ::getenv(DISPLAY); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); int i; - while( (i = display.tqfind(':')) >= 0) + while( (i = display.find(':')) >= 0) display[i] = '_'; fName += "_"+display; @@ -1244,7 +1244,7 @@ void KApplication::commitData( TQSessionManager& sm ) } else { w = list->next(); } - while ( w && done.tqcontainsRef( w ) ) + while ( w && done.containsRef( w ) ) w = list->next(); } delete list; @@ -1909,7 +1909,7 @@ void KApplication::invokeEditSlot( const char *slot ) TQMetaObject *meta = object->tqmetaObject(); - int idx = meta->tqfindSlot( slot + 1, true ); + int idx = meta->findSlot( slot + 1, true ); if( idx < 0 ) return; @@ -2846,7 +2846,7 @@ TQString KApplication::tempSaveName( const TQString& pFilename ) const } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); return aFilename; } @@ -2875,7 +2875,7 @@ TQString KApplication::checkRecoverFile( const TQString& pFilename, } } - aFilename.tqreplace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); + aFilename.replace( "/", "\\!" ).prepend( "#" ).append( "#" ).prepend( "/" ).prepend( aAutosaveDir.absPath() ); if( TQFile( aFilename ).exists() ) { @@ -2908,7 +2908,7 @@ bool checkAccess(const TQString& pathname, int mode) //strip the filename (everything until '/' from the end TQString dirName(pathname); - int pos = dirName.tqfindRev('/'); + int pos = dirName.findRev('/'); if ( pos == -1 ) return false; // No path in argument. This is evil, we won't allow this else if ( pos == 0 ) // don't turn e.g. /root into an empty string @@ -3123,18 +3123,18 @@ void KApplication::initUrlActionRestrictions() bool bEnabled = (strEnabled == "true"); if (refPath.startsWith("$HOME")) - refPath.tqreplace(0, 5, TQDir::homeDirPath()); + refPath.replace(0, 5, TQDir::homeDirPath()); else if (refPath.startsWith("~")) - refPath.tqreplace(0, 1, TQDir::homeDirPath()); + refPath.replace(0, 1, TQDir::homeDirPath()); if (urlPath.startsWith("$HOME")) - urlPath.tqreplace(0, 5, TQDir::homeDirPath()); + urlPath.replace(0, 5, TQDir::homeDirPath()); else if (urlPath.startsWith("~")) - urlPath.tqreplace(0, 1, TQDir::homeDirPath()); + urlPath.replace(0, 1, TQDir::homeDirPath()); if (refPath.startsWith("$TMP")) - refPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + refPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); if (urlPath.startsWith("$TMP")) - urlPath.tqreplace(0, 4, KGlobal::dirs()->saveLocation("tmp")); + urlPath.replace(0, 4, KGlobal::dirs()->saveLocation("tmp")); d->urlActionRestrictions.append(new KApplicationPrivate::URLActionRule ( action, refProt, refHost, refPath, urlProt, urlHost, urlPath, bEnabled)); diff --git a/kdecore/kcharsets.cpp b/kdecore/kcharsets.cpp index 027dba367..b78345276 100644 --- a/kdecore/kcharsets.cpp +++ b/kdecore/kcharsets.cpp @@ -491,14 +491,14 @@ TQString KCharsets::languageForEncoding( const TQString &encoding ) TQString KCharsets::encodingForName( const TQString &descriptiveName ) { - const int left = descriptiveName.tqfindRev( '(' ); + const int left = descriptiveName.findRev( '(' ); if (left<0) // No parenthesis, so assume it is a normal encoding name return descriptiveName.stripWhiteSpace(); TQString name(descriptiveName.mid(left+1)); - const int right = name.tqfindRev( ')' ); + const int right = name.findRev( ')' ); if (right<0) return name; @@ -536,7 +536,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if (n.isEmpty()) { codec = KGlobal::locale()->codecForEncoding(); - d->codecForNameDict.tqreplace("->locale<-", codec); + d->codecForNameDict.replace("->locale<-", codec); return codec; } @@ -553,7 +553,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(name); if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -566,7 +566,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -642,7 +642,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const } if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } @@ -654,7 +654,7 @@ TQTextCodec *KCharsets::codecForName(const TQString &n, bool &ok) const codec = TQTextCodec::codecForName(cname); if(codec) { - d->codecForNameDict.tqreplace(key, codec); + d->codecForNameDict.replace(key, codec); return codec; } diff --git a/kdecore/kclipboard.cpp b/kdecore/kclipboard.cpp index 03a4f916f..86250ea4f 100644 --- a/kdecore/kclipboard.cpp +++ b/kdecore/kclipboard.cpp @@ -72,11 +72,11 @@ public: return 0L; } virtual bool provides( const char *mimeType ) const { - return ( m_formats.tqfind( mimeType ) > -1 ); + return ( m_formats.find( mimeType ) > -1 ); } virtual TQByteArray tqencodedData( const char *format ) const { - int index = m_formats.tqfind( format ); + int index = m_formats.find( format ); if ( index > -1 ) return *(m_data.tqat( index )); diff --git a/kdecore/kcmdlineargs.cpp b/kdecore/kcmdlineargs.cpp index 93da1470b..10793b739 100644 --- a/kdecore/kcmdlineargs.cpp +++ b/kdecore/kcmdlineargs.cpp @@ -393,7 +393,7 @@ findOption(const KCmdLineOptions *options, TQCString &opt, if (!options->name) return result+0; TQCString nextOption = options->name; - int p = nextOption.tqfind(' '); + int p = nextOption.find(' '); if (p > 0) nextOption = nextOption.left(p); if (nextOption[0] == '!') @@ -432,7 +432,7 @@ KCmdLineArgs::findOption(const char *_opt, TQCString opt, int &i, bool _enabled, const char *opt_name; const char *def; TQCString argument; - int j = opt.tqfind('='); + int j = opt.find('='); if (j != -1) { argument = opt.mid(j+1); @@ -1081,9 +1081,9 @@ KCmdLineArgs::setOption(const TQCString &opt, bool enabled) } if (enabled) - parsedOptionList->tqreplace( opt, new TQCString("t") ); + parsedOptionList->replace( opt, new TQCString("t") ); else - parsedOptionList->tqreplace( opt, new TQCString("f") ); + parsedOptionList->replace( opt, new TQCString("f") ); } void @@ -1119,7 +1119,7 @@ KCmdLineArgs::getOption(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(_opt); + value = parsedOptionList->find(_opt); } if (value) @@ -1199,7 +1199,7 @@ KCmdLineArgs::isSet(const char *_opt) const TQCString *value = 0; if (parsedOptionList) { - value = parsedOptionList->tqfind(opt); + value = parsedOptionList->find(opt); } if (value) diff --git a/kdecore/kcompletion.cpp b/kdecore/kcompletion.cpp index ce2f3c3b5..813b56027 100644 --- a/kdecore/kcompletion.cpp +++ b/kdecore/kcompletion.cpp @@ -150,7 +150,7 @@ void KCompletion::addWeightedItem( const TQString& item ) uint weight = 0; // find out the weighting of this item (appended to the string as ":num") - int index = item.tqfindRev(':'); + int index = item.findRev(':'); if ( index > 0 ) { bool ok; weight = item.mid( index + 1 ).toUInt( &ok ); @@ -274,7 +274,7 @@ TQStringList KCompletion::substringCompletion( const TQString& string ) const for( ; it != list.end(); ++it ) { TQString item = *it; - if ( item.tqfind( string, 0, false ) != -1 ) { // always case insensitive + if ( item.find( string, 0, false ) != -1 ) { // always case insensitive matches.append( item ); } } diff --git a/kdecore/kcompletionbase.cpp b/kdecore/kcompletionbase.cpp index 019f4ec6b..9e7f6d746 100644 --- a/kdecore/kcompletionbase.cpp +++ b/kdecore/kcompletionbase.cpp @@ -123,7 +123,7 @@ bool KCompletionBase::setKeyBinding( KeyBindingType item, const KShortcut& cut ) for( KeyBindingMap::Iterator it = m_keyMap.begin(); it != m_keyMap.end(); ++it ) if( it.data() == cut ) return false; } - m_keyMap.tqreplace( item, cut ); + m_keyMap.replace( item, cut ); return true; } diff --git a/kdecore/kconfig.cpp b/kdecore/kconfig.cpp index e40f23a19..2531034ee 100644 --- a/kdecore/kconfig.cpp +++ b/kdecore/kconfig.cpp @@ -144,7 +144,7 @@ TQMap<TQString, TQString> KConfig::entryMap(const TQString &pGroup) const KEntryKey groupKey( pGroup_utf, 0 ); TQMap<TQString, TQString> tmpMap; - KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey); + KEntryMapConstIterator aIt = aEntryMap.find(groupKey); if (aIt == aEntryMap.end()) return tmpMap; ++aIt; // advance past special group entry marker @@ -183,7 +183,7 @@ KEntryMap KConfig::internalEntryMap(const TQString &pGroup) const KEntryKey aKey(pGroup_utf, 0); KEntryMap tmpEntryMap; - aIt = aEntryMap.tqfind(aKey); + aIt = aEntryMap.find(aKey); if (aIt == aEntryMap.end()) { // the special group key is not in the map, // so it must be an invalid group. Return @@ -237,7 +237,7 @@ void KConfig::putData(const KEntryKey &_key, const KEntry &_data, bool _checkGro KEntry KConfig::lookupData(const KEntryKey &_key) const { - KEntryMapConstIterator aIt = aEntryMap.tqfind(_key); + KEntryMapConstIterator aIt = aEntryMap.find(_key); if (aIt != aEntryMap.end()) { const KEntry &entry = *aIt; @@ -255,7 +255,7 @@ bool KConfig::internalHasGroup(const TQCString &group) const { KEntryKey groupKey( group, 0); - KEntryMapConstIterator aIt = aEntryMap.tqfind(groupKey); + KEntryMapConstIterator aIt = aEntryMap.find(groupKey); KEntryMapConstIterator aEnd = aEntryMap.end(); if (aIt == aEnd) @@ -290,7 +290,7 @@ void KConfig::checkUpdate(const TQString &id, const TQString &updateFile) setGroup("$Version"); TQString cfg_id = updateFile+":"+id; TQStringList ids = readListEntry("update_info"); - if (!ids.tqcontains(cfg_id)) + if (!ids.contains(cfg_id)) { TQStringList args; args << "--check" << updateFile; diff --git a/kdecore/kconfig_compiler/kconfig_compiler.cpp b/kdecore/kconfig_compiler/kconfig_compiler.cpp index fd2cbc405..10c91834c 100644 --- a/kdecore/kconfig_compiler/kconfig_compiler.cpp +++ b/kdecore/kconfig_compiler/kconfig_compiler.cpp @@ -284,7 +284,7 @@ static TQString dumpNode(const TQDomNode &node) static TQString filenameOnly(TQString path) { - int i = path.tqfindRev('/'); + int i = path.findRev('/'); if (i >= 0) return path.mid(i+1); return path; @@ -480,13 +480,13 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) if ( nameIsEmpty ) { name = key; - name.tqreplace( " ", TQString() ); - } else if ( name.tqcontains( ' ' ) ) { + name.replace( " ", TQString() ); + } else if ( name.contains( ' ' ) ) { kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl; name.remove( ' ' ); } - if (name.tqcontains("$(")) + if (name.contains("$(")) { if (param.isEmpty()) { @@ -513,7 +513,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) { // Adjust name paramName = name; - name.tqreplace("$("+param+")", TQString()); + name.replace("$("+param+")", TQString()); // Lookup defaults for indexed entries for(int i = 0; i <= paramMax; i++) { @@ -534,7 +534,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) int i = index.toInt(&ok); if (!ok) { - i = paramValues.tqfindIndex(index); + i = paramValues.findIndex(index); if (i == -1) { kdError() << "Index '" << index << "' for default value is unknown." << endl; @@ -568,7 +568,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element ) return 0; } - if (allNames.tqcontains(name)) + if (allNames.contains(name)) { if (nameIsEmpty) kdError() << "The key '" << key << "' can not be used as name for the entry because " @@ -771,7 +771,7 @@ TQString paramString(const TQString &s, const CfgEntry *e, int i) { TQString result = s; TQString needle = "$("+e->param()+")"; - if (result.tqcontains(needle)) + if (result.contains(needle)) { TQString tmp; if (e->paramType() == "Enum") @@ -796,7 +796,7 @@ TQString paramString(const TQString &group, const TQValueList<Param> ¶meters for (TQValueList<Param>::ConstIterator it = parameters.begin(); it != parameters.end(); ++it) { - if (paramString.tqcontains("$("+(*it).name+")")) + if (paramString.contains("$("+(*it).name+")")) { TQString tmp; tmp.sprintf("%%%d", i++); @@ -1249,7 +1249,7 @@ int main( int argc, char **argv ) TQString t = e->type(); // Manipulator - if (allMutators || mutators.tqcontains(n)) + if (allMutators || mutators.contains(n)) { h << " /**" << endl; h << " Set " << e->label() << endl; @@ -1642,7 +1642,7 @@ int main( int argc, char **argv ) TQString t = e->type(); // Manipulator - if (allMutators || mutators.tqcontains(n)) + if (allMutators || mutators.contains(n)) { cpp << "void " << setFunction(n, className) << "( "; if (!e->param().isEmpty()) diff --git a/kdecore/kconfigbackend.cpp b/kdecore/kconfigbackend.cpp index 4fc63ebe6..633458d41 100644 --- a/kdecore/kconfigbackend.cpp +++ b/kdecore/kconfigbackend.cpp @@ -999,7 +999,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, const KEntry ¤tEntry = *aIt; if(aIt.key().bDefault) { - aTempMap.tqreplace(aIt.key(), currentEntry); + aTempMap.replace(aIt.key(), currentEntry); continue; } @@ -1017,7 +1017,7 @@ bool KConfigINIBackEnd::getEntryMap(KEntryMap &aTempMap, bool bGlobal, // put this entry from the config object into the // temporary map, possibly replacing an existing entry - KEntryMapIterator aIt2 = aTempMap.tqfind(aIt.key()); + KEntryMapIterator aIt2 = aTempMap.find(aIt.key()); if (aIt2 != aTempMap.end() && (*aIt2).bImmutable) continue; // Bail out if the on-disk entry is immutable diff --git a/kdecore/kconfigbase.cpp b/kdecore/kconfigbase.cpp index 0b35f91e0..20d3f023c 100644 --- a/kdecore/kconfigbase.cpp +++ b/kdecore/kconfigbase.cpp @@ -272,7 +272,7 @@ TQString KConfigBase::readEntry( const char *pKey, if( expand || bExpand ) { // check for environment variables and make necessary translations - int nDollarPos = aValue.tqfind( '$' ); + int nDollarPos = aValue.find( '$' ); while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) { // there is at least one $ @@ -328,7 +328,7 @@ TQString KConfigBase::readEntry( const char *pKey, aValue.remove( nDollarPos, 1 ); nDollarPos++; } - nDollarPos = aValue.tqfind( '$', nDollarPos ); + nDollarPos = aValue.find( '$', nDollarPos ); } } @@ -793,7 +793,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co TQString aValue = readEntry( pKey ); if( !aValue.isNull() ) { - if ( aValue.tqcontains( ',' ) > 5 ) { + if ( aValue.contains( ',' ) > 5 ) { // KDE3 and upwards entry if ( !aRetFont.fromString( aValue ) && pDefault ) aRetFont = *pDefault; @@ -802,7 +802,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // backward compatibility with older font formats // ### remove KDE 3.1 ? // find first part (font family) - int nIndex = aValue.tqfind( ',' ); + int nIndex = aValue.find( ',' ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; @@ -812,7 +812,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find second part (point size) int nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) aRetFont = *pDefault; @@ -824,7 +824,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find third part (style hint) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -836,7 +836,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co // find fourth part (char set) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -848,7 +848,7 @@ TQFont KConfigBase::readFontEntry( const char *pKey, const TQFont* pDefault ) co nIndex-nOldIndex-1 ); // find fifth part (weight) nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ if( pDefault ) @@ -979,7 +979,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, bool bOK; // find first part (red) - int nIndex = aValue.tqfind( ',' ); + int nIndex = aValue.find( ',' ); if( nIndex == -1 ){ // return a sensible default -- Bernd @@ -992,7 +992,7 @@ TQColor KConfigBase::readColorEntry( const char *pKey, // find second part (green) int nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex+1 ); + nIndex = aValue.find( ',', nOldIndex+1 ); if( nIndex == -1 ){ // return a sensible default -- Bernd diff --git a/kdecore/kconfigdialogmanager.cpp b/kdecore/kconfigdialogmanager.cpp index 8db988709..97e741f65 100644 --- a/kdecore/kconfigdialogmanager.cpp +++ b/kdecore/kconfigdialogmanager.cpp @@ -131,13 +131,13 @@ void KConfigDialogManager::setupWidget(TQWidget *widget, KConfigSkeletonItem *it TQVariant minValue = item->minValue(); if (minValue.isValid()) { - if (widget->tqmetaObject()->tqfindProperty("minValue", true) != -1) + if (widget->tqmetaObject()->findProperty("minValue", true) != -1) widget->setProperty("minValue", minValue); } TQVariant maxValue = item->maxValue(); if (maxValue.isValid()) { - if (widget->tqmetaObject()->tqfindProperty("maxValue", true) != -1) + if (widget->tqmetaObject()->findProperty("maxValue", true) != -1) widget->setProperty("maxValue", maxValue); } if (TQWhatsThis::textFor( widget ).isEmpty()) @@ -181,7 +181,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang setupWidget(childWidget, item); - TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className()); + TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className()); if (changedIt == changedMap.end()) { @@ -189,7 +189,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang // it again using the super class name. This fixes a problem with using QtRuby/Korundum // widgets with KConfigXT where 'Qt::Widget' wasn't being seen a the real deal, even // though it was a 'QWidget'. - changedIt = changedMap.tqfind(childWidget->tqmetaObject()->tqsuperClassName()); + changedIt = changedMap.find(childWidget->tqmetaObject()->tqsuperClassName()); } if (changedIt == changedMap.end()) @@ -235,7 +235,7 @@ bool KConfigDialogManager::parseChildren(const TQWidget *widget, bool trackChang #ifndef NDEBUG else if (widgetName) { - TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.tqfind(childWidget->className()); + TQMap<TQString, TQCString>::const_iterator changedIt = changedMap.find(childWidget->className()); if (changedIt != changedMap.end()) { if ((!d->insideGroupBox || !childWidget->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) && @@ -283,7 +283,7 @@ void KConfigDialogManager::updateWidgets() if (item->isImmutable()) { widget->setEnabled(false); - TQWidget *buddy = d->buddyWidget.tqfind(it.currentKey()); + TQWidget *buddy = d->buddyWidget.find(it.currentKey()); if (buddy) buddy->setEnabled(false); } diff --git a/kdecore/kconfigskeleton.cpp b/kdecore/kconfigskeleton.cpp index 58b889018..b464f64d2 100644 --- a/kdecore/kconfigskeleton.cpp +++ b/kdecore/kconfigskeleton.cpp @@ -1203,5 +1203,5 @@ bool KConfigSkeleton::isImmutable(const TQString &name) KConfigSkeletonItem *KConfigSkeleton::findItem(const TQString &name) { - return mItemDict.tqfind(name); + return mItemDict.find(name); } diff --git a/kdecore/kdcoppropertyproxy.cpp b/kdecore/kdcoppropertyproxy.cpp index 22390a4c4..3742c509c 100644 --- a/kdecore/kdcoppropertyproxy.cpp +++ b/kdecore/kdcoppropertyproxy.cpp @@ -99,7 +99,7 @@ TQValueList<TQCString> KDCOPPropertyProxy::functions( TQObject *object ) TQStrListIterator it( properties ); for (; it.current(); ++it ) { - const TQMetaProperty *metaProp = metaObj->property( metaObj->tqfindProperty( it.current(), true ), true ); + const TQMetaProperty *metaProp = metaObj->property( metaObj->findProperty( it.current(), true ), true ); assert( metaProp ); @@ -314,7 +314,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ propName.detach(); set = true; propName = propName.mid( 3 ); - int p1 = propName.tqfind( '(' ); + int p1 = propName.find( '(' ); uint len = propName.length(); @@ -328,7 +328,7 @@ bool KDCOPPropertyProxy::decodePropertyRequestInternal( const TQCString &fun, TQ else propName.truncate( propName.length() - 2 ); - if ( !object->tqmetaObject()->propertyNames( true ).tqcontains( propName ) ) + if ( !object->tqmetaObject()->propertyNames( true ).contains( propName ) ) return false; return true; diff --git a/kdecore/kde-config.cpp.cmake b/kdecore/kde-config.cpp.cmake index cd8cb3ae4..867e43789 100644 --- a/kdecore/kde-config.cpp.cmake +++ b/kdecore/kde-config.cpp.cmake @@ -37,64 +37,64 @@ TQString expandvars(const char *_input) return result; bool changed = false; - int index = result.tqfind("${prefix}"); + int index = result.find("${prefix}"); if (index >= 0) { - result = result.tqreplace(index, 9, "@CMAKE_INSTALL_PREFIX@"); + result = result.replace(index, 9, "@CMAKE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(prefix)"); + index = result.find("$(prefix)"); if (index >= 0) { - result = result.tqreplace(index, 9, "@CMAKE_INSTALL_PREFIX@"); + result = result.replace(index, 9, "@CMAKE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${datadir}"); + index = result.find("${datadir}"); if (index >= 0) { - result = result.tqreplace(index, 10, "@SHARE_INSTALL_PREFIX@"); + result = result.replace(index, 10, "@SHARE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(datadir)"); + index = result.find("$(datadir)"); if (index >= 0) { - result = result.tqreplace(index, 10, "@SHARE_INSTALL_PREFIX@"); + result = result.replace(index, 10, "@SHARE_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${exec_prefix}"); + index = result.find("${exec_prefix}"); if (index >= 0) { - result = result.tqreplace(index, 14, "@EXEC_INSTALL_PREFIX@"); + result = result.replace(index, 14, "@EXEC_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("$(exec_prefix)"); + index = result.find("$(exec_prefix)"); if (index >= 0) { - result = result.tqreplace(index, 14, "@EXEC_INSTALL_PREFIX@"); + result = result.replace(index, 14, "@EXEC_INSTALL_PREFIX@"); changed = true; } - index = result.tqfind("${libdir}"); + index = result.find("${libdir}"); if (index >= 0) { - result = result.tqreplace(index, 9, "@LIB_INSTALL_DIR@"); + result = result.replace(index, 9, "@LIB_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(libdir)"); + index = result.find("$(libdir)"); if (index >= 0) { - result = result.tqreplace(index, 9, "@LIB_INSTALL_DIR@"); + result = result.replace(index, 9, "@LIB_INSTALL_DIR@"); changed = true; } - index = result.tqfind("${includedir}"); + index = result.find("${includedir}"); if (index >= 0) { - result = result.tqreplace(index, 20, "@INCLUDE_INSTALL_DIR@"); + result = result.replace(index, 20, "@INCLUDE_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(includedir)"); + index = result.find("$(includedir)"); if (index >= 0) { - result = result.tqreplace(index, 20, "@INCLUDE_INSTALL_DIR@"); + result = result.replace(index, 20, "@INCLUDE_INSTALL_DIR@"); changed = true; } - index = result.tqfind("${sysconfdir}"); + index = result.find("${sysconfdir}"); if (index >= 0) { - result = result.tqreplace(index, 13, "@SYSCONF_INSTALL_DIR@"); + result = result.replace(index, 13, "@SYSCONF_INSTALL_DIR@"); changed = true; } - index = result.tqfind("$(sysconfdir)"); + index = result.find("$(sysconfdir)"); if (index >= 0) { - result = result.tqreplace(index, 13, "@SYSCONF_INSTALL_DIR@"); + result = result.replace(index, 13, "@SYSCONF_INSTALL_DIR@"); changed = true; } if (changed) diff --git a/kdecore/kde-config.cpp.in b/kdecore/kde-config.cpp.in index eac5f43cf..ec9f24133 100644 --- a/kdecore/kde-config.cpp.in +++ b/kdecore/kde-config.cpp.in @@ -37,62 +37,62 @@ TQString expandvars(const char *_input) return result; bool changed = false; - int index = result.tqfind("${prefix}"); + int index = result.find("${prefix}"); if (index >= 0) { result = result.replace(index, 9, "@prefix@"); changed = true; } - index = result.tqfind("$(prefix)"); + index = result.find("$(prefix)"); if (index >= 0) { result = result.replace(index, 9, "@prefix@"); changed = true; } - index = result.tqfind("${datadir}"); + index = result.find("${datadir}"); if (index >= 0) { result = result.replace(index, 10, "@datadir@"); changed = true; } - index = result.tqfind("$(datadir)"); + index = result.find("$(datadir)"); if (index >= 0) { result = result.replace(index, 10, "@datadir@"); changed = true; } - index = result.tqfind("${exec_prefix}"); + index = result.find("${exec_prefix}"); if (index >= 0) { result = result.replace(index, 14, "@exec_prefix@"); changed = true; } - index = result.tqfind("$(exec_prefix)"); + index = result.find("$(exec_prefix)"); if (index >= 0) { result = result.replace(index, 14, "@exec_prefix@"); changed = true; } - index = result.tqfind("${libdir}"); + index = result.find("${libdir}"); if (index >= 0) { result = result.replace(index, 9, "@libdir@"); changed = true; } - index = result.tqfind("$(libdir)"); + index = result.find("$(libdir)"); if (index >= 0) { result = result.replace(index, 9, "@libdir@"); changed = true; } - index = result.tqfind("${includedir}"); + index = result.find("${includedir}"); if (index >= 0) { result = result.replace(index, 20, "@includedir@"); changed = true; } - index = result.tqfind("$(includedir)"); + index = result.find("$(includedir)"); if (index >= 0) { result = result.replace(index, 20, "@includedir@"); changed = true; } - index = result.tqfind("${sysconfdir}"); + index = result.find("${sysconfdir}"); if (index >= 0) { result = result.replace(index, 13, "@sysconfdir@"); changed = true; } - index = result.tqfind("$(sysconfdir)"); + index = result.find("$(sysconfdir)"); if (index >= 0) { result = result.replace(index, 13, "@sysconfdir@"); changed = true; diff --git a/kdecore/kdebug.cpp b/kdecore/kdebug.cpp index 75f2864f9..8b7b4d88d 100644 --- a/kdecore/kdebug.cpp +++ b/kdecore/kdebug.cpp @@ -86,7 +86,7 @@ static TQCString getDescrFromNum(unsigned int _num) KDebugCache->setAutoDelete(true); } - KDebugEntry *ent = KDebugCache->tqfind( _num ); + KDebugEntry *ent = KDebugCache->find( _num ); if ( ent ) return ent->descr; @@ -139,7 +139,7 @@ static TQCString getDescrFromNum(unsigned int _num) } file.close(); - ent = KDebugCache->tqfind( _num ); + ent = KDebugCache->find( _num ); if ( ent ) return ent->descr; diff --git a/kdecore/kdesktopfile.cpp b/kdecore/kdesktopfile.cpp index 3a2acb169..431a65578 100644 --- a/kdecore/kdesktopfile.cpp +++ b/kdecore/kdesktopfile.cpp @@ -83,7 +83,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) { // Hm, that didn't work... // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } local = ::locateLocal("xdgdata-dirs", local); } @@ -102,7 +102,7 @@ TQString KDesktopFile::locateLocal(const TQString &path) if (!TQDir::isRelativePath(local)) { // What now? Use filename only and hope for the best. - local = path.mid(path.tqfindRev('/')+1); + local = path.mid(path.findRev('/')+1); } local = ::locateLocal("xdgdata-apps", local); } @@ -155,7 +155,7 @@ TQString KDesktopFile::translatedEntry(const char* key) const if (hasKey(key)) { TQString value = readEntryUntranslated(key); TQString fName = fileName(); - fName = fName.mid(fName.tqfindRev('/')+1); + fName = fName.mid(fName.findRev('/')+1); TQString po_lookup_key = TQString::tqfromLatin1(key) + "(" + fName + "): " + value; TQString po_value = KGlobal::locale()->translate(po_lookup_key.utf8().data()); diff --git a/kdecore/kglobal.cpp b/kdecore/kglobal.cpp index 347e8d31c..d64974be4 100644 --- a/kdecore/kglobal.cpp +++ b/kdecore/kglobal.cpp @@ -150,7 +150,7 @@ KGlobal::staticQString(const TQString &str) _stringDict->setAutoDelete( true ); kglobal_init(); } - TQString *result = _stringDict->tqfind(str); + TQString *result = _stringDict->find(str); if (!result) { result = new TQString(str); @@ -170,7 +170,7 @@ KGlobal::registerStaticDeleter(KStaticDeleterBase *obj) { if (!_staticDeleters) kglobal_init(); - if (_staticDeleters->tqfind(obj) == -1) + if (_staticDeleters->find(obj) == -1) _staticDeleters->append(obj); } diff --git a/kdecore/kglobalaccel_x11.cpp b/kdecore/kglobalaccel_x11.cpp index ea3f88189..c2f7a3829 100644 --- a/kdecore/kglobalaccel_x11.cpp +++ b/kdecore/kglobalaccel_x11.cpp @@ -282,7 +282,7 @@ void KGlobalAccelPrivate::fakeKeyPressed(unsigned int keyCode) { .arg( codemod.code, 0, 16 ).arg( keyCode, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.tqcontains( codemod ) ) { + if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -360,7 +360,7 @@ bool KGlobalAccelPrivate::x11KeyPress( const XEvent *pEvent ) .arg( codemod.code, 0, 16 ).arg( pEvent->xkey.state, 0, 16 ).arg( codemod.mod, 0, 16 )) << endl; // Search for which accelerator activated this event: - if( !m_rgCodeModToAction.tqcontains( codemod ) ) { + if( !m_rgCodeModToAction.contains( codemod ) ) { #ifndef NDEBUG for( CodeModMap::ConstIterator it = m_rgCodeModToAction.begin(); it != m_rgCodeModToAction.end(); ++it ) { KAccelAction* pAction = *it; @@ -407,14 +407,14 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s if( rexPassIndex.search( pAction->methodSlotPtr() ) >= 0 && rexIndex.search( pAction->name() ) >= 0 ) { int n = rexIndex.cap(1).toInt(); kdDebug(125) << "Calling " << pAction->methodSlotPtr() << " int = " << n << endl; - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[2]; static_TQUType_int.set(o+1,n); const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else if( rexPassInfo.search( pAction->methodSlotPtr() ) ) { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) { TQUObject o[4]; static_TQUType_TQString.set(o+1,pAction->name()); @@ -423,7 +423,7 @@ void KGlobalAccelPrivate::activate( KAccelAction* pAction, const KKeySequence& s const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, o ); } } else { - int slot_id = pAction->objSlotPtr()->tqmetaObject()->tqfindSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); + int slot_id = pAction->objSlotPtr()->tqmetaObject()->findSlot( normalizeSignalSlot( pAction->methodSlotPtr() ).data() + 1, true ); if( slot_id >= 0 ) const_cast< TQObject* >( pAction->objSlotPtr())->qt_invoke( slot_id, 0 ); } diff --git a/kdecore/kiconloader.cpp b/kdecore/kiconloader.cpp index f19b56402..bd1ad3a91 100644 --- a/kdecore/kiconloader.cpp +++ b/kdecore/kiconloader.cpp @@ -328,7 +328,7 @@ void KIconLoader::addBaseThemes(KIconThemeNode *node, const TQString &appname) for (it=lst.begin(); it!=lst.end(); ++it) { - if( d->mThemesInTree.tqcontains(*it) && (*it) != "hicolor") + if( d->mThemesInTree.contains(*it) && (*it) != "hicolor") continue; KIconTheme *theme = new KIconTheme(*it,appname); if (!theme->isValid()) { @@ -370,7 +370,7 @@ void KIconLoader::addExtraDesktopThemes() TQDir dir2( buf ); TQString themeName=dir2.dirName(); - if (!list.tqcontains(themeName)) + if (!list.contains(themeName)) list.append(themeName); } } @@ -378,7 +378,7 @@ void KIconLoader::addExtraDesktopThemes() for (it=list.begin(); it!=list.end(); ++it) { - if ( d->mThemesInTree.tqcontains(*it) ) + if ( d->mThemesInTree.contains(*it) ) continue; if ( *it == TQString("default.kde") ) continue; @@ -601,7 +601,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si key = "$kicou_"; key += TQString::number(size); key += '_'; key += name; - bool inCache = TQPixmapCache::tqfind(key, pix); + bool inCache = TQPixmapCache::find(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -691,7 +691,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si key += overlayStr; // Is the icon in the cache? - bool inCache = TQPixmapCache::tqfind(key, pix); + bool inCache = TQPixmapCache::find(key, pix); if (inCache && (path_store == 0L)) return pix; @@ -866,7 +866,7 @@ TQPixmap KIconLoader::loadIcon(const TQString& _name, KIcon::Group group, int si TQImage *KIconLoader::loadOverlay(const TQString &name, int size) const { TQString key = name + '_' + TQString::number(size); - TQImage *image = d->imgDict.tqfind(key); + TQImage *image = d->imgDict.find(key); if (image != 0L) return image; @@ -892,7 +892,7 @@ TQMovie KIconLoader::loadMovie(const TQString& name, KIcon::Group group, int siz TQString file = moviePath( name, group, size ); if (file.isEmpty()) return TQMovie(); - int dirLen = file.tqfindRev('/'); + int dirLen = file.findRev('/'); TQString icon = iconPath(name, size ? -size : group, true); if (!icon.isEmpty() && file.left(dirLen) != icon.left(dirLen)) return TQMovie(); @@ -1048,13 +1048,13 @@ TQStringList KIconLoader::queryIconsByContext(int group_or_size, TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).tqfindRev('/'); + int n = (*it).findRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.tqcontains(name)) + if (!entries.contains(name)) { entries += name; res2 += *it; @@ -1088,13 +1088,13 @@ TQStringList KIconLoader::queryIcons(int group_or_size, KIcon::Context context) TQStringList::ConstIterator it; for (it=result.begin(); it!=result.end(); ++it) { - int n = (*it).tqfindRev('/'); + int n = (*it).findRev('/'); if (n == -1) name = *it; else name = (*it).mid(n+1); name = removeIconExtension(name); - if (!entries.tqcontains(name)) + if (!entries.contains(name)) { entries += name; res2 += *it; @@ -1383,7 +1383,7 @@ int IconSize(KIcon::Group group, KInstance *instance) TQPixmap KIconLoader::unknown() { TQPixmap pix; - if ( TQPixmapCache::tqfind("unknown", pix) ) + if ( TQPixmapCache::find("unknown", pix) ) return pix; TQString path = KGlobal::iconLoader()->iconPath("unknown", KIcon::Small, true); diff --git a/kdecore/kicontheme.cpp b/kdecore/kicontheme.cpp index fb25cac21..ea91ab418 100644 --- a/kdecore/kicontheme.cpp +++ b/kdecore/kicontheme.cpp @@ -185,7 +185,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQMap<int,TQValueList<int> > scIcons; for (KIconThemeDir *dir=mDirs.first(); dir!=0L; dir=mDirs.next()) { - if ((dir->type() == KIcon::Scalable) && !scIcons.tqcontains(dir->size())) + if ((dir->type() == KIcon::Scalable) && !scIcons.contains(dir->size())) { TQValueList<int> lst; for (i=dir->minSize(); i<=dir->maxSize(); i++) @@ -209,7 +209,7 @@ KIconTheme::KIconTheme(const TQString& name, const TQString& appName) TQValueList<int>::ConstIterator it2; for (it2=lst.begin(); it2!=lst.end(); ++it2) { - if (scIcons.tqcontains(*it2)) + if (scIcons.contains(*it2)) exp += scIcons[*it2]; else exp += *it2; @@ -492,7 +492,7 @@ TQStringList KIconTheme::list() KIconTheme oink(*it2); if (!oink.isValid()) continue; - if (!_theme_list->tqcontains(*it2)) + if (!_theme_list->contains(*it2)) _theme_list->append(*it2); } } diff --git a/kdecore/kinstance.cpp b/kdecore/kinstance.cpp index a03d6e891..2a579de0a 100644 --- a/kdecore/kinstance.cpp +++ b/kdecore/kinstance.cpp @@ -40,7 +40,7 @@ static TQPtrDict<TQCString> *allOldInstances = 0; #define DEBUG_ADD do { if (!allInstances) { allInstances = new TQPtrList<KInstance>(); allOldInstances = new TQPtrDict<TQCString>(); } allInstances->append(this); allOldInstances->insert( this, new TQCString( _name)); } while (false); #define DEBUG_REMOVE do { allInstances->removeRef(this); } while (false); - #define DEBUG_CHECK_ALIVE do { if (!allInstances->tqcontains((KInstance*)this)) { TQCString *old = allOldInstances->tqfind((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false); + #define DEBUG_CHECK_ALIVE do { if (!allInstances->contains((KInstance*)this)) { TQCString *old = allOldInstances->find((KInstance*)this); qWarning("ACCESSING DELETED KINSTANCE! (%s)", old ? old->data() : "<unknown>"); assert(false); } } while (false); #else #define DEBUG_ADD #define DEBUG_REMOVE diff --git a/kdecore/klibloader.cpp b/kdecore/klibloader.cpp index 3af226886..1a90881df 100644 --- a/kdecore/klibloader.cpp +++ b/kdecore/klibloader.cpp @@ -209,7 +209,7 @@ void KLibrary::slotObjectCreated( TQObject *obj ) if ( m_timer && m_timer->isActive() ) m_timer->stop(); - if ( m_objs.tqcontainsRef( obj ) ) + if ( m_objs.containsRef( obj ) ) return; // we know this object already connect( obj, TQT_SIGNAL( destroyed() ), @@ -337,10 +337,10 @@ static inline TQCString makeLibName( const char* name ) // only append ".la" if there is no extension // this allows to load non-libtool libraries as well // (mhk, 20000228) - int pos = libname.tqfindRev('/'); + int pos = libname.findRev('/'); if (pos < 0) pos = 0; - if (libname.tqfind('.', pos) < 0) + if (libname.find('.', pos) < 0) libname += ".la"; return libname; } @@ -500,7 +500,7 @@ void KLibLoader::slotLibraryDestroyed() void KLibLoader::close_pending(KLibWrapPrivate *wrap) { - if (wrap && !d->pending_close.tqcontainsRef( wrap )) + if (wrap && !d->pending_close.containsRef( wrap )) d->pending_close.append( wrap ); /* First delete all KLibrary objects in pending_close, but _don't_ unload @@ -534,7 +534,7 @@ void KLibLoader::close_pending(KLibWrapPrivate *wrap) /* Now ensure, that the libs are only unloaded in the reverse direction they were loaded. */ - if (!d->pending_close.tqcontainsRef( wrap )) { + if (!d->pending_close.containsRef( wrap )) { if (!deleted_one) /* Only diagnose, if we really haven't deleted anything. */ // kdDebug(150) << "try to dlclose " << wrap->name << ": not yet" << endl; diff --git a/kdecore/klocale.cpp b/kdecore/klocale.cpp index f9de79b52..1fae4fbab 100644 --- a/kdecore/klocale.cpp +++ b/kdecore/klocale.cpp @@ -121,7 +121,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) TQString mainCatalogue = catalog; // don't use main catalogue if we're looking up .desktop translations - if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { + if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { if (maincatalogue) { mainCatalogue = TQString::tqfromLatin1(maincatalogue); } @@ -135,7 +135,7 @@ void KLocale::initMainCatalogues(const TQString & catalog) else { // do not use insertCatalogue here, that would already trigger updateCatalogs d->catalogNames.append( mainCatalogue ); // application catalog - if (mainCatalogue.tqcontains("desktop") == 0 || mainCatalogue.tqcontains("kdesktop") == 1) { //don't bother if we're looking up desktop translations + if (mainCatalogue.contains("desktop") == 0 || mainCatalogue.contains("kdesktop") == 1) { //don't bother if we're looking up desktop translations d->catalogNames.append( SYSTEM_MESSAGES ); // always include kdelibs.mo d->catalogNames.append( "kio" ); // always include kio.mo d->catalogNames.append( "xdg-user-dirs" ); @@ -331,7 +331,7 @@ void KLocale::initFormat() readConfigEntry("DecimalSymbol", ".", m_decimalSymbol); readConfigEntry("ThousandsSeparator", ",", m_thousandsSeparator); - m_thousandsSeparator.tqreplace( TQString::tqfromLatin1("$0"), TQString() ); + m_thousandsSeparator.replace( TQString::tqfromLatin1("$0"), TQString() ); //kdDebug(173) << "m_thousandsSeparator=" << m_thousandsSeparator << endl; readConfigEntry("PositiveSign", "", m_positiveSign); @@ -342,7 +342,7 @@ void KLocale::initFormat() readConfigEntry("MonetaryDecimalSymbol", ".", m_monetaryDecimalSymbol); readConfigEntry("MonetaryThousandsSeparator", ",", m_monetaryThousandsSeparator); - m_monetaryThousandsSeparator.tqreplace(TQString::tqfromLatin1("$0"), TQString()); + m_monetaryThousandsSeparator.replace(TQString::tqfromLatin1("$0"), TQString()); readConfigNumEntry("FracDigits", 2, m_fracDigits, int); readConfigBoolEntry("PositivePrefixCurrencySymbol", true, @@ -417,7 +417,7 @@ TQString KLocale::catalogueFileName(const TQString & language, bool KLocale::setLanguage(const TQString & language) { - if ( d->languageList.tqcontains( language ) ) { + if ( d->languageList.contains( language ) ) { d->languageList.remove( language ); } d->languageList.prepend( language ); // let us consider this language to be the most important one @@ -451,7 +451,7 @@ bool KLocale::setLanguage(const TQStringList & languages) { // kdDebug() << "checking " << (*it) << endl; bool bIsTranslated = isApplicationTranslatedInto( *it ); - if ( languageList.tqcontains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { + if ( languageList.contains(*it) > 1 || (*it).isEmpty() || (!bIsTranslated) ) { // kdDebug() << "removing " << (*it) << endl; it = languageList.remove( it ); } @@ -526,7 +526,7 @@ void KLocale::splitLocale(const TQString & aStr, TQString str = aStr; // just in case, there is another language appended - int f = str.tqfind(':'); + int f = str.find(':'); if (f >= 0) str.truncate(f); @@ -534,14 +534,14 @@ void KLocale::splitLocale(const TQString & aStr, chrset = TQString::null; language = TQString::null; - f = str.tqfind('.'); + f = str.find('.'); if (f >= 0) { chrset = str.mid(f + 1); str.truncate(f); } - f = str.tqfind('_'); + f = str.find('_'); if (f >= 0) { country = str.mid(f + 1); @@ -644,7 +644,7 @@ TQString KLocale::weekDayName (int i, bool shortName) const void KLocale::insertCatalogue( const TQString & catalog ) { - if ( !d->catalogNames.tqcontains( catalog) ) { + if ( !d->catalogNames.contains( catalog) ) { d->catalogNames.append( catalog ); } updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects @@ -693,7 +693,7 @@ void KLocale::updateCatalogues( ) void KLocale::removeCatalogue(const TQString &catalog) { - if ( d->catalogNames.tqcontains( catalog )) { + if ( d->catalogNames.contains( catalog )) { d->catalogNames.remove( catalog ); if (KGlobal::_instance) updateCatalogues(); // walk through the KCatalogue instances and weed out everything we no longer need @@ -702,7 +702,7 @@ void KLocale::removeCatalogue(const TQString &catalog) void KLocale::setActiveCatalogue(const TQString &catalog) { - if ( d->catalogNames.tqcontains( catalog ) ) { + if ( d->catalogNames.contains( catalog ) ) { d->catalogNames.remove( catalog ); d->catalogNames.prepend( catalog ); updateCatalogues(); // walk through the KCatalogue instances and adapt to the new order @@ -795,10 +795,10 @@ TQString KLocale::translate( const char *index, const char *fallback) const static TQString put_n_in(const TQString &orig, unsigned long n) { TQString ret = orig; - int index = ret.tqfind("%n"); + int index = ret.find("%n"); if (index == -1) return ret; - ret.tqreplace(index, 2, TQString::number(n)); + ret.replace(index, 2, TQString::number(n)); return ret; } @@ -830,7 +830,7 @@ TQString KLocale::translate( const char *singular, const char *plural, } else { TQString tmp = TQString::fromUtf8( plural ); #ifndef NDEBUG - if (tmp.tqfind("%n") == -1) { + if (tmp.find("%n") == -1) { kdDebug() << "the message for i18n should contain a '%n'! " << plural << endl; } #endif @@ -1142,7 +1142,7 @@ TQString KLocale::formatMoney(double num, TQString res = TQString::number(neg?-num:num, 'f', precision); // Replace dot with locale decimal separator - res.tqreplace(TQChar('.'), monetaryDecimalSymbol()); + res.replace(TQChar('.'), monetaryDecimalSymbol()); // Insert the thousand separators _insertSeparator(res, monetaryThousandsSeparator(), monetaryDecimalSymbol()); @@ -1259,7 +1259,7 @@ static void _inc_by_one(TQString &str, int position) // Cut off if more digits in fractional part than 'precision' static void _round(TQString &str, int precision) { - int decimalSymbolPos = str.tqfind('.'); + int decimalSymbolPos = str.find('.'); if (decimalSymbolPos == -1) if (precision == 0) return; @@ -1294,7 +1294,7 @@ static void _round(TQString &str, int precision) break; } - decimalSymbolPos = str.tqfind('.'); + decimalSymbolPos = str.find('.'); str.truncate(decimalSymbolPos + precision + 1); // if precision == 0 delete also '.' @@ -1324,7 +1324,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round, if (round) _round(mantString, precision); // Replace dot with locale decimal separator - mantString.tqreplace(TQChar('.'), decimalSymbol()); + mantString.replace(TQChar('.'), decimalSymbol()); // Insert the thousand separators _insertSeparator(mantString, thousandsSeparator(), decimalSymbol()); @@ -1418,7 +1418,7 @@ void KLocale::setMainCatalogue(const char *catalog) double KLocale::readNumber(const TQString &_str, bool * ok) const { TQString str = _str.stripWhiteSpace(); - bool neg = str.tqfind(negativeSign()) == 0; + bool neg = str.find(negativeSign()) == 0; if (neg) str.remove( 0, negativeSign().length() ); @@ -1428,7 +1428,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const TQString exponentialPart; int EPos; - EPos = str.tqfind('E', 0, false); + EPos = str.find('E', 0, false); if (EPos != -1) { @@ -1436,7 +1436,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const str = str.left(EPos); } - int pos = str.tqfind(decimalSymbol()); + int pos = str.find(decimalSymbol()); TQString major; TQString minor; if ( pos == -1 ) @@ -1450,7 +1450,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = thousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.tqfind( thousandsSeparator() ) ) > 0 ) + while ( ( pos = major.find( thousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1487,7 +1487,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const bool currencyFound = false; TQString symbol = currencySymbol(); // First try removing currency symbol from either end - int pos = str.tqfind(symbol); + int pos = str.find(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1512,7 +1512,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } else { - int i1 = str.tqfind(negativeSign()); + int i1 = str.find(negativeSign()); if ( i1 == 0 || i1 == (int) str.length()-1 ) { neg = true; @@ -1525,7 +1525,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // it already (because of the negative sign being in the way). if ( !currencyFound ) { - pos = str.tqfind(symbol); + pos = str.find(symbol); if ( pos == 0 || pos == (int) str.length()-symbol.length() ) { str.remove(pos,symbol.length()); @@ -1534,7 +1534,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const } // And parse the rest as a number - pos = str.tqfind(monetaryDecimalSymbol()); + pos = str.find(monetaryDecimalSymbol()); TQString major; TQString minior; if (pos == -1) @@ -1548,7 +1548,7 @@ double KLocale::readMoney(const TQString &_str, bool * ok) const // Remove thousand separators int thlen = monetaryThousandsSeparator().length(); int lastpos = 0; - while ( ( pos = major.tqfind( monetaryThousandsSeparator() ) ) > 0 ) + while ( ( pos = major.find( monetaryThousandsSeparator() ) ) > 0 ) { // e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N int fromEnd = major.length() - pos; @@ -1948,8 +1948,8 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat bool KLocale::use12Clock() const { - if ((timeFormat().tqcontains(TQString::tqfromLatin1("%I")) > 0) || - (timeFormat().tqcontains(TQString::tqfromLatin1("%l")) > 0)) + if ((timeFormat().contains(TQString::tqfromLatin1("%I")) > 0) || + (timeFormat().contains(TQString::tqfromLatin1("%l")) > 0)) return true; else return false; @@ -2338,7 +2338,7 @@ TQStringList KLocale::languagesTwoAlpha() const langLst = config.readListEntry( lang ); else { - int i = lang.tqfind('_'); + int i = lang.find('_'); if (i >= 0) lang.truncate(i); langLst << lang; @@ -2348,7 +2348,7 @@ TQStringList KLocale::languagesTwoAlpha() const langIt != langLst.end(); ++langIt ) { - if ( !(*langIt).isEmpty() && !result.tqcontains( *langIt ) ) + if ( !(*langIt).isEmpty() && !result.contains( *langIt ) ) result += *langIt; } } @@ -2370,8 +2370,8 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const d->languages = new KConfig("all_languages", true, false, "locale"); TQString groupName = code; - const int i = groupName.tqfind('_'); - groupName.tqreplace(0, i, groupName.left(i).lower()); + const int i = groupName.find('_'); + groupName.replace(0, i, groupName.left(i).lower()); d->languages->setGroup(groupName); return d->languages->readEntry("Name"); diff --git a/kdecore/kmacroexpander.cpp b/kdecore/kmacroexpander.cpp index 89eb5c72f..c7717029c 100644 --- a/kdecore/kmacroexpander.cpp +++ b/kdecore/kmacroexpander.cpp @@ -339,7 +339,7 @@ template<class VT> int KMacroMapExpander<TQChar,VT>::expandPlainMacro( const TQString &str, uint pos, TQStringList &ret ) { - TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos]); + TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos]); if (it != macromap.end()) { ret += it.data(); return 1; @@ -355,7 +355,7 @@ KMacroMapExpander<TQChar,VT>::expandEscapedMacro( const TQString &str, uint pos, ret += TQString( escapeChar() ); return 2; } - TQMapConstIterator<TQChar,VT> it = macromap.tqfind(str[pos+1]); + TQMapConstIterator<TQChar,VT> it = macromap.find(str[pos+1]); if (it != macromap.end()) { ret += it.data(); return 2; @@ -390,7 +390,7 @@ KMacroMapExpander<TQString,VT>::expandPlainMacro( const TQString &str, uint pos, if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.tqfind( TQConstString( str.tqunicode() + pos, sl ).string() ); + macromap.find( TQConstString( str.tqunicode() + pos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return sl; @@ -421,7 +421,7 @@ KMacroMapExpander<TQString,VT>::expandEscapedMacro( const TQString &str, uint po if (!sl) return 0; TQMapConstIterator<TQString,VT> it = - macromap.tqfind( TQConstString( str.tqunicode() + rpos, sl ).string() ); + macromap.find( TQConstString( str.tqunicode() + rpos, sl ).string() ); if (it != macromap.end()) { ret += it.data(); return rsl; diff --git a/kdecore/kmimesourcefactory.cpp b/kdecore/kmimesourcefactory.cpp index 0123f3465..37745d398 100644 --- a/kdecore/kmimesourcefactory.cpp +++ b/kdecore/kmimesourcefactory.cpp @@ -60,7 +60,7 @@ TQString KMimeSourceFactory::makeAbsolute (const TQString& absOrRelName, const T TQString myName; TQString myContext; - const int pos = absOrRelName.tqfind ('|'); + const int pos = absOrRelName.find ('|'); if (pos > -1) { myContext = absOrRelName.left (pos); diff --git a/kdecore/kpalette.cpp b/kdecore/kpalette.cpp index f07ac4228..9cc7b5635 100644 --- a/kdecore/kpalette.cpp +++ b/kdecore/kpalette.cpp @@ -66,7 +66,7 @@ KPalette::KPalette(const TQString &name) // Read first line // Expected "GIMP Palette" if (paletteFile.readLine(line, maxLength) == -1) return; - if (line.tqfind(" Palette") == -1) return; + if (line.find(" Palette") == -1) return; while( paletteFile.readLine(line, maxLength) != -1) { diff --git a/kdecore/kprocio.cpp b/kdecore/kprocio.cpp index 91c28024f..9159edab5 100644 --- a/kdecore/kprocio.cpp +++ b/kdecore/kprocio.cpp @@ -231,7 +231,7 @@ int KProcIO::readln (TQString &line, bool autoAck, bool *partial) //need to reduce the size of recvbuffer at some point... - len=recvbuffer.tqfind ('\n',rbi)-rbi; + len=recvbuffer.find ('\n',rbi)-rbi; //kdDebug(174) << "KPIO::readln" << endl; diff --git a/kdecore/kprotocolinfofactory.cpp b/kdecore/kprotocolinfofactory.cpp index 6d61c2d8c..e47cbb881 100644 --- a/kdecore/kprotocolinfofactory.cpp +++ b/kdecore/kprotocolinfofactory.cpp @@ -86,7 +86,7 @@ KProtocolInfoFactory::findProtocol(const TQString &protocol) { if (!m_sycocaDict) return 0; // Error! - TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.tqfind(protocol); + TQMap<TQString,KProtocolInfo::Ptr>::iterator it = m_cache.find(protocol); if (it != m_cache.end()) return (*it); diff --git a/kdecore/krfcdate.cpp b/kdecore/krfcdate.cpp index 9d7c0b7ab..dabdc7afa 100644 --- a/kdecore/krfcdate.cpp +++ b/kdecore/krfcdate.cpp @@ -363,12 +363,12 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) TQString input = input_; // First find the 'T' separator, if any. - int tPos = input.tqfind('T'); + int tPos = input.find('T'); // If there is no time, no month or no day specified, fill those missing // fields so that 'input' matches YYYY-MM-DDTHH:MM:SS if (-1 == tPos) { - const int dashes = input.tqcontains('-'); + const int dashes = input.contains('-'); if (0 == dashes) { input += "-01-01"; } else if (1 == dashes) { @@ -400,7 +400,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) // +zone or -zone suffix (offset from UTC). - int plusPos = timeString.tqfindRev('+'); + int plusPos = timeString.findRev('+'); if (-1 != plusPos) { TQString offsetString = timeString.mid(plusPos + 1); @@ -409,7 +409,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) timeString = timeString.left(plusPos); } else { - int minusPos = timeString.tqfindRev('-'); + int minusPos = timeString.findRev('-'); if (-1 != minusPos) { TQString offsetString = timeString.mid(minusPos + 1); @@ -421,7 +421,7 @@ KRFCDate::parseDateISO8601( const TQString& input_ ) } // secfrac suffix. - int dotPos = timeString.tqfindRev('.'); + int dotPos = timeString.findRev('.'); if (-1 != dotPos) { timeString = timeString.left(dotPos); diff --git a/kdecore/krootprop.cpp b/kdecore/krootprop.cpp index 88f82b7d3..031e27abf 100644 --- a/kdecore/krootprop.cpp +++ b/kdecore/krootprop.cpp @@ -118,7 +118,7 @@ void KRootProp::setProp( const TQString& rProp ) { // parse the string for first key-value pair separator '\n' - i = s.tqfind("\n"); + i = s.find("\n"); if(i == -1) i = s.length(); @@ -131,7 +131,7 @@ void KRootProp::setProp( const TQString& rProp ) keypair.simplifyWhiteSpace(); - i = keypair.tqfind( "=" ); + i = keypair.find( "=" ); if( i != -1 ) { key = keypair.left( i ); @@ -160,7 +160,7 @@ void KRootProp::destroy() TQString KRootProp::readEntry( const TQString& rKey, const TQString& pDefault ) const { - if( propDict.tqcontains( rKey ) ) + if( propDict.contains( rKey ) ) return propDict[ rKey ]; else return pDefault; @@ -217,18 +217,18 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, // Support #ffffff style color naming. // Help ease transistion from legacy KDE setups - if( aValue.tqfind("#") == 0 ) { + if( aValue.find("#") == 0 ) { aRetColor.setNamedColor( aValue ); return aRetColor; } // Parse "red,green,blue" // find first comma - int nIndex1 = aValue.tqfind( ',' ); + int nIndex1 = aValue.find( ',' ); if( nIndex1 == -1 ) return aRetColor; // find second comma - int nIndex2 = aValue.tqfind( ',', nIndex1+1 ); + int nIndex2 = aValue.find( ',', nIndex1+1 ); if( nIndex2 == -1 ) return aRetColor; @@ -246,9 +246,9 @@ TQColor KRootProp::readColorEntry( const TQString& rKey, TQString KRootProp::writeEntry( const TQString& rKey, const TQString& rValue ) { dirty = true; - if ( propDict.tqcontains( rKey ) ) { + if ( propDict.contains( rKey ) ) { TQString aValue = propDict[ rKey ]; - propDict.tqreplace( rKey, rValue ); + propDict.replace( rKey, rValue ); return aValue; } else { @@ -280,7 +280,7 @@ TQString KRootProp::writeEntry( const TQString& rKey, const TQColor& rColor ) TQString KRootProp::removeEntry(const TQString& rKey) { - if (propDict.tqcontains(rKey)) { + if (propDict.contains(rKey)) { dirty = true; TQString aValue = propDict[rKey]; propDict.remove(rKey); diff --git a/kdecore/ksavefile.cpp b/kdecore/ksavefile.cpp index 1f1f28d23..72625a9ca 100644 --- a/kdecore/ksavefile.cpp +++ b/kdecore/ksavefile.cpp @@ -165,7 +165,7 @@ bool KSaveFile::backupFile( const TQString& qFilename, const TQString& backupDir else { TQCString nameOnly; - int slash = cFilename.tqfindRev('/'); + int slash = cFilename.findRev('/'); if (slash < 0) nameOnly = cFilename; else diff --git a/kdecore/kshell.cpp b/kdecore/kshell.cpp index 9ca5dc9b7..9a9aacfbe 100644 --- a/kdecore/kshell.cpp +++ b/kdecore/kshell.cpp @@ -355,7 +355,7 @@ TQString KShell::joinArgsDQ( const TQStringList &args ) TQString KShell::tildeExpand( const TQString &fname ) { if (fname[0] == (QChar)'~') { - int pos = fname.tqfind( '/' ); + int pos = fname.find( '/' ); if (pos < 0) return homeDir( TQConstString( fname.tqunicode() + 1, fname.length() - 1 ).string() ); TQString ret = homeDir( TQConstString( fname.tqunicode() + 1, pos - 1 ).string() ); diff --git a/kdecore/kshortcutmenu.cpp b/kdecore/kshortcutmenu.cpp index 930095c84..3df389f07 100644 --- a/kdecore/kshortcutmenu.cpp +++ b/kdecore/kshortcutmenu.cpp @@ -123,7 +123,7 @@ int KShortcutMenu::searchForKey( KKey key ) uint iKey = m_seq.count(); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.tqcontains( iItem ) ) { + if( m_seqs.contains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); //kdDebug(125) << "iItem = " << iItem << " key = " << key.toStringInternal() << " keyItem = " << keyItem.toStringInternal() << endl; if( key == keyItem ) { @@ -146,7 +146,7 @@ void KShortcutMenu::keepItemsMatching( KKey key ) m_seq.setKey( iKey, key ); for( uint iItem = 1; iItem < count(); iItem++ ) { - if( m_seqs.tqcontains( iItem ) ) { + if( m_seqs.contains( iItem ) ) { KKey keyItem = m_seqs[iItem].key( iKey ); if( key != keyItem ) { m_seqs.remove( iItem ); diff --git a/kdecore/ksockaddr.cpp b/kdecore/ksockaddr.cpp index bc9c03059..6ce802716 100644 --- a/kdecore/ksockaddr.cpp +++ b/kdecore/ksockaddr.cpp @@ -421,7 +421,7 @@ bool KInetSocketAddress::setHost(const TQString& addr, int family) #ifdef AF_INET6 // IPv6 addresses MUST contain colons (:) and IPv4 addresses must not - if (addr.tqfind(':') != -1) + if (addr.find(':') != -1) family = AF_INET6; else family = AF_INET; diff --git a/kdecore/kstandarddirs.cpp b/kdecore/kstandarddirs.cpp index a80b33e25..8d990dc7d 100644 --- a/kdecore/kstandarddirs.cpp +++ b/kdecore/kstandarddirs.cpp @@ -144,7 +144,7 @@ bool KStandardDirs::isRestrictedResource(const char *type, const TQString& relPa void KStandardDirs::applyDataRestrictions(const TQString &relPath) const { TQString key; - int i = relPath.tqfind(QChar('/')); + int i = relPath.find(QChar('/')); if (i != -1) key = "data_"+relPath.left(i); else @@ -192,7 +192,7 @@ void KStandardDirs::addPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!prefixes.tqcontains(dir)) { + if (!prefixes.contains(dir)) { priorityAdd(prefixes, dir, priority); dircache.clear(); } @@ -212,7 +212,7 @@ void KStandardDirs::addXdgConfigPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgconf_prefixes.tqcontains(dir)) { + if (!d->xdgconf_prefixes.contains(dir)) { priorityAdd(d->xdgconf_prefixes, dir, priority); dircache.clear(); } @@ -232,7 +232,7 @@ void KStandardDirs::addXdgDataPrefix( const TQString& _dir, bool priority ) if (dir.tqat(dir.length() - 1) != QChar('/')) dir += QChar('/'); - if (!d->xdgdata_prefixes.tqcontains(dir)) { + if (!d->xdgdata_prefixes.contains(dir)) { priorityAdd(d->xdgdata_prefixes, dir, priority); dircache.clear(); } @@ -265,7 +265,7 @@ bool KStandardDirs::addResourceType( const char *type, if (relativename.isEmpty()) return false; - TQStringList *rels = relatives.tqfind(type); + TQStringList *rels = relatives.find(type); if (!rels) { rels = new TQStringList(); relatives.insert(type, rels); @@ -273,7 +273,7 @@ bool KStandardDirs::addResourceType( const char *type, TQString copy = relativename; if (copy.tqat(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!rels->tqcontains(copy)) { + if (!rels->contains(copy)) { if (priority) rels->prepend(copy); else @@ -295,7 +295,7 @@ bool KStandardDirs::addResourceDir( const char *type, const TQString& absdir, bool priority) { - TQStringList *paths = absolutes.tqfind(type); + TQStringList *paths = absolutes.find(type); if (!paths) { paths = new TQStringList(); absolutes.insert(type, paths); @@ -304,7 +304,7 @@ bool KStandardDirs::addResourceDir( const char *type, if (copy.tqat(copy.length() - 1) != QChar('/')) copy += QChar('/'); - if (!paths->tqcontains(copy)) { + if (!paths->contains(copy)) { if (priority) paths->prepend(copy); else @@ -512,7 +512,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, } if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.tqcontains(relPart + fn)) + if (!unique || !relList.contains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -531,7 +531,7 @@ static void lookupDirectory(const TQString& path, const TQString &relPart, return; // File not found if ( S_ISREG( buff.st_mode)) { - if (!unique || !relList.tqcontains(relPart + fn)) + if (!unique || !relList.contains(relPart + fn)) { list.append( pathfn ); relList.append( relPart + fn ); @@ -557,7 +557,7 @@ static void lookupPrefix(const TQString& prefix, const TQString& relpath, if (relpath.length()) { - int slash = relpath.tqfind(QChar('/')); + int slash = relpath.find(QChar('/')); if (slash < 0) rest = relpath.left(relpath.length() - 1); else { @@ -629,7 +629,7 @@ KStandardDirs::findAllResources( const char *type, if (filter.length()) { - int slash = filter.tqfindRev('/'); + int slash = filter.findRev('/'); if (slash < 0) filterFile = filter; else { @@ -785,7 +785,7 @@ void KStandardDirs::createSpecialResource(const char *type) TQStringList KStandardDirs::resourceDirs(const char *type) const { - TQStringList *candidates = dircache.tqfind(type); + TQStringList *candidates = dircache.find(type); if (!candidates) { // filling cache if (strcmp(type, "socket") == 0) @@ -812,7 +812,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const d->dataRestrictionActive = false; // Reset } - dirs = relatives.tqfind(type); + dirs = relatives.find(type); if (dirs) { bool local = true; @@ -834,7 +834,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const testdir.setPath(path); if (local && restrictionActive) continue; - if ((local || testdir.exists()) && !candidates->tqcontains(path)) + if ((local || testdir.exists()) && !candidates->contains(path)) candidates->append(path); } // UGLY HACK - Chris CHeney @@ -844,7 +844,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const local = false; } } - dirs = absolutes.tqfind(type); + dirs = absolutes.find(type); if (dirs) for (TQStringList::ConstIterator it = dirs->begin(); it != dirs->end(); ++it) @@ -853,7 +853,7 @@ TQStringList KStandardDirs::resourceDirs(const char *type) const if (testdir.exists()) { TQString filename = realPath(*it); - if (!candidates->tqcontains(filename)) + if (!candidates->contains(filename)) candidates->append(filename); } } @@ -897,7 +897,7 @@ TQStringList KStandardDirs::systemPaths( const TQString& pstr ) if ( p[ 0 ] == QChar('~') ) { - int len = p.tqfind( QChar('/') ); + int len = p.find( QChar('/') ); if ( len == -1 ) len = p.length(); if ( len == 1 ) @@ -931,7 +931,7 @@ TQString KStandardDirs::findExe( const TQString& appname, TQFileInfo info; // absolute or relative path given - if (real_appname.tqfind(TQDir::separator()) >= 0) + if (real_appname.find(TQDir::separator()) >= 0) { info.setFile( real_appname ); if( info.exists() && ( ignore || info.isExecutable() ) @@ -1006,7 +1006,7 @@ static int tokenize( TQStringList& tokens, const TQString& str, for( int index = 0; index < len; index++) { - if ( delim.tqfind( str[ index ] ) >= 0 ) + if ( delim.find( str[ index ] ) >= 0 ) { tokens.append( token ); token = ""; @@ -1093,17 +1093,17 @@ TQString KStandardDirs::saveLocation(const char *type, { checkConfig(); - TQString *pPath = savelocations.tqfind(type); + TQString *pPath = savelocations.find(type); if (!pPath) { - TQStringList *dirs = relatives.tqfind(type); + TQStringList *dirs = relatives.find(type); if (!dirs && ( (strcmp(type, "socket") == 0) || (strcmp(type, "tmp") == 0) || (strcmp(type, "cache") == 0) )) { (void) resourceDirs(type); // Generate socket|tmp|cache resource. - dirs = relatives.tqfind(type); // Search again. + dirs = relatives.find(type); // Search again. } if (dirs) { @@ -1116,7 +1116,7 @@ TQString KStandardDirs::saveLocation(const char *type, pPath = new TQString(realPath(localkdedir() + dirs->last())); } else { - dirs = absolutes.tqfind(type); + dirs = absolutes.find(type); if (!dirs) qFatal("KStandardDirs: The resource type %s is not registered", type); pPath = new TQString(realPath(dirs->last())); @@ -1147,7 +1147,7 @@ TQString KStandardDirs::saveLocation(const char *type, TQString KStandardDirs::relativeLocation(const char *type, const TQString &absPath) { TQString fullPath = absPath; - int i = absPath.tqfindRev('/'); + int i = absPath.findRev('/'); if (i != -1) { fullPath = realPath(absPath.left(i+1))+absPath.mid(i+1); // Normalize @@ -1185,7 +1185,7 @@ bool KStandardDirs::makeDir(const TQString& dir, int mode) while( i < len ) { KDE_struct_stat st; - int pos = target.tqfind(QChar('/'), i); + int pos = target.find(QChar('/'), i); base += target.mid(i - 1, pos - i + 1); TQCString baseEncoded = TQFile::encodeName(base); // bail out if we encountered a problem @@ -1236,10 +1236,10 @@ static TQString executablePrefix() if(path.isEmpty()) return TQString::null; - int pos = path.tqfindRev('/'); // Skip filename + int pos = path.findRev('/'); // Skip filename if(pos <= 0) return TQString::null; - pos = path.tqfindRev(TQChar('/'), pos - 1); // Skip last directory + pos = path.findRev(TQChar('/'), pos - 1); // Skip last directory if(pos <= 0) return TQString::null; @@ -1549,7 +1549,7 @@ bool KStandardDirs::addCustomized(KConfig *config) TQString kioskAdmin = config->readEntry("kioskAdmin"); if (!kioskAdmin.isEmpty() && !kde_kiosk_admin) { - int i = kioskAdmin.tqfind(':'); + int i = kioskAdmin.find(':'); TQString user = kioskAdmin.left(i); TQString host = kioskAdmin.mid(i+1); @@ -1694,7 +1694,7 @@ TQString locateLocal( const char *type, { // try to find slashes. If there are some, we have to // create the subdir first - int slash = filename.tqfindRev('/')+1; + int slash = filename.findRev('/')+1; if (!slash) // only one filename return inst->dirs()->saveLocation(type, TQString::null, createDir) + filename; diff --git a/kdecore/kstartupinfo.cpp b/kdecore/kstartupinfo.cpp index 19ba9797f..98195e8e5 100644 --- a/kdecore/kstartupinfo.cpp +++ b/kdecore/kstartupinfo.cpp @@ -234,7 +234,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, return; if( id_P.none()) return; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) { // already reported, update d->startups[ id_P ].update( data_P ); d->startups[ id_P ].age = 0; // CHECKME @@ -250,7 +250,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->startups[ id_P ] ); return; } - if( d->silent_startups.tqcontains( id_P )) + if( d->silent_startups.contains( id_P )) { // already reported, update d->silent_startups[ id_P ].update( data_P ); d->silent_startups[ id_P ].age = 0; // CHECKME @@ -265,7 +265,7 @@ void KStartupInfo::new_startup_info_internal( const KStartupInfoId& id_P, emit gotStartupChange( id_P, d->silent_startups[ id_P ] ); return; } - if( d->uninited_startups.tqcontains( id_P )) + if( d->uninited_startups.contains( id_P )) { d->uninited_startups[ id_P ].update( data_P ); kdDebug( 172 ) << "updating uninited" << endl; @@ -317,18 +317,18 @@ void KStartupInfo::remove_startup_info_internal( const KStartupInfoId& id_P ) { if( d == NULL ) return; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) { kdDebug( 172 ) << "removing" << endl; emit gotRemoveStartup( id_P, d->startups[ id_P ]); d->startups.remove( id_P ); } - else if( d->silent_startups.tqcontains( id_P )) + else if( d->silent_startups.contains( id_P )) { kdDebug( 172 ) << "removing silent" << endl; d->silent_startups.remove( id_P ); } - else if( d->uninited_startups.tqcontains( id_P )) + else if( d->uninited_startups.contains( id_P )) { kdDebug( 172 ) << "removing uninited" << endl; d->uninited_startups.remove( id_P ); @@ -360,11 +360,11 @@ void KStartupInfo::remove_startup_pids( const KStartupInfoId& id_P, return; kdFatal( data_P.pids().count() == 0, 172 ); Data* data = NULL; - if( d->startups.tqcontains( id_P )) + if( d->startups.contains( id_P )) data = &d->startups[ id_P ]; - else if( d->silent_startups.tqcontains( id_P )) + else if( d->silent_startups.contains( id_P )) data = &d->silent_startups[ id_P ]; - else if( d->uninited_startups.tqcontains( id_P )) + else if( d->uninited_startups.contains( id_P )) data = &d->uninited_startups[ id_P ]; else return; @@ -669,7 +669,7 @@ bool KStartupInfo::find_id( const TQCString& id_P, KStartupInfoId* id_O, kdDebug( 172 ) << "find_id:" << id_P << endl; KStartupInfoId id; id.initId( id_P ); - if( d->startups.tqcontains( id )) + if( d->startups.contains( id )) { if( id_O != NULL ) *id_O = id; @@ -1069,7 +1069,7 @@ unsigned long KStartupInfoId::timestamp() const { if( none()) return 0; - int pos = d->id.tqfindRev( "_TIME" ); + int pos = d->id.findRev( "_TIME" ); if( pos >= 0 ) { bool ok; @@ -1083,10 +1083,10 @@ unsigned long KStartupInfoId::timestamp() const // snprintf (s, len, "%s/%s/%lu/%d-%d-%s", // canonicalized_launcher, canonicalized_launchee, (unsigned long) timestamp, // (int) getpid (), (int) sequence_number, hostbuf); - int pos1 = d->id.tqfindRev( '/' ); + int pos1 = d->id.findRev( '/' ); if( pos1 > 0 ) { - int pos2 = d->id.tqfindRev( '/', pos1 - 1 ); + int pos2 = d->id.findRev( '/', pos1 - 1 ); if( pos2 >= 0 ) { bool ok; @@ -1374,7 +1374,7 @@ const TQCString& KStartupInfoData::hostname() const void KStartupInfoData::addPid( pid_t pid_P ) { - if( !d->pids.tqcontains( pid_P )) + if( !d->pids.contains( pid_P )) d->pids.append( pid_P ); } @@ -1390,7 +1390,7 @@ const TQValueList< pid_t >& KStartupInfoData::pids() const bool KStartupInfoData::is_pid( pid_t pid_P ) const { - return d->pids.tqcontains( pid_P ); + return d->pids.contains( pid_P ); } void KStartupInfoData::setSilent( TriState state_P ) @@ -1446,24 +1446,24 @@ WId KStartupInfoData::launchedBy() const static long get_num( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); return item_P.mid( pos + 1 ).toLong(); } static unsigned long get_unum( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); return item_P.mid( pos + 1 ).toULong(); } static TQString get_str( const TQString& item_P ) { - unsigned int pos = item_P.tqfind( '=' ); + unsigned int pos = item_P.find( '=' ); if( item_P.length() > pos + 2 && item_P[ pos + 1 ] == (QChar)'\"' ) { - int pos2 = item_P.left( pos + 2 ).tqfind( '\"' ); + int pos2 = item_P.left( pos + 2 ).find( '\"' ); if( pos2 < 0 ) return TQString::null; // 01234 return item_P.mid( pos + 2, pos2 - 2 - pos ); // A="C" diff --git a/kdecore/kstringhandler.cpp b/kdecore/kstringhandler.cpp index e309ea6f0..dfabb49ea 100644 --- a/kdecore/kstringhandler.cpp +++ b/kdecore/kstringhandler.cpp @@ -22,7 +22,7 @@ static void parsePythonRange( const TQCString &range, uint &start, uint &end ) { - const int colon = range.tqfind( ':' ); + const int colon = range.find( ':' ); if ( colon == -1 ) { start = range.toUInt(); end = start; @@ -178,7 +178,7 @@ TQString KStringHandler::remword( const TQString &text , const TQString &word ) // Split words and add into list TQStringList list = TQStringList::split( " ", text, true ); - TQStringList::Iterator it = list.tqfind(word); + TQStringList::Iterator it = list.find(word); if (it != list.end()) list.remove( it ); @@ -422,7 +422,7 @@ bool KStringHandler::matchFileName( const TQString& filename, const TQString& pa if ( pattern[ pattern_len - 1 ] == (QChar)'*' && len + 1 >= pattern_len ) { if ( pattern[ 0 ] == (QChar)'*' ) { - return filename.tqfind(pattern.mid(1, pattern_len - 2)) != -1; + return filename.find(pattern.mid(1, pattern_len - 2)) != -1; } const TQChar *c1 = pattern.tqunicode(); @@ -457,7 +457,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.tqfind(sep, searchStart); + int tokenStart = s.find(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -465,7 +465,7 @@ KStringHandler::perlSplit(const TQString & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + sep.length(); - tokenStart = s.tqfind(sep, searchStart); + tokenStart = s.find(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) @@ -483,7 +483,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) int searchStart = 0; - int tokenStart = s.tqfind(sep, searchStart); + int tokenStart = s.find(sep, searchStart); while (-1 != tokenStart && (ignoreMax || l.count() < max - 1)) { @@ -491,7 +491,7 @@ KStringHandler::perlSplit(const TQChar & sep, const TQString & s, uint max) l << s.mid(searchStart, tokenStart - searchStart); searchStart = tokenStart + 1; - tokenStart = s.tqfind(sep, searchStart); + tokenStart = s.find(sep, searchStart); } if (!s.mid(searchStart, s.length() - searchStart).isEmpty()) diff --git a/kdecore/ksycoca.cpp b/kdecore/ksycoca.cpp index 0846c5c95..2df7ae772 100644 --- a/kdecore/ksycoca.cpp +++ b/kdecore/ksycoca.cpp @@ -266,7 +266,7 @@ void KSycoca::addFactory( KSycocaFactory *factory ) bool KSycoca::isChanged(const char *type) { - return self()->d->changeList.tqcontains(type); + return self()->d->changeList.contains(type); } void KSycoca::notifyDatabaseChanged(const TQStringList &changeList) @@ -428,7 +428,7 @@ TQString KSycoca::determineRelativePath( const TQString & _fullpath, const char TQStringList::ConstIterator dirsit = dirs.begin(); for ( ; dirsit != dirs.end() && sRelativeFilePath.isEmpty(); ++dirsit ) { // might need canonicalPath() ... - if ( _fullpath.tqfind( *dirsit ) == 0 ) // path is dirs + relativePath + if ( _fullpath.find( *dirsit ) == 0 ) // path is dirs + relativePath sRelativeFilePath = _fullpath.mid( (*dirsit).length() ); // skip appsdirs } if ( sRelativeFilePath.isEmpty() ) diff --git a/kdecore/kurl.cpp b/kdecore/kurl.cpp index cc7c3fddb..52c8a807a 100644 --- a/kdecore/kurl.cpp +++ b/kdecore/kurl.cpp @@ -338,7 +338,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de #else TQString encodedDot("%2e"); #endif - if (path.tqfind(encodedDot, 0, false) != -1) + if (path.find(encodedDot, 0, false) != -1) { #ifndef KDE_QT_ONLY static const TQString &encodedDOT = KGlobal::staticQString("%2E"); // Uppercase! @@ -365,7 +365,7 @@ static TQString cleanpath(const TQString &_path, bool cleanDirSeparator, bool de cdUp = 0; pos = orig_pos = len; - while ( pos && (pos = path.tqfindRev('/',--pos)) != -1 ) + while ( pos && (pos = path.findRev('/',--pos)) != -1 ) { len = orig_pos - pos - 1; if ( len == 2 && path[pos+1] == '.' && path[pos+2] == '.' ) @@ -542,11 +542,11 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) TQString rUrl = _rel_url; int len = _u.m_strProtocol.length(); if ( !_u.m_strHost.isEmpty() && !rUrl.isEmpty() && - rUrl.tqfind( _u.m_strProtocol, 0, false ) == 0 && + rUrl.find( _u.m_strProtocol, 0, false ) == 0 && rUrl[len] == ':' && (rUrl[len+1] != '/' || (rUrl[len+1] == '/' && rUrl[len+2] != '/')) ) { - rUrl.remove( 0, rUrl.tqfind( ':' ) + 1 ); + rUrl.remove( 0, rUrl.find( ':' ) + 1 ); } if ( rUrl.isEmpty() ) @@ -579,13 +579,13 @@ KURL::KURL( const KURL& _u, const TQString& _rel_url, int encoding_hint ) } else if ( rUrl[0] != '?' ) { - int pos = m_strPath.tqfindRev( '/' ); + int pos = m_strPath.findRev( '/' ); if (pos >= 0) m_strPath.truncate(pos); m_strPath += '/'; if (!m_strPath_encoded.isEmpty()) { - pos = m_strPath_encoded.tqfindRev( '/' ); + pos = m_strPath_encoded.findRev( '/' ); if (pos >= 0) m_strPath_encoded.truncate(pos); m_strPath_encoded += '/'; @@ -1231,7 +1231,7 @@ void KURL::setFileName( const TQString& _txt ) path = "/"; else { - int lastSlash = path.tqfindRev( '/' ); + int lastSlash = path.findRev( '/' ); if ( lastSlash == -1) { // The first character is not a '/' ??? @@ -1347,7 +1347,7 @@ void KURL::setEncodedPath( const TQString& _txt, int encoding_hint ) void KURL::setEncodedPathAndQuery( const TQString& _txt, int encoding_hint ) { - int pos = _txt.tqfind( '?' ); + int pos = _txt.find( '?' ); if ( pos == -1 ) { setEncodedPath(_txt, encoding_hint); @@ -1490,7 +1490,7 @@ TQString KURL::url( int _trailing, int encoding_hint ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.tqfind(':') != -1); + bool IPv6 = (m_strHost.find(':') != -1); if (IPv6) u += '[' + m_strHost + ']'; else @@ -1546,7 +1546,7 @@ TQString KURL::prettyURL( int _trailing ) const } if ( m_iUriMode == URL ) { - bool IPv6 = (m_strHost.tqfind(':') != -1); + bool IPv6 = (m_strHost.find(':') != -1); if (IPv6) { u += '[' + m_strHost + ']'; @@ -1704,13 +1704,13 @@ TQString KURL::fileName( bool _strip_trailing_slash ) const // This is hairy, we need the last unencoded slash. // Count in the encoded string how many encoded slashes follow the last // unencoded one. - int i = m_strPath_encoded.tqfindRev( TQChar('/'), len - 1 ); + int i = m_strPath_encoded.findRev( TQChar('/'), len - 1 ); TQString fileName_encoded = m_strPath_encoded.mid(i+1); - n += fileName_encoded.tqcontains("%2f", false); + n += fileName_encoded.contains("%2f", false); } int i = len; do { - i = path.tqfindRev( TQChar('/'), i - 1 ); + i = path.findRev( TQChar('/'), i - 1 ); } while (--n && (i > 0)); @@ -1773,7 +1773,7 @@ TQString KURL::directory( bool _strip_trailing_slash_from_result, if ( result.isEmpty() || result == "/" ) return result; - int i = result.tqfindRev( "/" ); + int i = result.findRev( "/" ); // If ( i == -1 ) => the first character is not a '/' // So it's some URL like file:blah.tgz, with no path if ( i == -1 ) @@ -2143,7 +2143,7 @@ TQMap< TQString, TQString > KURL::queryItems( int options, int encoding_hint ) c TQMap< TQString, TQString > result; TQStringList items = TQStringList::split( '&', m_strQuery_encoded ); for ( TQStringList::const_iterator it = items.begin() ; it != items.end() ; ++it ) { - int equal_pos = (*it).tqfind( '=' ); + int equal_pos = (*it).find( '=' ); if ( equal_pos > 0 ) { // = is not the first char... TQString name = (*it).left( equal_pos ); if ( options & CaseInsensitiveKeys ) diff --git a/kdecore/kurldrag.cpp b/kdecore/kurldrag.cpp index 089d2fadb..e0a7be227 100644 --- a/kdecore/kurldrag.cpp +++ b/kdecore/kurldrag.cpp @@ -140,7 +140,7 @@ bool KURLDrag::decode( const TQMimeSource *e, KURL::List &uris, TQMap<TQString,T if ( readingKey ) key = *it; else - metaData.tqreplace( key, *it ); + metaData.replace( key, *it ); readingKey = !readingKey; } Q_ASSERT( readingKey ); // an odd number of items would be, well, odd ;-) diff --git a/kdecore/kuser.cpp b/kdecore/kuser.cpp index ca74700fe..3fffddf4f 100644 --- a/kdecore/kuser.cpp +++ b/kdecore/kuser.cpp @@ -219,7 +219,7 @@ TQValueList<KUserGroup> KUser::groups() const { TQValueList<KUserGroup>::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList<KUser> users = (*it).users(); - if ( users.tqfind( *this ) != users.end()) { + if ( users.find( *this ) != users.end()) { result.append(*it); } } @@ -232,7 +232,7 @@ TQStringList KUser::groupNames() const { TQValueList<KUserGroup>::const_iterator it; for ( it = allGroups.begin(); it != allGroups.end(); ++it ) { TQValueList<KUser> users = (*it).users(); - if ( users.tqfind( *this ) != users.end()) { + if ( users.find( *this ) != users.end()) { result.append((*it).name()); } } diff --git a/kdecore/kvmallocator.cpp b/kdecore/kvmallocator.cpp index 031dd4304..996d55791 100644 --- a/kdecore/kvmallocator.cpp +++ b/kdecore/kvmallocator.cpp @@ -106,7 +106,7 @@ KVMAllocator::allocate(size_t _size) free_block.start += block.size; if (!free_block.size) d->free_blocks.remove(it); - it = d->used_blocks.tqreplace(block.start, block); + it = d->used_blocks.replace(block.start, block); return &(it.data()); } ++it; @@ -120,7 +120,7 @@ KVMAllocator::allocate(size_t _size) block.size = (_size + KVM_ALIGN) & ~KVM_ALIGN; block.mmap = 0; kdDebug(180)<<"VM alloc: using new block "<<(long)block.start<<" size ="<<(long)block.size<<" request = "<<_size<< endl; - it = d->used_blocks.tqreplace(block.start, block); + it = d->used_blocks.replace(block.start, block); d->max_length += block.size; return &(it.data()); } @@ -138,14 +138,14 @@ KVMAllocator::free(Block *block_p) return; } TQMap<off_t,KVMAllocator::Block>::iterator it; - it = d->used_blocks.tqfind(block.start); + it = d->used_blocks.find(block.start); if (it == d->used_blocks.end()) { kdDebug(180)<<"VM free: Block "<<(long)block.start<<" is not allocated."<<endl; return; } d->used_blocks.remove(it); - it = d->free_blocks.tqreplace(block.start, block); + it = d->free_blocks.replace(block.start, block); TQMap<off_t,KVMAllocator::Block>::iterator before = it; --before; if (before != d->free_blocks.end()) diff --git a/kdecore/kwinmodule.cpp b/kdecore/kwinmodule.cpp index 5e7b77333..f113570db 100644 --- a/kdecore/kwinmodule.cpp +++ b/kdecore/kwinmodule.cpp @@ -172,7 +172,7 @@ const TQValueList<WId>& KWinModule::stackingOrder() const bool KWinModule::hasWId(WId w) const { - return d->windows.tqfindIndex( w ) != -1; + return d->windows.findIndex( w ) != -1; } const TQValueList<WId>& KWinModule::systemTrayWindows() const @@ -243,7 +243,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) for ( TQPtrListIterator<KWinModule> mit( modules ); mit.current(); ++mit ) emit (*mit)->showingDesktopChanged( showingDesktop()); } - } else if ( windows.tqfindIndex( ev->xany.window ) != -1 ){ + } else if ( windows.findIndex( ev->xany.window ) != -1 ){ NETWinInfo ni( qt_xdisplay(), ev->xany.window, qt_xrootwin(), 0 ); unsigned long dirty[ 2 ]; ni.event( ev, dirty, 2 ); @@ -257,7 +257,7 @@ bool KWinModulePrivate::x11Event( XEvent * ev ) } if ( (dirty[ NETWinInfo::PROTOCOLS ] & NET::WMStrut) != 0 ) { removeStrutWindow( ev->xany.window ); - if ( possibleStrutWindows.tqfindIndex( ev->xany.window ) == -1 ) + if ( possibleStrutWindows.findIndex( ev->xany.window ) == -1 ) possibleStrutWindows.append( ev->xany.window ); } if ( dirty[ NETWinInfo::PROTOCOLS ] || dirty[ NETWinInfo::PROTOCOLS2 ] ) { @@ -318,7 +318,7 @@ void KWinModulePrivate::addClient(Window w) void KWinModulePrivate::removeClient(Window w) { bool emit_strutChanged = removeStrutWindow( w ); - if( strutSignalConnected && possibleStrutWindows.tqfindIndex( w ) != -1 && modules.count() > 0 ) { + if( strutSignalConnected && possibleStrutWindows.findIndex( w ) != -1 && modules.count() > 0 ) { NETWinInfo info( qt_xdisplay(), w, qt_xrootwin(), NET::WMStrut ); NETStrut strut = info.strut(); if ( strut.left || strut.top || strut.right || strut.bottom ) { @@ -400,7 +400,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons TQValueList<WId>::ConstIterator it1; for( it1 = d->windows.begin(); it1 != d->windows.end(); ++it1 ) { - if(exclude.tqfindIndex(*it1) != -1) continue; + if(exclude.findIndex(*it1) != -1) continue; // Kicker (very) extensively calls this function, causing hundreds of roundtrips just // to repeatedly find out struts of all windows. Therefore strut values for strut @@ -416,7 +416,7 @@ TQRect KWinModule::workArea( const TQValueList<WId>& exclude, int desktop ) cons if(!((*it2).desktop == desktop || (*it2).desktop == NETWinInfo::OnAllDesktops )) continue; strut = (*it2).strut; - } else if( d->possibleStrutWindows.tqfindIndex( *it1 ) != -1 ) { + } else if( d->possibleStrutWindows.findIndex( *it1 ) != -1 ) { NETWinInfo info( qt_xdisplay(), (*it1), qt_xrootwin(), NET::WMStrut | NET::WMDesktop); strut = info.strut(); d->possibleStrutWindows.remove( *it1 ); diff --git a/kdecore/kxmessages.cpp b/kdecore/kxmessages.cpp index 02af07b0f..6b6f971a2 100644 --- a/kdecore/kxmessages.cpp +++ b/kdecore/kxmessages.cpp @@ -189,7 +189,7 @@ bool KXMessages::x11Event( XEvent* ev_P ) ++i ) buf[ i ] = ev_P->xclient.data.b[ i ]; buf[ i ] = '\0'; - if( incoming_messages.tqcontains( ev_P->xclient.window )) + if( incoming_messages.contains( ev_P->xclient.window )) { if( ev_P->xclient.message_type == accept_atom1 && accept_atom1 != accept_atom2 ) // two different messages on the same window at the same time shouldn't happen anyway diff --git a/kdecore/network/khttpproxysocketdevice.cpp b/kdecore/network/khttpproxysocketdevice.cpp index 0d72b4b3d..648f4e571 100644 --- a/kdecore/network/khttpproxysocketdevice.cpp +++ b/kdecore/network/khttpproxysocketdevice.cpp @@ -222,7 +222,7 @@ bool KHttpProxySocketDevice::parseServerReply() TQCString fullHeaders = d->reply + buf.data(); // search for the end of the headers - index = fullHeaders.tqfind("\r\n\r\n"); + index = fullHeaders.find("\r\n\r\n"); if (index == -1) { // no, headers not yet finished... @@ -265,9 +265,9 @@ bool KHttpProxySocketDevice::parseServerReply() // now really parse the reply qDebug("KHttpProxySocketDevice: get reply: %s\n", - d->reply.left(d->reply.tqfind('\r')).data()); + d->reply.left(d->reply.find('\r')).data()); if (d->reply.left(7) != "HTTP/1." || - (index = d->reply.tqfind(' ')) == -1 || + (index = d->reply.find(' ')) == -1 || d->reply[index + 1] != '2') { setError(IO_ConnectError, NetFailure); diff --git a/kdecore/network/kresolver.cpp b/kdecore/network/kresolver.cpp index d58d02cb0..93c029b8e 100644 --- a/kdecore/network/kresolver.cpp +++ b/kdecore/network/kresolver.cpp @@ -917,7 +917,7 @@ TQString KResolver::localHostName() if (name.isEmpty()) return TQString::tqfromLatin1("localhost"); - if (name.tqfind('.') == -1) + if (name.find('.') == -1) { // not fully qualified // must resolve @@ -961,7 +961,7 @@ TQCString KResolver::domainToAscii(const TQString& tqunicodeDomain) TQStringList input = splitLabels(tqunicodeDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) return input.join(".").lower().latin1(); // No IDN allowed for this TLD // 3) decide whether to enforce the STD3 rules for chars < 0x7F @@ -1009,7 +1009,7 @@ TQString KResolver::domainToUnicode(const TQString& asciiDomain) TQStringList input = splitLabels(asciiDomain); // Do we allow IDN names for this TLD? - if (input.count() && !idnDomains->tqcontains(input[input.count()-1].lower())) + if (input.count() && !idnDomains->contains(input[input.count()-1].lower())) return asciiDomain.lower(); // No TLDs allowed // 3) decide whether to enforce the STD3 rules for chars < 0x7F diff --git a/kdecore/network/kresolverstandardworkers.cpp b/kdecore/network/kresolverstandardworkers.cpp index 185879841..6236cc15d 100644 --- a/kdecore/network/kresolverstandardworkers.cpp +++ b/kdecore/network/kresolverstandardworkers.cpp @@ -547,8 +547,8 @@ bool KStandardWorker::sanityCheck() if (!nodeName().isEmpty()) { TQString node = nodeName(); - if (node.tqfind('%') != -1) - node.truncate(node.tqfind('%')); + if (node.find('%') != -1) + node.truncate(node.find('%')); if (node.isEmpty() || node == TQString::tqfromLatin1("*") || node == TQString::tqfromLatin1("localhost")) @@ -584,7 +584,7 @@ bool KStandardWorker::resolveScopeId() { // we must test the original name, not the encoded one scopeid = 0; - int pos = nodeName().tqfindRev('%'); + int pos = nodeName().findRev('%'); if (pos == -1) return true; diff --git a/kdecore/network/ksocketaddress.cpp b/kdecore/network/ksocketaddress.cpp index a6fd14cf5..feaabfab5 100644 --- a/kdecore/network/ksocketaddress.cpp +++ b/kdecore/network/ksocketaddress.cpp @@ -131,7 +131,7 @@ bool KIpAddress::setAddress(const TQString& address) m_version = 0; // try to guess the address version - if (address.tqfind(':') != -1) + if (address.find(':') != -1) { #ifdef AF_INET6 // guessing IPv6 diff --git a/kdecore/network/ksocketbuffer.cpp b/kdecore/network/ksocketbuffer.cpp index ad4864be7..aacffde45 100644 --- a/kdecore/network/ksocketbuffer.cpp +++ b/kdecore/network/ksocketbuffer.cpp @@ -75,9 +75,9 @@ bool KSocketBuffer::canReadLine() const // walk the buffer for ( ; it != end; ++it) { - if ((*it).tqfind('\n', offset) != -1) + if ((*it).find('\n', offset) != -1) return true; - if ((*it).tqfind('\r', offset) != -1) + if ((*it).find('\r', offset) != -1) return true; offset = 0; } @@ -101,7 +101,7 @@ TQCString KSocketBuffer::readLine() // walk the buffer for ( ; it != end; ++it) { - int posnl = (*it).tqfind('\n', offset); + int posnl = (*it).find('\n', offset); if (posnl == -1) { // not found in this one diff --git a/kdecore/network/ksocketdevice.cpp b/kdecore/network/ksocketdevice.cpp index 36e0a5c7b..68651b8e2 100644 --- a/kdecore/network/ksocketdevice.cpp +++ b/kdecore/network/ksocketdevice.cpp @@ -884,7 +884,7 @@ KSocketDevice::setDefaultImpl(KSocketDeviceFactoryBase* factory) void KSocketDevice::addNewImpl(KSocketDeviceFactoryBase* factory, int capabilities) { TQMutexLocker locker(&defaultImplFactoryMutex); - if (factories.tqcontains(capabilities)) + if (factories.contains(capabilities)) delete factories[capabilities]; factories.insert(capabilities, factory); } diff --git a/kdecore/network/ksrvresolverworker.cpp b/kdecore/network/ksrvresolverworker.cpp index e217507f3..2ec5bb4bf 100644 --- a/kdecore/network/ksrvresolverworker.cpp +++ b/kdecore/network/ksrvresolverworker.cpp @@ -51,8 +51,8 @@ bool KSrvResolverWorker::preprocess() return false; TQString node = nodeName(); - if (node.tqfind('%') != -1) - node.truncate(node.tqfind('%')); + if (node.find('%') != -1) + node.truncate(node.find('%')); if (node.isEmpty() || node == TQString::tqfromLatin1("*") || node == TQString::tqfromLatin1("localhost")) diff --git a/kdecore/svgicons/ksvgiconpainter.cpp b/kdecore/svgicons/ksvgiconpainter.cpp index 06d5804f8..2f988ce78 100644 --- a/kdecore/svgicons/ksvgiconpainter.cpp +++ b/kdecore/svgicons/ksvgiconpainter.cpp @@ -1263,8 +1263,8 @@ void KSVGIconPainter::setStrokeColor(const TQString &stroke) TQString url = stroke; - unsigned int start = url.tqfind("#") + 1; - unsigned int end = url.tqfindRev(")"); + unsigned int start = url.find("#") + 1; + unsigned int end = url.findRev(")"); d->helper->m_strokeGradientReference = url.mid(start, end - start); } @@ -1291,8 +1291,8 @@ void KSVGIconPainter::setFillColor(const TQString &fill) TQString url = fill; - unsigned int start = url.tqfind("#") + 1; - unsigned int end = url.tqfindRev(")"); + unsigned int start = url.find("#") + 1; + unsigned int end = url.findRev(")"); d->helper->m_fillGradientReference = url.mid(start, end - start); } diff --git a/kded/kbuildservicefactory.cpp b/kded/kbuildservicefactory.cpp index dcd77c87b..30be4f213 100644 --- a/kded/kbuildservicefactory.cpp +++ b/kded/kbuildservicefactory.cpp @@ -67,7 +67,7 @@ KSycocaEntry * KBuildServiceFactory::createEntry( const TQString& file, const char *resource ) { TQString name = file; - int pos = name.tqfindRev('/'); + int pos = name.findRev('/'); if (pos != -1) { name = name.mid(pos+1); @@ -227,7 +227,7 @@ KBuildServiceFactory::saveInitList(TQDataStream &str) void KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource) { - if (m_dupeDict.tqfind(newEntry)) + if (m_dupeDict.find(newEntry)) return; KSycocaFactory::addEntry(newEntry, resource); @@ -244,7 +244,7 @@ KBuildServiceFactory::addEntry(KSycocaEntry *newEntry, const char *resource) TQString name = service->desktopEntryName(); m_nameDict->add( name, newEntry ); - m_serviceDict.tqreplace(name, service); + m_serviceDict.replace(name, service); TQString relName = service->desktopEntryPath(); m_relNameDict->add( relName, newEntry ); diff --git a/kded/kbuildservicegroupfactory.cpp b/kded/kbuildservicegroupfactory.cpp index 164dd81e3..7499eda84 100644 --- a/kded/kbuildservicegroupfactory.cpp +++ b/kded/kbuildservicegroupfactory.cpp @@ -59,7 +59,7 @@ KBuildServiceGroupFactory::createEntry( const TQString&, const char * ) void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KService *newEntry) { KServiceGroup *entry = 0; - KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName); + KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName); if (ptr) entry = dynamic_cast<KServiceGroup *>(ptr->data()); @@ -74,7 +74,7 @@ void KBuildServiceGroupFactory::addNewEntryTo( const TQString &menuName, KServic KServiceGroup * KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& file, KServiceGroup *entry, bool isDeleted) { - KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(menuName); + KSycocaEntry::Ptr *ptr = m_entryDict->find(menuName); if (ptr) { kdWarning(7021) << "KBuildServiceGroupFactory::addNew( " << menuName << ", " << file << " ): menu already exists!" << endl; @@ -94,14 +94,14 @@ KBuildServiceGroupFactory::addNew( const TQString &menuName, const TQString& fil // Make sure parent dir exists. KServiceGroup *parentEntry = 0; TQString parent = menuName.left(menuName.length()-1); - int i = parent.tqfindRev('/'); + int i = parent.findRev('/'); if (i > 0) { parent = parent.left(i+1); } else { parent = "/"; } parentEntry = 0; - ptr = m_entryDict->tqfind(parent); + ptr = m_entryDict->find(parent); if (ptr) parentEntry = dynamic_cast<KServiceGroup *>(ptr->data()); if (!parentEntry) @@ -123,7 +123,7 @@ KBuildServiceGroupFactory::addNewChild( const TQString &parent, const char *reso TQString name = "#parent#"+parent; KServiceGroup *entry = 0; - KSycocaEntry::Ptr *ptr = m_entryDict->tqfind(name); + KSycocaEntry::Ptr *ptr = m_entryDict->find(name); if (ptr) entry = dynamic_cast<KServiceGroup *>(ptr->data()); diff --git a/kded/kbuildservicetypefactory.cpp b/kded/kbuildservicetypefactory.cpp index e27a83cc4..1b09d10c6 100644 --- a/kded/kbuildservicetypefactory.cpp +++ b/kded/kbuildservicetypefactory.cpp @@ -69,7 +69,7 @@ KSycocaEntry * KBuildServiceTypeFactory::createEntry(const TQString &file, const char *resource) { TQString name = file; - int pos = name.tqfindRev('/'); + int pos = name.findRev('/'); if (pos != -1) { name = name.mid(pos+1); @@ -183,8 +183,8 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) for ( ; patit != pat.end() ; ++patit ) { const TQString &pattern = *patit; - if ( pattern.tqfindRev('*') == 0 - && pattern.tqfindRev('.') == 1 + if ( pattern.findRev('*') == 0 + && pattern.findRev('.') == 1 && pattern.length() <= 6 ) // it starts with "*.", has no other '*' and no other '.', and is max 6 chars // => fast patttern @@ -193,7 +193,7 @@ KBuildServiceTypeFactory::savePatternLists(TQDataStream &str) otherPatterns.append( pattern ); // Assumption : there is only one mimetype for that pattern // It doesn't really make sense otherwise, anyway. - dict.tqreplace( pattern, mimeType ); + dict.replace( pattern, mimeType ); } } } @@ -267,7 +267,7 @@ KBuildServiceTypeFactory::addEntry(KSycocaEntry *newEntry, const char *resource) TQMap<TQString,TQVariant::Type>::ConstIterator pit = pd.begin(); for( ; pit != pd.end(); ++pit ) { - if (!m_propertyTypeDict.tqcontains(pit.key())) + if (!m_propertyTypeDict.contains(pit.key())) m_propertyTypeDict.insert(pit.key(), pit.data()); else if (m_propertyTypeDict[pit.key()] != pit.data()) kdWarning(7021) << "Property '"<< pit.key() << "' is defined multiple times ("<< serviceType->name() <<")" <<endl; diff --git a/kded/kbuildsycoca.cpp b/kded/kbuildsycoca.cpp index 584531d8c..041c9db3a 100644 --- a/kded/kbuildsycoca.cpp +++ b/kded/kbuildsycoca.cpp @@ -203,15 +203,15 @@ KSycocaEntry *KBuildSycoca::createEntry(const TQString &file, bool addToFactory) // Re-use old entry if (g_factory == g_bsgf) // Strip .directory from service-group entries { - entry = g_entryDict->tqfind(file.left(file.length()-10)); + entry = g_entryDict->find(file.left(file.length()-10)); } else if (g_factory == g_bsf) { - entry = g_entryDict->tqfind(file); + entry = g_entryDict->find(file); } else { - entry = g_entryDict->tqfind(file); + entry = g_entryDict->find(file); } // remove from g_ctimeDict; if g_ctimeDict is not empty // after all files have been processed, it means @@ -300,7 +300,7 @@ bool KBuildSycoca::build() ++it1 ) { KSycocaResource res = (*it1); - if (!allResources.tqcontains(res.resource)) + if (!allResources.contains(res.resource)) allResources.append(res.resource); } } @@ -428,7 +428,7 @@ void KBuildSycoca::createMenu(TQString caption, TQString name, VFolderMenu::SubM if (timeStamp && (timeStamp == oldTimestamp)) { - entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->tqfind(subName)); + entry = dynamic_cast<KServiceGroup *> (g_serviceGroupEntryDict->find(subName)); if (entry && (entry->directoryEntryPath() != directoryFile)) entry = 0; // Can't reuse this one! } diff --git a/kded/kctimefactory.cpp b/kded/kctimefactory.cpp index 98471af48..746a1c433 100644 --- a/kded/kctimefactory.cpp +++ b/kded/kctimefactory.cpp @@ -72,7 +72,7 @@ void KCTimeInfo::addCTime(const TQString &path, TQ_UINT32 ctime) { assert(!path.isEmpty()); - ctimeDict.tqreplace(path, new TQ_UINT32(ctime)); + ctimeDict.replace(path, new TQ_UINT32(ctime)); } TQ_UINT32 @@ -94,6 +94,6 @@ KCTimeInfo::fillCTimeDict(TQDict<TQ_UINT32> &dict) KSycocaEntry::read(*m_str, path); (*m_str) >> ctime; if (path.isEmpty()) break; - dict.tqreplace(path, new TQ_UINT32(ctime)); + dict.replace(path, new TQ_UINT32(ctime)); } } diff --git a/kded/kded.cpp b/kded/kded.cpp index 7f8ec9121..257ab3731 100644 --- a/kded/kded.cpp +++ b/kded/kded.cpp @@ -247,7 +247,7 @@ void Kded::noDemandLoad(const TQString &obj) KDEDModule *Kded::loadModule(const TQCString &obj, bool onDemand) { - KDEDModule *module = m_modules.tqfind(obj); + KDEDModule *module = m_modules.find(obj); if (module) return module; KService::Ptr s = KService::serviceByDesktopPath("kded/"+obj+".desktop"); @@ -260,7 +260,7 @@ KDEDModule *Kded::loadModule(const KService *s, bool onDemand) if (s && !s->library().isEmpty()) { TQCString obj = s->desktopEntryName().latin1(); - KDEDModule *oldModule = m_modules.tqfind(obj); + KDEDModule *oldModule = m_modules.find(obj); if (oldModule) return oldModule; @@ -374,7 +374,7 @@ void Kded::slotApplicationRemoved(const TQCString &appId) it.current()->removeAll(appId); } - TQValueList<long> *windowIds = m_windowIdList.tqfind(appId); + TQValueList<long> *windowIds = m_windowIdList.find(appId); if (windowIds) { for( TQValueList<long>::ConstIterator it = windowIds->begin(); @@ -428,7 +428,7 @@ void Kded::updateResourceList() it != dirs.end(); ++it ) { - if (m_allResourceDirs.tqfind(*it) == m_allResourceDirs.end()) + if (m_allResourceDirs.find(*it) == m_allResourceDirs.end()) { m_allResourceDirs.append(*it); readDirectory(*it); @@ -603,18 +603,18 @@ void Kded::readDirectory( const TQString& _path ) bool Kded::isWindowRegistered(long windowId) { - return m_globalWindowIdList.tqfind(windowId) != 0; + return m_globalWindowIdList.find(windowId) != 0; } // DCOP void Kded::registerWindowId(long windowId) { - m_globalWindowIdList.tqreplace(windowId, &windowId); + m_globalWindowIdList.replace(windowId, &windowId); TQCString sender = callingDcopClient()->senderId(); if( sender.isEmpty()) // local call sender = callingDcopClient()->appId(); - TQValueList<long> *windowIds = m_windowIdList.tqfind(sender); + TQValueList<long> *windowIds = m_windowIdList.find(sender); if (!windowIds) { windowIds = new TQValueList<long>; @@ -636,7 +636,7 @@ void Kded::unregisterWindowId(long windowId) TQCString sender = callingDcopClient()->senderId(); if( sender.isEmpty()) // local call sender = callingDcopClient()->appId(); - TQValueList<long> *windowIds = m_windowIdList.tqfind(sender); + TQValueList<long> *windowIds = m_windowIdList.find(sender); if (windowIds) { windowIds->remove(windowId); diff --git a/kded/kdedmodule.cpp b/kded/kdedmodule.cpp index 426ec21da..ca28a5c62 100644 --- a/kded/kdedmodule.cpp +++ b/kded/kdedmodule.cpp @@ -69,14 +69,14 @@ void KDEDModule::insert(const TQCString &app, const TQCString &key, KShared *obj // appKey acts as a placeholder KEntryKey appKey(app, 0); - d->objMap->tqreplace(appKey, 0); + d->objMap->replace(appKey, 0); KEntryKey indexKey(app, key); // Prevent deletion in case the same object is inserted again. KSharedPtr<KShared> _obj = obj; - d->objMap->tqreplace(indexKey, _obj); + d->objMap->replace(indexKey, _obj); resetIdle(); } diff --git a/kded/khostname.cpp b/kded/khostname.cpp index 4965ae684..9b57e5362 100644 --- a/kded/khostname.cpp +++ b/kded/khostname.cpp @@ -82,7 +82,7 @@ KHostName::KHostName() display = ::getenv("DISPLAY"); // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); if (display.isEmpty()) { fprintf(stderr, "%s", i18n("Error: DISPLAY environment variable not set.\n").local8Bit().data()); @@ -145,14 +145,14 @@ void KHostName::changeX() TQCString authName = entries[1]; TQCString authKey = entries[2]; - int i = netId.tqfindRev(':'); + int i = netId.findRev(':'); if (i == -1) continue; TQCString netDisplay = netId.mid(i); if (netDisplay != display) continue; - i = netId.tqfind('/'); + i = netId.find('/'); if (i == -1) continue; @@ -208,7 +208,7 @@ void KHostName::changeDcop() if (!newName.isEmpty()) { - int i = line1.tqfindRev(':'); + int i = line1.findRev(':'); if (i == -1) { fprintf(stderr, "Warning: File '%s' has unexpected format.\n", fname.data()); @@ -340,7 +340,7 @@ void KHostName::changeSessionManager() fprintf(stderr, "Warning: No session management specified.\n"); return; } - int i = sm.tqfindRev(':'); + int i = sm.findRev(':'); if ((i == -1) || (sm.left(6) != "local/")) { fprintf(stderr, "Warning: Session Management socket '%s' has unexpected format.\n", sm.data()); diff --git a/kded/vfolder_menu.cpp b/kded/vfolder_menu.cpp index ce938c7cb..b1c3a612a 100644 --- a/kded/vfolder_menu.cpp +++ b/kded/vfolder_menu.cpp @@ -39,7 +39,7 @@ static void foldNode(TQDomElement &docElem, TQDomElement &e, TQMap<TQString,TQDo { if (s.isEmpty()) s = e.text(); - TQMap<TQString,TQDomElement>::iterator it = dupeList.tqfind(s); + TQMap<TQString,TQDomElement>::iterator it = dupeList.find(s); if (it != dupeList.end()) { kdDebug(7021) << e.tagName() << " and " << s << " requires combining!" << endl; @@ -69,7 +69,7 @@ static void replaceNode(TQDomElement &docElem, TQDomNode &n, const TQStringList void VFolderMenu::registerFile(const TQString &file) { - int i = file.tqfindRev('/'); + int i = file.findRev('/'); if (i < 0) return; @@ -108,8 +108,8 @@ TQStringList VFolderMenu::allDirectories() static void track(const TQString &menuId, const TQString &menuName, TQDict<KService> *includeList, TQDict<KService> *excludeList, TQDict<KService> *itemList, const TQString &comment) { - if (itemList->tqfind(menuId)) - printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->tqfind(menuId) ? 1 : 0, excludeList->tqfind(menuId) ? 1 : 0); + if (itemList->find(menuId)) + printf("%s: %s INCL %d EXCL %d\n", menuName.latin1(), comment.latin1(), includeList->find(menuId) ? 1 : 0, excludeList->find(menuId) ? 1 : 0); } void @@ -117,7 +117,7 @@ VFolderMenu::includeItems(TQDict<KService> *items1, TQDict<KService> *items2) { for(TQDictIterator<KService> it(*items2); it.current(); ++it) { - items1->tqreplace(it.current()->menuId(), it.current()); + items1->replace(it.current()->menuId(), it.current()); } } @@ -128,7 +128,7 @@ VFolderMenu::matchItems(TQDict<KService> *items1, TQDict<KService> *items2) { TQString id = it.current()->menuId(); ++it; - if (!items2->tqfind(id)) + if (!items2->find(id)) items1->remove(id); } } @@ -145,7 +145,7 @@ VFolderMenu::excludeItems(TQDict<KService> *items1, TQDict<KService> *items2) VFolderMenu::SubMenu* VFolderMenu::takeSubMenu(SubMenu *parentMenu, const TQString &menuName) { - int i = menuName.tqfind('/'); + int i = menuName.find('/'); TQString s1 = i > 0 ? menuName.left(i) : menuName; TQString s2 = menuName.mid(i+1); @@ -231,7 +231,7 @@ VFolderMenu::mergeMenu(SubMenu *menu1, SubMenu *menu2, bool reversePriority) void VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMenu *newMenu, bool reversePriority) { - int i = menuName.tqfind('/'); + int i = menuName.find('/'); TQString s1 = menuName.left(i); TQString s2 = menuName.mid(i+1); @@ -271,12 +271,12 @@ VFolderMenu::insertSubMenu(SubMenu *parentMenu, const TQString &menuName, SubMen void VFolderMenu::insertService(SubMenu *parentMenu, const TQString &name, KService *newService) { - int i = name.tqfind('/'); + int i = name.find('/'); if (i == -1) { // Add it here - parentMenu->items.tqreplace(newService->menuId(), newService); + parentMenu->items.replace(newService->menuId(), newService); return; } @@ -324,7 +324,7 @@ VFolderMenu::~VFolderMenu() for(appsInfo *info = m_appsInfoStack.first(); \ info; info = m_appsInfoStack.next()) \ { \ - KService::List *list = info->dictCategories.tqfind(category); \ + KService::List *list = info->dictCategories.find(category); \ if (list) for(KService::List::ConstIterator it = list->begin(); \ it != list->end(); ++it) \ { @@ -336,7 +336,7 @@ VFolderMenu::findApplication(const TQString &relPath) for(appsInfo *info = m_appsInfoStack.first(); info; info = m_appsInfoStack.next()) { - KService *s = info->applications.tqfind(relPath); + KService *s = info->applications.find(relPath); if (s) return s; } @@ -347,7 +347,7 @@ void VFolderMenu::addApplication(const TQString &id, KService *service) { service->setMenuId(id); - m_appsInfo->applications.tqreplace(id, service); + m_appsInfo->applications.replace(id, service); } void @@ -364,7 +364,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly) KService *s = it.current(); TQDictIterator<KService> tmpIt = it; ++it; - if (unusedOnly && m_usedAppsDict.tqfind(s->menuId())) + if (unusedOnly && m_usedAppsDict.find(s->menuId())) { // Remove and skip this one info->applications.remove(tmpIt.currentKey()); @@ -376,7 +376,7 @@ VFolderMenu::buildApplicationIndex(bool unusedOnly) it2 != cats.end(); ++it2) { const TQString &cat = *it2; - KService::List *list = info->dictCategories.tqfind(cat); + KService::List *list = info->dictCategories.find(cat); if (!list) { list = new KService::List(); @@ -603,7 +603,7 @@ VFolderMenu::mergeMenus(TQDomElement &docElem, TQString &name) else if( e.tagName() == "Menu") { TQString name; mergeMenus(e, name); - TQMap<TQString,TQDomElement>::iterator it = menuNodes.tqfind(name); + TQMap<TQString,TQDomElement>::iterator it = menuNodes.find(name); if (it != menuNodes.end()) { TQDomElement docElem2 = *it; @@ -719,7 +719,7 @@ VFolderMenu::pushDocInfo(const TQString &fileName, const TQString &baseDir) return; } int i; - i = baseName.tqfindRev('/'); + i = baseName.findRev('/'); if (i > 0) { m_docInfo.baseDir = baseName.left(i+1); @@ -739,7 +739,7 @@ VFolderMenu::pushDocInfoParent(const TQString &basePath, const TQString &baseDir m_docInfo.baseDir = baseDir; - TQString fileName = basePath.mid(basePath.tqfindRev('/')+1); + TQString fileName = basePath.mid(basePath.findRev('/')+1); m_docInfo.baseName = fileName.left( fileName.length() - 5 ); TQString baseName = TQDir::cleanDirPath(m_docInfo.baseDir + fileName); @@ -937,7 +937,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items) FOR_ALL_APPLICATIONS(it) { KService *s = it.current(); - items->tqreplace(s->menuId(), s); + items->replace(s->menuId(), s); } FOR_ALL_APPLICATIONS_END @@ -958,7 +958,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items) FOR_CATEGORY(domElem.text(), it) { KService *s = *it; - items->tqreplace(s->menuId(), s); + items->replace(s->menuId(), s); } FOR_CATEGORY_END } @@ -967,7 +967,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items) FOR_ALL_APPLICATIONS(it) { KService *s = it.current(); - items->tqreplace(s->menuId(), s); + items->replace(s->menuId(), s); } FOR_ALL_APPLICATIONS_END } @@ -977,7 +977,7 @@ VFolderMenu::processCondition(TQDomElement &domElem, TQDict<KService> *items) kdDebug(7021) << "Adding file " << filename << endl; KService *s = findApplication(filename); if (s) - items->tqreplace(filename, s); + items->replace(filename, s); } } @@ -1071,7 +1071,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl; { TQString id = name; // Strip path from id - int i = id.tqfindRev('/'); + int i = id.findRev('/'); if (i >= 0) id = id.mid(i+1); @@ -1079,7 +1079,7 @@ kdDebug(7021) << "processKDELegacyDirs()" << endl; // TODO: add Legacy category addApplication(id, service); - items.tqreplace(service->menuId(), service); + items.replace(service->menuId(), service); if (service->categories().isEmpty()) insertService(m_currentMenu, name, service); @@ -1144,10 +1144,10 @@ kdDebug(7021) << "processLegacyDir(" << dir << ", " << relDir << ", " << prefix // TODO: Add legacy category addApplication(id, service); - items.tqreplace(service->menuId(), service); + items.replace(service->menuId(), service); if (service->categories().isEmpty()) - m_currentMenu->items.tqreplace(id, service); + m_currentMenu->items.replace(id, service); } } } @@ -1305,7 +1305,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl; processKDELegacyDirs(); - m_legacyNodes.tqreplace("<KDE>", m_currentMenu); + m_legacyNodes.replace("<KDE>", m_currentMenu); m_currentMenu = oldMenu; kdeLegacyDirsDone = true; @@ -1318,7 +1318,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for <KDE>" << endl; TQString prefix = e.attributes().namedItem("prefix").toAttr().value(); - if (m_defaultLegacyDirs.tqcontains(dir)) + if (m_defaultLegacyDirs.contains(dir)) { if (!kdeLegacyDirsDone) { @@ -1328,7 +1328,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; processKDELegacyDirs(); - m_legacyNodes.tqreplace("<KDE>", m_currentMenu); + m_legacyNodes.replace("<KDE>", m_currentMenu); m_currentMenu = oldMenu; kdeLegacyDirsDone = true; @@ -1343,7 +1343,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; processLegacyDir(dir, TQString::null, prefix); - m_legacyNodes.tqreplace(dir, m_currentMenu); + m_legacyNodes.replace(dir, m_currentMenu); m_currentMenu = oldMenu; } } @@ -1421,7 +1421,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; { // Add legacy nodes to Menu structure TQString dir = absoluteDir(e.text(), e.attribute("__BaseDir")); - SubMenu *legacyMenu = m_legacyNodes.tqfind(dir); + SubMenu *legacyMenu = m_legacyNodes.find(dir); if (legacyMenu) { mergeMenu(m_currentMenu, legacyMenu); @@ -1432,7 +1432,7 @@ kdDebug(7021) << "Processing KDE Legacy dirs for " << dir << endl; { // Add legacy nodes to Menu structure TQString dir = "<KDE>"; - SubMenu *legacyMenu = m_legacyNodes.tqfind(dir); + SubMenu *legacyMenu = m_legacyNodes.find(dir); if (legacyMenu) { mergeMenu(m_currentMenu, legacyMenu); @@ -1618,7 +1618,7 @@ VFolderMenu::markUsedApplications(TQDict<KService> *items) { for(TQDictIterator<KService> it(*items); it.current(); ++it) { - m_usedAppsDict.tqreplace(it.current()->menuId(), it.current()); + m_usedAppsDict.replace(it.current()->menuId(), it.current()); } } diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp index 7c0f9ada7..473a61e43 100644 --- a/kdefx/kstyle.cpp +++ b/kdefx/kstyle.cpp @@ -118,7 +118,7 @@ namespace static bool useDropShadow(TQWidget* w) { return w && w->tqmetaObject() && - w->tqmetaObject()->tqfindProperty("KStyleMenuDropShadow") != -1; + w->tqmetaObject()->findProperty("KStyleMenuDropShadow") != -1; } } @@ -2081,7 +2081,7 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p) void TransparencyHandler::removeShadowWindows(const TQWidget* p) { #ifdef Q_WS_X11 - ShadowMap::iterator it = shadowMap().tqfind(p); + ShadowMap::iterator it = shadowMap().find(p); if (it != shadowMap().end()) { ShadowElements se = it.data(); @@ -2144,7 +2144,7 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) // * TODO : determine real cause for duplicate events // * till 20021005 if ((dropShadow || useDropShadow(p)) - && p->width() > 16 && p->height() > 16 && !shadowMap().tqcontains( p )) + && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p )) createShadowWindows(p); } else if (et == TQEvent::Resize && p->isShown() && p->isTopLevel()) diff --git a/kdeprint/cups/cupsaddsmb2.cpp b/kdeprint/cups/cupsaddsmb2.cpp index 2737cfd71..f12653cbb 100644 --- a/kdeprint/cups/cupsaddsmb2.cpp +++ b/kdeprint/cups/cupsaddsmb2.cpp @@ -231,7 +231,7 @@ void CupsAddSmb::checkActionStatus() m_status = (m_buffer.count() == 0); break; case MkDir: - m_status = (m_buffer.count() == 1 || m_buffer[1].tqfind("ERRfilexists") != -1); + m_status = (m_buffer.count() == 1 || m_buffer[1].find("ERRfilexists") != -1); break; case AddDriver: case AddPrinter: diff --git a/kdeprint/cups/cupsdconf2/addressdialog.cpp b/kdeprint/cups/cupsdconf2/addressdialog.cpp index 325d3c7d5..7e4f1bdd9 100644 --- a/kdeprint/cups/cupsdconf2/addressdialog.cpp +++ b/kdeprint/cups/cupsdconf2/addressdialog.cpp @@ -76,7 +76,7 @@ TQString AddressDialog::newAddress(TQWidget *parent) TQString AddressDialog::editAddress(const TQString& addr, TQWidget *parent) { AddressDialog dlg(parent); - int p = addr.tqfind(' '); + int p = addr.find(' '); if (p != -1) { dlg.type_->setCurrentItem(addr.left(p).lower() == "deny" ? 1 : 0); diff --git a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp index edd55d30e..5ae671092 100644 --- a/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdbrowsingpage.cpp @@ -127,8 +127,8 @@ bool CupsdBrowsingPage::loadConfig(CupsdConf *conf, TQString&) { conf_ = conf; browsing_->setChecked(conf_->browsing_); - cups_->setChecked(conf_->browseprotocols_.tqfindIndex("CUPS") != -1); - slp_->setChecked(conf_->browseprotocols_.tqfindIndex("SLP") != -1); + cups_->setChecked(conf_->browseprotocols_.findIndex("CUPS") != -1); + slp_->setChecked(conf_->browseprotocols_.findIndex("SLP") != -1); browseport_->setValue(conf_->browseport_); browseinterval_->setValue(conf_->browseinterval_); browsetimeout_->setValue(conf_->browsetimeout_); diff --git a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp index 4813f504d..0e761378c 100644 --- a/kdeprint/cups/cupsdconf2/cupsdcomment.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdcomment.cpp @@ -92,7 +92,7 @@ TQString CupsdComment::comment(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.tqfind(key); + Comment *comm = comments_.find(key); if (comm) return comm->comment(); } @@ -103,7 +103,7 @@ TQString CupsdComment::toolTip(const TQString& key) { if (comments_.count() != 0 || loadComments()) { - Comment *comm = comments_.tqfind(key); + Comment *comm = comments_.find(key); if (comm) return comm->toolTip(); } diff --git a/kdeprint/cups/cupsdconf2/cupsdconf.cpp b/kdeprint/cups/cupsdconf2/cupsdconf.cpp index 72e76edca..78ec9ec78 100644 --- a/kdeprint/cups/cupsdconf2/cupsdconf.cpp +++ b/kdeprint/cups/cupsdconf2/cupsdconf.cpp @@ -42,7 +42,7 @@ TQString findDir(const TQStringList& list) void splitSizeSpec(const TQString& s, int& sz, int& suff) { - int p = s.tqfind(TQRegExp("\\D")); + int p = s.find(TQRegExp("\\D")); sz = s.mid(0, p).toInt(); if (p != -1) { @@ -484,7 +484,7 @@ bool CupsdConf::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.tqfind(' ')) != -1) + if ((p=l.find(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -508,7 +508,7 @@ bool CupsdConf::parseOption(const TQString& line) { browseprotocols_.clear(); TQStringList prots = TQStringList::split(TQRegExp("\\s"), value, false); - if (prots.tqfind("all") != prots.end()) + if (prots.find("all") != prots.end()) browseprotocols_ << "CUPS" << "SLP"; else for (TQStringList::ConstIterator it=prots.begin(); it!=prots.end(); ++it) @@ -718,7 +718,7 @@ CupsLocation::CupsLocation(const CupsLocation& loc) bool CupsLocation::parseResource(const TQString& line) { TQString str = line.simplifyWhiteSpace(); - int p1 = line.tqfind(' '), p2 = line.tqfind('>'); + int p1 = line.find(' '), p2 = line.find('>'); if (p1 != -1 && p2 != -1) { resourcename_ = str.mid(p1+1,p2-p1-1); @@ -732,7 +732,7 @@ bool CupsLocation::parseOption(const TQString& line) int p(-1); TQString keyword, value, l(line.simplifyWhiteSpace()); - if ((p=l.tqfind(' ')) != -1) + if ((p=l.find(' ')) != -1) { keyword = l.left(p).lower(); value = l.mid(p+1); @@ -760,7 +760,7 @@ bool CupsLocation::parseOption(const TQString& line) else if (keyword == "authgroupname") authname_ = value; else if (keyword == "require") { - int p = value.tqfind(' '); + int p = value.find(' '); if (p != -1) { authname_ = value.mid(p+1); @@ -810,8 +810,8 @@ int CupsResource::typeFromText(const TQString& text) { if (text == i18n("Base", "Root") || text == i18n("All printers") || text == i18n("All classes") || text == i18n("Print jobs")) return RESOURCE_GLOBAL; else if (text == i18n("Administration")) return RESOURCE_ADMIN; - else if (text.tqfind(i18n("Class")) == 0) return RESOURCE_CLASS; - else if (text.tqfind(i18n("Printer")) == 0) return RESOURCE_PRINTER; + else if (text.find(i18n("Class")) == 0) return RESOURCE_CLASS; + else if (text.find(i18n("Printer")) == 0) return RESOURCE_PRINTER; else return RESOURCE_PRINTER; } @@ -832,12 +832,12 @@ TQString CupsResource::textToPath(const TQString& text) else if (text == i18n("All classes")) path = "/classes"; else if (text == i18n("Print jobs")) path = "/jobs"; else if (text == i18n("Base", "Root")) path = "/"; - else if (text.tqfind(i18n("Printer")) == 0) + else if (text.find(i18n("Printer")) == 0) { path = "/printers/"; path.append(text.right(text.length()-i18n("Printer").length()-1)); } - else if (text.tqfind(i18n("Class")) == 0) + else if (text.find(i18n("Class")) == 0) { path = "/classes/"; path.append(text.right(text.length()-i18n("Class").length()-1)); @@ -853,13 +853,13 @@ TQString CupsResource::pathToText(const TQString& path) else if (path == "/classes") text = i18n("All classes"); else if (path == "/") text = i18n("Root"); else if (path == "/jobs") text = i18n("Print jobs"); - else if (path.tqfind("/printers/") == 0) + else if (path.find("/printers/") == 0) { text = i18n("Printer"); text.append(" "); text.append(path.right(path.length()-10)); } - else if (path.tqfind("/classes/") == 0) + else if (path.find("/classes/") == 0) { text = i18n("Class"); text.append(" "); diff --git a/kdeprint/cups/cupsdconf2/cupsddialog.cpp b/kdeprint/cups/cupsdconf2/cupsddialog.cpp index 8dfa9c41a..fb59986c5 100644 --- a/kdeprint/cups/cupsdconf2/cupsddialog.cpp +++ b/kdeprint/cups/cupsdconf2/cupsddialog.cpp @@ -337,7 +337,7 @@ int CupsdDialog::serverOwner() while (!t.eof()) { str = t.readLine(); - if (str.tqfind("Uid:",0,false) == 0) + if (str.find("Uid:",0,false) == 0) { TQStringList list = TQStringList::split('\t', str, false); if (list.count() >= 2) diff --git a/kdeprint/cups/cupsdconf2/editlist.cpp b/kdeprint/cups/cupsdconf2/editlist.cpp index d0420be32..9acbb23a2 100644 --- a/kdeprint/cups/cupsdconf2/editlist.cpp +++ b/kdeprint/cups/cupsdconf2/editlist.cpp @@ -81,7 +81,7 @@ void EditList::setText(int index, const TQString& s) { if (list_->text(index) != s) { - TQListBoxItem *it = list_->tqfindItem(s, TQt::ExactMatch); + TQListBoxItem *it = list_->findItem(s, TQt::ExactMatch); if (!it) list_->changeItem(s, index); else @@ -97,13 +97,13 @@ void EditList::clear() void EditList::insertItem(const TQString& s) { - if (!list_->tqfindItem(s, TQt::ExactMatch)) + if (!list_->findItem(s, TQt::ExactMatch)) list_->insertItem(s); } void EditList::insertItem(const TQPixmap& icon, const TQString& s) { - if (!list_->tqfindItem(s, TQt::ExactMatch)) + if (!list_->findItem(s, TQt::ExactMatch)) list_->insertItem(icon, s); } diff --git a/kdeprint/cups/cupsdconf2/locationdialog.cpp b/kdeprint/cups/cupsdconf2/locationdialog.cpp index a4d550d0e..416efa249 100644 --- a/kdeprint/cups/cupsdconf2/locationdialog.cpp +++ b/kdeprint/cups/cupsdconf2/locationdialog.cpp @@ -141,7 +141,7 @@ void LocationDialog::fillLocation(CupsLocation *loc) void LocationDialog::setLocation(CupsLocation *loc) { - int index = conf_->resources_.tqfindRef(loc->resource_); + int index = conf_->resources_.findRef(loc->resource_); resource_->setCurrentItem(index); authtype_->setCurrentItem(loc->authtype_); authclass_->setCurrentItem(loc->authclass_); diff --git a/kdeprint/cups/cupsdconf2/portdialog.cpp b/kdeprint/cups/cupsdconf2/portdialog.cpp index d3dd2f0a5..18f27db5b 100644 --- a/kdeprint/cups/cupsdconf2/portdialog.cpp +++ b/kdeprint/cups/cupsdconf2/portdialog.cpp @@ -93,12 +93,12 @@ TQString PortDialog::editListen(const TQString& s, TQWidget *parent, CupsdConf * { PortDialog dlg(parent); dlg.setInfos(conf); - int p = s.tqfind(' '); + int p = s.find(' '); if (p != -1) { dlg.usessl_->setChecked(s.left(p).startsWith("SSL")); TQString addr = s.mid(p+1).stripWhiteSpace(); - int p1 = addr.tqfind(':'); + int p1 = addr.find(':'); if (p1 == -1) { dlg.address_->setText(addr); diff --git a/kdeprint/cups/cupsdconf2/sizewidget.cpp b/kdeprint/cups/cupsdconf2/sizewidget.cpp index 5920c30a9..d77fe5aaa 100644 --- a/kdeprint/cups/cupsdconf2/sizewidget.cpp +++ b/kdeprint/cups/cupsdconf2/sizewidget.cpp @@ -45,7 +45,7 @@ SizeWidget::SizeWidget( TQWidget *parent, const char *name ) void SizeWidget::setSizeString( const TQString& sz ) { - int p = sz.tqfind( TQRegExp( "\\D" ) ); + int p = sz.find( TQRegExp( "\\D" ) ); m_size->setValue( sz.left( p ).toInt() ); switch( sz[ p ].latin1() ) { diff --git a/kdeprint/cups/kcupsprinterimpl.cpp b/kdeprint/cups/kcupsprinterimpl.cpp index 132ddc136..4bcf96e6e 100644 --- a/kdeprint/cups/kcupsprinterimpl.cpp +++ b/kdeprint/cups/kcupsprinterimpl.cpp @@ -37,9 +37,9 @@ TQSize rangeToSize(const TQString& s) int p(-1); int from, to; - if ((p=range.tqfind(',')) != -1) + if ((p=range.find(',')) != -1) range.truncate(p); - if ((p=range.tqfind('-')) != -1) + if ((p=range.find('-')) != -1) { from = range.left(p).toInt(); to = range.right(range.length()-p-1).toInt(); diff --git a/kdeprint/cups/kmcupsjobmanager.cpp b/kdeprint/cups/kmcupsjobmanager.cpp index 76bf2202f..1daa22b42 100644 --- a/kdeprint/cups/kmcupsjobmanager.cpp +++ b/kdeprint/cups/kmcupsjobmanager.cpp @@ -212,7 +212,7 @@ void KMCupsJobManager::parseListAnswer(IppRequest& req, KMPrinter *pr) else if (name == "job-printer-uri" && !pr->isRemote()) { TQString str(attr->values[0].string.text); - int p = str.tqfindRev('/'); + int p = str.findRev('/'); if (p != -1) job->setPrinter(str.mid(p+1)); } @@ -356,7 +356,7 @@ static TQString processRange(const TQString& range) for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { s.append(*it); - if ((*it).tqfind('-') == -1) + if ((*it).find('-') == -1) s.append("-").append(*it); s.append(","); } @@ -387,15 +387,15 @@ bool KMCupsJobManager::editJobAttributes(KMJob *j) TQMap<TQString,TQString> opts = req.toMap(IPP_TAG_JOB); // translate the "Copies" option to non-CUPS syntax - if (opts.tqcontains("copies")) + if (opts.contains("copies")) opts["kde-copies"] = opts["copies"]; - if (opts.tqcontains("page-set")) + if (opts.contains("page-set")) opts["kde-pageset"] = (opts["page-set"] == "even" ? "2" : (opts["page-set"] == "odd" ? "1" : "0")); - if (opts.tqcontains("OutputOrder")) + if (opts.contains("OutputOrder")) opts["kde-pageorder"] = opts["OutputOrder"]; - if (opts.tqcontains("multiple-document-handling")) + if (opts.contains("multiple-document-handling")) opts["kde-collate"] = (opts["multiple-document-handling"] == "separate-documents-collated-copies" ? "Collate" : "Uncollate"); - if (opts.tqcontains("page-ranges")) + if (opts.contains("page-ranges")) opts["kde-range"] = opts["page-ranges"]; // find printer and construct dialog diff --git a/kdeprint/cups/kmcupsmanager.cpp b/kdeprint/cups/kmcupsmanager.cpp index 42ca37cf9..6dd1f32d5 100644 --- a/kdeprint/cups/kmcupsmanager.cpp +++ b/kdeprint/cups/kmcupsmanager.cpp @@ -655,10 +655,10 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) if (line.startsWith("*% COMDATA #")) { int p(-1), q(-1); - if ((p=line.tqfind("'name'")) != -1) + if ((p=line.find("'name'")) != -1) { - p = line.tqfind('\'',p+6)+1; - q = line.tqfind('\'',p); + p = line.find('\'',p+6)+1; + q = line.find('\'',p); keyword = line.mid(p,q-p); opt = driver->findOption(keyword); if (opt && (opt->type() == DrBase::Integer || opt->type() == DrBase::Float)) @@ -666,19 +666,19 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) else isnumeric = false; } - /*else if ((p=line.tqfind("'type'")) != -1) + /*else if ((p=line.find("'type'")) != -1) { - p = line.tqfind('\'',p+6)+1; - if (line.tqfind("float",p) != -1 || line.tqfind("int",p) != -1) + p = line.find('\'',p+6)+1; + if (line.find("float",p) != -1 || line.find("int",p) != -1) isnumeric = true; else isnumeric = false; }*/ - else if ((p=line.tqfind("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) + else if ((p=line.find("'default'")) != -1 && !keyword.isEmpty() && opt && isnumeric) { TQString prefix = line.left(p+9); tout << prefix << " => '" << opt->valueText() << '\''; - if (line.tqfind(',',p) != -1) + if (line.find(',',p) != -1) tout << ','; tout << endl; continue; @@ -687,7 +687,7 @@ void KMCupsManager::saveDriverFile(DrMain *driver, const TQString& filename) } else if (line.startsWith("*Default")) { - int p = line.tqfind(':',8); + int p = line.find(':',8); keyword = line.mid(8,p-8); DrBase *bopt = 0; if ( keyword == "PageRegion" || keyword == "ImageableArea" || keyword == "PaperDimension" ) diff --git a/kdeprint/cups/kmwbanners.cpp b/kdeprint/cups/kmwbanners.cpp index 72964c697..9e930ac0e 100644 --- a/kdeprint/cups/kmwbanners.cpp +++ b/kdeprint/cups/kmwbanners.cpp @@ -70,7 +70,7 @@ TQString mapBanner( const TQString& ban ) if ( map.size() == 0 ) for ( int i=0; bannermap[ i ].banner; i++ ) map[ bannermap[ i ].banner ] = bannermap[ i ].name; - TQMap<TQString,TQString>::ConstIterator it = map.tqfind( ban ); + TQMap<TQString,TQString>::ConstIterator it = map.find( ban ); if ( it == map.end() ) return ban; else @@ -120,7 +120,7 @@ void KMWBanners::initPrinter(KMPrinter *p) m_bans = TQStringList::split(',',p->option("kde-banners-supported"),false); if (m_bans.count() == 0) m_bans = defaultBanners(); - if (m_bans.tqfind("none") == m_bans.end()) + if (m_bans.find("none") == m_bans.end()) m_bans.prepend("none"); for ( TQStringList::Iterator it=m_bans.begin(); it!=m_bans.end(); ++it ) { @@ -131,8 +131,8 @@ void KMWBanners::initPrinter(KMPrinter *p) TQStringList l = TQStringList::split(',',p->option("kde-banners"),false); while (l.count() < 2) l.append("none"); - m_start->setCurrentItem(m_bans.tqfindIndex(l[0])); - m_end->setCurrentItem(m_bans.tqfindIndex(l[1])); + m_start->setCurrentItem(m_bans.findIndex(l[0])); + m_end->setCurrentItem(m_bans.findIndex(l[1])); } } diff --git a/kdeprint/cups/kmwother.cpp b/kdeprint/cups/kmwother.cpp index 947b884d1..68a6c4532 100644 --- a/kdeprint/cups/kmwother.cpp +++ b/kdeprint/cups/kmwother.cpp @@ -89,7 +89,7 @@ void KMWOther::initPrinter(KMPrinter *p) TQString prt = *( ++it ); if ( !prt.isEmpty() ) desc.append( " [" + prt + "]" ); - TQListViewItem *parent = parents.tqfind( cl ); + TQListViewItem *parent = parents.find( cl ); if ( !parent ) { parent = new TQListViewItem( root, lastparent, cl ); @@ -105,7 +105,7 @@ void KMWOther::initPrinter(KMPrinter *p) lastparent = parent; parents.insert( cl, parent ); } - item = new TQListViewItem( parent, last.tqfind( cl ), desc, uri); + item = new TQListViewItem( parent, last.find( cl ), desc, uri); last.insert( cl, item ); } } diff --git a/kdeprint/cups/kphpgl2page.cpp b/kdeprint/cups/kphpgl2page.cpp index 94816af1a..0d15a838d 100644 --- a/kdeprint/cups/kphpgl2page.cpp +++ b/kdeprint/cups/kphpgl2page.cpp @@ -142,9 +142,9 @@ KPHpgl2Page::~KPHpgl2Page() void KPHpgl2Page::setOptions(const TQMap<TQString,TQString>& opts) { TQString value; - if (opts.tqcontains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true")) + if (opts.contains("blackplot") && ((value=opts["blackplot"]).isEmpty() || value == "true")) m_blackplot->setChecked(true); - if (opts.tqcontains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true")) + if (opts.contains("fitplot") && ((value=opts["fitplot"]).isEmpty() || value == "true")) m_fitplot->setChecked(true); if (!(value=opts["penwidth"]).isEmpty()) m_penwidth->setValue(value.toInt()); diff --git a/kdeprint/cups/kptagspage.cpp b/kdeprint/cups/kptagspage.cpp index d9f5a0686..0e2d93ea3 100644 --- a/kdeprint/cups/kptagspage.cpp +++ b/kdeprint/cups/kptagspage.cpp @@ -110,7 +110,7 @@ bool KPTagsPage::isValid(TQString& msg) TQString tag(m_tags->text(r, 0)); if (tag.isEmpty()) continue; - else if (tag.tqfind(re) != -1) + else if (tag.find(re) != -1) { msg = i18n("The tag name must not contain any spaces, tabs or quotes: <b>%1</b>.").arg(tag); return false; diff --git a/kdeprint/cups/kptextpage.cpp b/kdeprint/cups/kptextpage.cpp index 25cfb888d..cec0f6c23 100644 --- a/kdeprint/cups/kptextpage.cpp +++ b/kdeprint/cups/kptextpage.cpp @@ -261,7 +261,7 @@ void KPTextPage::setOptions(const TQMap<TQString,TQString>& opts) if (!(value=opts["columns"]).isEmpty()) m_columns->setValue(value.toInt()); int ID(0); - if (opts.tqcontains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true")) + if (opts.contains("prettyprint") && (opts["prettyprint"].isEmpty() || opts["prettyprint"] == "true")) ID = 1; m_prettyprint->setButton(ID); slotPrettyChanged(ID); diff --git a/kdeprint/driver.cpp b/kdeprint/driver.cpp index 241dd0b10..26423a858 100644 --- a/kdeprint/driver.cpp +++ b/kdeprint/driver.cpp @@ -61,7 +61,7 @@ DriverItem* DrBase::createItem(DriverItem *parent, DriverItem *after) void DrBase::setOptions(const TQMap<TQString,TQString>& opts) { - if (opts.tqcontains(name())) setValueText(opts[name()]); + if (opts.contains(name())) setValueText(opts[name()]); } void DrBase::getOptions(TQMap<TQString,TQString>& opts, bool incldef) @@ -224,7 +224,7 @@ void DrGroup::addObject(DrBase *optgrp) void DrGroup::removeOption(const TQString& name) { - DrBase *opt = m_options.tqfind(name); + DrBase *opt = m_options.find(name); if (opt) { m_listoptions.removeRef(opt); @@ -264,7 +264,7 @@ void DrGroup::createTree(DriverItem *parent) DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup) { - DrBase *opt = m_options.tqfind(name); + DrBase *opt = m_options.find(name); if (!opt) { TQPtrListIterator<DrGroup> it(m_subgroups); @@ -278,7 +278,7 @@ DrBase* DrGroup::findOption(const TQString& name, DrGroup **parentGroup) DrGroup* DrGroup::findGroup(DrGroup *grp, DrGroup ** parentGroup) { - DrGroup *group = (m_subgroups.tqfindRef(grp) == -1 ? 0 : grp); + DrGroup *group = (m_subgroups.findRef(grp) == -1 ? 0 : grp); if (!group) { TQPtrListIterator<DrGroup> it(m_subgroups); diff --git a/kdeprint/driver.h b/kdeprint/driver.h index 0d08675af..a2ccab8a8 100644 --- a/kdeprint/driver.h +++ b/kdeprint/driver.h @@ -71,7 +71,7 @@ public: const TQString& get(const TQString& key) const { return m_map[key]; } void set(const TQString& key, const TQString& val) { m_map[key] = val; } - bool has(const TQString& key) const { return m_map.tqcontains(key); } + bool has(const TQString& key) const { return m_map.contains(key); } const TQString& name() const { return m_name; } void setName(const TQString& s) { m_name = s; } bool conflict() const { return m_conflict; } @@ -159,7 +159,7 @@ public: DriverItem* createTreeView(TQListView *parent); void addConstraint(DrConstraint *c) { m_constraints.append(c); } int checkConstraints(); - DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.tqfind(name); } + DrPageSize* findPageSize(const TQString& name) { return m_pagesizes.find(name); } void addPageSize(DrPageSize *sz); void removeOptionGlobally(const TQString& name); void removeGroupGlobally(DrGroup *grp); diff --git a/kdeprint/droptionview.cpp b/kdeprint/droptionview.cpp index 74d04bab9..f6ed93fff 100644 --- a/kdeprint/droptionview.cpp +++ b/kdeprint/droptionview.cpp @@ -219,7 +219,7 @@ void OptionListView::setOption(DrBase *opt) void OptionListView::setValue(const TQString& val) { - m_list->setCurrentItem(m_choices.tqfindIndex(val)); + m_list->setCurrentItem(m_choices.findIndex(val)); } void OptionListView::slotSelectionChanged() @@ -265,7 +265,7 @@ void OptionBooleanView::setOption(DrBase *opt) void OptionBooleanView::setValue(const TQString& val) { - int ID = m_choices.tqfindIndex(val); + int ID = m_choices.findIndex(val); m_group->setButton(ID); } diff --git a/kdeprint/foomatic/kmfoomaticmanager.cpp b/kdeprint/foomatic/kmfoomaticmanager.cpp index 76ca31a4e..749bf160b 100644 --- a/kdeprint/foomatic/kmfoomaticmanager.cpp +++ b/kdeprint/foomatic/kmfoomaticmanager.cpp @@ -97,10 +97,10 @@ KMPrinter* KMFoomaticManager::createPrinterFromElement(TQDomElement *elem) printer->setName(e.text()); printer->setPrinterName(e.text()); printer->setState(KMPrinter::Idle); - /*if (printer->name().tqfind('/') != -1) + /*if (printer->name().find('/') != -1) { QString s(printer->name()); - int p = s.tqfind('/'); + int p = s.find('/'); printer->setPrinterName(s.left(p)); printer->setInstanceName(s.mid(p+1)); printer->addType(KMPrinter::Virtual); diff --git a/kdeprint/foomatic2loader.cpp b/kdeprint/foomatic2loader.cpp index a258a8e4e..d2fb5b17d 100644 --- a/kdeprint/foomatic2loader.cpp +++ b/kdeprint/foomatic2loader.cpp @@ -141,7 +141,7 @@ DrMain* Foomatic2Loader::buildDriver() const if ( m_foodata.isEmpty() ) return NULL; - TQVariant v = m_foodata.tqfind( "VAR" ).data(); + TQVariant v = m_foodata.find( "VAR" ).data(); if ( !v.isNull() && v.type() == TQVariant::Map ) { DrMain *driver = new DrMain; @@ -151,8 +151,8 @@ DrMain* Foomatic2Loader::buildDriver() const driver->set( "matic_printer", v.mapFind( "id" ).data().toString() ); driver->set( "matic_driver", v.mapFind( "driver" ).data().toString() ); driver->set( "text", TQString( "%1 %2 (%3)" ).arg( driver->get( "manufacturer" ) ).arg( driver->get( "model" ) ).arg( driver->get( "matic_driver" ) ) ); - if ( m_foodata.tqcontains( "POSTPIPE" ) ) - driver->set( "postpipe", m_foodata.tqfind( "POSTPIPE" ).data().toString() ); + if ( m_foodata.contains( "POSTPIPE" ) ) + driver->set( "postpipe", m_foodata.find( "POSTPIPE" ).data().toString() ); v = v.mapFind( "args" ).data(); if ( !v.isNull() && v.type() == TQVariant::List ) { @@ -166,7 +166,7 @@ DrMain* Foomatic2Loader::buildDriver() const { TQString group = DrGroup::groupForOption( opt->name() ); DrGroup *grp = NULL; - if ( !groups.tqcontains( group ) ) + if ( !groups.contains( group ) ) { grp = new DrGroup; grp->set( "text", group ); @@ -211,7 +211,7 @@ DrMain* Foomatic2Loader::modifyDriver( DrMain *driver ) const TQValueList<DrBase*> optList; DrGroup *grp = NULL; - TQVariant V = m_foodata.tqfind( "VAR" ).data(); + TQVariant V = m_foodata.find( "VAR" ).data(); if ( !V.isNull() && V.type() == TQVariant::Map ) { TQVariant v = V.mapFind( "args" ).data(); diff --git a/kdeprint/kdeprintd.cpp b/kdeprint/kdeprintd.cpp index e2a22e933..e607629cb 100644 --- a/kdeprint/kdeprintd.cpp +++ b/kdeprint/kdeprintd.cpp @@ -192,7 +192,7 @@ bool KDEPrintd::checkFiles(TQString& cmd, const TQStringList& files) void KDEPrintd::statusMessage(const TQString& msg, int pid, const TQString& appName) { - StatusWindow *w = m_windows.tqfind(pid); + StatusWindow *w = m_windows.find(pid); if (!w && !msg.isEmpty()) { w = new StatusWindow(pid); diff --git a/kdeprint/kmdbentry.cpp b/kdeprint/kmdbentry.cpp index 87bb76c6c..9402dd02c 100644 --- a/kdeprint/kmdbentry.cpp +++ b/kdeprint/kmdbentry.cpp @@ -43,13 +43,13 @@ bool KMDBEntry::validate(bool checkIt) // check manufacturer if (manufacturer.isEmpty()) { - int p = model.tqfind(' ',0); + int p = model.find(' ',0); if (p != -1) manufacturer = model.left(p); if (manufacturer.isEmpty()) return false; } // extract manufacturer from model - if (model.tqfind(manufacturer,0,false) == 0) + if (model.find(manufacturer,0,false) == 0) { model = model.right(model.length()-manufacturer.length()-1).stripWhiteSpace(); if (model.isEmpty()) return false; diff --git a/kdeprint/kmfactory.cpp b/kdeprint/kmfactory.cpp index bf0872986..5c31cf5a9 100644 --- a/kdeprint/kmfactory.cpp +++ b/kdeprint/kmfactory.cpp @@ -333,7 +333,7 @@ KMFactory::PluginInfo KMFactory::pluginInfo(const TQString& name) void KMFactory::registerObject(KPReloadObject *obj, bool priority) { // check if object already registered, then add it - if (m_objects.tqfindRef(obj) == -1) + if (m_objects.findRef(obj) == -1) { if (priority) m_objects.prepend(obj); diff --git a/kdeprint/kmjobmanager.cpp b/kdeprint/kmjobmanager.cpp index fcde4817f..3449e1bb2 100644 --- a/kdeprint/kmjobmanager.cpp +++ b/kdeprint/kmjobmanager.cpp @@ -214,7 +214,7 @@ void KMJobManager::validatePluginActions(KActionCollection*, const TQPtrList<KMJ void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bool isSpecial) { - struct JobFilter *jf = m_filter.tqfind(pr); + struct JobFilter *jf = m_filter.find(pr); if (!jf) { jf = new JobFilter; @@ -226,7 +226,7 @@ void KMJobManager::addPrinter(const TQString& pr, KMJobManager::JobType type, bo void KMJobManager::removePrinter(const TQString& pr, KMJobManager::JobType type) { - struct JobFilter *jf = m_filter.tqfind(pr); + struct JobFilter *jf = m_filter.find(pr); if (jf) { jf->m_type[type] = QMAX(0, jf->m_type[type]-1); diff --git a/kdeprint/kmmanager.cpp b/kdeprint/kmmanager.cpp index e63fd8e4f..53d988a49 100644 --- a/kdeprint/kmmanager.cpp +++ b/kdeprint/kmmanager.cpp @@ -458,7 +458,7 @@ bool KMManager::createSpecialPrinter(KMPrinter *p) bool KMManager::removeSpecialPrinter(KMPrinter *p) { - if (p && p->isSpecial() && m_printers.tqfindRef(p) != -1) + if (p && p->isSpecial() && m_printers.findRef(p) != -1) { m_printers.removeRef(p); return m_specialmgr->savePrinters(); diff --git a/kdeprint/kmprinter.cpp b/kdeprint/kmprinter.cpp index f08cf4109..5749a47c5 100644 --- a/kdeprint/kmprinter.cpp +++ b/kdeprint/kmprinter.cpp @@ -165,7 +165,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent) fName = ( printer->docName() + "." + ext ); else { - int p = fName.tqfindRev( '.' ); + int p = fName.findRev( '.' ); if ( p == -1 ) fName.append( "." ).append( ext ); else @@ -216,7 +216,7 @@ bool KMPrinter::autoConfigure(KPrinter *printer, TQWidget *parent) TQString KMPrinter::deviceProtocol() const { - int p = m_device.tqfind( ':' ); + int p = m_device.find( ':' ); if ( p != -1 ) return m_device.left( p ); else diff --git a/kdeprint/kmprinter.h b/kdeprint/kmprinter.h index 3872800ed..7f527fb23 100644 --- a/kdeprint/kmprinter.h +++ b/kdeprint/kmprinter.h @@ -147,7 +147,7 @@ public: void setOwnSoftDefault(bool on) { m_ownsoftdefault = on; } static int compare(KMPrinter *p1, KMPrinter *p2); const TQString& option(const TQString& key) const { return m_options[key]; } - bool hasOption(const TQString& key) const { return m_options.tqcontains(key); } + bool hasOption(const TQString& key) const { return m_options.contains(key); } void setOption(const TQString& key, const TQString& value) { if (!key.isEmpty()) m_options[key] = value; } void removeOption(const TQString& key) { m_options.remove(key); } TQMap<TQString,TQString> options() const { return m_options; } diff --git a/kdeprint/kmthreadjob.cpp b/kdeprint/kmthreadjob.cpp index 02c148d95..0fe277ee1 100644 --- a/kdeprint/kmthreadjob.cpp +++ b/kdeprint/kmthreadjob.cpp @@ -106,7 +106,7 @@ bool KMThreadJob::checkJob(int ID) KMJob* KMThreadJob::findJob(int ID) { - return m_jobs.tqfind(ID); + return m_jobs.find(ID); } KMJob* KMThreadJob::findJob(const TQString& uri) @@ -115,7 +115,7 @@ KMJob* KMThreadJob::findJob(const TQString& uri) { int pid = uri.mid(6).toInt(); if (pid > 0) - return m_jobs.tqfind(pid); + return m_jobs.find(pid); } return NULL; } @@ -150,7 +150,7 @@ void KMThreadJob::createJob(KMJob *job) if (job->id() > 0) { loadJobs(); - if (!m_jobs.tqfind(job->id())) + if (!m_jobs.find(job->id())) { m_jobs.insert(job->id(),job); saveJobs(); diff --git a/kdeprint/kpfilterpage.cpp b/kdeprint/kpfilterpage.cpp index 3b3bc6164..fcea863a2 100644 --- a/kdeprint/kpfilterpage.cpp +++ b/kdeprint/kpfilterpage.cpp @@ -295,7 +295,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) TQDictIterator<KXmlCommand> dit(m_activefilters); for (;dit.current();) { - if (filters.tqfind(dit.currentKey()) == filters.end()) + if (filters.find(dit.currentKey()) == filters.end()) m_activefilters.remove(dit.currentKey()); else { @@ -309,7 +309,7 @@ void KPFilterPage::setOptions(const TQMap<TQString,TQString>& opts) for (TQStringList::ConstIterator sit=filters.begin(); sit!=filters.end(); ++sit) { KXmlCommand *f(0); - if ((f=m_activefilters.tqfind(*sit)) == 0) + if ((f=m_activefilters.find(*sit)) == 0) { f = KXmlCommandManager::self()->loadCommand(*sit); if (f) @@ -329,7 +329,7 @@ void KPFilterPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) TQStringList filters = activeList(); for (TQStringList::ConstIterator it=filters.begin(); it!=filters.end(); ++it) { - KXmlCommand *f = m_activefilters.tqfind(*it); + KXmlCommand *f = m_activefilters.find(*it); if (f) f->getOptions(opts, incldef); } @@ -355,7 +355,7 @@ KXmlCommand* KPFilterPage::currentFilter() { KXmlCommand *filter(0); if (m_view->selectedItem()) - filter = m_activefilters.tqfind(m_view->selectedItem()->text(1)); + filter = m_activefilters.find(m_view->selectedItem()->text(1)); return filter; } @@ -367,10 +367,10 @@ void KPFilterPage::checkFilterChain() while (item) { item->setPixmap(0, (ok ? SmallIcon("filter") : SmallIcon("filterstop"))); - KXmlCommand *f1 = m_activefilters.tqfind(item->text(1)); + KXmlCommand *f1 = m_activefilters.find(item->text(1)); if (f1 && item->nextSibling()) { - KXmlCommand *f2 = m_activefilters.tqfind(item->nextSibling()->text(1)); + KXmlCommand *f2 = m_activefilters.find(item->nextSibling()->text(1)); if (f2) { if (!f2->acceptMimeType(f1->mimeType())) diff --git a/kdeprint/kpposterpage.cpp b/kdeprint/kpposterpage.cpp index eef927f11..1fa7a23b5 100644 --- a/kdeprint/kpposterpage.cpp +++ b/kdeprint/kpposterpage.cpp @@ -265,7 +265,7 @@ void KPPosterPage::setOptions( const TQMap<TQString,TQString>& opts ) m_mediasize->setText( ps ); m_preview->setMediaSize( ps ); - if ( opts[ "_kde-filters" ].tqfind( "poster" ) != -1 ) + if ( opts[ "_kde-filters" ].find( "poster" ) != -1 ) { m_postercheck->setChecked( true ); ps = opts[ "_kde-poster-size" ]; @@ -302,7 +302,7 @@ void KPPosterPage::getOptions( TQMap<TQString,TQString>& opts, bool ) } else { - if ( !o.tqcontains( "poster" ) ) + if ( !o.contains( "poster" ) ) o.append( "poster" ); opts[ "_kde-filters" ] = o.join( "," ); opts[ "_kde-poster-media" ] = m_mediasize->text(); diff --git a/kdeprint/kpqtpage.cpp b/kdeprint/kpqtpage.cpp index 4c1a67f38..4bf107389 100644 --- a/kdeprint/kpqtpage.cpp +++ b/kdeprint/kpqtpage.cpp @@ -262,15 +262,15 @@ void KPQtPage::setOptions(const TQMap<TQString,TQString>& opts) DrListOption *opt = static_cast<DrListOption*>(driver()->findOption("PageSize")); DrBase *ch = opt->findChoice(val); if (ch) - m_pagesize->setCurrentItem(opt->choices()->tqfindRef(ch)); + m_pagesize->setCurrentItem(opt->choices()->findRef(ch)); } } else if (!opts["kde-pagesize"].isEmpty()) m_pagesize->setCurrentItem(findIndex(opts["kde-pagesize"].toInt())); ID = NUP_1; - if (opts["_kde-filters"].tqfind("psnup") != -1) + if (opts["_kde-filters"].find("psnup") != -1) { - if (opts.tqcontains("_kde-psnup-nup")) { + if (opts.contains("_kde-psnup-nup")) { ID = opts["_kde-psnup-nup"].toInt(); if (ID == 1 || ID == 2 || ID == 4) { @@ -323,7 +323,7 @@ void KPQtPage::getOptions(TQMap<TQString,TQString>& opts, bool incldef) else if (ID != NUP_OTHER) { int nup(ID == NUP_2 ? 2 : 4); - if (s.tqfind("psnup") == -1) + if (s.find("psnup") == -1) { TQStringList fl = TQStringList::split(',', s, false); KXmlCommandManager::self()->insertCommand(fl, "psnup"); diff --git a/kdeprint/kprintdialog.cpp b/kdeprint/kprintdialog.cpp index c62730fde..ebdc6ae42 100644 --- a/kdeprint/kprintdialog.cpp +++ b/kdeprint/kprintdialog.cpp @@ -800,7 +800,7 @@ void KPrintDialog::setOutputFileExtension(const TQString& ext) { KURL url( d->m_file->url() ); TQString f( url.fileName() ); - int p = f.tqfindRev( '.' ); + int p = f.findRev( '.' ); // change "file.ext"; don't change "file", "file." or ".file" but do change ".file.ext" if ( p > 0 && p != int (f.length () - 1) ) { diff --git a/kdeprint/kprinter.cpp b/kdeprint/kprinter.cpp index 4a7134435..edd924456 100644 --- a/kdeprint/kprinter.cpp +++ b/kdeprint/kprinter.cpp @@ -486,7 +486,7 @@ TQValueList<int> KPrinter::pageList() const TQStringList ranges = TQStringList::split(',',option("kde-range"),false); for (TQStringList::ConstIterator it=ranges.begin();it!=ranges.end();++it) { - int p = (*it).tqfind('-'); + int p = (*it).find('-'); bool ok; if (p == -1) { @@ -638,7 +638,7 @@ void KPrinter::setOptions(const TQMap<TQString,TQString>& opts) tmpset.remove( "kde-resolution" ); tmpset.remove( "kde-fonts" ); for (TQMap<TQString,TQString>::ConstIterator it=tmpset.begin();it!=tmpset.end();++it) - if (it.key().left(4) == "kde-" && !(d->m_options.tqcontains(it.key()))) + if (it.key().left(4) == "kde-" && !(d->m_options.contains(it.key()))) d->m_options[it.key()] = it.data(); } @@ -880,9 +880,9 @@ void KPrinter::setPrintProgram(const TQString& prg) else { TQString s(prg); - if (s.tqfind("%in") == -1) + if (s.find("%in") == -1) s.append(" %in"); - setOutputToFile( s.tqfind( "%out" ) != -1 ); + setOutputToFile( s.find( "%out" ) != -1 ); setOption("kde-isspecial", "1"); setOption("kde-special-command", s); } diff --git a/kdeprint/kprinterimpl.cpp b/kdeprint/kprinterimpl.cpp index 31294b9be..7d0d9477a 100644 --- a/kdeprint/kprinterimpl.cpp +++ b/kdeprint/kprinterimpl.cpp @@ -252,7 +252,7 @@ bool KPrinterImpl::startPrinting(const TQString& cmd, KPrinter *printer, const T TQString command(cmd), filestr; TQStringList printfiles; - if (command.tqfind("%in") == -1) command.append(" %in"); + if (command.find("%in") == -1) command.append(" %in"); for (TQStringList::ConstIterator it=files.begin(); it!=files.end(); ++it) if (TQFile::exists(*it)) @@ -317,7 +317,7 @@ int KPrinterImpl::filterFiles(KPrinter *printer, TQStringList& files, bool flag) !printer->option("kde-range").isEmpty() || printer->pageSet() != KPrinter::AllPages)) { - if (flist.tqfindIndex("psselect") == -1) + if (flist.findIndex("psselect") == -1) { int index = KXmlCommandManager::self()->insertCommand(flist, "psselect", false); if (index == -1 || !KXmlCommandManager::self()->checkCommand("psselect")) @@ -379,7 +379,7 @@ int KPrinterImpl::doFilterFiles(KPrinter *printer, TQStringList& files, const TQ for (TQStringList::Iterator it=files.begin(); it!=files.end(); ++it) { TQString mime = KMimeMagic::self()->findFileType(*it)->mimeType(); - if (inputMimeTypes.tqfind(mime) == inputMimeTypes.end()) + if (inputMimeTypes.find(mime) == inputMimeTypes.end()) { if (KMessageBox::warningContinueCancel(0, "<p>" + i18n("The MIME type %1 is not supported as input of the filter chain " @@ -491,7 +491,7 @@ int KPrinterImpl::autoConvertFiles(KPrinter *printer, TQStringList& files, bool it = files.remove( it ); continue; } - else if (mimeTypes.tqfindIndex(mime) == -1) + else if (mimeTypes.findIndex(mime) == -1) { if ((result=KMessageBox::warningYesNoCancel(NULL, i18n("<qt>The file format <em> %1 </em> is not directly supported by the current print system. You " diff --git a/kdeprint/kxmlcommand.cpp b/kdeprint/kxmlcommand.cpp index fbe7ec545..55a208d88 100644 --- a/kdeprint/kxmlcommand.cpp +++ b/kdeprint/kxmlcommand.cpp @@ -161,7 +161,7 @@ void KXmlCommand::setMimeType(const TQString& s) bool KXmlCommand::acceptMimeType(const TQString& s) { check(); - return (d->m_inputMime.tqfind(s) != d->m_inputMime.end()); + return (d->m_inputMime.find(s) != d->m_inputMime.end()); } TQStringList KXmlCommand::inputMimeTypes() @@ -383,7 +383,7 @@ TQString KXmlCommand::buildCommand(const TQMap<TQString,TQString>& opts, bool pi { TQString format = dopt->get("format"); TQString value = dopt->valueText(); - if ( format.tqfind( quotedRe ) != -1 ) + if ( format.find( quotedRe ) != -1 ) { if ( ( value.right( 1 ) == "'" && value.left( 1 ) == "'" ) || ( value.right( 1 ) == "\"" && value.left( 1 ) == "\"" ) ) @@ -463,7 +463,7 @@ void KXmlCommand::saveXml() TQDomElement KXmlCommand::createIO(TQDomDocument& doc, int n, const TQString& tag) { TQDomElement elem = doc.createElement(tag); - if (d->m_command.tqfind("%"+tag) != -1) + if (d->m_command.find("%"+tag) != -1) { for (int i=0; i<2; i++) { @@ -632,7 +632,7 @@ TQStringList KXmlCommandManager::commandList() for (TQStringList::ConstIterator it2=list.begin(); it2!=list.end(); ++it2) { TQString cmdName = (*it2).left((*it2).length()-8); - if (d->m_cmdlist.tqfind(cmdName) == d->m_cmdlist.end()) + if (d->m_cmdlist.find(cmdName) == d->m_cmdlist.end()) d->m_cmdlist.append(cmdName); } } @@ -676,7 +676,7 @@ TQString KXmlCommandManager::selectCommand(TQWidget *parent) KXmlCommand* KXmlCommandManager::command(const TQString& xmlId) const { - return (d->m_cmdmap.tqcontains(xmlId) ? d->m_cmdmap[xmlId] : 0); + return (d->m_cmdmap.contains(xmlId) ? d->m_cmdmap[xmlId] : 0); } int KXmlCommandManager::insertCommand(TQStringList& list, const TQString& filtername, bool defaultToStart) @@ -728,7 +728,7 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt preload(); - if (d->m_mimemap.tqcontains(mimesrc)) + if (d->m_mimemap.contains(mimesrc)) { const TQValueList<KXmlCommand*> l = d->m_mimemap[mimesrc]; for (TQValueList<KXmlCommand*>::ConstIterator it=l.begin(); it!=l.end(); ++it) @@ -752,7 +752,7 @@ TQStringList KXmlCommandManager::autoConvert(const TQString& mimesrc, const TQSt // mime types. Just discard it. If the subchain contains also the current // considered filter, then discard it: it denotes of a cycle in filter // chain. - if (subchain.count() > 0 && subchain.tqfindIndex((*it)->name()) == -1) + if (subchain.count() > 0 && subchain.findIndex((*it)->name()) == -1) { subchain.prepend((*it)->name()); if (subchain.count() < score || score == 0) @@ -791,12 +791,12 @@ bool KXmlCommandManager::checkCommand(const TQString& xmlId, int inputCheck, int TQString cmd = (xmlCmd ? xmlCmd->command() : xmlId); if (status && !cmd.isEmpty() && (inputCheck > None || outputCheck > None)) { - if (inputCheck > None && (cmd.tqfind("%in") == -1 || inputCheck == Advanced) && cmd.tqfind("%filterinput") == -1) + if (inputCheck > None && (cmd.find("%in") == -1 || inputCheck == Advanced) && cmd.find("%filterinput") == -1) { status = false; errmsg = i18n("The command does not contain the required tag %1.").arg(inputCheck == Advanced ? "%filterinput" : "{%in,%filterinput}"); } - if (status && outputCheck > None && (cmd.tqfind("%out") == -1 || outputCheck == Advanced) && cmd.tqfind("filteroutput") == -1) + if (status && outputCheck > None && (cmd.find("%out") == -1 || outputCheck == Advanced) && cmd.find("filteroutput") == -1) { status = false; errmsg = i18n("The command does not contain the required tag %1.").arg(outputCheck == Advanced ? "%filteroutput" : "{%out,%filteroutput}"); diff --git a/kdeprint/lpd/gschecker.cpp b/kdeprint/lpd/gschecker.cpp index 012d3cd4d..23f6be0a6 100644 --- a/kdeprint/lpd/gschecker.cpp +++ b/kdeprint/lpd/gschecker.cpp @@ -48,7 +48,7 @@ void GsChecker::loadDriverList() line = t.readLine().stripWhiteSpace(); if (ok) { - if (line.tqfind(':') != -1) + if (line.find(':') != -1) break; else buffer.append(line).append(" "); diff --git a/kdeprint/lpd/kmlpdmanager.cpp b/kdeprint/lpd/kmlpdmanager.cpp index e5e641b68..54f6c312a 100644 --- a/kdeprint/lpd/kmlpdmanager.cpp +++ b/kdeprint/lpd/kmlpdmanager.cpp @@ -80,7 +80,7 @@ bool KMLpdManager::completePrinter(KMPrinter *printer) bool KMLpdManager::completePrinterShort(KMPrinter *printer) { - PrintcapEntry *entry = m_entries.tqfind(printer->name()); + PrintcapEntry *entry = m_entries.find(printer->name()); if (entry) { QString type(entry->comment(2)), driver(entry->comment(7)), lp(entry->arg("lp")); @@ -299,11 +299,11 @@ void KMLpdManager::checkStatus() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - if ((p=line.tqfind(':')) != -1) + if ((p=line.find(':')) != -1) printer = findPrinter(line.left(p)); else if (line.startsWith("printing") && printer) - printer->setState(line.tqfind("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped); - else if (line.tqfind("entries") != -1 && printer) + printer->setState(line.find("enabled") != -1 ? KMPrinter::Idle : KMPrinter::Stopped); + else if (line.find("entries") != -1 && printer) if (!line.startsWith("no") && printer->state() == KMPrinter::Idle) printer->setState(KMPrinter::Processing); } @@ -367,7 +367,7 @@ PrinttoolEntry* KMLpdManager::findPrinttoolEntry(const TQString& name) { if (m_ptentries.count() == 0) loadPrinttoolDb(driverDirectory()+"/printerdb"); - PrinttoolEntry *ent = m_ptentries.tqfind(name); + PrinttoolEntry *ent = m_ptentries.find(name); if (!ent) setErrorMsg(i18n("Couldn't find driver <b>%1</b> in printtool database.").arg(name)); return ent; @@ -406,7 +406,7 @@ DrMain* KMLpdManager::loadDbDriver(KMDBEntry *entry) PrintcapEntry* KMLpdManager::findPrintcapEntry(const TQString& name) { - PrintcapEntry *ent = m_entries.tqfind(name); + PrintcapEntry *ent = m_entries.find(name); if (!ent) setErrorMsg(i18n("Couldn't find printer <b>%1</b> in printcap file.").arg(name)); return ent; @@ -471,7 +471,7 @@ TQMap<TQString,TQString> KMLpdManager::loadPrinttoolCfgFile(const TQString& file break; if (line.startsWith("export ")) line.replace(0,7,""); - if ((p=line.tqfind('=')) != -1) + if ((p=line.find('=')) != -1) { name = line.left(p); val = line.right(line.length()-p-1); @@ -510,7 +510,7 @@ bool KMLpdManager::savePrinttoolCfgFile(const TQString& templatefile, const TQSt tout << "export "; line.replace(0,7,TQString::tqfromLatin1("")); } - if ((p=line.tqfind('=')) != -1) + if ((p=line.find('=')) != -1) { name = line.left(p); tout << name << '=' << options[name] << endl; diff --git a/kdeprint/lpd/lpdtools.cpp b/kdeprint/lpd/lpdtools.cpp index ee919ff95..ba96f31a0 100644 --- a/kdeprint/lpd/lpdtools.cpp +++ b/kdeprint/lpd/lpdtools.cpp @@ -60,7 +60,7 @@ TQString nextWord(const TQString& s, int& pos) if (s[p1] == '{') { p1++; - p2 = s.tqfind('}',p1); + p2 = s.find('}',p1); } else { @@ -81,12 +81,12 @@ bool PrintcapEntry::readLine(const TQString& line) m_name = l[0]; int p(-1); // discard aliases - if ((p=m_name.tqfind('|')) != -1) + if ((p=m_name.find('|')) != -1) m_name = m_name.left(p); m_args.clear(); for (uint i=1; i<l.count(); i++) { - int p = l[i].tqfind('='); + int p = l[i].find('='); if (p == -1) p = 2; QString key = l[i].left(p); QString value = l[i].right(l[i].length()-(l[i][p] == '=' ? p+1 : p)); @@ -140,22 +140,22 @@ KMPrinter* PrintcapEntry::createPrinter() TQStringList splitPrinttoolLine(const TQString& line) { QStringList l; - int p = line.tqfind(':'); + int p = line.find(':'); if (p != -1) { l.append(line.left(p)); - p = line.tqfind('{',p); + p = line.find('{',p); if (p == -1) l.append(line.right(line.length()-l[0].length()-1).stripWhiteSpace()); else { while (p != -1) { - int q = line.tqfind('}',p); + int q = line.find('}',p); if (q != -1) { l.append(line.mid(p+1,q-p-1)); - p = line.tqfind('{',q); + p = line.find('{',q); } else break; } diff --git a/kdeprint/lpdunix/kmlpdunixmanager.cpp b/kdeprint/lpdunix/kmlpdunixmanager.cpp index 5350b53f1..8e757a706 100644 --- a/kdeprint/lpdunix/kmlpdunixmanager.cpp +++ b/kdeprint/lpdunix/kmlpdunixmanager.cpp @@ -114,12 +114,12 @@ TQMap<TQString,TQString> readEntry(KTextBuffer& t) if (l.count() > 0) { int p(-1); - if ((p=l[0].tqfind('|')) != -1) + if ((p=l[0].find('|')) != -1) entry["printer-name"] = l[0].left(p); // only keep first name (discard aliases else entry["printer-name"] = l[0]; for (uint i=1; i<l.count(); i++) - if ((p=l[i].tqfind('=')) != -1) + if ((p=l[i].find('=')) != -1) entry[l[i].left(p).stripWhiteSpace()] = l[i].right(l[i].length()-p-1).stripWhiteSpace(); else entry[l[i].stripWhiteSpace()] = TQString::null; @@ -192,14 +192,14 @@ void KMLpdUnixManager::parseEtcPrintcap() while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.tqcontains("printer-name") || entry.tqcontains("server")) + if (entry.isEmpty() || !entry.contains("printer-name") || entry.contains("server")) continue; if (entry["printer-name"] == "all") { - if (entry.tqcontains("all")) + if (entry.contains("all")) { // find separator - int p = entry["all"].tqfind(TQRegExp("[^a-zA-Z0-9_\\s-]")); + int p = entry["all"].find(TQRegExp("[^a-zA-Z0-9_\\s-]")); if (p != -1) { TQChar c = entry["all"][p]; @@ -216,7 +216,7 @@ void KMLpdUnixManager::parseEtcPrintcap() else { KMPrinter *printer = ::createPrinter(entry); - if (entry.tqcontains("rm")) + if (entry.contains("rm")) printer->setDescription(i18n("Remote printer queue on %1").arg(entry["rm"])); else printer->setDescription(i18n("Local printer")); @@ -254,18 +254,18 @@ void KMLpdUnixManager::parseEtcPrintersConf() while (!t.eof()) { entry = readEntry(t); - if (entry.isEmpty() || !entry.tqcontains("printer-name")) + if (entry.isEmpty() || !entry.contains("printer-name")) continue; TQString prname = entry["printer-name"]; if (prname == "_default") { - if (entry.tqcontains("use")) + if (entry.contains("use")) default_printer = entry["use"]; } else if (prname != "_all") { KMPrinter *printer = ::createPrinter(entry); - if (entry.tqcontains("bsdaddr")) + if (entry.contains("bsdaddr")) { TQStringList l = TQStringList::split(',',entry["bsdaddr"],false); printer->setDescription(i18n("Remote printer queue on %1").arg(l[0])); diff --git a/kdeprint/lpr/apshandler.cpp b/kdeprint/lpr/apshandler.cpp index 57ac45311..641ff5e07 100644 --- a/kdeprint/lpr/apshandler.cpp +++ b/kdeprint/lpr/apshandler.cpp @@ -63,7 +63,7 @@ bool ApsHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool shor if (!shortmode) { TQMap<TQString,TQString> opts = loadResources(entry); - if (opts.tqcontains("PRINTER")) + if (opts.contains("PRINTER")) { prt->setDescription(i18n("APS Driver (%1)").arg(opts["PRINTER"])); prt->setDriverInfo(prt->description()); @@ -148,7 +148,7 @@ TQMap<TQString,TQString> ApsHandler::loadVarFile(const TQString& filename) while (!t.atEnd()) { line = t.readLine().stripWhiteSpace(); - if (line.isEmpty() || line[0] == '#' || (p = line.tqfind('=')) == -1) + if (line.isEmpty() || line[0] == '#' || (p = line.find('=')) == -1) continue; TQString variable = line.left(p).stripWhiteSpace(); TQString value = line.mid(p+1).stripWhiteSpace(); @@ -166,7 +166,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config if (driver /* && config */ ) // Load resources in all case, to get the correct page size { TQMap<TQString,TQString> opts = loadResources(entry); - if ( !config && opts.tqcontains( "PAPERSIZE" ) ) + if ( !config && opts.contains( "PAPERSIZE" ) ) { // this is needed to keep applications informed // about the current selected page size @@ -187,7 +187,7 @@ DrMain* ApsHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool config DrMain* ApsHandler::loadDbDriver(const TQString& s) { - int p = s.tqfind('/'); + int p = s.find('/'); DrMain *driver = loadApsDriver(true); if (driver) driver->set("gsdriver", s.mid(p+1)); diff --git a/kdeprint/lpr/kmlprmanager.cpp b/kdeprint/lpr/kmlprmanager.cpp index d9bcae5e1..64e593590 100644 --- a/kdeprint/lpr/kmlprmanager.cpp +++ b/kdeprint/lpr/kmlprmanager.cpp @@ -160,7 +160,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt) { TQString handlerstr(prt->option("kde-lpr-handler")); LprHandler *handler(0); - if (handlerstr.isEmpty() || (handler = m_handlers.tqfind(handlerstr)) == NULL) + if (handlerstr.isEmpty() || (handler = m_handlers.find(handlerstr)) == NULL) { return NULL; } @@ -169,7 +169,7 @@ LprHandler* KMLprManager::findHandler(KMPrinter *prt) PrintcapEntry* KMLprManager::findEntry(KMPrinter *prt) { - PrintcapEntry *entry = m_entries.tqfind(prt->printerName()); + PrintcapEntry *entry = m_entries.find(prt->printerName()); if (!entry) { return NULL; @@ -230,9 +230,9 @@ DrMain* KMLprManager::loadPrinterDriver(KMPrinter *prt, bool config) DrMain* KMLprManager::loadFileDriver(const TQString& filename) { - int p = filename.tqfind('/'); + int p = filename.find('/'); TQString handler_str = (p != -1 ? filename.left(p) : TQString::tqfromLatin1("default")); - LprHandler *handler = m_handlers.tqfind(handler_str); + LprHandler *handler = m_handlers.find(handler_str); if (handler) { DrMain *driver = handler->loadDbDriver(filename); @@ -311,7 +311,7 @@ bool KMLprManager::savePrintcapFile() bool KMLprManager::createPrinter(KMPrinter *prt) { // remove existing printcap entry - PrintcapEntry *oldEntry = m_entries.tqfind(prt->printerName()); + PrintcapEntry *oldEntry = m_entries.find(prt->printerName()); // look for the handler and re-create entry LprHandler *handler(0); @@ -320,11 +320,11 @@ bool KMLprManager::createPrinter(KMPrinter *prt) // or we use the handler of the existing printer // (modifying something else, handler stays the same) if (prt->driver()) - handler = m_handlers.tqfind(prt->driver()->get("handler")); + handler = m_handlers.find(prt->driver()->get("handler")); else if (oldEntry) handler = findHandler(prt); else - handler = m_handlers.tqfind("default"); + handler = m_handlers.find("default"); if (!handler) { setErrorMsg(i18n("Internal error: no handler defined.")); diff --git a/kdeprint/lpr/lpchelper.cpp b/kdeprint/lpr/lpchelper.cpp index 4fa32b8e0..7cf0bfebf 100644 --- a/kdeprint/lpr/lpchelper.cpp +++ b/kdeprint/lpr/lpchelper.cpp @@ -62,7 +62,7 @@ LpcHelper::~LpcHelper() KMPrinter::PrinterState LpcHelper::state(const TQString& prname) const { - if (m_state.tqcontains(prname)) + if (m_state.contains(prname)) return m_state[prname]; return KMPrinter::Unknown; } @@ -82,26 +82,26 @@ void LpcHelper::parseStatusLPR(TQTextStream &t) line = t.readLine(); if (line.isEmpty()) continue; - else if (!line[0].isSpace() && (p = line.tqfind(':')) != -1) + else if (!line[0].isSpace() && (p = line.find(':')) != -1) { printer = line.left(p); m_state[printer] = KMPrinter::Idle; } - else if (line.tqfind("printing is disabled") != -1) + else if (line.find("printing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Stopped) | (m_state[printer] & ~KMPrinter::StateMask)); } - else if (line.tqfind("queuing is disabled") != -1) + else if (line.find("queuing is disabled") != -1) { if (!printer.isEmpty()) m_state[printer] = KMPrinter::PrinterState((KMPrinter::Rejecting) | (m_state[printer] & KMPrinter::StateMask)); } - else if (line.tqfind("entries") != -1) + else if (line.find("entries") != -1) { if (!printer.isEmpty() && (m_state[printer] & KMPrinter::StateMask) != KMPrinter::Stopped && - line.tqfind("no entries") == -1) + line.find("no entries") == -1) m_state[printer] = KMPrinter::PrinterState((m_state[printer] & ~KMPrinter::StateMask) | KMPrinter::Processing); } } @@ -121,7 +121,7 @@ void LpcHelper::parseStatusLPRng(TQTextStream& t) l = TQStringList::split(TQRegExp("\\s"), t.readLine(), false); if (l.count() < 4) continue; - p = l[0].tqfind('@'); + p = l[0].find('@'); if (p == 0) printer = l[0]; else @@ -206,11 +206,11 @@ static TQString lprngAnswer(const TQString& result, const TQString& printer) { int p, q; - p = result.tqfind("\n" + printer); + p = result.find("\n" + printer); if (p != -1) { - q = result.tqfind(':', p)+2; - p = result.tqfind('\n', q); + q = result.find(':', p)+2; + p = result.find('\n', q); TQString answer = result.mid(q, p-q).stripWhiteSpace(); return answer; } @@ -274,9 +274,9 @@ bool LpcHelper::removeJob(KMJob *job, TQString& msg) return false; } TQString result = execute(m_lprmpath + " -P " + KProcess::quote(job->printer()) + " " + TQString::number(job->id())); - if (result.tqfind("dequeued") != -1) + if (result.find("dequeued") != -1) return true; - else if (result.tqfind("Permission denied") != -1 || result.tqfind("no permissions") != -1) + else if (result.find("Permission denied") != -1 || result.find("no permissions") != -1) msg = i18n("Permission denied."); else msg = i18n("Execution of lprm failed: %1").arg(result); diff --git a/kdeprint/lpr/lpqhelper.cpp b/kdeprint/lpr/lpqhelper.cpp index bbc70da3a..3bd1c514b 100644 --- a/kdeprint/lpr/lpqhelper.cpp +++ b/kdeprint/lpr/lpqhelper.cpp @@ -46,7 +46,7 @@ KMJob* LpqHelper::parseLineLpr(const TQString& line) job->setOwner(line.mid(7, 11).stripWhiteSpace()); job->setId(line.mid(18, 5).toInt()); job->setName(line.mid(23, 38).stripWhiteSpace()); - int p = line.tqfind(' ', 61); + int p = line.find(' ', 61); if (p != -1) { job->setSize(line.mid(61, p-61).toInt() / 1000); @@ -61,14 +61,14 @@ KMJob* LpqHelper::parseLineLPRng(const TQString& line) return NULL; KMJob *job = new KMJob; job->setState((rank[0].isDigit() ? KMJob::Queued : (rank == "hold" ? KMJob::Held : KMJob::Printing))); - int p = line.tqfind('@', 7), q = line.tqfind(' ', 7); + int p = line.find('@', 7), q = line.find(' ', 7); job->setOwner(line.mid(7, TQMIN(p,q)-7)); while (line[q].isSpace()) q++; q++; while (line[q].isSpace()) q++; - p = line.tqfind(' ', q); + p = line.find(' ', q); job->setId(line.mid(q, p-q).toInt()); while (line[p].isSpace()) p++; diff --git a/kdeprint/lpr/lprhandler.cpp b/kdeprint/lpr/lprhandler.cpp index 1cacfae85..d3fc4ee94 100644 --- a/kdeprint/lpr/lprhandler.cpp +++ b/kdeprint/lpr/lprhandler.cpp @@ -61,7 +61,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool) KURL uri; if (!val.isEmpty() && val != "/dev/null") { - int p = val.tqfind('@'); + int p = val.find('@'); if (p != -1) { prt->setLocation(i18n("Remote queue (%1) on %2").arg(val.left(p)).arg(val.mid(p+1))); @@ -69,7 +69,7 @@ bool LprHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool) uri.setHost(val.mid(p+1)); uri.setPath("/" + val.left(p)); } - else if ((p = val.tqfind('%')) != -1) + else if ((p = val.find('%')) != -1) { prt->setLocation(i18n("Network printer (%1)").arg("socket")); uri.setProtocol("socket"); diff --git a/kdeprint/lpr/lprngtoolhandler.cpp b/kdeprint/lpr/lprngtoolhandler.cpp index aea703ea5..2d94e9b18 100644 --- a/kdeprint/lpr/lprngtoolhandler.cpp +++ b/kdeprint/lpr/lprngtoolhandler.cpp @@ -40,7 +40,7 @@ LPRngToolHandler::LPRngToolHandler(KMManager *mgr) bool LPRngToolHandler::validate(PrintcapEntry *entry) { if (entry->comment.startsWith("##LPRNGTOOL##") && - entry->comment.tqfind("UNKNOWN") == -1) + entry->comment.find("UNKNOWN") == -1) return true; return false; } @@ -82,14 +82,14 @@ bool LPRngToolHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, boo if (!(str=entry->field("ifhp")).isEmpty()) { TQString model; - int p = str.tqfind("model"); + int p = str.find("model"); if (p != -1) { - p = str.tqfind('=', p); + p = str.find('=', p); if (p != -1) { p++; - int q = str.tqfind(',', p); + int q = str.find(',', p); if (q == -1) model = str.mid(p); else @@ -142,7 +142,7 @@ void LPRngToolHandler::loadAuthFile(const TQString& filename, TQString& user, TQ line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - int p = line.tqfind('='); + int p = line.find('='); if (p != -1) { TQString key = line.left(p); @@ -182,7 +182,7 @@ DrMain* LPRngToolHandler::loadDriver(KMPrinter *prt, PrintcapEntry *entry, bool DrMain* LPRngToolHandler::loadDbDriver(const TQString& s) { - int p = s.tqfind('/'); + int p = s.find('/'); DrMain* driver = loadToolDriver(locate("data", "kdeprint/lprngtooldriver1")); if (driver) driver->set("driverID", s.mid(p+1)); @@ -209,13 +209,13 @@ TQValueList< TQPair<TQString,TQStringList> > LPRngToolHandler::loadChoiceDict(co key = TQString::null; if (line.contains('|') == 2 || line.right(7) == "BOOLEAN") { - int p = line.tqfind('|', 7); + int p = line.find('|', 7); key = line.mid(7, p-7); } } else if (line.startsWith("CHOICE")) { - int p = line.tqfind('|', 7); + int p = line.find('|', 7); l << line.mid(7, p-7); } } @@ -239,7 +239,7 @@ TQMap<TQString,TQString> LPRngToolHandler::parseZOptions(const TQString& optstr) bool found(false); for (TQValueList< TQPair<TQString,TQStringList> >::ConstIterator p=m_dict.begin(); p!=m_dict.end() && !found; ++p) { - if ((*p).second.tqfind(*it) != (*p).second.end()) + if ((*p).second.find(*it) != (*p).second.end()) { opts[(*p).first] = (*it); found = true; diff --git a/kdeprint/lpr/matichandler.cpp b/kdeprint/lpr/matichandler.cpp index 1625571d7..bd3307ad5 100644 --- a/kdeprint/lpr/matichandler.cpp +++ b/kdeprint/lpr/matichandler.cpp @@ -85,7 +85,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh { prt->setLocation(i18n("Local printer on %1").arg(val)); KURL url(val); - if (val.tqfind("usb") != -1) + if (val.find("usb") != -1) url.setProtocol("usb"); else url.setProtocol("parallel"); @@ -126,7 +126,7 @@ bool MaticHandler::completePrinter(KMPrinter *prt, PrintcapEntry *entry, bool sh TQString MaticHandler::parsePostpipe(const TQString& s) { TQString url; - int p = s.tqfindRev('|'); + int p = s.findRev('|'); TQStringList args = TQStringList::split(" ", s.right(s.length()-p-1)); if (args.count() != 0) @@ -167,7 +167,7 @@ TQString MaticHandler::parsePostpipe(const TQString& s) else { TQString host = (args[i].length() == 2 ? args[i+1] : args[i].right(args[i].length()-2)); - int p = host.tqfind("\\@"); + int p = host.find("\\@"); if (p != -1) { url = "lpd://" + host.right(host.length()-p-2) + "/" + host.left(p); @@ -309,13 +309,13 @@ bool MaticHandler::savePrinterDriver(KMPrinter *prt, PrintcapEntry *entry, DrMai line = tin.readLine(); if (line.stripWhiteSpace().startsWith("$postpipe")) continue; - else if ((p = line.tqfind("'name'")) != -1) + else if ((p = line.find("'name'")) != -1) { - p = line.tqfind('\'', p+6)+1; - q = line.tqfind('\'', p); + p = line.find('\'', p+6)+1; + q = line.find('\'', p); optname = line.mid(p, q-p); } - else if ((p = line.tqfind("'default'")) != -1) + else if ((p = line.find("'default'")) != -1) { DrBase *opt = driver->findOption(optname); if (opt) @@ -372,7 +372,7 @@ bool MaticHandler::savePpdFile(DrMain *driver, const TQString& filename) line = tin.readLine(); if (line.startsWith("*% COMDATA #")) { - if (line.tqfind("'default'") != -1) + if (line.find("'default'") != -1) { DrBase *opt = (optname.isEmpty() ? NULL : driver->findOption(optname)); if (opt) diff --git a/kdeprint/lpr/matichelper.cpp b/kdeprint/lpr/matichelper.cpp index acc968331..1da5f6313 100644 --- a/kdeprint/lpr/matichelper.cpp +++ b/kdeprint/lpr/matichelper.cpp @@ -29,7 +29,7 @@ TQString maticFile(PrintcapEntry *entry) s = entry->field("filter_options"); if (!s.isEmpty()) { - int p = s.tqfindRev(' '); + int p = s.findRev(' '); if (p != -1) s = s.mid(p+1); } diff --git a/kdeprint/lpr/printcapentry.h b/kdeprint/lpr/printcapentry.h index e1c785760..a7f2cabcf 100644 --- a/kdeprint/lpr/printcapentry.h +++ b/kdeprint/lpr/printcapentry.h @@ -72,7 +72,7 @@ public: TQMap<TQString,Field> fields; TQString postcomment; - bool has(const TQString& f) const { return fields.tqcontains(f); } + bool has(const TQString& f) const { return fields.contains(f); } TQString field(const TQString& f) const { return fields[f].value; } bool writeEntry(TQTextStream&); void addField(const TQString& name, Field::Type type = Field::Boolean, const TQString& value = TQString::null); diff --git a/kdeprint/lpr/printcapreader.cpp b/kdeprint/lpr/printcapreader.cpp index 4a5ce5ea7..72a6e2903 100644 --- a/kdeprint/lpr/printcapreader.cpp +++ b/kdeprint/lpr/printcapreader.cpp @@ -101,7 +101,7 @@ PrintcapEntry* PrintcapReader::nextEntry() // now parse the entry kdDebug() << "COMMENT: " << comment << endl; kdDebug() << "LINE: " << buf << endl; - int p = buf.tqfind(':'); + int p = buf.find(':'); if (p == -1) name = buf; else @@ -132,14 +132,14 @@ PrintcapEntry* PrintcapReader::nextEntry() for (TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it) { Field f; - int p = (*it).tqfind('='); + int p = (*it).find('='); if (p == -1) { - p = (*it).tqfind('#'); + p = (*it).find('#'); if (p == -1) { f.type = Field::Boolean; - p = (*it).tqfind('@'); + p = (*it).find('@'); if (p == -1) { f.name = (*it); diff --git a/kdeprint/management/cjanuswidget.cpp b/kdeprint/management/cjanuswidget.cpp index 856ab8a62..4163a87fe 100644 --- a/kdeprint/management/cjanuswidget.cpp +++ b/kdeprint/management/cjanuswidget.cpp @@ -241,7 +241,7 @@ CJanusWidget::CPage* CJanusWidget::findPage(TQListBoxItem *i) TQListBoxItem* CJanusWidget::findPrevItem(CPage *p) { - if (m_pages.tqfindRef(p) == -1) + if (m_pages.findRef(p) == -1) m_pages.last(); else m_pages.prev(); diff --git a/kdeprint/management/kmconfigfilter.cpp b/kdeprint/management/kmconfigfilter.cpp index ab643c341..967a67908 100644 --- a/kdeprint/management/kmconfigfilter.cpp +++ b/kdeprint/management/kmconfigfilter.cpp @@ -97,7 +97,7 @@ void KMConfigFilter::loadConfig(KConfig *conf) { if (!it.current()->isSpecial() && !it.current()->isVirtual()) { - KListBox *lb = (m_plist.tqfind(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); + KListBox *lb = (m_plist.find(it.current()->printerName()) == m_plist.end() ? m_list1 : m_list2); lb->insertItem(SmallIcon(it.current()->pixmap()), it.current()->printerName()); } } diff --git a/kdeprint/management/kmdbcreator.cpp b/kdeprint/management/kmdbcreator.cpp index fb76b5baf..7bdefbe0e 100644 --- a/kdeprint/management/kmdbcreator.cpp +++ b/kdeprint/management/kmdbcreator.cpp @@ -133,7 +133,7 @@ void KMDBCreator::slotReceivedStdout(KProcess*, char *buf, int len) // the toInt() will return 0. If that occurs for the first number, // then the number of steps will be also 0. bool ok; - int p = str.tqfind('\n'); + int p = str.find('\n'); int n = str.mid(0, p).toInt(&ok); // process the number received diff --git a/kdeprint/management/kmdriverdb.cpp b/kdeprint/management/kmdriverdb.cpp index ec5f8c42b..973be686e 100644 --- a/kdeprint/management/kmdriverdb.cpp +++ b/kdeprint/management/kmdriverdb.cpp @@ -110,23 +110,23 @@ void KMDriverDB::slotDbCreated() KMDBEntryList* KMDriverDB::findEntry(const TQString& manu, const TQString& model) { - TQDict<KMDBEntryList> *models = m_entries.tqfind(manu); + TQDict<KMDBEntryList> *models = m_entries.find(manu); if (models) - return models->tqfind(model); + return models->find(model); return 0; } KMDBEntryList* KMDriverDB::findPnpEntry(const TQString& manu, const TQString& model) { - TQDict<KMDBEntryList> *models = m_pnpentries.tqfind(manu); + TQDict<KMDBEntryList> *models = m_pnpentries.find(manu); if (models) - return models->tqfind(model); + return models->find(model); return 0; } TQDict<KMDBEntryList>* KMDriverDB::findModels(const TQString& manu) { - return m_entries.tqfind(manu); + return m_entries.find(manu); } void KMDriverDB::insertEntry(KMDBEntry *entry) @@ -140,14 +140,14 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) } // insert it in normal entries - TQDict<KMDBEntryList> *models = m_entries.tqfind(entry->manufacturer); + TQDict<KMDBEntryList> *models = m_entries.find(entry->manufacturer); if (!models) { models = new TQDict<KMDBEntryList>(17,false); models->setAutoDelete(true); m_entries.insert(entry->manufacturer,models); } - KMDBEntryList *list = models->tqfind(entry->model); + KMDBEntryList *list = models->find(entry->model); if (!list) { list = new KMDBEntryList; @@ -159,14 +159,14 @@ void KMDriverDB::insertEntry(KMDBEntry *entry) if (!entry->pnpmanufacturer.isEmpty() && !entry->pnpmodel.isEmpty()) { // insert it in PNP entries - models = m_pnpentries.tqfind(entry->manufacturer); + models = m_pnpentries.find(entry->manufacturer); if (!models) { models = new TQDict<KMDBEntryList>(17,false); models->setAutoDelete(true); m_pnpentries.insert(entry->manufacturer,models); } - list = models->tqfind(entry->model); + list = models->find(entry->model); if (!list) { list = new KMDBEntryList; @@ -209,7 +209,7 @@ void KMDriverDB::loadDbFile() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - int p = line.tqfind('='); + int p = line.find('='); if (p == -1) continue; words.clear(); diff --git a/kdeprint/management/kmdriverdbwidget.cpp b/kdeprint/management/kmdriverdbwidget.cpp index d67377485..e8a00c44d 100644 --- a/kdeprint/management/kmdriverdbwidget.cpp +++ b/kdeprint/management/kmdriverdbwidget.cpp @@ -95,17 +95,17 @@ KMDriverDbWidget::~KMDriverDbWidget() void KMDriverDbWidget::setDriver(const TQString& manu, const TQString& model) { - TQListBoxItem *item = m_manu->tqfindItem(manu); + TQListBoxItem *item = m_manu->findItem(manu); TQString model_(model); if (item) { m_manu->setCurrentItem(item); - item = m_model->tqfindItem(model_); + item = m_model->findItem(model_); if (!item) // try by stripping the manufacturer name from // the beginning of the model string. This is // often the case with PPD files - item = m_model->tqfindItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); + item = m_model->findItem(model_.replace(0,manu.length()+1,TQString::tqfromLatin1(""))); if (item) m_model->setCurrentItem(item); } @@ -203,11 +203,11 @@ void KMDriverDbWidget::slotPostscriptToggled(bool on) { if (on) { - TQListBoxItem *item = m_manu->tqfindItem("GENERIC"); + TQListBoxItem *item = m_manu->findItem("GENERIC"); if (item) { m_manu->setCurrentItem(item); - item = m_model->tqfindItem( "POSTSCRIPT PRINTER" ); + item = m_model->findItem( "POSTSCRIPT PRINTER" ); if ( item ) { m_model->setCurrentItem( item ); diff --git a/kdeprint/management/kminstancepage.cpp b/kdeprint/management/kminstancepage.cpp index 47bae6132..a2d024546 100644 --- a/kdeprint/management/kminstancepage.cpp +++ b/kdeprint/management/kminstancepage.cpp @@ -121,9 +121,9 @@ void KMInstancePage::setPrinter(KMPrinter *p) //iif (!oldText.isEmpty()) //{ - TQListBoxItem *item = m_view->tqfindItem(oldText); + TQListBoxItem *item = m_view->findItem(oldText); if (!item) - item = m_view->tqfindItem(i18n("(Default)")); + item = m_view->findItem(i18n("(Default)")); if (item) m_view->setSelected(item,true); //} @@ -138,7 +138,7 @@ void KMInstancePage::slotNew() i18n("(Default)"),&ok,this); if (ok) { - if (name.tqfind(TQRegExp("[/\\s]")) != -1) + if (name.find(TQRegExp("[/\\s]")) != -1) KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes.")); else { @@ -183,7 +183,7 @@ void KMInstancePage::slotCopy() i18n("(Default)"),&ok,this); if (ok) { - if (name.tqfind(TQRegExp("[/\\s]")) != -1) + if (name.find(TQRegExp("[/\\s]")) != -1) KMessageBox::error(this, i18n("Instance name must not contain any spaces or slashes.")); else { diff --git a/kdeprint/management/kmjobviewer.cpp b/kdeprint/management/kmjobviewer.cpp index ebdfacf81..508595998 100644 --- a/kdeprint/management/kmjobviewer.cpp +++ b/kdeprint/management/kmjobviewer.cpp @@ -586,7 +586,7 @@ void KMJobViewer::loadPluginActions() KAction *act = actionCollection()->action("job_restart"); for (int i=0;i<act->containerCount();i++) { - if (menuBar()->tqfindItem(act->itemId(i), &menu)) + if (menuBar()->findItem(act->itemId(i), &menu)) { menuindex = mpopindex = menu->indexOf(act->itemId(i))+1; break; diff --git a/kdeprint/management/kmspecialprinterdlg.cpp b/kdeprint/management/kmspecialprinterdlg.cpp index c444091e7..346e858f4 100644 --- a/kdeprint/management/kmspecialprinterdlg.cpp +++ b/kdeprint/management/kmspecialprinterdlg.cpp @@ -186,7 +186,7 @@ void KMSpecialPrinterDlg::setPrinter(KMPrinter *printer) { m_command->setCommand(printer->option("kde-special-command")); m_usefile->setChecked(printer->option("kde-special-file") == "1"); - int index = m_mimelist.tqfindIndex(printer->option("kde-special-mimetype")); + int index = m_mimelist.findIndex(printer->option("kde-special-mimetype")); m_mimetype->setCurrentItem(index == -1 ? 0 : index); m_extension->setText(printer->option("kde-special-extension")); m_name->setText(printer->name()); diff --git a/kdeprint/management/kmwbackend.cpp b/kdeprint/management/kmwbackend.cpp index 0a2958737..d05564115 100644 --- a/kdeprint/management/kmwbackend.cpp +++ b/kdeprint/management/kmwbackend.cpp @@ -104,7 +104,7 @@ void KMWBackend::updatePrinter(KMPrinter *p) TQString s = m_buttons->selected()->text(); s.replace(TQRegExp("&(?=\\w)"), TQString::tqfromLatin1("")); p->setOption("kde-backend-description",s); - setNextPage((m_map.tqcontains(ID) ? m_map[ID] : KMWizard::Error)); + setNextPage((m_map.contains(ID) ? m_map[ID] : KMWizard::Error)); } void KMWBackend::addBackend( int ID, bool on, int nextpage ) diff --git a/kdeprint/management/kmwclass.cpp b/kdeprint/management/kmwclass.cpp index 77544b08f..2e27db0c9 100644 --- a/kdeprint/management/kmwclass.cpp +++ b/kdeprint/management/kmwclass.cpp @@ -94,7 +94,7 @@ void KMWClass::initPrinter(KMPrinter *p) { TQPtrListIterator<KMPrinter> it(*list); for (;it.current();++it) - if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.tqcontains(it.current()->name())) + if (it.current()->instanceName().isEmpty() && !it.current()->isClass(true) && !it.current()->isSpecial() && !members.contains(it.current()->name())) m_list1->insertItem(SmallIcon(it.current()->pixmap()), it.current()->name()); m_list1->sort(); } diff --git a/kdeprint/management/kmwdriver.cpp b/kdeprint/management/kmwdriver.cpp index 45ce3afe7..d0a38e17d 100644 --- a/kdeprint/management/kmwdriver.cpp +++ b/kdeprint/management/kmwdriver.cpp @@ -49,7 +49,7 @@ void KMWDriver::initPrinter(KMPrinter *p) { // use auto-detection info instead: split the string // into make/model pair at the first space character - int p = autoDetect.tqfind( ' ' ); + int p = autoDetect.find( ' ' ); if ( p != -1 ) { TQString manu = autoDetect.left( p ), model = autoDetect.mid( p+1 ); diff --git a/kdeprint/management/kmwizard.cpp b/kdeprint/management/kmwizard.cpp index 2a3fca450..fead7c4e3 100644 --- a/kdeprint/management/kmwizard.cpp +++ b/kdeprint/management/kmwizard.cpp @@ -178,14 +178,14 @@ void KMWizard::configure(int start, int end, bool inclusive) void KMWizard::setNextPage(int page, int next) { - KMWizardPage *p = m_pagepool.tqfind(page); + KMWizardPage *p = m_pagepool.find(page); if (p) p->setNextPage(next); } void KMWizard::setCurrentPage(int ID, bool back) { - KMWizardPage *page = m_pagepool.tqfind(ID); + KMWizardPage *page = m_pagepool.find(ID); if (!page) { KMessageBox::error(this,i18n("Unable to find the requested page."),i18n("Add Printer Wizard")); diff --git a/kdeprint/management/kmwlocal.cpp b/kdeprint/management/kmwlocal.cpp index af283af7d..c581bdf3c 100644 --- a/kdeprint/management/kmwlocal.cpp +++ b/kdeprint/management/kmwlocal.cpp @@ -78,7 +78,7 @@ bool KMWLocal::isValid(TQString& msg) msg = i18n("The URI is empty","Empty URI."); return false; } - else if (m_uris.tqfindIndex(m_localuri->text()) == -1) + else if (m_uris.findIndex(m_localuri->text()) == -1) { if (KMessageBox::warningContinueCancel(this, i18n("The local URI doesn't correspond to a detected port. Continue?")) == KMessageBox::Cancel) { @@ -173,7 +173,7 @@ void KMWLocal::initialize() ++it; TQString uri = *it; - int p = uri.tqfind( ':' ); + int p = uri.find( ':' ); TQString desc = *(++it), prot = ( p != -1 ? uri.left( p ) : TQString::null ); TQString printer = *(++it); int index(-1); diff --git a/kdeprint/management/kmwname.cpp b/kdeprint/management/kmwname.cpp index 43f6f3fad..d46b104a7 100644 --- a/kdeprint/management/kmwname.cpp +++ b/kdeprint/management/kmwname.cpp @@ -48,7 +48,7 @@ bool KMWName::isValid(TQString& msg) msg = i18n("You must supply at least a name."); return false; } - else if (text(0).tqfind(TQRegExp("\\s")) != -1) + else if (text(0).find(TQRegExp("\\s")) != -1) { QString conv = text(0); conv.replace(TQRegExp("\\s"), ""); diff --git a/kdeprint/management/kmwsocketutil.cpp b/kdeprint/management/kmwsocketutil.cpp index 31dad2249..a8a89e3ad 100644 --- a/kdeprint/management/kmwsocketutil.cpp +++ b/kdeprint/management/kmwsocketutil.cpp @@ -209,7 +209,7 @@ TQString localRootIP() if (infos.count() > 0) { TQString IPstr = infos.first()->address()->nodeName(); - int p = IPstr.tqfindRev('.'); + int p = IPstr.findRev('.'); IPstr.truncate(p); return IPstr; } diff --git a/kdeprint/management/kxmlcommanddlg.cpp b/kdeprint/management/kxmlcommanddlg.cpp index 9d6688001..474f9b61b 100644 --- a/kdeprint/management/kxmlcommanddlg.cpp +++ b/kdeprint/management/kxmlcommanddlg.cpp @@ -52,7 +52,7 @@ TQString generateId(const TQMap<TQString, DrBase*>& map) { int index(-1); - while (map.tqcontains(TQString::tqfromLatin1("item%1").arg(++index))) ; + while (map.contains(TQString::tqfromLatin1("item%1").arg(++index))) ; return TQString::tqfromLatin1("item%1").arg(index); } @@ -454,7 +454,7 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item) m_name->setText(item->text(1)); m_desc->setText(item->text(0)); - DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0); + DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0); if (opt) { bool isgroup = (opt->type() < DrBase::String); @@ -498,8 +498,8 @@ void KXmlCommandAdvancedDlg::viewItem(TQListViewItem *item) m_addopt->setEnabled(isgroup); TQListViewItem *prevItem = findPrev(item), *nextItem = findNext(item); - DrBase *prevOpt = (prevItem && m_opts.tqcontains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0); - DrBase *nextOpt = (nextItem && m_opts.tqcontains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0); + DrBase *prevOpt = (prevItem && m_opts.contains(prevItem->text(1)) ? m_opts[prevItem->text(1)] : 0); + DrBase *nextOpt = (nextItem && m_opts.contains(nextItem->text(1)) ? m_opts[nextItem->text(1)] : 0); m_up->setEnabled(prevOpt && !(prevOpt->type() < DrBase::String && opt->type() >= DrBase::String)); m_down->setEnabled(nextOpt && !(isgroup && nextOpt->type() >= DrBase::String)); @@ -571,7 +571,7 @@ void KXmlCommandAdvancedDlg::slotApplyChanges() m_apply->setEnabled(false); - DrBase *opt = (m_opts.tqcontains(item->text(1)) ? m_opts[item->text(1)] : 0); + DrBase *opt = (m_opts.contains(item->text(1)) ? m_opts[item->text(1)] : 0); m_opts.remove(item->text(1)); delete opt; @@ -735,9 +735,9 @@ void KXmlCommandAdvancedDlg::slotMoveDown() void KXmlCommandAdvancedDlg::slotCommandChanged(const TQString& cmd) { - m_inputfile->parentWidget()->setEnabled(cmd.tqfind("%filterinput") != -1); - m_outputfile->parentWidget()->setEnabled(cmd.tqfind("%filteroutput") != -1); - m_view->setEnabled(cmd.tqfind("%filterargs") != -1); + m_inputfile->parentWidget()->setEnabled(cmd.find("%filterinput") != -1); + m_outputfile->parentWidget()->setEnabled(cmd.find("%filteroutput") != -1); + m_view->setEnabled(cmd.find("%filterargs") != -1); m_name->parentWidget()->setEnabled(m_view->isEnabled()); slotSelectionChanged((m_view->isEnabled() ? m_view->currentItem() : 0)); m_view->setOpen(m_view->firstChild(), m_view->isEnabled()); @@ -751,7 +751,7 @@ void KXmlCommandAdvancedDlg::slotValueSelected(TQListViewItem *item) void KXmlCommandAdvancedDlg::slotOptionRenamed(TQListViewItem *item, int) { - if (item && m_opts.tqcontains(item->text(1))) + if (item && m_opts.contains(item->text(1))) { DrBase *opt = m_opts[item->text(1)]; opt->set("text", item->text(0)); @@ -767,7 +767,7 @@ void KXmlCommandAdvancedDlg::recreateGroup(TQListViewItem *item, DrGroup *grp) TQListViewItem *child = item->firstChild(); while (child) { - DrBase *opt = (m_opts.tqcontains(child->text(1)) ? m_opts[child->text(1)] : 0); + DrBase *opt = (m_opts.contains(child->text(1)) ? m_opts[child->text(1)] : 0); if (opt) { if (opt->type() == DrBase::Group) @@ -807,7 +807,7 @@ bool KXmlCommandAdvancedDlg::editCommand(KXmlCommand *xmlcmd, TQWidget *parent) xmlcmd->setComment( xmldlg->m_comment->text().replace( TQRegExp( "\n" ), " " ) ); // need to recreate the driver tree structure - DrMain *driver = (xmldlg->m_opts.tqcontains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0); + DrMain *driver = (xmldlg->m_opts.contains("__root__") ? static_cast<DrMain*>(xmldlg->m_opts["__root__"]) : 0); if (!driver && xmldlg->m_opts.count() > 0) { kdDebug() << "KXmlCommandAdvancedDlg: driver structure not found, creating one" << endl; @@ -951,7 +951,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd) item->setRenameEnabled(0, true); } - int index = m_mimelist.tqfindIndex(xmlCmd->mimeType()); + int index = m_mimelist.findIndex(xmlCmd->mimeType()); if (index != -1) m_mimetype->setCurrentItem(index); else @@ -964,7 +964,7 @@ void KXmlCommandDlg::setCommand(KXmlCommand *xmlCmd) for (TQStringList::ConstIterator it=list.begin(); it!=list.end(); ++it) { m_selectedmime->insertItem(*it); - delete m_availablemime->tqfindItem(*it, TQt::ExactMatch); + delete m_availablemime->findItem(*it, TQt::ExactMatch); } } diff --git a/kdeprint/management/kxmlcommandselector.cpp b/kdeprint/management/kxmlcommandselector.cpp index 8162c7b6c..f46222fba 100644 --- a/kdeprint/management/kxmlcommandselector.cpp +++ b/kdeprint/management/kxmlcommandselector.cpp @@ -137,7 +137,7 @@ void KXmlCommandSelector::loadCommands() } m_cmd->insertStringList(desclist); - int index = m_cmdlist.tqfindIndex(thisCmd); + int index = m_cmdlist.findIndex(thisCmd); if (index != -1) m_cmd->setCurrentItem(index); if (m_cmd->currentItem() != -1 && m_cmd->isEnabled()) @@ -156,7 +156,7 @@ TQString KXmlCommandSelector::command() const void KXmlCommandSelector::setCommand(const TQString& cmd) { - int index = m_cmdlist.tqfindIndex(cmd); + int index = m_cmdlist.findIndex(cmd); if (m_usefilter) m_usefilter->setChecked(index != -1); @@ -176,7 +176,7 @@ void KXmlCommandSelector::slotAddCommand() { bool added(true); - if (m_cmdlist.tqfindIndex(cmdId) != -1) + if (m_cmdlist.findIndex(cmdId) != -1) { if (KMessageBox::warningContinueCancel( this, diff --git a/kdeprint/management/networkscanner.cpp b/kdeprint/management/networkscanner.cpp index ab025748b..73466cdbb 100644 --- a/kdeprint/management/networkscanner.cpp +++ b/kdeprint/management/networkscanner.cpp @@ -80,7 +80,7 @@ TQString NetworkScanner::NetworkScannerPrivate::localPrefix() if (infos.count() > 0) { TQString IPstr = infos.first()->address()->nodeName(); - int p = IPstr.tqfindRev('.'); + int p = IPstr.findRev('.'); IPstr.truncate(p); return IPstr; } diff --git a/kdeprint/management/smbview.cpp b/kdeprint/management/smbview.cpp index bbe2a07f9..f13670591 100644 --- a/kdeprint/management/smbview.cpp +++ b/kdeprint/management/smbview.cpp @@ -140,7 +140,7 @@ void SmbView::init() while (!smb_stream.atEnd ()) { TQString smb_line = smb_stream.readLine (); - if (smb_line.tqcontains (wins_keyword, FALSE) > 0) + if (smb_line.contains (wins_keyword, FALSE) > 0) { TQString key = smb_line.section ('=', 0, 0); key = key.stripWhiteSpace(); @@ -216,7 +216,7 @@ void SmbView::processGroups() clear(); for (TQStringList::ConstIterator it=grps.begin(); it!=grps.end(); ++it) { - int p = (*it).tqfind("<1d>"); + int p = (*it).find("<1d>"); if (p == -1) continue; TQListViewItem *item = new TQListViewItem(this,(*it).left(p).stripWhiteSpace()); diff --git a/kdeprint/messagewindow.cpp b/kdeprint/messagewindow.cpp index 77931d165..4f64f8edb 100644 --- a/kdeprint/messagewindow.cpp +++ b/kdeprint/messagewindow.cpp @@ -85,7 +85,7 @@ void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay ) kdWarning( 500 ) << "Cannot add a message window to a null parent" << endl; else { - MessageWindow *w = m_windows.tqfind( parent ); + MessageWindow *w = m_windows.find( parent ); if ( w ) w->setText( txt ); else @@ -96,14 +96,14 @@ void MessageWindow::add( TQWidget *parent, const TQString& txt, int delay ) void MessageWindow::remove( TQWidget *parent ) { if ( parent ) - delete m_windows.tqfind( parent ); + delete m_windows.find( parent ); } void MessageWindow::change( TQWidget *parent, const TQString& txt ) { if ( parent ) { - MessageWindow *w = m_windows.tqfind( parent ); + MessageWindow *w = m_windows.find( parent ); if ( w ) w->setText( txt ); else diff --git a/kdeprint/plugincombobox.cpp b/kdeprint/plugincombobox.cpp index 02934b0d9..414f38601 100644 --- a/kdeprint/plugincombobox.cpp +++ b/kdeprint/plugincombobox.cpp @@ -81,7 +81,7 @@ void PluginComboBox::reload() { TQString syst = KMFactory::self()->printSystem(); int index(-1); - if ((index=m_pluginlist.tqfindIndex(syst)) != -1) + if ((index=m_pluginlist.findIndex(syst)) != -1) m_combo->setCurrentItem(index); configChanged(); } diff --git a/kdeprint/posterpreview.cpp b/kdeprint/posterpreview.cpp index c4685f719..8afa0e295 100644 --- a/kdeprint/posterpreview.cpp +++ b/kdeprint/posterpreview.cpp @@ -139,7 +139,7 @@ void PosterPreview::drawContents( TQPainter *painter ) { for ( int j=0; j<m_cols; j++, x+=m_pw ) { - bool selected = ( m_selectedpages.tqfind( i*m_cols+j+1 ) != m_selectedpages.end() ); + bool selected = ( m_selectedpages.find( i*m_cols+j+1 ) != m_selectedpages.end() ); p->fillRect( x+1, y+1, m_pw-2, m_ph-2, ( selected ? KGlobalSettings::highlightColor() : white ) ); p->drawRect( x, y, m_pw, m_ph ); if ( pw > 0 && ph > 0 ) @@ -187,7 +187,7 @@ void PosterPreview::mousePressEvent( TQMouseEvent *e ) r = m_rows - ( e->pos().y()-m_boundingrect.y() )/( m_boundingrect.height()/m_rows ); int pagenum = ( r-1 )*m_cols+c; - if ( m_selectedpages.tqfind( pagenum ) == m_selectedpages.end() || + if ( m_selectedpages.find( pagenum ) == m_selectedpages.end() || !( e->state() & TQt::ShiftButton ) ) { if ( !( e->state() & TQt::ShiftButton ) ) @@ -267,7 +267,7 @@ void PosterPreview::setSelectedPages( const TQString& s ) for ( TQStringList::ConstIterator it=l.begin(); it!=l.end(); ++it ) { int p; - if ( ( p = ( *it ).tqfind( '-' ) ) == -1 ) + if ( ( p = ( *it ).find( '-' ) ) == -1 ) m_selectedpages.append( ( *it ).toInt() ); else { diff --git a/kdeprint/ppdloader.cpp b/kdeprint/ppdloader.cpp index 32721a45b..9fbecc774 100644 --- a/kdeprint/ppdloader.cpp +++ b/kdeprint/ppdloader.cpp @@ -78,7 +78,7 @@ static TQValueList<float> splitNumberString( const TQString& _s ) int p1 = 1, p2 = 0; while ( true ) { - p2 = s.tqfind( ' ', p1 ); + p2 = s.find( ' ', p1 ); if ( p2 != -1 ) { l.append( s.mid( p1, p2-p1 ).toFloat() ); @@ -220,7 +220,7 @@ bool PPDLoader::endUi( const TQString& name ) else grp = m_groups.top(); grp->addOption( m_option ); - if ( grp->get( "text" ).tqcontains( "install", false ) ) + if ( grp->get( "text" ).contains( "install", false ) ) m_option->set( "fixed", "1" ); } m_option = 0; @@ -431,7 +431,7 @@ bool PPDLoader::putPaperDimension( const TQString& name, const TQString& s ) { TQValueList<float> l = splitNumberString( s ); - PS_private *ps = m_ps.tqfind( name ); + PS_private *ps = m_ps.find( name ); if ( !ps ) { ps = new PS_private; @@ -448,7 +448,7 @@ bool PPDLoader::putImageableArea( const TQString& name, const TQString& s ) { TQValueList<float> l = splitNumberString( s ); - PS_private *ps = m_ps.tqfind( name ); + PS_private *ps = m_ps.find( name ); if ( !ps ) { ps = new PS_private; diff --git a/kdeprint/ppdscanner.cpp b/kdeprint/ppdscanner.cpp index 213e08507..7eb0f22e7 100644 --- a/kdeprint/ppdscanner.cpp +++ b/kdeprint/ppdscanner.cpp @@ -933,7 +933,7 @@ YY_RULE_SETUP case 24: YY_RULE_SETUP #line 100 "./ppdscanner.l" -{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } +{ yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } YY_BREAK case 25: YY_RULE_SETUP diff --git a/kdeprint/ppdscanner.l b/kdeprint/ppdscanner.l index 851ee290e..60a63f035 100644 --- a/kdeprint/ppdscanner.l +++ b/kdeprint/ppdscanner.l @@ -97,7 +97,7 @@ L [[:alnum:]] /** * Value state */ -<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].tqcontains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } +<value>\"[^\"]*\" { yylval = yytext; kdeprint_ppdscanner_lno += yylval[0].contains('\n'); QDEBUG1("Quoted value: %s",yytext); return QUOTED; } <value>{WORD} { yylval = yytext; QDEBUG1("String part: %s",yytext); return STRINGPART; } <value>"/" { BEGIN(translation_2); return '/'; } <value>"\n" { kdeprint_ppdscanner_lno++; BEGIN(INITIAL); } diff --git a/kdeprint/printerfilter.cpp b/kdeprint/printerfilter.cpp index 2590f41a4..a6f02f077 100644 --- a/kdeprint/printerfilter.cpp +++ b/kdeprint/printerfilter.cpp @@ -62,7 +62,7 @@ bool PrinterFilter::filter(KMPrinter *prt) if (m_enabled) { if ((!m_locationRe.isEmpty() && m_locationRe.exactMatch(prt->location())) || - m_printers.tqfind(prt->printerName()) != m_printers.end()) + m_printers.find(prt->printerName()) != m_printers.end()) return true; else return false; diff --git a/kdeprint/rlpr/kmrlprmanager.cpp b/kdeprint/rlpr/kmrlprmanager.cpp index 3a5460dda..467f6c58e 100644 --- a/kdeprint/rlpr/kmrlprmanager.cpp +++ b/kdeprint/rlpr/kmrlprmanager.cpp @@ -59,7 +59,7 @@ bool KMRlprManager::createPrinter(KMPrinter *p) bool KMRlprManager::removePrinter(KMPrinter *p) { - if (m_printers.tqfindRef(p) == -1) + if (m_printers.findRef(p) == -1) setErrorMsg(i18n("Printer not found.")); else { diff --git a/kdeprint/rlpr/kmwrlpr.cpp b/kdeprint/rlpr/kmwrlpr.cpp index 5e87be982..2f1d8b076 100644 --- a/kdeprint/rlpr/kmwrlpr.cpp +++ b/kdeprint/rlpr/kmwrlpr.cpp @@ -140,7 +140,7 @@ void KMWRlpr::initialize() line = t.readLine().stripWhiteSpace(); if (line.isEmpty()) continue; - if ((p=line.tqfind(':')) != -1) + if ((p=line.find(':')) != -1) { host = line.left(p).stripWhiteSpace(); TQListViewItem *hitem = new TQListViewItem(m_view,host); @@ -180,7 +180,7 @@ void KMWRlpr::initialize() } if (buffer.isEmpty()) continue; - int p = buffer.tqfind(':'); + int p = buffer.find(':'); if (p != -1) { TQString name = buffer.left(p); diff --git a/kdeprint/treecombobox.cpp b/kdeprint/treecombobox.cpp index d36db7092..b0fde0f11 100644 --- a/kdeprint/treecombobox.cpp +++ b/kdeprint/treecombobox.cpp @@ -44,7 +44,7 @@ TreeListBoxItem::TreeListBoxItem(TQListBox *lb, const TQPixmap& pix, const TQStr else { TQString parentStr = txt.left(txt.length()-m_path[m_depth].length()-1); - TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->tqfindItem(parentStr, TQt::ExactMatch)); + TreeListBoxItem *parentItem = static_cast<TreeListBoxItem*>(lb->findItem(parentStr, TQt::ExactMatch)); if (!parentItem) { // parent not found, add parent first into QListBox diff --git a/kdeprint/util.cpp b/kdeprint/util.cpp index 28e9afcba..f47db5017 100644 --- a/kdeprint/util.cpp +++ b/kdeprint/util.cpp @@ -44,7 +44,7 @@ KURL smbToUrl(const TQString& s) { // allow to handle non-encoded chars in login/password KURL url; - int p = s.tqfind('@'); + int p = s.find('@'); if (p == -1) { // assumes url starts with "smb://". Use encoding in @@ -56,7 +56,7 @@ KURL smbToUrl(const TQString& s) // assumes URL starts with "smb://" TQString username = s.mid(6, p-6); url = KURL("smb://" + KURL::encode_string(s.mid(p+1))); - int q = username.tqfind(':'); + int q = username.find(':'); if (q == -1) url.setUser(username); else @@ -99,14 +99,14 @@ bool splitSmbURI( const TQString& uri, TQString& work, TQString& server, TQStrin return false; p = 6; - int p1 = uri.tqfind( '/', p ); + int p1 = uri.find( '/', p ); if ( p1 != -1 ) { - int p2 = uri.tqfind( '@', p ); + int p2 = uri.find( '@', p ); if ( p2 != -1 && p2 < p1 ) { // Got a user - int p3 = uri.tqfind( ':', p ); + int p3 = uri.find( ':', p ); if ( p3 != -1 && p3 < p2 ) { // Got a password diff --git a/kdesu/client.cpp b/kdesu/client.cpp index b5c9361aa..030053da0 100644 --- a/kdesu/client.cpp +++ b/kdesu/client.cpp @@ -59,7 +59,7 @@ KDEsuClient::KDEsuClient() } // strip the screen number from the display - display.tqreplace(TQRegExp("\\.[0-9]+$"), ""); + display.replace(TQRegExp("\\.[0-9]+$"), ""); #else TQCString display("QWS"); #endif @@ -169,13 +169,13 @@ TQCString KDEsuClient::escape(const TQCString &str) { TQCString copy = str; int n = 0; - while ((n = copy.tqfind("\\", n)) != -1) + while ((n = copy.find("\\", n)) != -1) { copy.insert(n, '\\'); n += 2; } n = 0; - while ((n = copy.tqfind("\"", n)) != -1) + while ((n = copy.find("\"", n)) != -1) { copy.insert(n, '\\'); n += 2; @@ -313,7 +313,7 @@ TQValueList<TQCString> KDEsuClient::getKeys(const TQCString &group) // kdDebug(900) << "Found a matching entry: " << reply << endl; while (1) { - pos = reply.tqfind( '\007', index ); + pos = reply.find( '\007', index ); if( pos == -1 ) { if( index == 0 ) diff --git a/kdesu/kcookie.cpp b/kdesu/kcookie.cpp index 60ddcfe3e..f60ec7314 100644 --- a/kdesu/kcookie.cpp +++ b/kdesu/kcookie.cpp @@ -54,7 +54,7 @@ QCStringList KCookie::split(const TQCString &line, char ch) QCStringList result; int i=0, pos; - while ((pos = line.tqfind(ch, i)) != -1) + while ((pos = line.find(ch, i)) != -1) { result += line.mid(i, pos-i); i = pos+1; diff --git a/kdesu/process.cpp b/kdesu/process.cpp index 00c320a12..f5fb7d34e 100644 --- a/kdesu/process.cpp +++ b/kdesu/process.cpp @@ -179,7 +179,7 @@ TQCString PtyProcess::readLine(bool block) if (!m_Inbuf.isEmpty()) { - pos = m_Inbuf.tqfind('\n'); + pos = m_Inbuf.find('\n'); if (pos == -1) { ret = m_Inbuf; @@ -228,7 +228,7 @@ TQCString PtyProcess::readLine(bool block) buf[nbytes] = '\000'; m_Inbuf += buf; - pos = m_Inbuf.tqfind('\n'); + pos = m_Inbuf.find('\n'); if (pos == -1) { ret = m_Inbuf; @@ -513,7 +513,7 @@ int PtyProcess::waitForChild() if (!m_Exit.isEmpty()) { // match exit string only at line starts - int pos = output.tqfind(m_Exit.data()); + int pos = output.find(m_Exit.data()); if ((pos >= 0) && ((pos == 0 && lineStart) || (output.at (pos - 1) == '\n'))) { kill(m_Pid, SIGTERM); diff --git a/kdesu/ssh.cpp b/kdesu/ssh.cpp index 03051b826..d39634ac5 100644 --- a/kdesu/ssh.cpp +++ b/kdesu/ssh.cpp @@ -156,12 +156,12 @@ TQCString SshProcess::dcopForward() if (srv.isEmpty()) return result; - int i = srv.tqfind('/'); + int i = srv.find('/'); if (i == -1) return result; if (srv.left(i) != "tcp") return result; - int j = srv.tqfind(':', ++i); + int j = srv.find(':', ++i); if (j == -1) return result; TQCString host = srv.mid(i, j-i); diff --git a/kdesu/stub.cpp b/kdesu/stub.cpp index c7f39c4a8..2af171d72 100644 --- a/kdesu/stub.cpp +++ b/kdesu/stub.cpp @@ -145,7 +145,7 @@ int StubProcess::ConverseStub(int check) it != env.end(); ++it ) { - if( (*it).tqfind( "DESKTOP_STARTUP_ID=" ) == 0 ) + if( (*it).find( "DESKTOP_STARTUP_ID=" ) == 0 ) tmp = (*it).mid( strlen( "DESKTOP_STARTUP_ID=" )); } if( tmp.isEmpty()) diff --git a/kdeui/kaccelgen.h b/kdeui/kaccelgen.h index 696f85cda..8f0c50bed 100644 --- a/kdeui/kaccelgen.h +++ b/kdeui/kaccelgen.h @@ -131,7 +131,7 @@ loadPredefined(Iter begin, Iter end, TQMap<TQChar,bool>& keys) { for (Iter i = begin; i != end; ++i) { TQString item = Deref::deref(i); - int user_ampersand = item.tqfind(TQChar('&')); + int user_ampersand = item.find(TQChar('&')); if( user_ampersand >= 0 ) { // Sanity check. Note that we don't try to find an // accelerator if the user shoots him/herself in the foot @@ -178,7 +178,7 @@ generate(Iter begin, Iter end, TQStringList& target) // Attempt to find a good accelerator, but only if the user // has not manually hardcoded one. - int user_ampersand = item.tqfind(TQChar('&')); + int user_ampersand = item.find(TQChar('&')); if( user_ampersand < 0 || item[user_ampersand+1] == '&') { bool found = false; uint found_idx; @@ -187,7 +187,7 @@ generate(Iter begin, Iter end, TQStringList& target) // Check word-starting letters first. for( j=0; j < item.length(); ++j ) { if( isLegalAccelerator(item, j) - && !used_accels.tqcontains(item[j]) + && !used_accels.contains(item[j]) && (0 == j || (j > 0 && item[j-1].isSpace())) ) { found = true; found_idx = j; @@ -199,7 +199,7 @@ generate(Iter begin, Iter end, TQStringList& target) // No word-starting letter; search for any letter. for( j=0; j < item.length(); ++j ) { if( isLegalAccelerator(item, j) - && !used_accels.tqcontains(item[j]) ) { + && !used_accels.contains(item[j]) ) { found = true; found_idx = j; break; diff --git a/kdeui/kaction.cpp b/kdeui/kaction.cpp index 3502f9d20..6a0ad7812 100644 --- a/kdeui/kaction.cpp +++ b/kdeui/kaction.cpp @@ -530,7 +530,7 @@ void KAction::updateShortcut( TQPopupMenu* menu, int id ) // show the string representation of its shortcut. if ( d->m_kaccel || d->m_kaccelList.count() ) { TQString s = menu->text( id ); - int i = s.tqfind( '\t' ); + int i = s.find( '\t' ); if ( i >= 0 ) s.replace( i+1, s.length()-i, d->m_cut.seq(0).toString() ); else diff --git a/kdeui/kactionclasses.cpp b/kdeui/kactionclasses.cpp index 9c5d201fb..4c757157d 100644 --- a/kdeui/kactionclasses.cpp +++ b/kdeui/kactionclasses.cpp @@ -730,7 +730,7 @@ TQStringList KSelectAction::comboItems() const for( ; it != d->m_list.end(); ++it ) { TQString item = *it; - int i = item.tqfind( '&' ); + int i = item.find( '&' ); if ( i > -1 ) item = item.remove( i, 1 ); lst.append( item ); @@ -779,18 +779,18 @@ void KSelectAction::slotActivated( const TQString &text ) if ( isEditable() ) { TQStringList lst = d->m_list; - if(!lst.tqcontains(text)) + if(!lst.contains(text)) { lst.append( text ); setItems( lst ); } } - int i = d->m_list.tqfindIndex( text ); + int i = d->m_list.findIndex( text ); if ( i > -1 ) setCurrentItem( i ); else - setCurrentItem( comboItems().tqfindIndex( text ) ); + setCurrentItem( comboItems().findIndex( text ) ); // Delay this. Especially useful when the slot connected to activated() will re-create // the menu, e.g. in the recent files action. This prevents a crash. TQTimer::singleShot( 0, this, TQT_SLOT( slotActivated() ) ); @@ -1476,7 +1476,7 @@ void KFontAction::setFont( const TQString &family ) return; } } - i = lowerName.tqfind(" ["); + i = lowerName.find(" ["); if (i>-1) { lowerName = lowerName.left(i); @@ -1513,7 +1513,7 @@ void KFontAction::setFont( const TQString &family ) FcConfigSubstitute (config, pattern, FcMatchPattern); pattern = FcFontMatch(NULL, pattern, NULL); realFamily = (char*)FcNameUnparse(pattern); - realFamily.remove(realFamily.tqfind(regExp), realFamily.length()); + realFamily.remove(realFamily.find(regExp), realFamily.length()); if ( !realFamily.isEmpty() && realFamily != family ) setFont( realFamily ); @@ -1637,7 +1637,7 @@ void KFontSizeAction::init() void KFontSizeAction::setFontSize( int size ) { if ( size == fontSize() ) { - setCurrentItem( items().tqfindIndex( TQString::number( size ) ) ); + setCurrentItem( items().findIndex( TQString::number( size ) ) ); return; } @@ -1646,7 +1646,7 @@ void KFontSizeAction::setFontSize( int size ) return; } - int index = items().tqfindIndex( TQString::number( size ) ); + int index = items().findIndex( TQString::number( size ) ); if ( index == -1 ) { // Insert at the correct position in the list (to keep sorting) TQValueList<int> lst; @@ -1664,7 +1664,7 @@ void KFontSizeAction::setFontSize( int size ) strLst.append( TQString::number(*it) ); KSelectAction::setItems( strLst ); // Find new current item - index = lst.tqfindIndex( size ); + index = lst.findIndex( size ); setCurrentItem( index ); } else diff --git a/kdeui/kactioncollection.cpp b/kdeui/kactioncollection.cpp index 671bc5d94..69a87eaee 100644 --- a/kdeui/kactioncollection.cpp +++ b/kdeui/kactioncollection.cpp @@ -426,7 +426,7 @@ TQStringList KActionCollection::groups() const TQAsciiDictIterator<KAction> it( d->m_actionDict ); for( ; it.current(); ++it ) - if ( !it.current()->group().isEmpty() && !lst.tqcontains( it.current()->group() ) ) + if ( !it.current()->group().isEmpty() && !lst.contains( it.current()->group() ) ) lst.append( it.current()->group() ); return lst; diff --git a/kdeui/kbugreport.cpp b/kdeui/kbugreport.cpp index 8e37eff3d..0e0f6450d 100644 --- a/kdeui/kbugreport.cpp +++ b/kdeui/kbugreport.cpp @@ -289,7 +289,7 @@ void KBugReport::updateURL() void KBugReport::appChanged(int i) { TQString appName = d->appcombo->text(i); - int index = appName.tqfind( '/' ); + int index = appName.find( '/' ); if ( index > 0 ) appName = appName.left( index ); kdDebug() << "appName " << appName << endl; diff --git a/kdeui/kcharselect.cpp b/kdeui/kcharselect.cpp index 2ae916efe..7bd0320c9 100644 --- a/kdeui/kcharselect.cpp +++ b/kdeui/kcharselect.cpp @@ -460,7 +460,7 @@ TQSize KCharSelect::tqsizeHint() const //================================================================== void KCharSelect::setFont( const TQString &_font ) { - const TQValueList<TQString>::Iterator it = fontList.tqfind( _font ); + const TQValueList<TQString>::Iterator it = fontList.find( _font ); if ( it != fontList.end() ) { TQValueList<TQString>::Iterator it2 = fontList.begin(); int pos = 0; diff --git a/kdeui/kcmenumngr.cpp b/kdeui/kcmenumngr.cpp index 2288a5963..d985c8e91 100644 --- a/kdeui/kcmenumngr.cpp +++ b/kdeui/kcmenumngr.cpp @@ -122,7 +122,7 @@ bool KContextMenuManager::eventFilter( TQObject *o, TQEvent * e) void KContextMenuManager::widgetDestroyed() { - if ( menus.tqfind( (TQObject*)sender() ) ) + if ( menus.find( (TQObject*)sender() ) ) menus.remove( (TQObject*)sender() ); } diff --git a/kdeui/kcolordialog.cpp b/kdeui/kcolordialog.cpp index 990e9df9e..a9b1c36ac 100644 --- a/kdeui/kcolordialog.cpp +++ b/kdeui/kcolordialog.cpp @@ -674,8 +674,8 @@ KPaletteTable::readNamedColor( void ) // that start with "gray". // TQString name = line.mid(pos).stripWhiteSpace(); - if( name.isNull() || name.tqfind(' ') != -1 || - name.tqfind( "gray" ) != -1 || name.tqfind( "grey" ) != -1 ) + if( name.isNull() || name.find(' ') != -1 || + name.find( "gray" ) != -1 || name.find( "grey" ) != -1 ) { continue; } diff --git a/kdeui/kcombobox.cpp b/kdeui/kcombobox.cpp index af4852ac2..2b6b0098c 100644 --- a/kdeui/kcombobox.cpp +++ b/kdeui/kcombobox.cpp @@ -163,7 +163,7 @@ void KComboBox::makeCompletion( const TQString& text ) if( text.isNull() || !listBox() ) return; - const int index = listBox()->index( listBox()->tqfindItem( text ) ); + const int index = listBox()->index( listBox()->findItem( text ) ); if( index >= 0 ) setCurrentItem( index ); } diff --git a/kdeui/kcommand.cpp b/kdeui/kcommand.cpp index 4960c8016..2c76b21cd 100644 --- a/kdeui/kcommand.cpp +++ b/kdeui/kcommand.cpp @@ -133,7 +133,7 @@ void KCommandHistory::addCommand(KCommand *command, bool execute) { return; int index; - if(d->m_present && (index=m_commands.tqfindRef(d->m_present))!=-1) { + if(d->m_present && (index=m_commands.findRef(d->m_present))!=-1) { if (m_first) --index; m_commands.insert(index+1, command); @@ -192,7 +192,7 @@ void KCommandHistory::undo() { m_redo->setText(i18n("&Redo: %1").arg(d->m_present->name())); } int index; - if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.prev()) { + if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.prev()) { d->m_present=m_commands.current(); if (m_undo) { m_undo->setEnabled(true); @@ -226,7 +226,7 @@ void KCommandHistory::redo() { if(!d->m_savedAt) emit documentRestored(); } - else if((index=m_commands.tqfindRef(d->m_present))!=-1 && m_commands.next()) { + else if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.next()) { d->m_present=m_commands.current(); d->m_present->execute(); emit commandExecuted(); @@ -257,7 +257,7 @@ void KCommandHistory::redo() { void KCommandHistory::documentSaved() { if(d->m_present && !m_first) - d->m_savedAt=m_commands.tqfindRef(d->m_present); + d->m_savedAt=m_commands.findRef(d->m_present); else if(!d->m_present && !m_first) d->m_savedAt=-42; // this value signals that the document has // been saved with an empty history. @@ -287,7 +287,7 @@ void KCommandHistory::clipCommands() { if(count<=m_undoLimit && count<=m_redoLimit) return; - int index=m_commands.tqfindRef(d->m_present); + int index=m_commands.findRef(d->m_present); if(index>=m_undoLimit) { for(int i=0; i<=(index-m_undoLimit); ++i) { m_commands.removeFirst(); @@ -295,7 +295,7 @@ void KCommandHistory::clipCommands() { if(d->m_savedAt==-1) d->m_savedAt=-42; } - index=m_commands.tqfindRef(d->m_present); // calculate the new + index=m_commands.findRef(d->m_present); // calculate the new count=m_commands.count(); // values (for the redo-branch :) // make it easier for us... d->m_savedAt==-1 -> invalid if(d->m_savedAt!=-42 && d->m_savedAt<-1) @@ -316,7 +316,7 @@ void KCommandHistory::slotUndoAboutToShow() { m_undoPopup->clear(); int i = 0; - if (m_commands.tqfindRef(d->m_present)!=-1) + if (m_commands.findRef(d->m_present)!=-1) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { m_undoPopup->insertItem( i18n("Undo: %1").arg(m_commands.current()->name()), i++ ); @@ -340,7 +340,7 @@ void KCommandHistory::slotRedoAboutToShow() d->m_present = m_commands.first(); m_redoPopup->insertItem( i18n("Redo: %1").arg(d->m_present->name()), i++ ); } - if (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next()) + if (m_commands.findRef(d->m_present)!=-1 && m_commands.next()) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { m_redoPopup->insertItem( i18n("Redo: %1").arg(m_commands.current()->name()), i++ ); @@ -360,7 +360,7 @@ void KCommandHistory::updateActions() if ( m_undo && m_redo ) { m_undo->setEnabled( !m_first && ( d->m_present ) ); - m_redo->setEnabled(m_first || (m_commands.tqfindRef(d->m_present)!=-1 && m_commands.next())); + m_redo->setEnabled(m_first || (m_commands.findRef(d->m_present)!=-1 && m_commands.next())); } } diff --git a/kdeui/kconfigdialog.cpp b/kdeui/kconfigdialog.cpp index d0cb6aaa7..2a6f95a21 100644 --- a/kdeui/kconfigdialog.cpp +++ b/kdeui/kconfigdialog.cpp @@ -160,7 +160,7 @@ void KConfigDialog::setupManagerConnections(KConfigDialogManager *manager) KConfigDialog* KConfigDialog::exists(const char* name) { - return openDialogs.tqfind(name); + return openDialogs.find(name); } bool KConfigDialog::showDialog(const char* name) diff --git a/kdeui/kcursor.cpp b/kdeui/kcursor.cpp index da32249a9..5907c4ba0 100644 --- a/kdeui/kcursor.cpp +++ b/kdeui/kcursor.cpp @@ -386,7 +386,7 @@ void KCursorPrivate::setAutoHideCursor( TQWidget *w, bool enable, bool customEve if ( enable ) { - if ( m_eventFilters.tqfind( w ) != NULL ) + if ( m_eventFilters.find( w ) != NULL ) return; KCursorPrivateAutoHideEventFilter* filter = new KCursorPrivateAutoHideEventFilter( w ); m_eventFilters.insert( w, filter ); @@ -412,7 +412,7 @@ bool KCursorPrivate::eventFilter( TQObject *o, TQEvent *e ) if ( !enabled ) return false; - KCursorPrivateAutoHideEventFilter* filter = m_eventFilters.tqfind( o ); + KCursorPrivateAutoHideEventFilter* filter = m_eventFilters.find( o ); Q_ASSERT( filter != NULL ); if ( filter == NULL ) diff --git a/kdeui/kdatetbl.cpp b/kdeui/kdatetbl.cpp index e4f1ae988..a2bbdf9d3 100644 --- a/kdeui/kdatetbl.cpp +++ b/kdeui/kdatetbl.cpp @@ -596,7 +596,7 @@ void KDateTable::setCustomDatePainting(const TQDate &date, const TQColor &fgColo mode->fgColor=fgColor; mode->bgColor=bgColor; - d->customPaintingModes.tqreplace( date.toString(), mode ); + d->customPaintingModes.replace( date.toString(), mode ); d->useCustomColors=true; update(); } diff --git a/kdeui/kdetrayproxy/kdetrayproxy.cpp b/kdeui/kdetrayproxy/kdetrayproxy.cpp index 5e798ebab..7cb621bd8 100644 --- a/kdeui/kdetrayproxy/kdetrayproxy.cpp +++ b/kdeui/kdetrayproxy/kdetrayproxy.cpp @@ -55,11 +55,11 @@ void KDETrayProxy::windowAdded( WId w ) if ( !trayWinFor ) // not a KDE tray window return; // kdDebug() << "New tray window:" << w << endl; - if( !tray_windows.tqcontains( w )) + if( !tray_windows.contains( w )) tray_windows.append( w ); withdrawWindow( w ); // window will be removed from pending_windows when after docked - if( !pending_windows.tqcontains( w )) + if( !pending_windows.contains( w )) pending_windows.append( w ); docked_windows.remove( w ); Window owner = selection.owner(); @@ -85,21 +85,21 @@ bool KDETrayProxy::x11Event( XEvent* e ) { if( tray_windows.isEmpty()) return false; - if( e->type == DestroyNotify && tray_windows.tqcontains( e->xdestroywindow.window )) + if( e->type == DestroyNotify && tray_windows.contains( e->xdestroywindow.window )) { tray_windows.remove( e->xdestroywindow.window ); pending_windows.remove( e->xdestroywindow.window ); docked_windows.remove( e->xdestroywindow.window ); } - if( e->type == ReparentNotify && tray_windows.tqcontains( e->xreparent.window )) + if( e->type == ReparentNotify && tray_windows.contains( e->xreparent.window )) { if( e->xreparent.parent == qt_xrootwin()) { - if( !docked_windows.tqcontains( e->xreparent.window ) || e->xreparent.serial >= docked_windows[ e->xreparent.window ] ) + if( !docked_windows.contains( e->xreparent.window ) || e->xreparent.serial >= docked_windows[ e->xreparent.window ] ) { // kdDebug() << "Window released:" << e->xreparent.window << endl; docked_windows.remove( e->xreparent.window ); - if( !pending_windows.tqcontains( e->xreparent.window )) + if( !pending_windows.contains( e->xreparent.window )) pending_windows.append( e->xreparent.window ); } } @@ -109,9 +109,9 @@ bool KDETrayProxy::x11Event( XEvent* e ) pending_windows.remove( e->xreparent.window ); } } - if( e->type == UnmapNotify && tray_windows.tqcontains( e->xunmap.window )) + if( e->type == UnmapNotify && tray_windows.contains( e->xunmap.window )) { - if( docked_windows.tqcontains( e->xunmap.window ) && e->xunmap.serial >= docked_windows[ e->xunmap.window ] ) + if( docked_windows.contains( e->xunmap.window ) && e->xunmap.serial >= docked_windows[ e->xunmap.window ] ) { // kdDebug() << "Window unmapped:" << e->xunmap.window << endl; XReparentWindow( qt_xdisplay(), e->xunmap.window, qt_xrootwin(), 0, 0 ); diff --git a/kdeui/kdockwidget.cpp b/kdeui/kdockwidget.cpp index f5dd09efc..5590299fc 100644 --- a/kdeui/kdockwidget.cpp +++ b/kdeui/kdockwidget.cpp @@ -355,7 +355,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { btn->reparent(this,TQPoint(0,0)); } btn->setFixedSize(closeButton->pixmap()->width(),closeButton->pixmap()->height()); - if (!d->btns.tqcontainsRef(btn)) d->btns.append(btn); + if (!d->btns.containsRef(btn)) d->btns.append(btn); btn->show(); @@ -383,7 +383,7 @@ void KDockWidgetHeader::addButton(KDockButton_Private* btn) { void KDockWidgetHeader::removeButton(KDockButton_Private* btn) { if (btn->parentWidget()==this) { - if (d->btns.tqcontainsRef(btn)) d->btns.removeRef(btn); + if (d->btns.containsRef(btn)) d->btns.removeRef(btn); delete btn; } } @@ -1860,12 +1860,12 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos ) } w = p; } - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; - if ( qt_tqfind_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; + if ( qt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; if (tqt_dynamic_cast<KDockContainer*>(w)) return 0L; if (!childDockWidgetList) return 0L; - if ( childDockWidgetList->tqfind(w) != -1 ) return 0L; + if ( childDockWidgetList->find(w) != -1 ) return 0L; if ( currentDragWidget->isGroup && ((KDockWidget*)w)->parentDockTabGroup() ) return 0L; KDockWidget* www = (KDockWidget*)w; @@ -1910,7 +1910,7 @@ void KDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const while ( it.current() ) { if ( it.current()->isWidgetType() ) { w = (TQWidget*)it.current(); - if ( w->isVisible() && w->tqgeometry().tqcontains(pos) ) { + if ( w->isVisible() && w->tqgeometry().contains(pos) ) { if ( w->inherits("KDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); return; @@ -2230,8 +2230,8 @@ void KDockManager::writeConfig(TQDomElement &base) TQStringList::Iterator nListIt=nList.begin(); while ( nListIt!=nList.end() ) { KDockWidget *obj = getDockWidgetFromName( *nListIt); - if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.tqfind( obj->firstName.latin1() ) == -1 - || nameList.tqfind(obj->lastName.latin1()) == -1)) { + if ((obj->isGroup && (!obj->d->isContainer)) && (nameList.find( obj->firstName.latin1() ) == -1 + || nameList.find(obj->lastName.latin1()) == -1)) { // Skip until children are saved (why?) ++nListIt; // nList.next(); @@ -2578,7 +2578,7 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } /*************************************************************************************************/ if ( obj->isGroup ){ - if ( (findList.tqfind( obj->firstName ) != findList.end()) && (findList.tqfind( obj->lastName ) != findList.end() )){ + if ( (findList.find( obj->firstName ) != findList.end()) && (findList.find( obj->lastName ) != findList.end() )){ c->writeEntry( cname+":type", "GROUP"); if ( !obj->parent() ){ @@ -2601,9 +2601,9 @@ void KDockManager::writeConfig( KConfig* c, TQString group ) } else { /*************************************************************************************************/ //debug(" Skip %s", nList.current()); - //if ( findList.tqfind( obj->firstName ) == -1 ) + //if ( findList.find( obj->firstName ) == -1 ) // debug(" ? Not found %s", obj->firstName); - //if ( findList.tqfind( obj->lastName ) == -1 ) + //if ( findList.find( obj->lastName ) == -1 ) // debug(" ? Not found %s", obj->lastName); ++nListIt; // if ( !nList.current() ) nList.first(); diff --git a/kdeui/keditcl1.cpp b/kdeui/keditcl1.cpp index e32081fa9..fe886f434 100644 --- a/kdeui/keditcl1.cpp +++ b/kdeui/keditcl1.cpp @@ -359,7 +359,7 @@ void KEdit::computePosition() while(find >=0 && find <= coltemp- 1 ){ - find = linetext.tqfind('\t', find+start_of_line, true )-start_of_line; + find = linetext.find('\t', find+start_of_line, true )-start_of_line; if( find >=0 && find <= coltemp - 1 ){ found_one = true; pos = pos + find - mem; diff --git a/kdeui/keditcl2.cpp b/kdeui/keditcl2.cpp index c885b6b27..4bbc12c30 100644 --- a/kdeui/keditcl2.cpp +++ b/kdeui/keditcl2.cpp @@ -162,7 +162,7 @@ int KEdit::doSearch(TQString s_pattern, bool case_sensitive, string = textLine(i); - pos = string.tqfind(s_pattern, i == line ? col : 0, case_sensitive); + pos = string.find(s_pattern, i == line ? col : 0, case_sensitive); if( pos != -1){ @@ -191,7 +191,7 @@ int KEdit::doSearch(TQString s_pattern, bool case_sensitive, string = textLine(i); int line_length = string.length(); - pos = string.tqfindRev(s_pattern, line == i ? col : line_length , case_sensitive); + pos = string.findRev(s_pattern, line == i ? col : line_length , case_sensitive); if (pos != -1){ @@ -528,10 +528,10 @@ int KEdit::doReplace(TQString s_pattern, bool case_sensitive, string = textLine(line_counter); if (replace_all){ - pos = string.tqfind(s_pattern, replace_all_col, case_sensitive); + pos = string.find(s_pattern, replace_all_col, case_sensitive); } else{ - pos = string.tqfind(s_pattern, line_counter == line ? col : 0, case_sensitive); + pos = string.find(s_pattern, line_counter == line ? col : 0, case_sensitive); } if (pos == -1 ){ @@ -554,7 +554,7 @@ int KEdit::doReplace(TQString s_pattern, bool case_sensitive, replace_all_col = pos + replacement.length(); replace_all_line = line_counter; - pos = stringnew.tqfind(s_pattern, replace_all_col, case_sensitive); + pos = stringnew.find(s_pattern, replace_all_col, case_sensitive); } while( pos != -1); @@ -595,13 +595,13 @@ int KEdit::doReplace(TQString s_pattern, bool case_sensitive, if (replace_all_col < 0) pos = -1; else - pos = string.tqfindRev(s_pattern, replace_all_col , case_sensitive); + pos = string.findRev(s_pattern, replace_all_col , case_sensitive); } else{ if ((line == line_counter) && (col < 0)) pos = -1; else - pos = string.tqfindRev(s_pattern, + pos = string.findRev(s_pattern, line == line_counter ? col : line_length , case_sensitive); } diff --git a/kdeui/keditlistbox.cpp b/kdeui/keditlistbox.cpp index f8aeb096f..81277ed55 100644 --- a/kdeui/keditlistbox.cpp +++ b/kdeui/keditlistbox.cpp @@ -195,7 +195,7 @@ void KEditListBox::typedSomething(const TQString& text) else { StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); - bool enable = (!m_listBox->tqfindItem( text, mode )); + bool enable = (!m_listBox->findItem( text, mode )); servNewButton->setEnabled( enable ); } } @@ -266,7 +266,7 @@ void KEditListBox::addItem() else { StringComparisonMode mode = (StringComparisonMode) (ExactMatch | CaseSensitive ); - alreadyInList =(m_listBox->tqfindItem(currentTextLE, mode) ); + alreadyInList =(m_listBox->findItem(currentTextLE, mode) ); } } diff --git a/kdeui/kedittoolbar.cpp b/kdeui/kedittoolbar.cpp index cb21c2160..98a1f0537 100644 --- a/kdeui/kedittoolbar.cpp +++ b/kdeui/kedittoolbar.cpp @@ -485,7 +485,7 @@ void KEditToolbar::slotDefault() } else { - int slash = d->m_file.tqfindRev('/')+1; + int slash = d->m_file.findRev('/')+1; if (slash) d->m_file = d->m_file.mid(slash); TQString xml_file = locateLocal("data", TQString::tqfromLatin1( KGlobal::instance()->instanceName() + '/' ) + d->m_file); @@ -1034,7 +1034,7 @@ void KEditToolbarWidget::loadActionList(TQDomElement& elem) KAction *action = actionCollection->action( i ); // skip our active ones - if (active_list.tqcontains(action->name())) + if (active_list.contains(action->name())) continue; ToolbarItem *act = new ToolbarItem(m_inactiveList, tagActionList, action->name(), action->toolTip()); @@ -1361,7 +1361,7 @@ void KEditToolbarWidget::updateLocal(TQDomElement& elem) continue; TQDomElement toolbar = (*xit).m_document.documentElement().toElement(); - toolbar.tqreplaceChild(elem, (*it)); + toolbar.replaceChild(elem, (*it)); return; } diff --git a/kdeui/kfontcombo.cpp b/kdeui/kfontcombo.cpp index 173b08cff..e62360521 100644 --- a/kdeui/kfontcombo.cpp +++ b/kdeui/kfontcombo.cpp @@ -212,7 +212,7 @@ void KFontCombo::setCurrentFont(const TQString &family) return; } } - int x = lowerName.tqfind(" ["); + int x = lowerName.find(" ["); if (x>-1) { lowerName = lowerName.left(x); @@ -251,7 +251,7 @@ void KFontCombo::setCurrentFont(const TQString &family) FcConfigSubstitute (config, pattern, FcMatchPattern); pattern = FcFontMatch(NULL, pattern, NULL); realFamily = (char*)FcNameUnparse(pattern); - realFamily.remove(realFamily.tqfind(regExp), realFamily.length()); + realFamily.remove(realFamily.find(regExp), realFamily.length()); if ( !realFamily.isEmpty() && realFamily != family ) setCurrentFont( realFamily ); diff --git a/kdeui/kfontdialog.cpp b/kdeui/kfontdialog.cpp index 6aae075e2..bea8e78fe 100644 --- a/kdeui/kfontdialog.cpp +++ b/kdeui/kfontdialog.cpp @@ -284,7 +284,7 @@ KFontChooser::KFontChooser(TQWidget *parent, const char *name, connect( sizeListBox, TQT_SIGNAL(highlighted(const TQString&)), TQT_SLOT(size_chosen_slot(const TQString&)) ); - sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(10)), true); // default to 10pt. + sizeListBox->setSelected(sizeListBox->findItem(TQString::number(10)), true); // default to 10pt. row ++; @@ -469,13 +469,13 @@ void KFontChooser::family_chosen_slot(const TQString& family) currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { TQString style = *it; - int pos = style.tqfind("Plain"); + int pos = style.find("Plain"); if(pos >=0) style = style.replace(pos,5,i18n("Regular")); - pos = style.tqfind("Normal"); + pos = style.find("Normal"); if(pos >=0) style = style.replace(pos,6,i18n("Regular")); - pos = style.tqfind("Oblique"); + pos = style.find("Oblique"); if(pos >=0) style = style.replace(pos,7,i18n("Italic")); - if(!styleListBox->tqfindItem(style)) { + if(!styleListBox->findItem(style)) { styleListBox->insertItem(i18n(style.utf8())); currentStyles.insert(i18n(style.utf8()), *it); } @@ -486,9 +486,9 @@ void KFontChooser::family_chosen_slot(const TQString& family) } styleListBox->blockSignals(true); - TQListBoxItem *item = styleListBox->tqfindItem(selectedStyle); + TQListBoxItem *item = styleListBox->findItem(selectedStyle); if (item) - styleListBox->setSelected(styleListBox->tqfindItem(selectedStyle), true); + styleListBox->setSelected(styleListBox->findItem(selectedStyle), true); else styleListBox->setSelected(0, true); styleListBox->blockSignals(false); @@ -538,7 +538,7 @@ void KFontChooser::style_chosen_slot(const TQString& style) fillSizeList(); } sizeListBox->blockSignals(true); - sizeListBox->setSelected(sizeListBox->tqfindItem(TQString::number(selectedSize)), true); + sizeListBox->setSelected(sizeListBox->findItem(TQString::number(selectedSize)), true); sizeListBox->blockSignals(false); sizeListBox->ensureCurrentVisible(); @@ -587,7 +587,7 @@ void KFontChooser::setupDisplay() { if (family.contains('[')) { - family = family.left(family.tqfind('[')).stripWhiteSpace(); + family = family.left(family.find('[')).stripWhiteSpace(); for (i = 0; i < numEntries; i++) { if (family == familyListBox->text(i).lower()) { familyListBox->setCurrentItem(i); @@ -684,10 +684,10 @@ void KFontChooser::addFont( TQStringList &list, const char *xfont ) TQString font = TQString::tqfromLatin1(ptr + 1); int pos; - if ( ( pos = font.tqfind( '-' ) ) > 0 ) { + if ( ( pos = font.find( '-' ) ) > 0 ) { font.truncate( pos ); - if ( font.tqfind( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) + if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) return; TQStringList::Iterator it = list.begin(); diff --git a/kdeui/kiconview.cpp b/kdeui/kiconview.cpp index ce1aec637..6d3f51a2b 100644 --- a/kdeui/kiconview.cpp +++ b/kdeui/kiconview.cpp @@ -258,7 +258,7 @@ void KIconView::emitExecute( TQIconViewItem *item, const TQPoint &pos ) void KIconView::updateDragHoldItem( TQDropEvent *e ) { - TQIconViewItem *item = tqfindItem( e->pos() ); + TQIconViewItem *item = findItem( e->pos() ); if ( d->dragHoldItem != item) { @@ -307,7 +307,7 @@ void KIconView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQIconView::contentsMouseDoubleClickEvent( e ); - TQIconViewItem* item = tqfindItem( e->pos() ); + TQIconViewItem* item = findItem( e->pos() ); if( item ) { if( (e->button() == Qt::LeftButton) && !m_bUseSingle ) @@ -417,7 +417,7 @@ TQFontMetrics *KIconView::itemFontMetrics() const TQPixmap KIconView::selectedIconPixmap( TQPixmap *pix, const TQColor &col ) const { TQPixmap m; - if ( d->maskCache.tqfind( TQString::number( pix->serialNumber() ), m ) ) + if ( d->maskCache.find( TQString::number( pix->serialNumber() ), m ) ) return m; m = KPixmapEffect::selectedPixmap( KPixmap(*pix), col ); d->maskCache.insert( TQString::number( pix->serialNumber() ), m ); diff --git a/kdeui/kiconviewsearchline.cpp b/kdeui/kiconviewsearchline.cpp index 1ee76c9df..701e15428 100644 --- a/kdeui/kiconviewsearchline.cpp +++ b/kdeui/kiconviewsearchline.cpp @@ -224,7 +224,7 @@ bool KIconViewSearchLine::itemMatches( const TQIconViewItem *item, return false; TQString itemtext = item->text(); - return ( itemtext.tqfind( s, 0, caseSensitive() ) >= 0 ); + return ( itemtext.find( s, 0, caseSensitive() ) >= 0 ); } void KIconViewSearchLine::init( TQIconView *iconView ) diff --git a/kdeui/kinputdialog.cpp b/kdeui/kinputdialog.cpp index 06ceeecd4..61b30cce1 100644 --- a/kdeui/kinputdialog.cpp +++ b/kdeui/kinputdialog.cpp @@ -229,7 +229,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, for ( TQStringList::ConstIterator it=select.begin(); it!=select.end(); ++it ) { - item = d->m_listBox->tqfindItem( *it, CaseSensitive|ExactMatch ); + item = d->m_listBox->findItem( *it, CaseSensitive|ExactMatch ); if ( item ) d->m_listBox->setSelected( item, true ); } @@ -242,7 +242,7 @@ KInputDialog::KInputDialog( const TQString &caption, const TQString &label, TQT_SLOT( slotOk() ) ); TQString text = select.first(); - item = d->m_listBox->tqfindItem( text, CaseSensitive|ExactMatch ); + item = d->m_listBox->findItem( text, CaseSensitive|ExactMatch ); if ( item ) d->m_listBox->setSelected( item, true ); } diff --git a/kdeui/kjanuswidget.cpp b/kdeui/kjanuswidget.cpp index 3605d492d..4109e6346 100644 --- a/kdeui/kjanuswidget.cpp +++ b/kdeui/kjanuswidget.cpp @@ -413,7 +413,7 @@ void KJanusWidget::InsertTreeListItem(const TQStringList &items, const TQPixmap curPath << name; TQString key = curPath.join("_/_"); - if (mFolderIconMap.tqcontains(key)) { + if (mFolderIconMap.contains(key)) { TQPixmap p = mFolderIconMap[key]; newChild->setPixmap(0,p); } @@ -1191,7 +1191,7 @@ void KJanusWidget::virtual_hook( int, void* ) // delete the node. void KJanusWidget::removePage( TQWidget *page ) { - if (!d || !d->mPageToInt.tqcontains(page)) + if (!d || !d->mPageToInt.contains(page)) return; int index = d->mPageToInt[page]; @@ -1237,7 +1237,7 @@ void KJanusWidget::removePage( TQWidget *page ) TQString KJanusWidget::pageTitle(int index) const { - if (!d || !d->mIntToTitle.tqcontains(index)) + if (!d || !d->mIntToTitle.contains(index)) return TQString::null; else return d->mIntToTitle[index]; @@ -1246,7 +1246,7 @@ TQString KJanusWidget::pageTitle(int index) const TQWidget *KJanusWidget::pageWidget(int index) const { - if (!d || !d->mIntToPage.tqcontains(index)) + if (!d || !d->mIntToPage.contains(index)) return 0; else return d->mIntToPage[index]; diff --git a/kdeui/klanguagebutton.cpp b/kdeui/klanguagebutton.cpp index 7da8b85e5..bfc160c8e 100644 --- a/kdeui/klanguagebutton.cpp +++ b/kdeui/klanguagebutton.cpp @@ -60,12 +60,12 @@ static void checkInsertPos( TQPopupMenu *popup, const TQString & str, static TQPopupMenu * checkInsertIndex( TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu ) { - int pos = tags->tqfindIndex( submenu ); + int pos = tags->findIndex( submenu ); TQPopupMenu *pi = 0; if ( pos != -1 ) { - TQMenuItem *p = popup->tqfindItem( pos ); + TQMenuItem *p = popup->findItem( pos ); pi = p ? p->popup() : 0; } if ( !pi ) @@ -232,7 +232,7 @@ void KLanguageButton::clear() bool KLanguageButton::contains( const TQString & id ) const { - return m_ids->tqcontains( id ) > 0; + return m_ids->contains( id ) > 0; } TQString KLanguageButton::current() const @@ -276,7 +276,7 @@ void KLanguageButton::setCurrentItem( int i ) void KLanguageButton::setCurrentItem( const TQString & id ) { - int i = m_ids->tqfindIndex( id ); + int i = m_ids->findIndex( id ); if ( id.isNull() ) i = 0; if ( i != -1 ) diff --git a/kdeui/klineedit.cpp b/kdeui/klineedit.cpp index 48861d38c..87fc29d83 100644 --- a/kdeui/klineedit.cpp +++ b/kdeui/klineedit.cpp @@ -1219,7 +1219,7 @@ void KLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest ) bool wasSelected = d->completionBox->isSelected( d->completionBox->currentItem() ); const TQString currentSelection = d->completionBox->currentText(); d->completionBox->setItems( items ); - TQListBoxItem* item = d->completionBox->tqfindItem( currentSelection, TQt::ExactMatch ); + TQListBoxItem* item = d->completionBox->findItem( currentSelection, TQt::ExactMatch ); // If no item is selected, that means the listbox hasn't been manipulated by the user yet, // because it's not possible otherwise to have no selected item. In such case make // always the first item current and unselected, so that the current item doesn't jump. @@ -1246,7 +1246,7 @@ void KLineEdit::setCompletedItems( const TQStringList& items, bool autoSuggest ) if ( d->autoSuggest && autoSuggest ) { - int index = items.first().tqfind( txt ); + int index = items.first().find( txt ); TQString newText = items.first().mid( index ); setUserSelection(false); setCompletedText(newText,true); diff --git a/kdeui/klistview.cpp b/kdeui/klistview.cpp index 97cef2627..29c563389 100644 --- a/kdeui/klistview.cpp +++ b/kdeui/klistview.cpp @@ -865,7 +865,7 @@ void KListView::contentsMouseReleaseEvent( TQMouseEvent *e ) if (!rootDecoClicked) { int col = header()->mapToLogical( header()->cellAt( p.x() ) ); - if ( d->renameable.tqcontains(col) ) + if ( d->renameable.contains(col) ) rename(at, col); } } @@ -1377,7 +1377,7 @@ void KListView::cleanItemHighlighter () void KListView::rename(TQListViewItem *item, int c) { - if (d->renameable.tqcontains(c)) + if (d->renameable.contains(c)) { ensureItemVisible(item); d->editor->load(item,c); @@ -1386,7 +1386,7 @@ void KListView::rename(TQListViewItem *item, int c) bool KListView::isRenameable (int col) const { - return d->renameable.tqcontains(col); + return d->renameable.contains(col); } void KListView::setRenameable (int col, bool renameable) diff --git a/kdeui/klistviewsearchline.cpp b/kdeui/klistviewsearchline.cpp index 6a73f9e38..fb02a8259 100644 --- a/kdeui/klistviewsearchline.cpp +++ b/kdeui/klistviewsearchline.cpp @@ -214,14 +214,14 @@ bool KListViewSearchLine::itemMatches(const TQListViewItem *item, const TQString TQValueList<int>::ConstIterator it = d->searchColumns.begin(); for(; it != d->searchColumns.end(); ++it) { if(*it < item->listView()->columns() && - item->text(*it).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(*it).find(s, 0, d->caseSensitive) >= 0) return true; } } else { for(int i = 0; i < item->listView()->columns(); i++) { if(item->listView()->columnWidth(i) > 0 && - item->text(i).tqfind(s, 0, d->caseSensitive) >= 0) + item->text(i).find(s, 0, d->caseSensitive) >= 0) { return true; } @@ -260,7 +260,7 @@ TQPopupMenu *KListViewSearchLine::createPopupMenu() columnText = i18n("Column number %1","Column No. %1").arg(visiblePosition); } subMenu->insertItem(columnText, visibleColumns); - if(d->searchColumns.isEmpty() || d->searchColumns.tqfind(i) != d->searchColumns.end()) + if(d->searchColumns.isEmpty() || d->searchColumns.find(i) != d->searchColumns.end()) subMenu->setItemChecked(visibleColumns, true); else allColumnsAreSearchColumns = false; @@ -320,7 +320,7 @@ void KListViewSearchLine::searchColumnsMenuActivated(int id) d->searchColumns.clear(); } else { - if(d->searchColumns.tqfind(id) != d->searchColumns.end()) + if(d->searchColumns.find(id) != d->searchColumns.end()) d->searchColumns.remove(id); else { if(d->searchColumns.isEmpty()) { diff --git a/kdeui/kmenubar.cpp b/kdeui/kmenubar.cpp index fcd56ddaa..2014142e8 100644 --- a/kdeui/kmenubar.cpp +++ b/kdeui/kmenubar.cpp @@ -518,7 +518,7 @@ void KMenuBar::drawContents( TQPainter* p ) for ( int i=0; i<(int)count(); i++ ) { - TQMenuItem *mi = tqfindItem( idAt( i ) ); + TQMenuItem *mi = findItem( idAt( i ) ); if ( !mi->text().isNull() || mi->pixmap() ) { diff --git a/kdeui/knumvalidator.cpp b/kdeui/knumvalidator.cpp index 4dba9d796..5ab97e840 100644 --- a/kdeui/knumvalidator.cpp +++ b/kdeui/knumvalidator.cpp @@ -339,17 +339,17 @@ TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const t = l->thousandsSeparator(); // first, delete p's and t's: if ( !p.isEmpty() ) - for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) ) + for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) ) s.remove( idx, p.length() ); if ( !t.isEmpty() ) - for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) ) + for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) ) s.remove( idx, t.length() ); // then, replace the d's and n's - if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) || - ( !d.isEmpty() && d.tqfind('-') != -1 ) ) { + if ( ( !n.isEmpty() && n.find('.') != -1 ) || + ( !d.isEmpty() && d.find('-') != -1 ) ) { // make sure we don't replace something twice: kdWarning() << "KDoubleValidator: decimal symbol contains '-' or " "negative sign contains '.' -> improve algorithm" << endl; @@ -357,11 +357,11 @@ TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const } if ( !d.isEmpty() && d != "." ) - for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) ) + for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) ) s.replace( idx, d.length(), '.'); if ( !n.isEmpty() && n != "-" ) - for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) ) + for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) ) s.replace( idx, n.length(), '-' ); } diff --git a/kdeui/kpanelapplet.cpp b/kdeui/kpanelapplet.cpp index 152368b87..ece71ad54 100644 --- a/kdeui/kpanelapplet.cpp +++ b/kdeui/kpanelapplet.cpp @@ -146,13 +146,13 @@ void KPanelApplet::watchForFocus(TQWidget* widget, bool watch) if (watch) { - if (d->watchedForFocus.tqfind(TQT_TQOBJECT(widget)) == -1) + if (d->watchedForFocus.find(TQT_TQOBJECT(widget)) == -1) { d->watchedForFocus.append(TQT_TQOBJECT(widget)); widget->installEventFilter(this); } } - else if (d->watchedForFocus.tqfind(TQT_TQOBJECT(widget)) != -1) + else if (d->watchedForFocus.find(TQT_TQOBJECT(widget)) != -1) { d->watchedForFocus.remove(TQT_TQOBJECT(widget)); widget->removeEventFilter(this); @@ -172,7 +172,7 @@ void KPanelApplet::needsFocus(bool focus) bool KPanelApplet::eventFilter(TQObject *o, TQEvent * e) { - if (d->watchedForFocus.tqfind(o) != -1) + if (d->watchedForFocus.find(o) != -1) { if (e->type() == TQEvent::MouseButtonRelease || e->type() == TQEvent::FocusIn) diff --git a/kdeui/kpassdlg.cpp b/kdeui/kpassdlg.cpp index 5e5df81cd..dad923c62 100644 --- a/kdeui/kpassdlg.cpp +++ b/kdeui/kpassdlg.cpp @@ -69,10 +69,10 @@ static int * ourMaxLength( const KPasswordEdit* const e ) { d_ptr->setAutoDelete(true); qAddPostRoutine( cleanup_d_ptr ); } - int* ret = d_ptr->tqfind( (void*) e ); + int* ret = d_ptr->find( (void*) e ); if ( ! ret ) { ret = new int; - d_ptr->tqreplace( (void*) e, ret ); + d_ptr->replace( (void*) e, ret ); } return ret; } @@ -634,15 +634,15 @@ void KPasswordDialog::enableOkBtn() if (pwlength > 5) pwlength = 5; const TQRegExp numRxp("[0-9]", true, false); - int numeric = (int) (pass.tqcontains(numRxp) / lengthFactor); + int numeric = (int) (pass.contains(numRxp) / lengthFactor); if (numeric > 3) numeric = 3; const TQRegExp symbRxp("\\W", false, false); - int numsymbols = (int) (pass.tqcontains(symbRxp) / lengthFactor); + int numsymbols = (int) (pass.contains(symbRxp) / lengthFactor); if (numsymbols > 3) numsymbols = 3; const TQRegExp upperRxp("[A-Z]", true, false); - int upper = (int) (pass.tqcontains(upperRxp) / lengthFactor); + int upper = (int) (pass.contains(upperRxp) / lengthFactor); if (upper > 3) upper = 3; int pwstrength=((pwlength*10)-20) + (numeric*10) + (numsymbols*15) + (upper*10); diff --git a/kdeui/kpopupmenu.cpp b/kdeui/kpopupmenu.cpp index b6fa2b0d8..2e174422b 100644 --- a/kdeui/kpopupmenu.cpp +++ b/kdeui/kpopupmenu.cpp @@ -203,7 +203,7 @@ int KPopupMenu::insertTitle(const TQPixmap &icon, const TQString &text, int id, void KPopupMenu::changeTitle(int id, const TQString &text) { - TQMenuItem *item = tqfindItem(id); + TQMenuItem *item = findItem(id); if(item){ if(item->widget()) ((KPopupTitle *)item->widget())->setTitle(text); @@ -220,7 +220,7 @@ void KPopupMenu::changeTitle(int id, const TQString &text) void KPopupMenu::changeTitle(int id, const TQPixmap &icon, const TQString &text) { - TQMenuItem *item = tqfindItem(id); + TQMenuItem *item = findItem(id); if(item){ if(item->widget()) ((KPopupTitle *)item->widget())->setTitle(text, &icon); @@ -239,7 +239,7 @@ TQString KPopupMenu::title(int id) const { if(id == -1) // obsolete return d->m_lastTitle; - TQMenuItem *item = tqfindItem(id); + TQMenuItem *item = findItem(id); if(item){ if(item->widget()) return ((KPopupTitle *)item->widget())->title(); @@ -253,7 +253,7 @@ TQString KPopupMenu::title(int id) const TQPixmap KPopupMenu::titlePixmap(int id) const { - TQMenuItem *item = tqfindItem(id); + TQMenuItem *item = findItem(id); if(item){ if(item->widget()) return ((KPopupTitle *)item->widget())->icon(); @@ -382,13 +382,13 @@ void KPopupMenu::keyPressEvent(TQKeyEvent* e) // if there is an accelerator present, remove it if ((int)accel(j) != 0) - thisText = thisText.tqreplace("&", TQString()); + thisText = thisText.replace("&", TQString()); // chop text to the search length thisText = thisText.left(seqLen); // do the search - if (!thisText.tqfind(d->keySeq, 0, false)) { + if (!thisText.find(d->keySeq, 0, false)) { if (firstpass) { // match @@ -429,8 +429,8 @@ void KPopupMenu::keyPressEvent(TQKeyEvent* e) activateItemAt(d->lastHitIndex); resetKeyboardVars(); - } else if (tqfindItem(idAt(d->lastHitIndex)) && - tqfindItem(idAt(d->lastHitIndex))->popup()) { + } else if (findItem(idAt(d->lastHitIndex)) && + findItem(idAt(d->lastHitIndex))->popup()) { // only activate sub-menus activateItemAt(d->lastHitIndex); resetKeyboardVars(); @@ -557,7 +557,7 @@ void KPopupMenu::itemHighlighted(int /* whichItem */) void KPopupMenu::showCtxMenu(TQPoint pos) { - TQMenuItem* item = tqfindItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -577,7 +577,7 @@ void KPopupMenu::showCtxMenu(TQPoint pos) emit aboutToShowContextMenu(this, KPopupMenuPrivate::s_highlightedItem, d->m_ctxMenu); - TQPopupMenu* subMenu = tqfindItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { connect(subMenu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(ctxMenuHideShowingMenu())); @@ -601,7 +601,7 @@ void KPopupMenu::showCtxMenu(TQPoint pos) */ void KPopupMenu::ctxMenuHideShowingMenu() { - TQMenuItem* item = tqfindItem(KPopupMenuPrivate::s_highlightedItem); + TQMenuItem* item = findItem(KPopupMenuPrivate::s_highlightedItem); if (item) { TQPopupMenu* subMenu = item->popup(); @@ -616,7 +616,7 @@ void KPopupMenu::ctxMenuHiding() { if (KPopupMenuPrivate::s_highlightedItem) { - TQPopupMenu* subMenu = tqfindItem(KPopupMenuPrivate::s_highlightedItem)->popup(); + TQPopupMenu* subMenu = findItem(KPopupMenuPrivate::s_highlightedItem)->popup(); if (subMenu) { disconnect(subMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(ctxMenuHideShowingMenu())); diff --git a/kdeui/ksconfig.cpp b/kdeui/ksconfig.cpp index 807917ca5..bb1deab52 100644 --- a/kdeui/ksconfig.cpp +++ b/kdeui/ksconfig.cpp @@ -266,7 +266,7 @@ KSpellConfig::interpret( TQString &fname, TQString &lname, TQString extension; - int i = dname.tqfind('-'); + int i = dname.find('-'); if ( i != -1 ) { extension = dname.mid(i+1); @@ -406,7 +406,7 @@ KSpellConfig::fillInDialog () int whichelement=-1; if ( dictFromList() ) - whichelement = langfnames.tqfindIndex(dictionary()); + whichelement = langfnames.findIndex(dictionary()); dictcombo->setMinimumWidth (dictcombo->tqsizeHint().width()); @@ -742,7 +742,7 @@ KSpellConfig::fillDicts( TQComboBox* box, TQStringList* dictionaries ) } } } - int whichelement = langfnames.tqfindIndex(qsdict); + int whichelement = langfnames.findIndex(qsdict); if ( whichelement >= 0 ) { box->setCurrentItem( whichelement ); } @@ -788,7 +788,7 @@ KSpellConfig::setDictionary (const TQString s) qsdict=s; //.copy(); if (qsdict.length()>5) - if ((signed)qsdict.tqfind(".hash")==(signed)qsdict.length()-5) + if ((signed)qsdict.find(".hash")==(signed)qsdict.length()-5) qsdict.remove (qsdict.length()-5,5); @@ -797,7 +797,7 @@ KSpellConfig::setDictionary (const TQString s) int whichelement=-1; if (dictFromList()) { - whichelement = langfnames.tqfindIndex(s); + whichelement = langfnames.findIndex(s); if(whichelement >= 0) { diff --git a/kdeui/kspell.cpp b/kdeui/kspell.cpp index 7285e9c2a..3a13e6e3d 100644 --- a/kdeui/kspell.cpp +++ b/kdeui/kspell.cpp @@ -393,7 +393,7 @@ bool KSpell::addPersonal( const TQString & word ) TQString qs = word.simplifyWhiteSpace(); //we'll let ispell do the work here b/c we can - if ( qs.tqfind(' ') != -1 || qs.isEmpty() ) // make sure it's a _word_ + if ( qs.find(' ') != -1 || qs.isEmpty() ) // make sure it's a _word_ return false; qs.prepend( "*" ); @@ -412,7 +412,7 @@ bool KSpell::ignore( const TQString & word ) TQString qs = word.simplifyWhiteSpace(); //we'll let ispell do the work here b/c we can - if ( qs.tqfind (' ') != -1 || qs.isEmpty() ) // make sure it's a _word_ + if ( qs.find (' ') != -1 || qs.isEmpty() ) // make sure it's a _word_ return false; qs.prepend( "@" ); @@ -483,7 +483,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog ) d->checking = true; TQString qs = buffer.simplifyWhiteSpace(); - if ( qs.tqfind (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_ + if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_ d->checkNextTimer->start( 0, true ); return false; } @@ -525,7 +525,7 @@ bool KSpell::checkWord( const TQString & buffer, bool _usedialog, bool suggest ) d->checking = true; TQString qs = buffer.simplifyWhiteSpace(); - if ( qs.tqfind (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_ + if ( qs.find (' ') != -1 || qs.isEmpty() ) { // make sure it's a _word_ d->checkNextTimer->start( 0, true ); return false; } @@ -660,7 +660,7 @@ TQString KSpell::funnyWord( const TQString & word ) i = j-1; - if ( !( k = qs.tqfindRev(shorty) ) || k != -1 ) + if ( !( k = qs.findRev(shorty) ) || k != -1 ) qs.remove( k, shorty.length() ); else { @@ -699,7 +699,7 @@ int KSpell::parseOneResponse( const TQString &buffer, TQString &word, TQStringLi int i,j; - word = buffer.mid( 2, buffer.tqfind( ' ', 3 ) -2 ); + word = buffer.mid( 2, buffer.find( ' ', 3 ) -2 ); //check() needs this orig=word; @@ -717,18 +717,18 @@ int KSpell::parseOneResponse( const TQString &buffer, TQString &word, TQStringLi //We don't take advantage of ispell's ignore function because //we can't interrupt ispell's output (when checking a large //buffer) to add a word to _it's_ ignore-list. - if ( ignorelist.tqfindIndex( word.lower() ) != -1 ) + if ( ignorelist.findIndex( word.lower() ) != -1 ) return IGNORE; //// Position in line /// TQString qs2; - if ( buffer.tqfind( ':' ) != -1 ) - qs2 = buffer.left( buffer.tqfind(':') ); + if ( buffer.find( ':' ) != -1 ) + qs2 = buffer.left( buffer.find(':') ); else qs2 = buffer; - posinline = qs2.right( qs2.length()-qs2.tqfindRev(' ') ).toInt()-1; + posinline = qs2.right( qs2.length()-qs2.findRev(' ') ).toInt()-1; ///// Replace-list stuff //// TQStringList::Iterator it = replacelist.begin(); @@ -745,14 +745,14 @@ int KSpell::parseOneResponse( const TQString &buffer, TQString &word, TQStringLi /////// Suggestions ////// if ( buffer[0] != '#' ) { - TQString qs = buffer.mid( buffer.tqfind(':')+2, buffer.length() ); + TQString qs = buffer.mid( buffer.find(':')+2, buffer.length() ); qs += ','; sugg.clear(); i = j = 0; while( (unsigned int)i < qs.length() ) { - TQString temp = qs.mid( i, (j=qs.tqfind (',',i)) - i ); + TQString temp = qs.mid( i, (j=qs.find (',',i)) - i ); sugg.append( funnyWord(temp) ); i=j+2; @@ -1016,7 +1016,7 @@ bool KSpell::check( const TQString &_buffer, bool _usedialog ) emitProgress(); // send first buffer line - int i = origbuffer.tqfind( '\n', 0 ) + 1; + int i = origbuffer.find( '\n', 0 ) + 1; qs = origbuffer.mid( 0, i ); cleanFputs( qs, false ); @@ -1130,7 +1130,7 @@ void KSpell::check2( KProcIO * ) //kdDebug(750) << "[EOL](" << tempe << ")[" << temp << "]" << endl; lastpos = (lastlastline=lastline) + offset; //do we really want this? - i = origbuffer.tqfind('\n', lastline) + 1; + i = origbuffer.find('\n', lastline) + 1; qs = origbuffer.mid( lastline, i-lastline ); cleanFputs( qs, false ); lastline = i; diff --git a/kdeui/kstringvalidator.cpp b/kdeui/kstringvalidator.cpp index 2e0d3b167..4c2f33890 100644 --- a/kdeui/kstringvalidator.cpp +++ b/kdeui/kstringvalidator.cpp @@ -30,12 +30,12 @@ TQValidator::State KStringListValidator::validate( TQString & input, int& ) cons if ( input.isEmpty() ) return Intermediate; if ( isRejecting() ) // anything not in mStringList is acceptable: - if ( mStringList.tqfind( input ) == mStringList.end() ) + if ( mStringList.find( input ) == mStringList.end() ) return Acceptable; else return Intermediate; else // only what is in mStringList is acceptable: - if ( mStringList.tqfind( input ) != mStringList.end() ) + if ( mStringList.find( input ) != mStringList.end() ) return Acceptable; else for ( TQStringList::ConstIterator it = mStringList.begin() ; @@ -84,7 +84,7 @@ TQValidator::State KMimeTypeValidator::validate( TQString & input, int& ) const void KMimeTypeValidator::fixup( TQString & input ) const { TQRegExp invalidChars("[^/" ALLOWED_CHARS "]+"); - input.tqreplace( invalidChars, TQString()); + input.replace( invalidChars, TQString()); } #include "kstringvalidator.moc" diff --git a/kdeui/kswitchlanguagedialog.cpp b/kdeui/kswitchlanguagedialog.cpp index ee7a26e83..fa43dcaf2 100644 --- a/kdeui/kswitchlanguagedialog.cpp +++ b/kdeui/kswitchlanguagedialog.cpp @@ -158,7 +158,7 @@ void KSwitchLanguageDialog::removeButtonClicked() return; } - TQMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.tqfind(removeButton); + TQMap<KPushButton *, LanguageRowData>::iterator it = d->languageRows.find(removeButton); if (it == d->languageRows.end()) { diff --git a/kdeui/ksyntaxhighlighter.cpp b/kdeui/ksyntaxhighlighter.cpp index bd01ad2a9..5e334ac11 100644 --- a/kdeui/ksyntaxhighlighter.cpp +++ b/kdeui/ksyntaxhighlighter.cpp @@ -148,7 +148,7 @@ int KSyntaxHighlighter::highlightParagraph( const TQString &text, int ) } TQString simplified = text; - simplified = TQString(simplified.tqreplace( TQRegExp( "\\s" ), TQString() )).tqreplace( '|', TQString::tqfromLatin1(">") ); + simplified = TQString(simplified.replace( TQRegExp( "\\s" ), TQString() )).replace( '|', TQString::tqfromLatin1(">") ); while ( simplified.startsWith( TQString::tqfromLatin1(">>>>") ) ) simplified = simplified.mid(3); if ( simplified.startsWith( TQString::tqfromLatin1(">>>") ) || simplified.startsWith( TQString::tqfromLatin1("> > >") ) ) @@ -189,7 +189,7 @@ int KSpellingHighlighter::highlightParagraph( const TQString &text, // leave #includes, diffs, and quoted replies alone TQString diffAndCo( ">|" ); - bool isCode = diffAndCo.tqfind(text[0]) != -1; + bool isCode = diffAndCo.find(text[0]) != -1; if ( !text.endsWith(" ") ) d->alwaysEndsWithSpace = false; @@ -375,7 +375,7 @@ bool KDictSpellingHighlighter::isMisspelled( const TQString &word ) // get tricky... // For auto detection ignore signature and reply prefix if ( !d->autoReady ) - d->autoIgnoreDict.tqreplace( word, Ignore ); + d->autoIgnoreDict.replace( word, Ignore ); // "dict" is used as a cache to store the results of KSpell TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict ); @@ -383,14 +383,14 @@ bool KDictSpellingHighlighter::isMisspelled( const TQString &word ) if ( d->autoReady && ( d->autoDict[word] != NotOkay )) { if ( !d->autoIgnoreDict[word] ) ++d->errorCount; - d->autoDict.tqreplace( word, NotOkay ); + d->autoDict.replace( word, NotOkay ); } return d->active; } if ( !dict->isEmpty() && (*dict)[word] == Okay ) { if ( d->autoReady && !d->autoDict[word] ) { - d->autoDict.tqreplace( word, Okay ); + d->autoDict.replace( word, Okay ); } return false; } @@ -399,7 +399,7 @@ bool KDictSpellingHighlighter::isMisspelled( const TQString &word ) int para, index; textEdit()->getCursorPosition( ¶, &index ); ++d->wordCount; - dict->tqreplace( word, Unknown ); + dict->replace( word, Unknown ); ++d->checksRequested; if (currentParagraph() != para) d->completeRehighlightRequired = true; @@ -425,9 +425,9 @@ void KDictSpellingHighlighter::slotMisspelling (const TQString &originalWord, co Q_UNUSED( suggestions ); // kdDebug() << suggestions.join( " " ).latin1() << endl; if ( d->globalConfig ) - d->sDict()->tqreplace( originalWord, NotOkay ); + d->sDict()->replace( originalWord, NotOkay ); else - d->mDict->tqreplace( originalWord, NotOkay ); + d->mDict->replace( originalWord, NotOkay ); //Emit this baby so that apps that want to have suggestions in a popup over //the misspelled word can catch them. @@ -441,7 +441,7 @@ void KDictSpellingHighlighter::slotCorrected(const TQString &word, { TQDict<int>* dict = ( d->globalConfig ? d->sDict() : d->mDict ); if ( !dict->isEmpty() && (*dict)[word] == Unknown ) { - dict->tqreplace( word, Okay ); + dict->replace( word, Okay ); } ++d->checksDone; if (d->checksDone == d->checksRequested) { diff --git a/kdeui/ktabbar.cpp b/kdeui/ktabbar.cpp index 8e2477e5f..eed23ebfe 100644 --- a/kdeui/ktabbar.cpp +++ b/kdeui/ktabbar.cpp @@ -76,7 +76,7 @@ void KTabBar::setTabEnabled( int id, bool enabled ) if ( t->isEnabled() ) { r = r.unite( t->rect() ); - tablist->append( tablist->take( tablist->tqfindRef( t ) ) ); + tablist->append( tablist->take( tablist->findRef( t ) ) ); emit selected( t->identifier() ); } } @@ -181,7 +181,7 @@ void KTabBar::mouseMoveEvent( TQMouseEvent *e ) } rect.moveLeft( t->rect().left() + 2 + xoff ); rect.moveTop( t->rect().center().y()-pixmap.height()/2 + yoff ); - if ( rect.tqcontains( e->pos() ) ) { + if ( rect.contains( e->pos() ) ) { if ( mHoverCloseButton ) { if ( mHoverCloseButtonTab == t ) return; @@ -300,7 +300,7 @@ void KTabBar::setTabColor( int id, const TQColor& color ) const TQColor &KTabBar::tabColor( int id ) const { - if ( mTabColors.tqcontains( id ) ) + if ( mTabColors.contains( id ) ) return mTabColors[id]; return tqcolorGroup().foreground(); @@ -312,7 +312,7 @@ int KTabBar::insertTab( TQTab *t, int index ) if ( mTabCloseActivatePrevious && count() > 2 ) { TQPtrList<TQTab> *tablist = tabList(); - tablist->insert( count()-2, tablist->take( tablist->tqfindRef( t ) ) ); + tablist->insert( count()-2, tablist->take( tablist->findRef( t ) ) ); } return res; @@ -359,7 +359,7 @@ void KTabBar::paintLabel( TQPainter *p, const TQRect& br, flags |= TQStyle::Style_HasFocus; TQColorGroup cg( tqcolorGroup() ); - if ( mTabColors.tqcontains( t->identifier() ) ) + if ( mTabColors.contains( t->identifier() ) ) cg.setColor( TQColorGroup::Foreground, mTabColors[t->identifier()] ); tqstyle().tqdrawControl( TQStyle::CE_TabBarLabel, p, this, r, diff --git a/kdeui/ktextbrowser.cpp b/kdeui/ktextbrowser.cpp index dfd283455..6b3685a81 100644 --- a/kdeui/ktextbrowser.cpp +++ b/kdeui/ktextbrowser.cpp @@ -60,7 +60,7 @@ void KTextBrowser::setSource( const TQString& name ) return; } - if( name.tqfind('@') > -1 ) + if( name.find('@') > -1 ) { if( !mNotifyClick ) { diff --git a/kdeui/ktip.cpp b/kdeui/ktip.cpp index 269a7c472..f8e30fcd1 100644 --- a/kdeui/ktip.cpp +++ b/kdeui/ktip.cpp @@ -115,12 +115,12 @@ void KTipDatabase::addTips(const TQString& tipFile ) const TQRegExp rx("\\n+"); int pos = -1; - while ((pos = content.tqfind("<html>", pos + 1, false)) != -1) + while ((pos = content.find("<html>", pos + 1, false)) != -1) { // to make translations work, tip extraction here must exactly // match what is done by the preparetips script TQString tip = content - .mid(pos + 6, content.tqfind("</html>", pos, false) - pos - 6) + .mid(pos + 6, content.find("</html>", pos, false) - pos - 6) .replace(rx, "\n"); if (!tip.endsWith("\n")) tip += "\n"; diff --git a/kdeui/ktoolbar.cpp b/kdeui/ktoolbar.cpp index 6a5995b69..a3d266efa 100644 --- a/kdeui/ktoolbar.cpp +++ b/kdeui/ktoolbar.cpp @@ -427,7 +427,7 @@ int KToolBar::insertAnimatedWidget(int id, TQObject *receiver, const char *slot, KAnimWidget *KToolBar::animatedWidget( int id ) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; KAnimWidget *aw = tqt_dynamic_cast<KAnimWidget *>(*it); @@ -610,7 +610,7 @@ TQString KToolBar::getComboItem (int id, int index) const KComboBox * KToolBar::getCombo(int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; return tqt_dynamic_cast<KComboBox *>( *it ); @@ -619,7 +619,7 @@ KComboBox * KToolBar::getCombo(int id) KLineEdit * KToolBar::getLined (int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; return tqt_dynamic_cast<KLineEdit *>( *it ); @@ -628,7 +628,7 @@ KLineEdit * KToolBar::getLined (int id) KToolBarButton * KToolBar::getButton (int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return 0; return tqt_dynamic_cast<KToolBarButton *>( *it ); @@ -637,7 +637,7 @@ KToolBarButton * KToolBar::getButton (int id) void KToolBar::alignItemRight (int id, bool right ) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) return; if ( rightAligned && !right && (*it) == rightAligned ) @@ -649,7 +649,7 @@ void KToolBar::alignItemRight (int id, bool right ) TQWidget *KToolBar::getWidget (int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); return ( it == id2widget.end() ) ? 0 : (*it); } @@ -677,7 +677,7 @@ void KToolBar::clear () void KToolBar::removeItem(int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; @@ -693,7 +693,7 @@ void KToolBar::removeItem(int id) void KToolBar::removeItemDelayed(int id) { - Id2WidgetMap::Iterator it = id2widget.tqfind( id ); + Id2WidgetMap::Iterator it = id2widget.find( id ); if ( it == id2widget.end() ) { kdDebug(220) << name() << " KToolBar::removeItem item " << id << " not found" << endl; @@ -729,7 +729,7 @@ void KToolBar::showItem (int id) int KToolBar::itemIndex (int id) { TQWidget *w = getWidget(id); - return w ? widgets.tqfindRef(w) : -1; + return w ? widgets.findRef(w) : -1; } int KToolBar::idAt (int index) @@ -1006,7 +1006,7 @@ void KToolBar::saveState() if ( curname == barname ) { just_append = false; - local.documentElement().tqreplaceChild( current, elem ); + local.documentElement().replaceChild( current, elem ); break; } } @@ -1280,7 +1280,7 @@ void KToolBar::childEvent( TQChildEvent *e ) if ( !tqt_dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu // prevent items that have been explicitly inserted by insert*() from // being inserted again - if ( !widget2id.tqcontains( w ) ) + if ( !widget2id.contains( w ) ) { int dummy = -1; insertWidgetInternal( w, dummy, -1 ); @@ -2250,7 +2250,7 @@ void KToolBar::widgetDestroyed() void KToolBar::removeWidgetInternal( TQWidget * w ) { widgets.removeRef( w ); - TQMap< TQWidget*, int >::Iterator it = widget2id.tqfind( w ); + TQMap< TQWidget*, int >::Iterator it = widget2id.find( w ); if ( it == widget2id.end() ) return; id2widget.remove( *it ); diff --git a/kdeui/ktoolbarhandler.cpp b/kdeui/ktoolbarhandler.cpp index 45c1962db..34bfe7046 100644 --- a/kdeui/ktoolbarhandler.cpp +++ b/kdeui/ktoolbarhandler.cpp @@ -55,7 +55,7 @@ namespace if ( !toolBar ) continue; - if ( oldToolBarList.tqfindRef( toolBar ) == -1 ) + if ( oldToolBarList.findRef( toolBar ) == -1 ) m_needsRebuild = true; m_toolBars.append( toolBar ); diff --git a/kdeui/ktoolbarradiogroup.cpp b/kdeui/ktoolbarradiogroup.cpp index 190b1e395..ab8e50e08 100644 --- a/kdeui/ktoolbarradiogroup.cpp +++ b/kdeui/ktoolbarradiogroup.cpp @@ -53,15 +53,15 @@ void KToolBarRadioGroup::addButton (int id) void KToolBarRadioGroup::removeButton (int id) { - if (!buttons->tqfind(id)) + if (!buttons->find(id)) return; - buttons->tqfind(id)->setRadio(false); + buttons->find(id)->setRadio(false); buttons->remove(id); } void KToolBarRadioGroup::slotToggled(int id) { - if (buttons->tqfind(id) && buttons->tqfind(id)->isOn()) + if (buttons->find(id) && buttons->find(id)->isOn()) { TQIntDictIterator<KToolBarButton> it(*buttons); while (it.current()) diff --git a/kdeui/kxmlguiclient.cpp b/kdeui/kxmlguiclient.cpp index a20be86d6..dd7458ede 100644 --- a/kdeui/kxmlguiclient.cpp +++ b/kdeui/kxmlguiclient.cpp @@ -269,7 +269,7 @@ bool KXMLGUIClient::mergeXML( TQDomElement &base, const TQDomElement &additive, // tag, in any event and just replace the old with the new if ( additive.attribute(attrNoMerge) == attrOne ) // ### use toInt() instead? (Simon) { - base.parentNode().tqreplaceChild(additive, base); + base.parentNode().replaceChild(additive, base); return true; } @@ -572,7 +572,7 @@ void KXMLGUIClient::insertChildClient( KXMLGUIClient *child ) void KXMLGUIClient::removeChildClient( KXMLGUIClient *child ) { - assert( d->m_children.tqcontainsRef( child ) ); + assert( d->m_children.containsRef( child ) ); d->m_children.removeRef( child ); child->d->m_parent = 0; } @@ -734,7 +734,7 @@ TQString KXMLGUIClient::findVersionNumber( const TQString &xml ) case ST_AFTER_OPEN: { //Jump to gui.. - int guipos = xml.tqfind("gui", pos, false /*case-insensitive*/); + int guipos = xml.find("gui", pos, false /*case-insensitive*/); if (guipos == -1) return TQString::null; //Reject @@ -747,7 +747,7 @@ TQString KXMLGUIClient::findVersionNumber( const TQString &xml ) break; case ST_EXPECT_VERSION: { - int verpos = xml.tqfind("version=\"", pos, false /*case-insensitive*/); + int verpos = xml.find("version=\"", pos, false /*case-insensitive*/); if (verpos == -1) return TQString::null; //Reject @@ -810,7 +810,7 @@ KXMLGUIClient::ActionPropertiesMap KXMLGUIClient::extractActionProperties( const if ( actionName.isEmpty() ) continue; - TQMap<TQString, TQMap<TQString, TQString> >::Iterator propIt = properties.tqfind( actionName ); + TQMap<TQString, TQMap<TQString, TQString> >::Iterator propIt = properties.find( actionName ); if ( propIt == properties.end() ) propIt = properties.insert( actionName, TQMap<TQString, TQString>() ); @@ -874,7 +874,7 @@ void KXMLGUIClient::addStateActionEnabled(const TQString& state, stateChange.actionsToEnable.append( action ); //kdDebug() << "KXMLGUIClient::addStateActionEnabled( " << state << ", " << action << ")" << endl; - m_actionsStateMap.tqreplace( state, stateChange ); + m_actionsStateMap.replace( state, stateChange ); } @@ -886,7 +886,7 @@ void KXMLGUIClient::addStateActionDisabled(const TQString& state, stateChange.actionsToDisable.append( action ); //kdDebug() << "KXMLGUIClient::addStateActionDisabled( " << state << ", " << action << ")" << endl; - m_actionsStateMap.tqreplace( state, stateChange ); + m_actionsStateMap.replace( state, stateChange ); } diff --git a/kdeui/kxmlguifactory.cpp b/kdeui/kxmlguifactory.cpp index 169511c49..2714b1207 100644 --- a/kdeui/kxmlguifactory.cpp +++ b/kdeui/kxmlguifactory.cpp @@ -240,7 +240,7 @@ void KXMLGUIFactory::addClient( KXMLGUIClient *client ) d->guiClient = client; // add this client to our client list - if ( !d->m_clients.tqcontainsRef( client ) ) + if ( !d->m_clients.containsRef( client ) ) d->m_clients.append( client ); else kdDebug(1002) << "XMLGUI client already added " << client << endl; diff --git a/kdeui/kxmlguifactory_p.cpp b/kdeui/kxmlguifactory_p.cpp index a5ce2b4ef..279753277 100644 --- a/kdeui/kxmlguifactory_p.cpp +++ b/kdeui/kxmlguifactory_p.cpp @@ -136,7 +136,7 @@ ContainerNode *ContainerNode::findContainer( const TQString &name, const TQStrin { for (; nIt.current(); ++nIt ) if ( nIt.current()->name == name && - !excludeList->tqcontainsRef( nIt.current()->container ) ) + !excludeList->containsRef( nIt.current()->container ) ) { res = nIt.current(); break; @@ -149,7 +149,7 @@ ContainerNode *ContainerNode::findContainer( const TQString &name, const TQStrin for (; nIt.current(); ++nIt ) { if ( nIt.current()->tagName == tagName && - !excludeList->tqcontainsRef( nIt.current()->container ) + !excludeList->containsRef( nIt.current()->container ) /* * It is a bad idea to also compare the client, because * we don't want to do so in situations like these: @@ -226,7 +226,7 @@ void ContainerNode::plugActionList( BuildState &state, const MergingIndexList::I TQString k( mergingIdx.mergingName ); - if ( k.tqfind( tagActionList ) == -1 ) + if ( k.find( tagActionList ) == -1 ) return; k = k.mid( tagActionList.length() ); @@ -268,7 +268,7 @@ void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList: TQString k = mergingIdx.mergingName; - if ( k.tqfind( tagActionList ) == -1 ) + if ( k.find( tagActionList ) == -1 ) return; k = k.mid( tagActionList.length() ); @@ -283,7 +283,7 @@ void ContainerNode::unplugActionList( BuildState &state, const MergingIndexList: TQString(), mergingIndices.end() ); - ActionListMap::Iterator lIt( client->actionLists.tqfind( k ) ); + ActionListMap::Iterator lIt( client->actionLists.find( k ) ); if ( lIt == client->actionLists.end() ) return; @@ -568,9 +568,9 @@ void BuildHelper::processElement( const TQDomElement &e ) bool isActionTag = ( tag == tagAction ); - if ( isActionTag || customTags.tqfindIndex( tag ) != -1 ) + if ( isActionTag || customTags.findIndex( tag ) != -1 ) processActionOrCustomElement( e, isActionTag ); - else if ( containerTags.tqfindIndex( tag ) != -1 ) + else if ( containerTags.findIndex( tag ) != -1 ) processContainerElement( e, tag, currName ); else if ( tag == tagMerge || tag == tagDefineGroup || tag == tagActionList ) processMergeElement( tag, currName, e ); diff --git a/kdeui/qxembed.cpp b/kdeui/qxembed.cpp index 794579cdb..6288fea57 100644 --- a/kdeui/qxembed.cpp +++ b/kdeui/qxembed.cpp @@ -489,7 +489,7 @@ static int qxembed_x11_event_filter( XEvent* e) { // L0681: Search saved focus widget. TQWidget* focusCurrent = 0; - TQGuardedPtr<TQWidget>* fw = focusMap->tqfind( w->tqtopLevelWidget() ); + TQGuardedPtr<TQWidget>* fw = focusMap->find( w->tqtopLevelWidget() ); if ( fw ) { focusCurrent = *fw; // L0682: Remove it from the map diff --git a/kdewidgets/makekdewidgets.cpp b/kdewidgets/makekdewidgets.cpp index b3fffa7e1..c5141d3f6 100644 --- a/kdewidgets/makekdewidgets.cpp +++ b/kdewidgets/makekdewidgets.cpp @@ -172,7 +172,7 @@ void buildFile( TQTextStream &ts, const TQString& group, const TQString& fileNam for ( uint idx = 0; idx < includes.count(); ++idx ) ts << "#include <" << includes[ idx ] << ">" << endl; TQStringList classes = input.groupList(); - classes.remove( classes.tqfind( "Global" ) ); + classes.remove( classes.find( "Global" ) ); // Autogenerate widget includes here for ( uint idx = 0; idx < classes.count(); ++idx ) ts << buildWidgetInclude( classes[ idx ], input ) << endl; diff --git a/kdoctools/kio_help.cpp b/kdoctools/kio_help.cpp index 00d968e6a..9da16d83e 100644 --- a/kdoctools/kio_help.cpp +++ b/kdoctools/kio_help.cpp @@ -75,7 +75,7 @@ TQString HelpProtocol::langLookup(const TQString& fname) if ( ( *it ).right( 5 ) == ".html" ) { - TQString file = (*it).left((*it).tqfindRev('/')) + "/index.docbook"; + TQString file = (*it).left((*it).findRev('/')) + "/index.docbook"; kdDebug( 7119 ) << "Looking for help in: " << file << endl; info.setFile(file); if (info.exists() && info.isFile() && info.isReadable()) @@ -189,7 +189,7 @@ void HelpProtocol::get( const KURL& url ) return; } } else { - TQString docbook_file = file.left(file.tqfindRev('/')) + "/index.docbook"; + TQString docbook_file = file.left(file.findRev('/')) + "/index.docbook"; if (!KStandardDirs::exists(file)) { file = docbook_file; } else { @@ -217,9 +217,9 @@ void HelpProtocol::get( const KURL& url ) if (mParsed.isEmpty()) { tqunicodeError( i18n( "The requested help file could not be parsed:<br>%1" ).arg( file ) ); } else { - int pos1 = mParsed.tqfind( "charset=" ); + int pos1 = mParsed.find( "charset=" ); if ( pos1 > 0 ) { - int pos2 = mParsed.tqfind( '"', pos1 ); + int pos2 = mParsed.find( '"', pos1 ); if ( pos2 > 0 ) { mParsed.replace( pos1, pos2 - pos1, "charset=UTF-8" ); } @@ -274,7 +274,7 @@ void HelpProtocol::get( const KURL& url ) { int index = 0; while ( true ) { - index = mParsed.tqfind( TQRegExp( "<a name=" ), index); + index = mParsed.find( TQRegExp( "<a name=" ), index); if ( index == -1 ) { kdDebug( 7119 ) << "no anchor\n"; break; // use whatever is the target, most likely index.html @@ -283,12 +283,12 @@ void HelpProtocol::get( const KURL& url ) if ( mParsed.mid( index, 11 + anchor.length() ).lower() == TQString( "<a name=\"%1\">" ).arg( anchor ) ) { - index = mParsed.tqfindRev( "<FILENAME filename=", index ) + + index = mParsed.findRev( "<FILENAME filename=", index ) + strlen( "<FILENAME filename=\"" ); TQString filename=mParsed.mid( index, 2000 ); - filename = filename.left( filename.tqfind( '\"' ) ); + filename = filename.left( filename.find( '\"' ) ); TQString path = target.path(); - path = path.left( path.tqfindRev( '/' ) + 1) + filename; + path = path.left( path.findRev( '/' ) + 1) + filename; kdDebug( 7119 ) << "anchor found in " << path <<endl; target.setPath( path ); break; @@ -307,9 +307,9 @@ void HelpProtocol::emitFile( const KURL& url ) { infoMessage(i18n("Looking up section")); - TQString filename = url.path().mid(url.path().tqfindRev('/') + 1); + TQString filename = url.path().mid(url.path().findRev('/') + 1); - int index = mParsed.tqfind(TQString("<FILENAME filename=\"%1\"").arg(filename)); + int index = mParsed.find(TQString("<FILENAME filename=\"%1\"").arg(filename)); if (index == -1) { if ( filename == "index.html" ) { data( fromUnicode( mParsed ) ); diff --git a/kdoctools/meinproc.cpp b/kdoctools/meinproc.cpp index f3a5fc983..b0e65e673 100644 --- a/kdoctools/meinproc.cpp +++ b/kdoctools/meinproc.cpp @@ -212,7 +212,7 @@ int main(int argc, char **argv) { QCStringList::ConstIterator end = paramList.end(); for ( ; it != end; ++it ) { const TQCString tuple = *it; - const int ch = tuple.tqfind( '=' ); + const int ch = tuple.find( '=' ); if ( ch == -1 ) { kdError() << "Key-Value tuple '" << tuple << "' lacks a '='!" << endl; return( 2 ); @@ -282,7 +282,7 @@ int main(int argc, char **argv) { goto end; } - if (output.tqfind( "<FILENAME " ) == -1 || args->isSet( "stdout" ) || args->isSet("output") ) + if (output.find( "<FILENAME " ) == -1 || args->isSet( "stdout" ) || args->isSet("output") ) { TQFile file; if (args->isSet( "stdout" ) ) { @@ -302,13 +302,13 @@ int main(int argc, char **argv) { } else { int index = 0; while (true) { - index = output.tqfind("<FILENAME ", index); + index = output.find("<FILENAME ", index); if (index == -1) break; int filename_index = index + strlen("<FILENAME filename=\""); TQString filename = output.mid(filename_index, - output.tqfind("\"", filename_index) - + output.find("\"", filename_index) - filename_index); TQString filedata = splitOut(output, index); diff --git a/kdoctools/xslt.cpp b/kdoctools/xslt.cpp index af3d7520b..5a40d6e60 100644 --- a/kdoctools/xslt.cpp +++ b/kdoctools/xslt.cpp @@ -140,8 +140,8 @@ TQString splitOut(const TQString &parsed, int index) TQString filedata; while (true) { - int endindex = parsed.tqfind("</FILENAME>", index); - int startindex = parsed.tqfind("<FILENAME ", index) + 1; + int endindex = parsed.find("</FILENAME>", index); + int startindex = parsed.find("<FILENAME ", index) + 1; // kdDebug() << "FILENAME " << startindex << " " << endindex << " " << inside << " " << parsed.mid(startindex + 18, 15)<< " " << parsed.length() << endl; @@ -166,10 +166,10 @@ TQString splitOut(const TQString &parsed, int index) } - index = filedata.tqfind("<FILENAME "); + index = filedata.find("<FILENAME "); if (index > 0) { - int endindex = filedata.tqfindRev("</FILENAME>"); + int endindex = filedata.findRev("</FILENAME>"); while (filedata.tqat(endindex) != '>') endindex++; endindex++; filedata = filedata.left(index) + filedata.mid(endindex); diff --git a/khtml/css/css_stylesheetimpl.cpp b/khtml/css/css_stylesheetimpl.cpp index a27ed5286..8189a6846 100644 --- a/khtml/css/css_stylesheetimpl.cpp +++ b/khtml/css/css_stylesheetimpl.cpp @@ -324,7 +324,7 @@ StyleSheetListImpl::~StyleSheetListImpl() void StyleSheetListImpl::add( StyleSheetImpl* s ) { - if ( !styleSheets.tqcontainsRef( s ) ) { + if ( !styleSheets.containsRef( s ) ) { s->ref(); styleSheets.append( s ); } @@ -379,8 +379,8 @@ MediaListImpl::MediaListImpl( CSSRuleImpl *parentRule, const DOMString &media ) bool MediaListImpl::contains( const DOMString &medium ) const { - return m_lstMedia.empty() || m_lstMedia.tqcontains( medium ) || - m_lstMedia.tqcontains( "all" ); + return m_lstMedia.empty() || m_lstMedia.contains( medium ) || + m_lstMedia.contains( "all" ); } CSSStyleSheetImpl *MediaListImpl::parentStyleSheet() const diff --git a/khtml/css/css_valueimpl.cpp b/khtml/css/css_valueimpl.cpp index cb63ceb64..3fa38efe9 100644 --- a/khtml/css/css_valueimpl.cpp +++ b/khtml/css/css_valueimpl.cpp @@ -896,21 +896,21 @@ FontFamilyValueImpl::FontFamilyValueImpl( const TQString &string) parsedFontName = parsedFontName.lower(); // kdDebug(0) << "searching for face '" << parsedFontName << "'" << endl; - int pos = available.tqfind( ',' + parsedFontName + ',', 0, false ); + int pos = available.find( ',' + parsedFontName + ',', 0, false ); if ( pos == -1 ) { // many pages add extra MSs to make sure it's windows only ;( if ( parsedFontName.startsWith( "ms " ) ) parsedFontName = parsedFontName.mid( 3 ); if ( parsedFontName.endsWith( " ms" ) ) parsedFontName.truncate( parsedFontName.length() - 3 ); - pos = available.tqfind( ",ms " + parsedFontName + ',', 0, false ); + pos = available.find( ",ms " + parsedFontName + ',', 0, false ); if ( pos == -1 ) - pos = available.tqfind( ',' + parsedFontName + " ms,", 0, false ); + pos = available.find( ',' + parsedFontName + " ms,", 0, false ); } if ( pos != -1 ) { ++pos; - int p = available.tqfind(',', pos); + int p = available.find(',', pos); assert( p != -1 ); // available is supposed to start and end with , parsedFontName = available.mid( pos, p - pos); // kdDebug(0) << "going for '" << parsedFontName << "'" << endl; diff --git a/khtml/css/cssstyleselector.cpp b/khtml/css/cssstyleselector.cpp index 08b47da4b..32391bb7f 100644 --- a/khtml/css/cssstyleselector.cpp +++ b/khtml/css/cssstyleselector.cpp @@ -257,7 +257,7 @@ CSSStyleSelector::CSSStyleSelector( DocumentImpl* doc, TQString userStyleSheet, u.setQuery( TQString::null ); u.setRef( TQString::null ); encodedurl.file = u.url(); - int pos = encodedurl.file.tqfindRev('/'); + int pos = encodedurl.file.findRev('/'); encodedurl.path = encodedurl.file; if ( pos > 0 ) { encodedurl.path.truncate( pos ); @@ -828,12 +828,12 @@ unsigned int CSSStyleSelector::addInlineDeclarations(DOM::ElementImpl* e, static void cleanpath(TQString &path) { int pos; - while ( (pos = path.tqfind( "/../" )) != -1 ) { + while ( (pos = path.find( "/../" )) != -1 ) { int prev = 0; if ( pos > 0 ) - prev = path.tqfindRev( "/", pos -1 ); + prev = path.findRev( "/", pos -1 ); // don't remove the host, i.e. http://foo.org/../foo.html - if (prev < 0 || (prev > 3 && path.tqfindRev("://", prev-1) == prev-2)) + if (prev < 0 || (prev > 3 && path.findRev("://", prev-1) == prev-2)) path.remove( pos, 3); else // matching directory found ? @@ -846,9 +846,9 @@ static void cleanpath(TQString &path) // We don't want to waste a function call on the search for the anchor // in the vast majority of cases where there is no "//" in the path. int refPos = -2; - while ( (pos = path.tqfind( "//", pos )) != -1) { + while ( (pos = path.find( "//", pos )) != -1) { if (refPos == -2) - refPos = path.tqfind("#", 0); + refPos = path.find("#", 0); if (refPos > 0 && pos >= refPos) break; @@ -857,7 +857,7 @@ static void cleanpath(TQString &path) else pos += 2; } - while ( (pos = path.tqfind( "/./" )) != -1) + while ( (pos = path.find( "/./" )) != -1) path.remove( pos, 2 ); //kdDebug() << "checkPseudoState " << path << endl; } @@ -904,7 +904,7 @@ static bool matchNth(int count, const TQString& nth) b = 0; } else { - int n = nth.tqfind('n'); + int n = nth.find('n'); if (n != -1) { if (nth[0] == '-') if (n==1) @@ -917,11 +917,11 @@ static bool matchNth(int count, const TQString& nth) else a = nth.left(n).toInt(); - int p = nth.tqfind('+'); + int p = nth.find('+'); if (p != -1) b = nth.mid(p+1).toInt(); else { - p = nth.tqfind('-'); + p = nth.find('-'); b = -nth.mid(p+1).toInt(); } } @@ -1173,7 +1173,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm int pos = 0; for ( ;; ) { - pos = val_str.string().tqfind(sel_str.string(), pos, caseSensitive); + pos = val_str.string().find(sel_str.string(), pos, caseSensitive); if ( pos == -1 ) return false; if ( pos == 0 || val_uc[pos-1].isSpace() ) { int endpos = pos + sel_len; @@ -1189,7 +1189,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm //kdDebug( 6080 ) << "checking for contains match" << endl; TQConstString val_str(value->tqunicode(), value->length()); TQConstString sel_str(sel->value.tqunicode(), sel->value.length()); - return val_str.string().tqcontains(sel_str.string(), caseSensitive); + return val_str.string().contains(sel_str.string(), caseSensitive); } case CSSSelector::Begin: { @@ -1214,7 +1214,7 @@ bool CSSStyleSelector::checkSimpleSelector(DOM::CSSSelector *sel, DOM::ElementIm const TQString& selStr = sel_str.string(); if(str.length() < selStr.length()) return false; // Check if str begins with selStr: - if(str.tqfind(selStr, 0, caseSensitive) != 0) return false; + if(str.find(selStr, 0, caseSensitive) != 0) return false; // It does. Check for exact match or following '-': if(str.length() != selStr.length() && str[selStr.length()] != '-') return false; diff --git a/khtml/dom/css_value.cpp b/khtml/dom/css_value.cpp index 20faff88a..90d1b1570 100644 --- a/khtml/dom/css_value.cpp +++ b/khtml/dom/css_value.cpp @@ -126,7 +126,7 @@ void CSSStyleDeclaration::setProperty( const DOMString &propName, const DOMStrin if (!id) return; bool important = false; TQString str = priority.string(); - if (str.tqfind("important", 0, false) != -1) + if (str.find("important", 0, false) != -1) important = true; static_cast<CSSStyleDeclarationImpl *>(impl)->setProperty( id, value, important ); diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp index 2646b8e26..4fa87e2ce 100644 --- a/khtml/ecma/kjs_binding.cpp +++ b/khtml/ecma/kjs_binding.cpp @@ -190,7 +190,7 @@ ScriptInterpreter::~ScriptInterpreter() #ifdef KJS_VERBOSE kdDebug(6070) << "ScriptInterpreter::~ScriptInterpreter " << this << " for part=" << m_frame << endl; #endif - assert( interpreterList && interpreterList->tqcontains( this ) ); + assert( interpreterList && interpreterList->contains( this ) ); interpreterList->remove( this ); if ( interpreterList->isEmpty() ) { delete interpreterList; diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h index 0672cd8eb..c55da21ce 100644 --- a/khtml/ecma/kjs_binding.h +++ b/khtml/ecma/kjs_binding.h @@ -103,7 +103,7 @@ namespace KJS { m_domObjects.insert( objectHandle, obj ); } void customizedDOMObject( DOMObject* obj ) { - m_customizedDomObjects.tqreplace( obj, this ); + m_customizedDomObjects.replace( obj, this ); } bool deleteDOMObject( void* objectHandle ) { DOMObject* obj = m_domObjects.take( objectHandle ); diff --git a/khtml/ecma/kjs_css.cpp b/khtml/ecma/kjs_css.cpp index ea651336e..b42f9dd02 100644 --- a/khtml/ecma/kjs_css.cpp +++ b/khtml/ecma/kjs_css.cpp @@ -185,7 +185,7 @@ void DOMCSSStyleDeclaration::tryPut(ExecState *exec, const Identifier &propertyN if (propvalue.isEmpty()) styleDecl.removeProperty(prop); else { - int important = propvalue.tqfind("!important", 0, false); + int important = propvalue.find("!important", 0, false); if (important == -1) styleDecl.setProperty(prop, DOM::DOMString(propvalue), ""); else diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp index 8ebd20349..b3c2a41b1 100644 --- a/khtml/ecma/kjs_debugwin.cpp +++ b/khtml/ecma/kjs_debugwin.cpp @@ -1123,7 +1123,7 @@ bool KJSDebugWin::haveBreakpoint(SourceFile *sourceFile, int line0, int line1) for (int i = 0; i < m_breakpointCount; i++) { int sourceId = m_breakpoints[i].sourceId; int lineno = m_breakpoints[i].lineno; - if (m_sourceFragments.tqcontains(sourceId) && + if (m_sourceFragments.contains(sourceId) && m_sourceFragments[sourceId]->sourceFile == sourceFile) { int absLineno = m_sourceFragments[sourceId]->baseLine+lineno-1; if (absLineno >= line0 && absLineno <= line1) diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp index 657addcf3..637b6a8e1 100644 --- a/khtml/ecma/kjs_navigator.cpp +++ b/khtml/ecma/kjs_navigator.cpp @@ -188,14 +188,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String("Mozilla"); case AppName: // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape - if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1) + if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::tqfromLatin1("compatible")) == -1) { //kdDebug() << "appName -> Mozilla" << endl; return String("Netscape"); } - if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) { //kdDebug() << "appName -> IE" << endl; return String("Microsoft Internet Explorer"); @@ -204,17 +204,17 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String("Konqueror"); case AppVersion: // We assume the string is something like Mozilla/version (properties) - return String(userAgent.mid(userAgent.tqfind('/') + 1)); + return String(userAgent.mid(userAgent.find('/') + 1)); case Product: // We are pretending to be Mozilla or Safari - if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1) + if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::tqfromLatin1("compatible")) == -1) { return String("Gecko"); } // When spoofing as IE, we use Undefined(). - if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) { return Undefined(); } @@ -222,9 +222,9 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String("Konqueror/khtml"); case ProductSub: { - int ix = userAgent.tqfind("Gecko"); + int ix = userAgent.find("Gecko"); if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.tqunicode()[ix+5] == TQChar('/') && - userAgent.tqfind(TQRegExp("\\d{8}"), ix+6) == ix+6) + userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6) { // We have Gecko/<productSub> in the UA string return String(userAgent.mid(ix+6, 8)); @@ -245,10 +245,10 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String(userAgent); case Platform: // yet another evil hack, but necessary to spoof some sites... - if ( (userAgent.tqfind(TQString::tqfromLatin1("Win"),0,false)>=0) ) + if ( (userAgent.find(TQString::tqfromLatin1("Win"),0,false)>=0) ) return String(TQString::tqfromLatin1("Win32")); - else if ( (userAgent.tqfind(TQString::tqfromLatin1("Macintosh"),0,false)>=0) || - (userAgent.tqfind(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) ) + else if ( (userAgent.find(TQString::tqfromLatin1("Macintosh"),0,false)>=0) || + (userAgent.find(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) ) return String(TQString::tqfromLatin1("MacPPC")); else { diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp index 55e9aeff6..2469ac681 100644 --- a/khtml/ecma/kjs_proxy.cpp +++ b/khtml/ecma/kjs_proxy.cpp @@ -343,8 +343,8 @@ void KJSProxyImpl::applyUserAgent() assert( m_script ); TQString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host(); TQString userAgent = KProtocolManager::userAgentForHost(host); - if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) { m_script->setCompatMode(Interpreter::IECompat); #ifdef KJS_VERBOSE @@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent() } else // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape - if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1 && - userAgent.tqfind(TQString::tqfromLatin1("KHTML")) == -1) + if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::tqfromLatin1("compatible")) == -1 && + userAgent.find(TQString::tqfromLatin1("KHTML")) == -1) { m_script->setCompatMode(Interpreter::NetscapeCompat); #ifdef KJS_VERBOSE diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp index 77a098680..067a189ac 100644 --- a/khtml/ecma/kjs_window.cpp +++ b/khtml/ecma/kjs_window.cpp @@ -1446,7 +1446,7 @@ void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory) // check if we're allowed to inject javascript // SYNC check with khtml_part.cpp::slotRedirect! if ( isSafeScript(exec) || - dstUrl.tqfind(TQString::tqfromLatin1("javascript:"), 0, false) != 0 ) + dstUrl.find(TQString::tqfromLatin1("javascript:"), 0, false) != 0 ) part->scheduleRedirection(-1, dstUrl, lockHistory); @@ -1618,7 +1618,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString while (it != flist.end()) { TQString s = *it++; TQString key, val; - int pos = s.tqfind('='); + int pos = s.find('='); if (pos >= 0) { key = s.left(pos).stripWhiteSpace().lower(); val = s.mid(pos + 1).stripWhiteSpace().lower(); @@ -2271,7 +2271,7 @@ void WindowQObject::timerEvent(TQTimerEvent *) it = TQPtrListIterator<ScheduledAction>(toExecute); for (; it.current(); ++it) { ScheduledAction *action = it.current(); - if (!scheduledActions.tqcontainsRef(action)) // removed by clearTimeout() + if (!scheduledActions.containsRef(action)) // removed by clearTimeout() continue; action->executing = true; // prevent deletion in clearTimeout() @@ -2288,7 +2288,7 @@ void WindowQObject::timerEvent(TQTimerEvent *) action->executing = false; - if (!scheduledActions.tqcontainsRef(action)) + if (!scheduledActions.containsRef(action)) delete action; else action->nextTime = action->nextTime.addMSecs(action->interval); @@ -2603,8 +2603,8 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att url.setRef(str); break; case Host: { - TQString host = str.left(str.tqfind(":")); - TQString port = str.mid(str.tqfind(":")+1); + TQString host = str.left(str.find(":")); + TQString port = str.mid(str.find(":")+1); url.setHost(host); url.setPort(port.toUInt()); break; diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp index f821d7b95..7b88477f0 100644 --- a/khtml/ecma/xmlhttprequest.cpp +++ b/khtml/ecma/xmlhttprequest.cpp @@ -395,7 +395,7 @@ void XMLHttpRequest::send(const TQString& _body) // through setRequestHeader. NOTE: the user can still disable // this feature at the protocol level (kio_http). // ### does find() ever succeed? the headers are stored in lower case! - if (requestHeaders.tqfind("Referer") == requestHeaders.end()) { + if (requestHeaders.find("Referer") == requestHeaders.end()) { KURL documentURL(doc->URL()); documentURL.setPass(TQString::null); documentURL.setUser(TQString::null); @@ -489,7 +489,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val TQStringList bannedHeaders = TQStringList::split(',', TQString::tqfromLatin1(BANNED_HTTP_HEADERS)); - if (bannedHeaders.tqcontains(name)) + if (bannedHeaders.contains(name)) return; // Denied requestHeaders[name] = value.stripWhiteSpace(); @@ -501,7 +501,7 @@ Value XMLHttpRequest::getAllResponseHeaders() const return Undefined(); } - int endOfLine = responseHeaders.tqfind("\n"); + int endOfLine = responseHeaders.find("\n"); if (endOfLine == -1) { return Undefined(); @@ -535,7 +535,7 @@ Value XMLHttpRequest::getResponseHeader(const TQString& name) const return Undefined(); } - int endOfLine = responseHeaders.tqfind("\n", headerLinePos + matchLength); + int endOfLine = responseHeaders.find("\n", headerLinePos + matchLength); return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace()); } @@ -546,10 +546,10 @@ static Value httpStatus(const TQString& response, bool textStatus = false) return Undefined(); } - int endOfLine = response.tqfind("\n"); + int endOfLine = response.find("\n"); TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine); - int codeStart = firstLine.tqfind(" "); - int codeEnd = firstLine.tqfind(" ", codeStart + 1); + int codeStart = firstLine.find(" "); + int codeEnd = firstLine.find(" ", codeStart + 1); if (codeStart == -1 || codeEnd == -1) { return Undefined(); @@ -643,9 +643,9 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data) // NOTE: Replace a 304 response with a 200! Both IE and Mozilla do this. // Problem first reported through bug# 110272. - int codeStart = responseHeaders.tqfind("304"); + int codeStart = responseHeaders.find("304"); if ( codeStart != -1) { - int codeEnd = responseHeaders.tqfind("\n", codeStart+3); + int codeEnd = responseHeaders.find("\n", codeStart+3); if (codeEnd != -1) responseHeaders.replace(codeStart, (codeEnd-codeStart), "200 OK"); } @@ -659,13 +659,13 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data) #endif if ( decoder == NULL ) { - int pos = responseHeaders.tqfind("content-type:", 0, false); + int pos = responseHeaders.find("content-type:", 0, false); if ( pos > -1 ) { pos += 13; - int index = responseHeaders.tqfind('\n', pos); + int index = responseHeaders.find('\n', pos); TQString type = responseHeaders.mid(pos, (index-pos)); - index = type.tqfind (';'); + index = type.find (';'); if (index > -1) encoding = TQString(type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false))).stripWhiteSpace(); } diff --git a/khtml/html/html_documentimpl.cpp b/khtml/html/html_documentimpl.cpp index a38f6c2fb..a5c78657c 100644 --- a/khtml/html/html_documentimpl.cpp +++ b/khtml/html/html_documentimpl.cpp @@ -233,11 +233,11 @@ HTMLMapElementImpl* HTMLDocumentImpl::getMap(const DOMString& _url) { TQString url = _url.string(); TQString s; - int pos = url.tqfind('#'); + int pos = url.find('#'); //kdDebug(0) << "map pos of #:" << pos << endl; s = TQString(_url.tqunicode() + pos + 1, _url.length() - pos - 1); - TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.tqfind(s); + TQMapConstIterator<TQString,HTMLMapElementImpl*> it = mapMap.find(s); if (it != mapMap.end()) return *it; @@ -297,7 +297,7 @@ static int parseDocTypePart(const TQString& buffer, int index) else if (ch == '-') { int tmpIndex=index; if (buffer[index+1] == '-' && - ((tmpIndex=buffer.tqfind("--", index+2)) != -1)) + ((tmpIndex=buffer.find("--", index+2)) != -1)) index = tmpIndex+2; else return index; @@ -330,7 +330,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // Skip through any comments and processing instructions. int index = 0; do { - index = buffer.tqfind('<', index); + index = buffer.find('<', index); if (index == -1) break; TQChar nextChar = buffer[index+1]; if (nextChar == '!') { @@ -340,10 +340,10 @@ static bool parseDocTypeDeclaration(const TQString& buffer, break; } index = parseDocTypePart(buffer,index); - index = buffer.tqfind('>', index); + index = buffer.find('>', index); } else if (nextChar == '?') - index = buffer.tqfind('>', index); + index = buffer.find('>', index); else break; } while (index != -1); @@ -371,7 +371,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // |start| is the first character (after the quote) and |end| // is the final quote, so there are |end|-|start| characters. int publicIDStart = index+1; - int publicIDEnd = buffer.tqfind(theChar, publicIDStart); + int publicIDEnd = buffer.find(theChar, publicIDStart); if (publicIDEnd == -1) return false; index = parseDocTypePart(buffer, publicIDEnd+1); @@ -385,7 +385,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, // We have a system identifier. *resultFlags |= PARSEMODE_HAVE_SYSTEM_ID; int systemIDStart = index+1; - int systemIDEnd = buffer.tqfind(next, systemIDStart); + int systemIDEnd = buffer.find(next, systemIDStart); if (systemIDEnd == -1) return false; systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart); @@ -410,7 +410,7 @@ static bool parseDocTypeDeclaration(const TQString& buffer, if (next != '\"' && next != '\'') return false; int systemIDStart = index+1; - int systemIDEnd = buffer.tqfind(next, systemIDStart); + int systemIDEnd = buffer.find(next, systemIDStart); if (systemIDEnd == -1) return false; systemID = buffer.mid(systemIDStart, systemIDEnd - systemIDStart); diff --git a/khtml/html/html_formimpl.cpp b/khtml/html/html_formimpl.cpp index d025f428e..1512395e2 100644 --- a/khtml/html/html_formimpl.cpp +++ b/khtml/html/html_formimpl.cpp @@ -122,8 +122,8 @@ static TQCString encodeCString(const TQCString& e) // http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1 // safe characters like NS handles them for compatibility static const char *safe = "-._*"; - TQCString encoded(( e.length()+e.tqcontains( '\n' ) )*3 - +e.tqcontains('\r') * 3 + 1); + TQCString encoded(( e.length()+e.contains( '\n' ) )*3 + +e.contains('\r') * 3 + 1); int enclen = 0; bool crmissing = false; unsigned char oldc; @@ -391,12 +391,12 @@ TQByteArray HTMLFormElementImpl::formData(bool& ok) void HTMLFormElementImpl::setEnctype( const DOMString& type ) { - if(type.string().tqfind("multipart", 0, false) != -1 || type.string().tqfind("form-data", 0, false) != -1) + if(type.string().find("multipart", 0, false) != -1 || type.string().find("form-data", 0, false) != -1) { m_enctype = "multipart/form-data"; m_multipart = true; m_post = true; - } else if (type.string().tqfind("text", 0, false) != -1 || type.string().tqfind("plain", 0, false) != -1) + } else if (type.string().find("text", 0, false) != -1 || type.string().find("plain", 0, false) != -1) { m_enctype = "text/plain"; m_multipart = false; @@ -457,7 +457,7 @@ void HTMLFormElementImpl::walletOpened(KWallet::Wallet *w) { if ((current->inputType() == HTMLInputElementImpl::PASSWORD || current->inputType() == HTMLInputElementImpl::TEXT) && !current->readOnly() && - map.tqcontains(current->name().string())) { + map.contains(current->name().string())) { getDocument()->setFocusNode(current); current->setValue(map[current->name().string()]); } @@ -2751,7 +2751,7 @@ void HTMLTextAreaElementImpl::attach() static TQString expandLF(const TQString& s) { // LF -> CRLF - unsigned crs = s.tqcontains( '\n' ); + unsigned crs = s.contains( '\n' ); if (crs == 0) return s; unsigned len = s.length(); diff --git a/khtml/html/html_miscimpl.cpp b/khtml/html/html_miscimpl.cpp index 2b0387d35..d5e812029 100644 --- a/khtml/html/html_miscimpl.cpp +++ b/khtml/html/html_miscimpl.cpp @@ -290,7 +290,7 @@ TQValueList<NodeImpl*> HTMLCollectionImpl::namedItems( const DOMString &name ) c //remember stuff about elements we were asked for. m_cache->updateNodeListInfo(m_refNode->getDocument()); CollectionCache* cache = static_cast<CollectionCache*>(m_cache); - if (TQValueList<NodeImpl*>* info = cache->nameCache.tqfind(key)) { + if (TQValueList<NodeImpl*>* info = cache->nameCache.find(key)) { return *info; } else { diff --git a/khtml/html/html_objectimpl.cpp b/khtml/html/html_objectimpl.cpp index 5ed1e11f3..2dc0f4288 100644 --- a/khtml/html/html_objectimpl.cpp +++ b/khtml/html/html_objectimpl.cpp @@ -57,7 +57,7 @@ HTMLObjectBaseElementImpl::HTMLObjectBaseElementImpl(DocumentImpl *doc) void HTMLObjectBaseElementImpl::setServiceType(const TQString & val) { serviceType = val.lower(); - int pos = serviceType.tqfind( ";" ); + int pos = serviceType.find( ";" ); if ( pos!=-1 ) serviceType.truncate( pos ); } @@ -160,9 +160,9 @@ void HTMLObjectBaseElementImpl::attach() { if (serviceType.isEmpty() && url.startsWith("data:")) { // Extract the MIME type from the data URL. - int index = url.tqfind(';'); + int index = url.find(';'); if (index == -1) - index = url.tqfind(','); + index = url.find(','); if (index != -1) { int len = index - 5; if (len > 0) diff --git a/khtml/html/htmltokenizer.cpp b/khtml/html/htmltokenizer.cpp index d1d009d39..0b9b5f34d 100644 --- a/khtml/html/htmltokenizer.cpp +++ b/khtml/html/htmltokenizer.cpp @@ -347,7 +347,7 @@ void HTMLTokenizer::parseSpecial(TokenizerString &src) // possible end of tagname, lets check. if ( !scriptCodeResync && !escaped && !src.escaped() && ( ch == '>' || ch == '/' || ch <= ' ' ) && ch && scriptCodeSize >= searchStopperLen && - !TQConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().tqfind( searchStopper, 0, false )) { + !TQConstString( scriptCode+scriptCodeSize-searchStopperLen, searchStopperLen ).string().find( searchStopper, 0, false )) { scriptCodeResync = scriptCodeSize-searchStopperLen+1; tquote = NoQuote; continue; @@ -1618,7 +1618,7 @@ void HTMLTokenizer::finish() food += TQString(scriptCode, scriptCodeSize); } else { - pos = TQConstString(scriptCode, scriptCodeSize).string().tqfind('>'); + pos = TQConstString(scriptCode, scriptCodeSize).string().find('>'); food.setUnicode(scriptCode+pos+1, scriptCodeSize-pos-1); // deep copy } KHTML_DELETE_QCHAR_VEC(scriptCode); diff --git a/khtml/java/kjavaappletserver.cpp b/khtml/java/kjavaappletserver.cpp index e7c136f38..d95f194ad 100644 --- a/khtml/java/kjavaappletserver.cpp +++ b/khtml/java/kjavaappletserver.cpp @@ -448,7 +448,7 @@ void KJavaAppletServer::sendURLData( int loaderID, int code, const TQByteArray& void KJavaAppletServer::removeDataJob( int loaderID ) { - const KIOJobMap::iterator it = d->kiojobs.tqfind( loaderID ); + const KIOJobMap::iterator it = d->kiojobs.find( loaderID ); if (it != d->kiojobs.end()) { it.data()->deleteLater(); d->kiojobs.erase( it ); @@ -502,7 +502,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) if (cmd_code == KJAS_PUT_DATA) { // rest of the data is for kio put if (ok) { - KIOJobMap::iterator it = d->kiojobs.tqfind( ID_num ); + KIOJobMap::iterator it = d->kiojobs.find( ID_num ); if (ok && it != d->kiojobs.end()) { TQByteArray qba; qba.setRawData(qb.data() + index, qb.size() - index - 1); @@ -517,7 +517,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) //now parse out the arguments while( index < qb_size ) { - int sep_pos = qb.tqfind( 0, index ); + int sep_pos = qb.find( 0, index ); if (sep_pos < 0) { kdError(6100) << "Missing separation byte" << endl; sep_pos = qb_size; @@ -565,7 +565,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) case KJAS_DATA_COMMAND: if (ok && !args.empty()) { const int cmd = args.first().toInt( &ok ); - KIOJobMap::iterator it = d->kiojobs.tqfind( ID_num ); + KIOJobMap::iterator it = d->kiojobs.find( ID_num ); if (ok && it != d->kiojobs.end()) it.data()->jobCommand( cmd ); kdDebug(6100) << "KIO Data command: " << ID_num << " " << args.first() << endl; @@ -581,7 +581,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) case KJAS_PUT_MEMBER: case KJAS_CALL_MEMBER: { const int ticket = args[0].toInt(); - JSStack::iterator it = d->jsstack.tqfind(ticket); + JSStack::iterator it = d->jsstack.find(ticket); if (it != d->jsstack.end()) { kdDebug(6100) << "slotJavaRequest: " << ticket << endl; args.pop_front(); @@ -670,7 +670,7 @@ void KJavaAppletServer::slotJavaRequest( const TQByteArray& qb ) TQString subject = cert->getSubject() + TQChar('\n'); TQRegExp reg(TQString("/[A-Z]+=")); int pos = 0; - while ((pos = subject.tqfind(reg, pos)) > -1) + while ((pos = subject.find(reg, pos)) > -1) subject.replace(pos, 1, TQString("\n ")); text += subject.mid(1); } diff --git a/khtml/java/kjavaappletviewer.cpp b/khtml/java/kjavaappletviewer.cpp index b5038a576..a3f8fc361 100644 --- a/khtml/java/kjavaappletviewer.cpp +++ b/khtml/java/kjavaappletviewer.cpp @@ -230,7 +230,7 @@ KJavaAppletViewer::KJavaAppletViewer (TQWidget * wparent, const char *, TQStringList::const_iterator it = args.begin(); const TQStringList::const_iterator itEnd = args.end(); for ( ; it != itEnd; ++it) { - const int equalPos = (*it).tqfind("="); + const int equalPos = (*it).find("="); if (equalPos > 0) { const TQString name = (*it).left (equalPos).upper (); TQString value = (*it).right ((*it).length () - equalPos - 1); diff --git a/khtml/khtml_ext.cpp b/khtml/khtml_ext.cpp index e802177d1..5ff15fe53 100644 --- a/khtml/khtml_ext.cpp +++ b/khtml/khtml_ext.cpp @@ -315,7 +315,7 @@ void KHTMLPartBrowserExtension::callExtensionProxyMethod( const char *method ) if ( !m_extensionProxy ) return; - int slot = m_extensionProxy->tqmetaObject()->tqfindSlot( method ); + int slot = m_extensionProxy->tqmetaObject()->findSlot( method ); if ( slot == -1 ) return; diff --git a/khtml/khtml_factory.cpp b/khtml/khtml_factory.cpp index bb80a1e83..7eedc6311 100644 --- a/khtml/khtml_factory.cpp +++ b/khtml/khtml_factory.cpp @@ -146,7 +146,7 @@ void KHTMLFactory::registerPart( KHTMLPart *part ) if ( !s_parts ) s_parts = new TQPtrList<KHTMLPart>; - if ( !s_parts->tqcontainsRef( part ) ) + if ( !s_parts->containsRef( part ) ) { s_parts->append( part ); ref(); diff --git a/khtml/khtml_pagecache.cpp b/khtml/khtml_pagecache.cpp index 31e764b5e..e736df5c2 100644 --- a/khtml/khtml_pagecache.cpp +++ b/khtml/khtml_pagecache.cpp @@ -157,7 +157,7 @@ KHTMLPageCache::createCacheEntry() void KHTMLPageCache::addData(long id, const TQByteArray &data) { - KHTMLPageCacheEntry *entry = d->dict.tqfind(id); + KHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) entry->addData(data); } @@ -165,7 +165,7 @@ KHTMLPageCache::addData(long id, const TQByteArray &data) void KHTMLPageCache::endData(long id) { - KHTMLPageCacheEntry *entry = d->dict.tqfind(id); + KHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) entry->endData(); } @@ -184,13 +184,13 @@ KHTMLPageCache::cancelEntry(long id) bool KHTMLPageCache::isValid(long id) { - return (d->dict.tqfind(id) != 0); + return (d->dict.find(id) != 0); } bool KHTMLPageCache::isComplete(long id) { - KHTMLPageCacheEntry *entry = d->dict.tqfind(id); + KHTMLPageCacheEntry *entry = d->dict.find(id); if (entry) return entry->isComplete(); return false; @@ -199,7 +199,7 @@ KHTMLPageCache::isComplete(long id) void KHTMLPageCache::fetchData(long id, TQObject *recvObj, const char *recvSlot) { - KHTMLPageCacheEntry *entry = d->dict.tqfind(id); + KHTMLPageCacheEntry *entry = d->dict.find(id); if (!entry || !entry->isComplete()) return; // Make this entry the most recent entry. @@ -271,7 +271,7 @@ KHTMLPageCache::sendData() void KHTMLPageCache::saveData(long id, TQDataStream *str) { - KHTMLPageCacheEntry *entry = d->dict.tqfind(id); + KHTMLPageCacheEntry *entry = d->dict.find(id); assert(entry); int fd = entry->m_file->handle(); diff --git a/khtml/khtml_part.cpp b/khtml/khtml_part.cpp index 3363c02f6..0699b799a 100644 --- a/khtml/khtml_part.cpp +++ b/khtml/khtml_part.cpp @@ -2301,7 +2301,7 @@ void KHTMLPart::checkCompleted() d->m_paUseStylesheet->setEnabled( sheets.count() > 2); if (sheets.count() > 2) { - d->m_paUseStylesheet->setCurrentItem(kMax(sheets.tqfindIndex(d->m_sheetUsed), 0)); + d->m_paUseStylesheet->setCurrentItem(kMax(sheets.findIndex(d->m_sheetUsed), 0)); slotUseStylesheet(); } @@ -2402,7 +2402,7 @@ void KHTMLPart::slotRedirect() d->m_redirectURL = TQString(); // SYNC check with ecma/kjs_window.cpp::goURL ! - if ( u.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( u.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { TQString script = KURL::decode_string( u.right( u.length() - 11 ) ); kdDebug( 6050 ) << "KHTMLPart::slotRedirect script=" << script << endl; @@ -2838,7 +2838,7 @@ bool KHTMLPart::findTextNext( const TQString &str, bool forward, bool caseSensit matchLen = matcher.matchedLength(); } else { - d->m_findPos = s.string().tqfind(str, d->m_findPos+1, caseSensitive); + d->m_findPos = s.string().find(str, d->m_findPos+1, caseSensitive); matchLen = str.length(); } @@ -3212,7 +3212,7 @@ bool KHTMLPart::findTextNext( bool reverse ) s.truncate( d->m_findPosEnd ); if ( !s.isEmpty() ) { - newLine = s.tqfind( '\n' ) != -1; // did we just get a newline? + newLine = s.find( '\n' ) != -1; // did we just get a newline? if( !( options & KFindDialog::FindBackwards )) { //kdDebug(6050) << "StringPortion: " << index << "-" << index+s.length()-1 << " -> " << lastNode << endl; @@ -3731,8 +3731,8 @@ void KHTMLPart::overURL( const TQString &url, const TQString &target, bool /*shi return; } - if (url.tqfind( TQString::tqfromLatin1( "javascript:" ),0, false ) == 0 ) { - TQString jscode = KURL::decode_string( url.mid( url.tqfind( "javascript:", 0, false ) ) ); + if (url.find( TQString::tqfromLatin1( "javascript:" ),0, false ) == 0 ) { + TQString jscode = KURL::decode_string( url.mid( url.find( "javascript:", 0, false ) ) ); jscode = KStringHandler::rsqueeze( jscode, 80 ); // truncate if too long if (url.startsWith("javascript:window.open")) jscode += i18n(" (In new window)"); @@ -3906,7 +3906,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c if ( !target.isEmpty() ) hasTarget = true; - if ( url.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { crossFrameExecuteScript( target, KURL::decode_string( url.mid( 11 ) ) ); return false; @@ -3965,7 +3965,7 @@ bool KHTMLPart::urlSelectedIntern( const TQString &url, int button, int state, c } } - if (!d->m_referrer.isEmpty() && !args.metaData().tqcontains("referrer")) + if (!d->m_referrer.isEmpty() && !args.metaData().contains("referrer")) args.metaData()["referrer"] = d->m_referrer; @@ -4276,7 +4276,7 @@ void KHTMLPart::updateActions() { TQObject *ext = KParts::BrowserExtension::childObject( frame ); if ( ext ) - enablePrintFrame = ext->tqmetaObject()->slotNames().tqcontains( "print()" ); + enablePrintFrame = ext->tqmetaObject()->slotNames().contains( "print()" ); } d->m_paPrintFrame->setEnabled( enablePrintFrame ); @@ -4319,7 +4319,7 @@ bool KHTMLPart::requestFrame( khtml::RenderPart *frame, const TQString &url, con (*it)->m_params = params; // Support for <frame src="javascript:string"> - if ( url.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) + if ( url.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { if ( processObjectRequest(*it, KURL("about:blank"), TQString("text/html") ) ) { KHTMLPart* p = static_cast<KHTMLPart*>(static_cast<KParts::ReadOnlyPart *>((*it)->m_part)); @@ -4393,7 +4393,7 @@ bool KHTMLPart::requestObject( khtml::ChildFrame *child, const KURL &url, const child->m_args = args; child->m_args.reload = (d->m_cachePolicy == KIO::CC_Reload); child->m_serviceName = TQString(); - if (!d->m_referrer.isEmpty() && !child->m_args.metaData().tqcontains( "referrer" )) + if (!d->m_referrer.isEmpty() && !child->m_args.metaData().contains( "referrer" )) child->m_args.metaData()["referrer"] = d->m_referrer; child->m_args.metaData().insert("PropagateHttpHeader", "true"); @@ -4655,7 +4655,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char KTrader::OfferList offers = KTrader::self()->query( mimetype, "KParts/ReadOnlyPart", constr, TQString() ); if ( offers.isEmpty() ) { - int pos = mimetype.tqfind( "-plugin" ); + int pos = mimetype.find( "-plugin" ); if (pos < 0) return 0L; TQString stripped_mime = mimetype.left( pos ); @@ -4675,7 +4675,7 @@ KParts::ReadOnlyPart *KHTMLPart::createPart( TQWidget *parentWidget, const char KParts::ReadOnlyPart *res = 0L; const char *className = "KParts::ReadOnlyPart"; - if ( service->serviceTypes().tqcontains( "Browser/View" ) ) + if ( service->serviceTypes().contains( "Browser/View" ) ) className = "Browser/View"; if ( factory->inherits( "KParts::Factory" ) ) @@ -4811,7 +4811,7 @@ void KHTMLPart::submitForm( const char *action, const TQString &url, const TQByt TQString urlstring = u.url(); - if ( urlstring.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { + if ( urlstring.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { urlstring = KURL::decode_string(urlstring); crossFrameExecuteScript( _target, urlstring.right( urlstring.length() - 11) ); return; @@ -5095,7 +5095,7 @@ void KHTMLPart::slotChildURLRequest( const KURL &url, const KParts::URLArgs &arg // TODO: handle child target correctly! currently the script are always executed fur the parent TQString urlStr = url.url(); - if ( urlStr.tqfind( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { + if ( urlStr.find( TQString::tqfromLatin1( "javascript:" ), 0, false ) == 0 ) { TQString script = KURL::decode_string( urlStr.right( urlStr.length() - 11 ) ); executeScript( DOM::Node(), script ); return; @@ -6660,7 +6660,7 @@ void KHTMLPart::slotPrintFrame() TQMetaObject *mo = ext->tqmetaObject(); - int idx = mo->tqfindSlot( "print()", true ); + int idx = mo->findSlot( "print()", true ); if ( idx >= 0 ) { TQUObject o[ 1 ]; ext->qt_invoke( idx, o ); @@ -6854,7 +6854,7 @@ void KHTMLPart::slotPartRemoved( KParts::Part *part ) if (factory()) { factory()->removeClient( part ); } - if (childClients()->tqcontainsRef(part)) { + if (childClients()->containsRef(part)) { removeChildClient( part ); } } @@ -6999,7 +6999,7 @@ bool KHTMLPart::pluginPageQuestionAsked(const TQString& mimetype) const if ( parent ) return parent->pluginPageQuestionAsked(mimetype); - return d->m_pluginPageQuestionAsked.tqcontains(mimetype); + return d->m_pluginPageQuestionAsked.contains(mimetype); } void KHTMLPart::setPluginPageQuestionAsked(const TQString& mimetype) @@ -7379,7 +7379,7 @@ void KHTMLPart::setSuppressedPopupIndicator( bool enable, KHTMLPart *originPart if ( enable && originPart ) { d->m_openableSuppressedPopups++; - if ( d->m_suppressedPopupOriginParts.tqfindIndex( originPart ) == -1 ) + if ( d->m_suppressedPopupOriginParts.findIndex( originPart ) == -1 ) d->m_suppressedPopupOriginParts.append( originPart ); } diff --git a/khtml/khtml_settings.cc b/khtml/khtml_settings.cc index 405fa4234..6b8649601 100644 --- a/khtml/khtml_settings.cc +++ b/khtml/khtml_settings.cc @@ -121,7 +121,7 @@ static KPerDomainSettings &setup_per_domain_policy( kdWarning() << "setup_per_domain_policy: domain is empty" << endl; } const TQString ldomain = domain.lower(); - PolicyMap::iterator it = d->domainPolicy.tqfind(ldomain); + PolicyMap::iterator it = d->domainPolicy.find(ldomain); if (it == d->domainPolicy.end()) { // simply copy global domain settings (they should have been initialized // by this time) @@ -161,7 +161,7 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai KJavaScriptAdvice &javaAdvice, KJavaScriptAdvice& javaScriptAdvice) { TQString tmp(configStr); - int splitIndex = tmp.tqfind(':'); + int splitIndex = tmp.find(':'); if ( splitIndex == -1) { domain = configStr.lower(); @@ -172,7 +172,7 @@ void KHTMLSettings::splitDomainAdvice(const TQString& configStr, TQString &domai { domain = tmp.left(splitIndex).lower(); TQString adviceString = tmp.mid( splitIndex+1, tmp.length() ); - int splitIndex2 = adviceString.tqfind( ':' ); + int splitIndex2 = adviceString.find( ':' ); if( splitIndex2 == -1 ) { // Java advice only javaAdvice = strToAdvice( adviceString ); @@ -508,7 +508,7 @@ void KHTMLSettings::init( KConfig * config, bool reset ) const TQStringList::ConstIterator itEnd = dl.end(); for (; it != itEnd; ++it) { const TQString domain = (*it).lower(); - TQMap<TQString,int>::Iterator pos = domainList.tqfind(domain); + TQMap<TQString,int>::Iterator pos = domainList.find(domain); if (pos == notfound) domainList.insert(domain,0); }/*next it*/ } @@ -656,7 +656,7 @@ static const KPerDomainSettings &lookup_hostname_policy( const PolicyMap::const_iterator notfound = d->domainPolicy.end(); // First check whether there is a perfect match. - PolicyMap::const_iterator it = d->domainPolicy.tqfind(hostname); + PolicyMap::const_iterator it = d->domainPolicy.find(hostname); if( it != notfound ) { #ifdef DEBUG_SETTINGS kdDebug() << "perfect match" << endl; @@ -670,9 +670,9 @@ static const KPerDomainSettings &lookup_hostname_policy( // there's no dots left. TQString host_part = hostname; int dot_idx = -1; - while( (dot_idx = host_part.tqfind(TQChar('.'))) >= 0 ) { + while( (dot_idx = host_part.find(TQChar('.'))) >= 0 ) { host_part.remove(0,dot_idx); - it = d->domainPolicy.tqfind(host_part); + it = d->domainPolicy.find(host_part); Q_ASSERT(notfound == d->domainPolicy.end()); if( it != notfound ) { #ifdef DEBUG_SETTINGS @@ -888,7 +888,7 @@ const TQString &KHTMLSettings::availableFamilies() for ( ; f != fEnd; ++f ) { (*f).replace( foundryExp, ""); - if (!s.tqcontains(*f)) + if (!s.contains(*f)) s << *f; } s.sort(); diff --git a/khtml/khtmlview.cpp b/khtml/khtmlview.cpp index 2cbd99384..75ecea21f 100644 --- a/khtml/khtmlview.cpp +++ b/khtml/khtmlview.cpp @@ -1202,7 +1202,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) c = KCursor::ibeamCursor(); if ( mev.url.length() && m_part->settings()->changeCursor() ) { c = m_part->urlCursor(); - if (mev.url.string().startsWith("mailto:") && mev.url.string().tqfind('@')>0) + if (mev.url.string().startsWith("mailto:") && mev.url.string().find('@')>0) mailtoCursor = true; else newWindowCursor = targetOpensNewWindow( m_part, mev.target.string() ); @@ -1217,7 +1217,7 @@ void KHTMLView::viewportMouseMoveEvent( TQMouseEvent * _mouse ) break; case CURSOR_POINTER: c = m_part->urlCursor(); - if (mev.url.string().startsWith("mailto:") && mev.url.string().tqfind('@')>0) + if (mev.url.string().startsWith("mailto:") && mev.url.string().find('@')>0) mailtoCursor = true; else newWindowCursor = targetOpensNewWindow( m_part, mev.target.string() ); @@ -2275,7 +2275,7 @@ void KHTMLView::displayAccessKeys( KHTMLView* caller, KHTMLView* origview, TQVal if( tqFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains accesskey = a; } - if( accesskey.isNull() && fallbacks.tqcontains( en )) { + if( accesskey.isNull() && fallbacks.contains( en )) { TQChar a = fallbacks[ en ].upper(); if( tqFind( taken.begin(), taken.end(), a ) == taken.end()) // !contains accesskey = TQString( "<qt><i>" ) + a + "</i></qt>"; @@ -2625,7 +2625,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const } if( ignore ) continue; - if( text.isNull() && labels.tqcontains( element )) + if( text.isNull() && labels.contains( element )) text = labels[ element ]; if( text.isNull() && text_before ) text = getElementText( element, false ); @@ -2685,7 +2685,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const for( TQValueList< TQPair< TQString, TQChar > >::ConstIterator it = priorities.begin(); it != priorities.end(); ++it ) - if( text == (*it).first && keys.tqcontains( (*it).second )) { + if( text == (*it).first && keys.contains( (*it).second )) { key = (*it).second; break; } @@ -2698,7 +2698,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const for( TQStringList::ConstIterator it = words.begin(); it != words.end(); ++it ) { - if( keys.tqcontains( (*it)[ 0 ].upper())) { + if( keys.contains( (*it)[ 0 ].upper())) { key = (*it)[ 0 ].upper(); break; } @@ -2708,7 +2708,7 @@ TQMap< ElementImpl*, TQChar > KHTMLView::buildFallbackAccessKeys() const for( unsigned int i = 0; i < text.length(); ++i ) { - if( keys.tqcontains( text[ i ].upper())) { + if( keys.contains( text[ i ].upper())) { key = text[ i ].upper(); break; } @@ -2757,7 +2757,7 @@ bool KHTMLView::pagedMode() const void KHTMLView::setWidgetVisible(RenderWidget* w, bool vis) { if (vis) { - d->visibleWidgets.tqreplace(w, w->widget()); + d->visibleWidgets.replace(w, w->widget()); } else d->visibleWidgets.remove(w); @@ -3085,7 +3085,7 @@ void KHTMLView::addFormCompletionItem(const TQString &name, const TQString &valu if (cc_number) return; TQStringList items = formCompletionItems(name); - if (!items.tqcontains(value)) + if (!items.contains(value)) items.prepend(value); while ((int)items.count() > m_part->settings()->maxFormCompletionItems()) items.remove(items.fromLast()); @@ -3125,7 +3125,7 @@ bool KHTMLView::nonPasswordStorableSite(const TQString& host) const TQStringList sites = d->formCompletions->readListEntry("Sites"); d->formCompletions->setGroup(TQString::null);//reset - return (sites.tqfind(host) != sites.end()); + return (sites.find(host) != sites.end()); } // returns true if event should be swallowed diff --git a/khtml/kmultipart/kmultipart.cpp b/khtml/kmultipart/kmultipart.cpp index 8aeb2cdbd..2023c1e85 100644 --- a/khtml/kmultipart/kmultipart.cpp +++ b/khtml/kmultipart/kmultipart.cpp @@ -246,7 +246,7 @@ void KMultiPart::slotData( KIO::Job *job, const TQByteArray &data ) { Q_ASSERT( m_nextMimeType.isNull() ); m_nextMimeType = TQString::tqfromLatin1( line.data() + 14 ).stripWhiteSpace(); - int semicolon = m_nextMimeType.tqfind( ';' ); + int semicolon = m_nextMimeType.find( ';' ); if ( semicolon != -1 ) m_nextMimeType = m_nextMimeType.left( semicolon ); kdDebug() << "m_nextMimeType=" << m_nextMimeType << endl; diff --git a/khtml/misc/decoder.cpp b/khtml/misc/decoder.cpp index bd831c125..f227f4014 100644 --- a/khtml/misc/decoder.cpp +++ b/khtml/misc/decoder.cpp @@ -170,7 +170,7 @@ static int findXMLEncoding(const TQCString &str, int &encodingLength) { int len = str.length(); - int pos = str.tqfind("encoding"); + int pos = str.find("encoding"); if (pos == -1) return -1; pos += 8; @@ -365,10 +365,10 @@ TQString Decoder::decode(const char *data, int len) TQCString str( ptr, (end-ptr)+1); str = str.lower(); int pos = 0; - //if( (pos = str.tqfind("http-equiv", pos)) == -1) break; - //if( (pos = str.tqfind("content-type", pos)) == -1) break; + //if( (pos = str.find("http-equiv", pos)) == -1) break; + //if( (pos = str.find("content-type", pos)) == -1) break; while( pos < ( int ) str.length() ) { - if( (pos = str.tqfind("charset", pos)) == -1) break; + if( (pos = str.find("charset", pos)) == -1) break; pos += 7; // skip whitespace.. while( pos < (int)str.length() && str[pos] <= ' ' ) pos++; diff --git a/khtml/misc/loader.cpp b/khtml/misc/loader.cpp index 460b2ceb2..220c9ea2d 100644 --- a/khtml/misc/loader.cpp +++ b/khtml/misc/loader.cpp @@ -144,7 +144,7 @@ void CachedObject::deref(CachedObjectClient *c) assert( c ); assert( m_clients.count() ); assert( !canDelete() ); - assert( m_clients.tqfind( c ) ); + assert( m_clients.find( c ) ); Cache::flush(); @@ -981,7 +981,7 @@ void DocLoader::setExpireDate(time_t _expireDate, bool relative) void DocLoader::insertCachedObject( CachedObject* o ) const { - if ( m_docObjects.tqfind(o) ) + if ( m_docObjects.find(o) ) return; m_docObjects.insert( o, o ); if ( m_docObjects.count() > 3 * m_docObjects.size() ) @@ -993,7 +993,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) bool reload = false; if (m_cachePolicy == KIO::CC_Verify) { - if (!m_reloadedURLs.tqcontains(fullURL)) + if (!m_reloadedURLs.contains(fullURL)) { if (existing && existing->isExpired()) { @@ -1005,7 +1005,7 @@ bool DocLoader::needReload(CachedObject *existing, const TQString& fullURL) } else if ((m_cachePolicy == KIO::CC_Reload) || (m_cachePolicy == KIO::CC_Refresh)) { - if (!m_reloadedURLs.tqcontains(fullURL)) + if (!m_reloadedURLs.contains(fullURL)) { if (existing) { @@ -1427,7 +1427,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c KIO::CacheControl cachePolicy = dl ? dl->cachePolicy() : KIO::CC_Verify; TQString url = kurl.url(); - CachedObject* o = cache->tqfind(url); + CachedObject* o = cache->find(url); if ( o && o->type() != CachedType ) { removeCacheEntry( o ); @@ -1436,7 +1436,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c if ( o && dl->needReload( o, url ) ) { o = 0; - assert( cache->tqfind( url ) == 0 ); + assert( cache->find( url ) == 0 ); } if(!o) @@ -1464,7 +1464,7 @@ CachedObjectType* Cache::requestObject( DocLoader* dl, const KURL& kurl, const c void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_data) { - CachedObject *o = cache->tqfind(url); + CachedObject *o = cache->find(url); if(o) removeCacheEntry(o); @@ -1474,7 +1474,7 @@ void Cache::preloadStyleSheet( const TQString &url, const TQString &stylesheet_d void Cache::preloadScript( const TQString &url, const TQString &script_data) { - CachedObject *o = cache->tqfind(url); + CachedObject *o = cache->find(url); if(o) removeCacheEntry(o); diff --git a/khtml/misc/multimap.h b/khtml/misc/multimap.h index fbd883457..8f60dcf02 100644 --- a/khtml/misc/multimap.h +++ b/khtml/misc/multimap.h @@ -42,7 +42,7 @@ public: typedef MultiMapPtrList<T> List; void append(void* key, T* element) { - List *list = dict.tqfind(key); + List *list = dict.find(key); if (!list){ list = new List(8); dict.insert(key, list); @@ -50,7 +50,7 @@ public: list->append(element); } void remove(void* key, T* element) { - List *list = dict.tqfind(key); + List *list = dict.find(key); if (list) { list->remove(element); if (list->isEmpty()) dict.remove(key); @@ -60,7 +60,7 @@ public: dict.remove(key); } List* find(void* key) { - return dict.tqfind(key); + return dict.find(key); } private: TQPtrDict<List> dict; diff --git a/khtml/rendering/render_canvas.cpp b/khtml/rendering/render_canvas.cpp index 3980c8eee..3a5c558ac 100644 --- a/khtml/rendering/render_canvas.cpp +++ b/khtml/rendering/render_canvas.cpp @@ -492,7 +492,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep no = no->nextSibling(); } } - if (os->selectionState() == SelectionInside && !oldSelectedInside.tqcontainsRef(os)) + if (os->selectionState() == SelectionInside && !oldSelectedInside.containsRef(os)) oldSelectedInside.append(os); os = no; @@ -550,7 +550,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep if (no) no = no->nextSibling(); } - if (o->selectionState() == SelectionInside && !newSelectedInside.tqcontainsRef(o)) + if (o->selectionState() == SelectionInside && !newSelectedInside.containsRef(o)) newSelectedInside.append(o); o=no; @@ -581,7 +581,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQPtrListIterator<RenderObject> oldIterator(oldSelectedInside); bool firstRect = true; for (; oldIterator.current(); ++oldIterator){ - if (!newSelectedInside.tqcontainsRef(oldIterator.current())){ + if (!newSelectedInside.containsRef(oldIterator.current())){ if (firstRect){ updateRect = enclosingPositionedRect(oldIterator.current()); firstRect = false; @@ -601,7 +601,7 @@ void RenderCanvas::setSelection(RenderObject *s, int sp, RenderObject *e, int ep TQPtrListIterator<RenderObject> newIterator(newSelectedInside); firstRect = true; for (; newIterator.current(); ++newIterator){ - if (!oldSelectedInside.tqcontainsRef(newIterator.current())){ + if (!oldSelectedInside.containsRef(newIterator.current())){ if (firstRect){ updateRect = enclosingPositionedRect(newIterator.current()); firstRect = false; diff --git a/khtml/rendering/render_frames.cpp b/khtml/rendering/render_frames.cpp index 47a433293..9f58a0a4f 100644 --- a/khtml/rendering/render_frames.cpp +++ b/khtml/rendering/render_frames.cpp @@ -808,7 +808,7 @@ void RenderPartObject::updateWidget() serviceType = "application/x-activex-handler"; #endif - if(classId.tqfind(TQString::tqfromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) { + if(classId.find(TQString::tqfromLatin1("D27CDB6E-AE6D-11cf-96B8-444553540000")) >= 0) { // It is ActiveX, but the nsplugin system handling // should also work, that's why we don't override the // serviceType with application/x-activex-handler @@ -817,17 +817,17 @@ void RenderPartObject::updateWidget() // with nspluginviewer (Niko) serviceType = "application/x-shockwave-flash"; } - else if(classId.tqfind(TQString::tqfromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0) + else if(classId.find(TQString::tqfromLatin1("CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA")) >= 0) serviceType = "audio/x-pn-realaudio-plugin"; - else if(classId.tqfind(TQString::tqfromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 || - objbase->classId.tqfind(TQString::tqfromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0) + else if(classId.find(TQString::tqfromLatin1("8AD9C840-044E-11D1-B3E9-00805F499D93")) >= 0 || + objbase->classId.find(TQString::tqfromLatin1("CAFEEFAC-0014-0000-0000-ABCDEFFEDCBA")) >= 0) serviceType = "application/x-java-applet"; // http://www.apple.com/quicktime/tools_tips/tutorials/activex.html - else if(classId.tqfind(TQString::tqfromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0) + else if(classId.find(TQString::tqfromLatin1("02BF25D5-8C17-4B23-BC80-D3488ABDDC6B")) >= 0) serviceType = "video/quicktime"; // http://msdn.microsoft.com/library/en-us/dnwmt/html/adding_windows_media_to_web_pages__etse.asp?frame=true - else if(objbase->classId.tqfind(TQString::tqfromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 || - classId.tqfind(TQString::tqfromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0) + else if(objbase->classId.find(TQString::tqfromLatin1("6BF52A52-394A-11d3-B153-00C04F79FAA6")) >= 0 || + classId.find(TQString::tqfromLatin1("22D6f312-B0F6-11D0-94AB-0080C74C7E95")) >= 0) serviceType = "video/x-msvideo"; else diff --git a/khtml/rendering/render_object.cpp b/khtml/rendering/render_object.cpp index 8c4c8ab56..1fc72c7d8 100644 --- a/khtml/rendering/render_object.cpp +++ b/khtml/rendering/render_object.cpp @@ -2223,7 +2223,7 @@ CounterNode* RenderObject::lookupCounter(const TQString& counter) const { TQDict<khtml::CounterNode>* counters = document()->counters(this); if (counters) - return counters->tqfind(counter); + return counters->find(counter); else return 0; } diff --git a/khtml/rendering/render_table.cpp b/khtml/rendering/render_table.cpp index 337e9399d..26e9c26d5 100644 --- a/khtml/rendering/render_table.cpp +++ b/khtml/rendering/render_table.cpp @@ -2800,7 +2800,7 @@ public: static void addBorderStyle(TQValueList<CollapsedBorderValue>& borderStyles, CollapsedBorderValue borderValue) { - if (!borderValue.exists() || borderStyles.tqcontains(borderValue)) + if (!borderValue.exists() || borderStyles.contains(borderValue)) return; TQValueListIterator<CollapsedBorderValue> it = borderStyles.begin(); diff --git a/khtml/test_regression.cpp b/khtml/test_regression.cpp index f80d82921..b53f20ba8 100644 --- a/khtml/test_regression.cpp +++ b/khtml/test_regression.cpp @@ -215,7 +215,7 @@ Value RegTestFunction::call(ExecState *exec, Object &/*thisObj*/, const List &ar switch (id) { case Print: { UString str = args[0].toString(exec); - if ( str.qstring().lower().tqfind( "failed!" ) >= 0 ) + if ( str.qstring().lower().find( "failed!" ) >= 0 ) m_regTest->saw_failure = true; TQString res = str.qstring().replace('\007', ""); m_regTest->m_currentOutput += res + "\n"; @@ -1077,7 +1077,7 @@ static TQString makeRelativePath(const TQString &base, const TQString &path) int pos = 0; do { pos++; - int newpos = absBase.tqfind('/', pos); + int newpos = absBase.find('/', pos); if (newpos == -1) newpos = absBase.length(); TQConstString cmpPathComp(absPath.tqunicode() + pos, newpos - pos); TQConstString cmpBaseComp(absBase.tqunicode() + pos, newpos - pos); diff --git a/khtml/testkhtml.cpp b/khtml/testkhtml.cpp index d98d875b2..4a2b2daa1 100644 --- a/khtml/testkhtml.cpp +++ b/khtml/testkhtml.cpp @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) TQObject::connect( doc, TQT_SIGNAL(completed()), dummy, TQT_SLOT(handleDone()) ); - if (args->url(0).url().right(4).tqfind(".xml", 0, false) == 0) { + if (args->url(0).url().right(4).find(".xml", 0, false) == 0) { KParts::URLArgs ags(doc->browserExtension()->urlArgs()); ags.serviceType = "text/xml"; doc->browserExtension()->setURLArgs(ags); diff --git a/khtml/xml/dom2_eventsimpl.cpp b/khtml/xml/dom2_eventsimpl.cpp index 1c13ab5ce..c49a03e78 100644 --- a/khtml/xml/dom2_eventsimpl.cpp +++ b/khtml/xml/dom2_eventsimpl.cpp @@ -499,14 +499,14 @@ public: } L toLeft(R r) { - TQMapIterator<R,L> i( m_rToL.tqfind(r) ); + TQMapIterator<R,L> i( m_rToL.find(r) ); if (i != m_rToL.end()) return *i; return L(); } R toRight(L l) { - TQMapIterator<L,R> i = m_lToR.tqfind(l); + TQMapIterator<L,R> i = m_lToR.find(l); if (i != m_lToR.end()) return *i; return R(); diff --git a/khtml/xml/dom_docimpl.cpp b/khtml/xml/dom_docimpl.cpp index 9de636704..0f70610ef 100644 --- a/khtml/xml/dom_docimpl.cpp +++ b/khtml/xml/dom_docimpl.cpp @@ -232,7 +232,7 @@ void ElementMappingCache::add(const TQString& id, ElementImpl* nd) { if (id.isEmpty()) return; - ItemInfo* info = m_dict.tqfind(id); + ItemInfo* info = m_dict.find(id); if (info) { info->ref++; @@ -251,7 +251,7 @@ void ElementMappingCache::set(const TQString& id, ElementImpl* nd) { if (id.isEmpty()) return; - ItemInfo* info = m_dict.tqfind(id); + ItemInfo* info = m_dict.find(id); info->nd = nd; } @@ -259,7 +259,7 @@ void ElementMappingCache::remove(const TQString& id, ElementImpl* nd) { if (id.isEmpty()) return; - ItemInfo* info = m_dict.tqfind(id); + ItemInfo* info = m_dict.find(id); info->ref--; if (info->ref == 0) { @@ -276,13 +276,13 @@ void ElementMappingCache::remove(const TQString& id, ElementImpl* nd) bool ElementMappingCache::contains(const TQString& id) { if (id.isEmpty()) return false; - return m_dict.tqfind(id); + return m_dict.find(id); } ElementMappingCache::ItemInfo* ElementMappingCache::get(const TQString& id) { if (id.isEmpty()) return 0; - return m_dict.tqfind(id); + return m_dict.find(id); } static KStaticDeleter< TQPtrList<DocumentImpl> > s_changedDocumentsDeleter; @@ -1668,9 +1668,9 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con { // get delay and url TQString str = content.string().stripWhiteSpace(); - int pos = str.tqfind(TQRegExp("[;,]")); + int pos = str.find(TQRegExp("[;,]")); if ( pos == -1 ) - pos = str.tqfind(TQRegExp("[ \t]")); + pos = str.find(TQRegExp("[ \t]")); bool ok = false; int delay = kMax( 0, content.implementation()->toInt(&ok) ); @@ -1685,7 +1685,7 @@ void DocumentImpl::processHttpEquiv(const DOMString &equiv, const DOMString &con pos++; while(pos < (int)str.length() && str[pos].isSpace()) pos++; str = str.mid(pos); - if(str.tqfind("url", 0, false ) == 0) str = str.mid(3); + if(str.find("url", 0, false ) == 0) str = str.mid(3); str = str.stripWhiteSpace(); if ( str.length() && str[0] == '=' ) str = str.mid( 1 ).stripWhiteSpace(); while(str.length() && @@ -1881,17 +1881,17 @@ NodeImpl::Id DocumentImpl::getId( NodeImpl::IdType _type, DOMStringImpl* _nsURI, TQString name = cs ? n.string() : n.string().upper(); if (!_nsURI) { - id = (NodeImpl::Id)(long) map->ids.tqfind( name ); + id = (NodeImpl::Id)(long) map->ids.find( name ); if (!id && _type != NodeImpl::NamespaceId) { - id = (NodeImpl::Id)(long) map->ids.tqfind( "aliases: " + name ); + id = (NodeImpl::Id)(long) map->ids.find( "aliases: " + name ); } } else { - id = (NodeImpl::Id)(long) map->ids.tqfind( name ); + id = (NodeImpl::Id)(long) map->ids.find( name ); if (!readonly && id && _prefix && _prefix->l) { // we were called in registration mode... check if the alias exists TQConstString px( _prefix->s, _prefix->l ); TQString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name); - if (!map->ids.tqfind( qn )) { + if (!map->ids.find( qn )) { map->ids.insert( qn, (void*)id ); } } @@ -2143,7 +2143,7 @@ void DocumentImpl::recalcStyleSelector() title = title.replace('&', "&&"); - if ( !m_availableSheets.tqcontains( title ) ) + if ( !m_availableSheets.contains( title ) ) m_availableSheets.append( title ); } } @@ -2170,7 +2170,7 @@ void DocumentImpl::recalcStyleSelector() // or we found the sheet we selected if (sheetUsed.isEmpty() || (!canResetSheet && tokenizer()) || - m_availableSheets.tqcontains(sheetUsed)) { + m_availableSheets.contains(sheetUsed)) { break; } @@ -2690,7 +2690,7 @@ NodeListImpl::Cache* DOM::DocumentImpl::acquireCachedNodeListInfo( //Check to see if we have this sort of item cached. NodeListImpl::Cache* cached = - (type == NodeListImpl::UNCACHEABLE) ? 0 : m_nodeListCache.tqfind(key.hash()); + (type == NodeListImpl::UNCACHEABLE) ? 0 : m_nodeListCache.find(key.hash()); if (cached) { if (cached->key == key) { @@ -2710,7 +2710,7 @@ NodeListImpl::Cache* DOM::DocumentImpl::acquireCachedNodeListInfo( if (type != NodeListImpl::UNCACHEABLE) { newInfo->ref(); //Add the cache's reference - m_nodeListCache.tqreplace(key.hash(), newInfo); + m_nodeListCache.replace(key.hash(), newInfo); } return newInfo; diff --git a/khtml/xml/dom_docimpl.h b/khtml/xml/dom_docimpl.h index a4aec9223..8d20f47e6 100644 --- a/khtml/xml/dom_docimpl.h +++ b/khtml/xml/dom_docimpl.h @@ -616,7 +616,7 @@ protected: TQConstString px( _prefix->s, _prefix->l ); TQString name = cs ? n.string() : n.string().upper(); TQString qn("aliases: " + (cs ? px.string() : px.string().upper()) + ":" + name); - if (!ids.tqfind( qn )) { + if (!ids.find( qn )) { ids.insert( qn, (void*)id ); } } diff --git a/khtml/xml/dom_nodeimpl.cpp b/khtml/xml/dom_nodeimpl.cpp index 8440d4395..834f4b674 100644 --- a/khtml/xml/dom_nodeimpl.cpp +++ b/khtml/xml/dom_nodeimpl.cpp @@ -2060,7 +2060,7 @@ bool RegisteredListenerList::stillContainsListener(const RegisteredEventListener { if (!listeners) return false; - return listeners->tqfind(listener) != listeners->end(); + return listeners->find(listener) != listeners->end(); } RegisteredListenerList::~RegisteredListenerList() { diff --git a/khtml/xml/dom_stringimpl.cpp b/khtml/xml/dom_stringimpl.cpp index 3f904ae76..14aa4f5ea 100644 --- a/khtml/xml/dom_stringimpl.cpp +++ b/khtml/xml/dom_stringimpl.cpp @@ -286,14 +286,14 @@ khtml::Length* DOMStringImpl::toCoordsArray(int& len) const } str = str.simplifyWhiteSpace(); - len = str.tqcontains(' ') + 1; + len = str.contains(' ') + 1; khtml::Length* r = new khtml::Length[len]; int i = 0; int pos = 0; int pos2; - while((pos2 = str.tqfind(' ', pos)) != -1) { + while((pos2 = str.find(' ', pos)) != -1) { r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); pos = pos2+1; } @@ -307,7 +307,7 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const TQString str(s, l); str = str.simplifyWhiteSpace(); - len = str.tqcontains(',') + 1; + len = str.contains(',') + 1; // If we have no commas, we have no array. if( len == 1 ) @@ -319,7 +319,7 @@ khtml::Length* DOMStringImpl::toLengthArray(int& len) const int pos = 0; int pos2; - while((pos2 = str.tqfind(',', pos)) != -1) { + while((pos2 = str.find(',', pos)) != -1) { r[i++] = parseLength((TQChar *) str.tqunicode()+pos, pos2-pos); pos = pos2+1; } diff --git a/khtml/xml/xml_tokenizer.cpp b/khtml/xml/xml_tokenizer.cpp index 37fc36f02..8f6164f51 100644 --- a/khtml/xml/xml_tokenizer.cpp +++ b/khtml/xml/xml_tokenizer.cpp @@ -152,11 +152,11 @@ void XMLHandler::fixUpNSURI(TQString& uri, const TQString& qname) { /* QXml does not resolve the namespaces of attributes in the same tag that preceed the xmlns declaration. This fixes up that case */ - if (uri.isEmpty() && qname.tqfind(':') != -1) { + if (uri.isEmpty() && qname.find(':') != -1) { TQXmlNamespaceSupport ns; TQString localName, prefix; ns.splitName(qname, prefix, localName); - if (namespaceInfo.tqcontains(prefix)) { + if (namespaceInfo.contains(prefix)) { uri = namespaceInfo[prefix].top(); } } diff --git a/kinit/autostart.cpp b/kinit/autostart.cpp index 9383e4301..8fba76928 100644 --- a/kinit/autostart.cpp +++ b/kinit/autostart.cpp @@ -82,10 +82,10 @@ void AutoStart::setPhaseDone() static TQString extractName(TQString path) { - int i = path.tqfindRev('/'); + int i = path.findRev('/'); if (i >= 0) path = path.mid(i+1); - i = path.tqfindRev('.'); + i = path.findRev('.'); if (i >= 0) path = path.left(i); return path; @@ -147,14 +147,14 @@ AutoStart::loadAutoStartList() // Same local file name? TQString localOuter; TQString localInner; - int slashPos = (*it).tqfindRev( '/', -1, TRUE ); + int slashPos = (*it).findRev( '/', -1, TRUE ); if (slashPos == -1) { localOuter = (*it); } else { localOuter = (*it).mid(slashPos+1); } - slashPos = (*localit).tqfindRev( '/', -1, TRUE ); + slashPos = (*localit).findRev( '/', -1, TRUE ); if (slashPos == -1) { localInner = (*localit); } @@ -178,12 +178,12 @@ AutoStart::loadAutoStartList() if (config.hasKey("OnlyShowIn")) { - if ((!config.readListEntry("OnlyShowIn", ';').tqcontains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))) + if ((!config.readListEntry("OnlyShowIn", ';').contains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))) continue; } if (config.hasKey("NotShowIn")) { - if ((config.readListEntry("NotShowIn", ';').tqcontains("TDE")) || (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))) + if ((config.readListEntry("NotShowIn", ';').contains("TDE")) || (config.readListEntry("NotShowIn", ';').contains("KDE"))) continue; } diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index 2e4810dea..bda7a7d35 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -370,7 +370,7 @@ TQCString execpath_avoid_loops( const TQCString& exec, int envc, const char* env s_instance->dirs()->findExe( exec, paths.join( TQString( ":" )))); if( avoid_loops && !execpath.isEmpty()) { - int pos = execpath.tqfindRev( '/' ); + int pos = execpath.findRev( '/' ); TQString bin_path = execpath.left( pos ); for( TQStringList::Iterator it = paths.begin(); it != paths.end(); @@ -456,7 +456,7 @@ static pid_t launch(int argc, const char *_name, const char *args, { lib = _name; name = _name; - name = name.mid( name.tqfindRev('/') + 1); + name = name.mid( name.findRev('/') + 1); exec = _name; if (lib.right(3) == ".la") libpath = lib; @@ -535,7 +535,7 @@ static pid_t launch(int argc, const char *_name, const char *args, ++it ) { TQCString tmp( it.current()); - int pos = tmp.tqfind( '=' ); + int pos = tmp.find( '=' ); if( pos >= 0 ) unsetenv( tmp.left( pos )); } @@ -1477,16 +1477,16 @@ static void kdeinit_library_path() it++) { TQString d = *it; - if (ltdl_library_path.tqcontains(d)) + if (ltdl_library_path.contains(d)) continue; - if (ld_library_path.tqcontains(d)) + if (ld_library_path.contains(d)) continue; if (d[d.length()-1] == '/') { d.truncate(d.length()-1); - if (ltdl_library_path.tqcontains(d)) + if (ltdl_library_path.contains(d)) continue; - if (ld_library_path.tqcontains(d)) + if (ld_library_path.contains(d)) continue; } if ((d == "/lib") || (d == "/usr/lib")) @@ -1517,7 +1517,7 @@ static void kdeinit_library_path() exit(255); } int i; - if((i = display.tqfindRev('.')) > display.tqfindRev(':') && i >= 0) + if((i = display.findRev('.')) > display.findRev(':') && i >= 0) display.truncate(i); TQCString socketName = TQFile::encodeName(locateLocal("socket", TQString("kdeinit-%1").arg(TQString(display)), s_instance)); diff --git a/kinit/klauncher.cpp b/kinit/klauncher.cpp index 0c5ceb015..4f2e12450 100644 --- a/kinit/klauncher.cpp +++ b/kinit/klauncher.cpp @@ -893,7 +893,7 @@ KLauncher::exec_blind( const TQCString &name, const TQValueList<TQCString> &arg_ request->transaction = 0; // No confirmation is send request->envs = envs; // Find service, if any - strip path if needed - KService::Ptr service = KService::serviceByDesktopName( name.mid( name.tqfindRev( '/' ) + 1 )); + KService::Ptr service = KService::serviceByDesktopName( name.mid( name.findRev( '/' ) + 1 )); if (service != NULL) send_service_startup_info( request, service, startup_id, TQValueList< TQCString >()); @@ -1165,7 +1165,7 @@ KLauncher::kdeinit_exec(const TQString &app, const TQStringList &args, if( app != "kbuildsycoca" ) // avoid stupid loop { // Find service, if any - strip path if needed - KService::Ptr service = KService::serviceByDesktopName( app.mid( app.tqfindRev( '/' ) + 1 )); + KService::Ptr service = KService::serviceByDesktopName( app.mid( app.findRev( '/' ) + 1 )); if (service != NULL) send_service_startup_info( request, service, startup_id, TQValueList< TQCString >()); diff --git a/kio/bookmarks/dptrtemplate.h b/kio/bookmarks/dptrtemplate.h index a34f021be..2a69d6a54 100644 --- a/kio/bookmarks/dptrtemplate.h +++ b/kio/bookmarks/dptrtemplate.h @@ -34,10 +34,10 @@ public: d_ptr = new TQPtrDict<PrivateData>; qAddPostRoutine( cleanup_d_ptr ); } - PrivateData* ret = d_ptr->tqfind( (void*) instance ); + PrivateData* ret = d_ptr->find( (void*) instance ); if ( ! ret ) { ret = new PrivateData; - d_ptr->tqreplace( (void*) instance, ret ); + d_ptr->replace( (void*) instance, ret ); } return ret; } diff --git a/kio/bookmarks/kbookmark.h b/kio/bookmarks/kbookmark.h index 0046eb689..84f177522 100644 --- a/kio/bookmarks/kbookmark.h +++ b/kio/bookmarks/kbookmark.h @@ -130,13 +130,13 @@ public: * @return address of parent */ static TQString parentAddress( const TQString & address ) - { return address.left( address.tqfindRev('/') ); } + { return address.left( address.findRev('/') ); } /** * @return position in parent (e.g. /4/5/2 -> 2) */ static uint positionInParent( const TQString & address ) - { return address.mid( address.tqfindRev('/') + 1 ).toInt(); } + { return address.mid( address.findRev('/') + 1 ).toInt(); } /** * @return address of previous sibling (e.g. /4/5/2 -> /4/5/1) diff --git a/kio/bookmarks/kbookmarkimporter_crash.cc b/kio/bookmarks/kbookmarkimporter_crash.cc index 7e0831e83..988e1f673 100644 --- a/kio/bookmarks/kbookmarkimporter_crash.cc +++ b/kio/bookmarks/kbookmarkimporter_crash.cc @@ -141,7 +141,7 @@ TQStringList KCrashBookmarkImporterImpl::getCrashLogs() int count = 0; for ( ; (( fi = it.current() ) != 0) && (count < 20); ++it, ++count ) { - bool stillAlive = activeLogs.tqcontains( fi->absFilePath() ); + bool stillAlive = activeLogs.contains( fi->absFilePath() ); if ( !stillAlive ) crashFiles << fi->absFilePath(); } diff --git a/kio/bookmarks/kbookmarkimporter_kde1.cc b/kio/bookmarks/kbookmarkimporter_kde1.cc index 79568be02..49999e675 100644 --- a/kio/bookmarks/kbookmarkimporter_kde1.cc +++ b/kio/bookmarks/kbookmarkimporter_kde1.cc @@ -48,7 +48,7 @@ void KBookmarkImporter::scanIntern( TQDomElement & parentElem, const TQString & TQDir dir( _path ); TQString canonical = dir.canonicalPath(); - if ( m_lstParsedDirs.tqcontains(canonical) ) + if ( m_lstParsedDirs.contains(canonical) ) { kdWarning() << "Directory " << canonical << " already parsed" << endl; return; diff --git a/kio/bookmarks/kbookmarkimporter_ns.cc b/kio/bookmarks/kbookmarkimporter_ns.cc index f7b438f78..e4e074107 100644 --- a/kio/bookmarks/kbookmarkimporter_ns.cc +++ b/kio/bookmarks/kbookmarkimporter_ns.cc @@ -61,14 +61,14 @@ void KNSBookmarkImporterImpl::parse() TQCString t = s.stripWhiteSpace(); if(t.left(12).upper() == "<DT><A HREF=" || t.left(16).upper() == "<DT><H3><A HREF=") { - int firstQuotes = t.tqfind('"')+1; - int secondQuotes = t.tqfind('"', firstQuotes); + int firstQuotes = t.find('"')+1; + int secondQuotes = t.find('"', firstQuotes); if (firstQuotes != -1 && secondQuotes != -1) { TQCString link = t.mid(firstQuotes, secondQuotes-firstQuotes); - int endTag = t.tqfind('>', secondQuotes+1); + int endTag = t.find('>', secondQuotes+1); TQCString name = t.mid(endTag+1); - name = name.left(name.tqfindRev('<')); + name = name.left(name.findRev('<')); if ( name.right(4) == "</A>" ) name = name.left( name.length() - 4 ); TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) ); @@ -79,9 +79,9 @@ void KNSBookmarkImporterImpl::parse() } } else if(t.left(7).upper() == "<DT><H3") { - int endTag = t.tqfind('>', 7); + int endTag = t.find('>', 7); TQCString name = t.mid(endTag+1); - name = name.left(name.tqfindRev('<')); + name = name.left(name.findRev('<')); TQString qname = KCharsets::resolveEntities( codec->toUnicode( name ) ); TQCString additionalInfo = t.mid( 8, endTag-8 ); bool folded = (additionalInfo.left(6) == "FOLDED"); diff --git a/kio/bookmarks/kbookmarkmenu.cc b/kio/bookmarks/kbookmarkmenu.cc index a4195409b..0c7965a16 100644 --- a/kio/bookmarks/kbookmarkmenu.cc +++ b/kio/bookmarks/kbookmarkmenu.cc @@ -537,7 +537,7 @@ void KBookmarkMenu::addNewFolder() TQString title = i18n( "&New Bookmark Folder..." ); int p; - while ( ( p = title.tqfind( '&' ) ) >= 0 ) + while ( ( p = title.find( '&' ) ) >= 0 ) title.remove( p, 1 ); KAction * paNewFolder = new KAction( title, @@ -1175,7 +1175,7 @@ void KBookmarkMenu::setDynamicBookmarks(const TQString &id, const DynMenuInfo &n // make sure list includes type config.setGroup("Bookmarks"); - if (elist.tqcontains(id) < 1) { + if (elist.contains(id) < 1) { elist << id; config.writeEntry("DynamicMenus", elist); } diff --git a/kio/kfile/images.h b/kio/kfile/images.h index 62e42afeb..f544e2f0a 100644 --- a/kio/kfile/images.h +++ b/kio/kfile/images.h @@ -248,7 +248,7 @@ static struct EmbedImage { static const TQImage& qembed_findImage( const TQString& name ) { static TQDict<TQImage> dict; - TQImage* img = dict.tqfind( name ); + TQImage* img = dict.find( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { diff --git a/kio/kfile/kacleditwidget.cpp b/kio/kfile/kacleditwidget.cpp index 0e58aee6e..37b06da44 100644 --- a/kio/kfile/kacleditwidget.cpp +++ b/kio/kfile/kacleditwidget.cpp @@ -495,17 +495,17 @@ void EditACLEntryDialog::slotUpdateAllowedUsersAndGroups() m_groupsCombo->clear(); if ( m_defaultCB && m_defaultCB->isChecked() ) { m_usersCombo->insertStringList( m_defaultUsers ); - if ( m_defaultUsers.tqfind( oldUser ) != m_defaultUsers.end() ) + if ( m_defaultUsers.find( oldUser ) != m_defaultUsers.end() ) m_usersCombo->setCurrentText( oldUser ); m_groupsCombo->insertStringList( m_defaultGroups ); - if ( m_defaultGroups.tqfind( oldGroup ) != m_defaultGroups.end() ) + if ( m_defaultGroups.find( oldGroup ) != m_defaultGroups.end() ) m_groupsCombo->setCurrentText( oldGroup ); } else { m_usersCombo->insertStringList( m_users ); - if ( m_users.tqfind( oldUser ) != m_users.end() ) + if ( m_users.find( oldUser ) != m_users.end() ) m_usersCombo->setCurrentText( oldUser ); m_groupsCombo->insertStringList( m_groups ); - if ( m_groups.tqfind( oldGroup ) != m_groups.end() ) + if ( m_groups.find( oldGroup ) != m_groups.end() ) m_groupsCombo->setCurrentText( oldGroup ); } } diff --git a/kio/kfile/kdiroperator.cpp b/kio/kfile/kdiroperator.cpp index 6c38e5ef7..f84be90ea 100644 --- a/kio/kfile/kdiroperator.cpp +++ b/kio/kfile/kdiroperator.cpp @@ -590,7 +590,7 @@ void KDirOperator::checkPath(const TQString &, bool /*takeFiles*/) // SLOT text = text.stripWhiteSpace(); // if the argument is no URL (the check is quite fragil) and it's // no absolute path, we add the current directory to get a correct url - if (text.tqfind(':') < 0 && text[0] != '/') + if (text.find(':') < 0 && text[0] != '/') text.insert(0, currUrl); // in case we have a selection defined and someone patched the file- @@ -825,7 +825,7 @@ bool KDirOperator::checkPreviewInternal() const { TQStringList supported = KIO::PreviewJob::supportedMimeTypes(); // no preview support for directories? - if ( dirOnlyMode() && supported.tqfindIndex( "inode/directory" ) == -1 ) + if ( dirOnlyMode() && supported.findIndex( "inode/directory" ) == -1 ) return false; TQStringList mimeTypes = dir->mimeFilters(); diff --git a/kio/kfile/kdirselectdialog.cpp b/kio/kfile/kdirselectdialog.cpp index d33f7fadf..10238ad93 100644 --- a/kio/kfile/kdirselectdialog.cpp +++ b/kio/kfile/kdirselectdialog.cpp @@ -211,7 +211,7 @@ void KDirSelectDialog::setCurrentURL( const KURL& url ) { while ( pos > 0 ) { - pos = path.tqfindRev( '/', pos -1 ); + pos = path.findRev( '/', pos -1 ); if ( pos >= 0 ) { dirToList.setPath( path.left( pos +1 ) ); diff --git a/kio/kfile/kdiskfreesp.cpp b/kio/kfile/kdiskfreesp.cpp index 5fe26f696..2a2f6f0f2 100644 --- a/kio/kfile/kdiskfreesp.cpp +++ b/kio/kfile/kdiskfreesp.cpp @@ -109,7 +109,7 @@ void KDiskFreeSp::dfDone() if ( !s.isEmpty() ) { //kdDebug(kfile_area) << "GOT: [" << s << "]" << endl; - if (s.tqfind(BLANK)<0) // devicename was too long, rest in next line + if (s.find(BLANK)<0) // devicename was too long, rest in next line if ( !t.eof() ) { // just appends the next line v=t.readLine(); s=s.append(v); @@ -119,30 +119,30 @@ void KDiskFreeSp::dfDone() //kdDebug(kfile_area) << "[" << s << "]" << endl; - //TQString deviceName = s.left(s.tqfind(BLANK)); - s=s.remove(0,s.tqfind(BLANK)+1 ); + //TQString deviceName = s.left(s.find(BLANK)); + s=s.remove(0,s.find(BLANK)+1 ); //kdDebug(kfile_area) << " DeviceName: [" << deviceName << "]" << endl; if (!NO_FS_TYPE) - s=s.remove(0,s.tqfind(BLANK)+1 ); // eat fs type + s=s.remove(0,s.find(BLANK)+1 ); // eat fs type - u=s.left(s.tqfind(BLANK)); + u=s.left(s.find(BLANK)); unsigned long kBSize = u.toULong(); - s=s.remove(0,s.tqfind(BLANK)+1 ); + s=s.remove(0,s.find(BLANK)+1 ); //kdDebug(kfile_area) << " Size: [" << kBSize << "]" << endl; - u=s.left(s.tqfind(BLANK)); + u=s.left(s.find(BLANK)); unsigned long kBUsed = u.toULong(); - s=s.remove(0,s.tqfind(BLANK)+1 ); + s=s.remove(0,s.find(BLANK)+1 ); //kdDebug(kfile_area) << " Used: [" << kBUsed << "]" << endl; - u=s.left(s.tqfind(BLANK)); + u=s.left(s.find(BLANK)); unsigned long kBAvail = u.toULong(); - s=s.remove(0,s.tqfind(BLANK)+1 ); + s=s.remove(0,s.find(BLANK)+1 ); //kdDebug(kfile_area) << " Avail: [" << kBAvail << "]" << endl; - s=s.remove(0,s.tqfind(BLANK)+1 ); // delete the capacity 94% + s=s.remove(0,s.find(BLANK)+1 ); // delete the capacity 94% TQString mountPoint = s.stripWhiteSpace(); //kdDebug(kfile_area) << " MountPoint: [" << mountPoint << "]" << endl; diff --git a/kio/kfile/kfiledialog.cpp b/kio/kfile/kfiledialog.cpp index 227bcffea..a1668693d 100644 --- a/kio/kfile/kfiledialog.cpp +++ b/kio/kfile/kfiledialog.cpp @@ -204,7 +204,7 @@ void KFileDialog::setLocationLabel(const TQString& text) void KFileDialog::setFilter(const TQString& filter) { - int pos = filter.tqfind('/'); + int pos = filter.find('/'); // Check for an un-escaped '/', if found // interpret as a MIME filter. @@ -219,7 +219,7 @@ void KFileDialog::setFilter(const TQString& filter) // escaped '/' characters. TQString copy (filter); - for (pos = 0; (pos = copy.tqfind("\\/", pos)) != -1; ++pos) + for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos) copy.remove(pos, 1); ops->clearFilter(); @@ -1133,7 +1133,7 @@ void KFileDialog::slotFilterChanged() TQString filter = filterWidget->currentFilter(); ops->clearFilter(); - if ( filter.tqfind( '/' ) > -1 ) { + if ( filter.find( '/' ) > -1 ) { TQStringList types = TQStringList::split( " ", filter ); types.prepend( "inode/directory" ); ops->setMimeFilter( types ); @@ -1250,7 +1250,7 @@ void KFileDialog::setSelection(const TQString& url) } else { TQString filename = u.url(); - int sep = filename.tqfindRev('/'); + int sep = filename.findRev('/'); if (sep >= 0) { // there is a / in it if ( KProtocolInfo::supportsListing( u )) { KURL dir(u); @@ -1474,7 +1474,7 @@ KURL::List& KFileDialog::parseSelectedURLs() const if ( d->filenames.contains( '/' )) { // assume _one_ absolute filename static const TQString &prot = KGlobal::staticQString(":/"); KURL u; - if ( d->filenames.tqfind( prot ) != -1 ) + if ( d->filenames.find( prot ) != -1 ) u = d->filenames; else u.setPath( d->filenames ); @@ -1504,7 +1504,7 @@ KURL::List KFileDialog::tokenize( const TQString& line ) const KURL u( ops->url() ); TQString name; - int count = line.tqcontains( '"' ); + int count = line.contains( '"' ); if ( count == 0 ) { // no " " -> assume one single file u.setFileName( line ); if ( u.isValid() ) @@ -1526,8 +1526,8 @@ KURL::List KFileDialog::tokenize( const TQString& line ) const int start = 0; int index1 = -1, index2 = -1; while ( true ) { - index1 = line.tqfind( '"', start ); - index2 = line.tqfind( '"', index1 + 1 ); + index1 = line.find( '"', start ); + index2 = line.find( '"', index1 + 1 ); if ( index1 < 0 ) break; @@ -1885,7 +1885,7 @@ static TQString getExtensionFromPatternList (const TQStringList &patternList) // *.JP? if ((*it).startsWith ("*.") && (*it).length () > 2 && - (*it).tqfind ('*', 2) < 0 && (*it).tqfind ('?', 2) < 0) + (*it).find ('*', 2) < 0 && (*it).find ('?', 2) < 0) { ret = (*it).mid (1); break; @@ -1937,7 +1937,7 @@ void KFileDialog::updateAutoSelectExtension (void) if (!filter.isEmpty ()) { // e.g. "*.cpp" - if (filter.tqfind ('/') < 0) + if (filter.find ('/') < 0) { d->extension = getExtensionFromPatternList (TQStringList::split (" ", filter)).lower (); kdDebug (kfile_area) << "\tsetFilter-style: pattern ext=\'" @@ -2056,10 +2056,10 @@ void KFileDialog::updateLocationEditExtension (const TQString &lastExtension) KURL url = getCompleteURL (urlStr); kdDebug (kfile_area) << "updateLocationEditExtension (" << url << ")" << endl; - const int fileNameOffset = urlStr.tqfindRev ('/') + 1; + const int fileNameOffset = urlStr.findRev ('/') + 1; TQString fileName = urlStr.mid (fileNameOffset); - const int dot = fileName.tqfindRev ('.'); + const int dot = fileName.findRev ('.'); const int len = fileName.length (); if (dot > 0 && // has an extension already and it's not a hidden file // like ".hidden" (but we do accept ".hidden.ext") @@ -2115,7 +2115,7 @@ void KFileDialog::updateFilter () KMimeType::Ptr mime = KMimeType::findByPath(urlStr, 0, true); if (mime && mime->name() != KMimeType::defaultMimeType()) { if (filterWidget->currentFilter() != mime->name() && - filterWidget->filters.tqfindIndex(mime->name()) != -1) { + filterWidget->filters.findIndex(mime->name()) != -1) { filterWidget->setCurrentFilter(mime->name()); } } @@ -2135,7 +2135,7 @@ void KFileDialog::appendExtension (KURL &url) kdDebug (kfile_area) << "appendExtension(" << url << ")" << endl; const int len = fileName.length (); - const int dot = fileName.tqfindRev ('.'); + const int dot = fileName.findRev ('.'); const bool suppressExtension = (dot == len - 1); const bool unspecifiedExtension = (dot <= 0); @@ -2361,11 +2361,11 @@ void KFileDialog::setNonExtSelection() TQString pattern, filename = locationEdit->currentText().stripWhiteSpace(); KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if ( !pattern.isEmpty() && pattern.tqat( 0 ) == '*' && pattern.tqfind( '*' , 1 ) == -1 ) + if ( !pattern.isEmpty() && pattern.tqat( 0 ) == '*' && pattern.find( '*' , 1 ) == -1 ) locationEdit->lineEdit()->setSelection( 0, filename.length() - pattern.stripWhiteSpace().length()+1 ); else { - int lastDot = filename.tqfindRev( '.' ); + int lastDot = filename.findRev( '.' ); if ( lastDot > 0 ) locationEdit->lineEdit()->setSelection( 0, lastDot ); } diff --git a/kio/kfile/kfilefiltercombo.cpp b/kio/kfile/kfilefiltercombo.cpp index 117097c98..625321f1a 100644 --- a/kio/kfile/kfilefiltercombo.cpp +++ b/kio/kfile/kfilefiltercombo.cpp @@ -68,11 +68,11 @@ void KFileFilterCombo::setFilter(const TQString& filter) if (!filter.isEmpty()) { TQString tmp = filter; - int index = tmp.tqfind('\n'); + int index = tmp.find('\n'); while (index > 0) { filters.append(tmp.left(index)); tmp = tmp.mid(index + 1); - index = tmp.tqfind('\n'); + index = tmp.find('\n'); } filters.append(tmp); } @@ -82,7 +82,7 @@ void KFileFilterCombo::setFilter(const TQString& filter) TQStringList::ConstIterator it; TQStringList::ConstIterator end(filters.end()); for (it = filters.begin(); it != end; ++it) { - int tab = (*it).tqfind('|'); + int tab = (*it).find('|'); insertItem((tab < 0) ? *it : (*it).mid(tab + 1)); } @@ -101,7 +101,7 @@ TQString KFileFilterCombo::currentFilter() const } } - int tab = f.tqfind('|'); + int tab = f.find('|'); if (tab < 0) return f; else diff --git a/kio/kfile/kfileiconview.cpp b/kio/kfile/kfileiconview.cpp index c5c2ac697..7a176bcc6 100644 --- a/kio/kfile/kfileiconview.cpp +++ b/kio/kfile/kfileiconview.cpp @@ -866,7 +866,7 @@ void KFileIconView::contentsDragEnterEvent( TQDragEnterEvent *e ) if ((dropOptions() & AutoOpenDirs) == 0) return; - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); if ( item ) { // are we over an item ? d->dropItem = item; d->autoOpenTimer.start( autoOpenDelay() ); // restart timer @@ -889,7 +889,7 @@ void KFileIconView::contentsDragMoveEvent( TQDragMoveEvent *e ) if ((dropOptions() & AutoOpenDirs) == 0) return; - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); if ( item ) { // are we over an item ? if (d->dropItem != item) { @@ -921,7 +921,7 @@ void KFileIconView::contentsDropEvent( TQDropEvent *e ) } e->acceptAction(); // Yes - KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(tqfindItem( contentsToViewport( e->pos() ) )); + KFileIconViewItem *item = dynamic_cast<KFileIconViewItem*>(findItem( contentsToViewport( e->pos() ) )); KFileItem * fileItem = 0; if (item) fileItem = item->fileInfo(); diff --git a/kio/kfile/kfilemetapreview.cpp b/kio/kfile/kfilemetapreview.cpp index 676549a29..3c73387b4 100644 --- a/kio/kfile/kfilemetapreview.cpp +++ b/kio/kfile/kfilemetapreview.cpp @@ -62,7 +62,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT if ( mimeType == "inode/directory" ) return 0L; - KPreviewWidgetBase *provider = m_previewProviders.tqfind( mimeType ); + KPreviewWidgetBase *provider = m_previewProviders.find( mimeType ); if ( provider ) return provider; @@ -87,15 +87,15 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT } // with the new mimetypes from the audio-preview, try again - provider = m_previewProviders.tqfind( mimeType ); + provider = m_previewProviders.find( mimeType ); if ( provider ) return provider; // ### mimetype may be image/* for example, try that - int index = mimeType.tqfind( '/' ); + int index = mimeType.find( '/' ); if ( index > 0 ) { - provider = m_previewProviders.tqfind( mimeType.left( index + 1 ) + "*" ); + provider = m_previewProviders.find( mimeType.left( index + 1 ) + "*" ); if ( provider ) return provider; } @@ -107,7 +107,7 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT TQString parentMimeType = mimeInfo->parentMimeType(); while ( !parentMimeType.isEmpty() ) { - provider = m_previewProviders.tqfind( parentMimeType ); + provider = m_previewProviders.find( parentMimeType ); if ( provider ) return provider; @@ -123,11 +123,11 @@ KPreviewWidgetBase * KFileMetaPreview::previewProviderFor( const TQString& mimeT { if ( textProperty.toBool() ) { - provider = m_previewProviders.tqfind( "text/plain" ); + provider = m_previewProviders.find( "text/plain" ); if ( provider ) return provider; - provider = m_previewProviders.tqfind( "text/*" ); + provider = m_previewProviders.find( "text/*" ); if ( provider ) return provider; } diff --git a/kio/kfile/kfiletreebranch.cpp b/kio/kfile/kfiletreebranch.cpp index 4f7539490..352bd875e 100644 --- a/kio/kfile/kfiletreebranch.cpp +++ b/kio/kfile/kfiletreebranch.cpp @@ -182,7 +182,7 @@ void KFileTreeBranch::addItems( const KFileItemList& list ) if( !m_showExtensions && !currItem->isDir() ) /* Need to cut the extension */ { TQString name = currItem->text(); - int mPoint = name.tqfindRev( '.' ); + int mPoint = name.findRev( '.' ); if( mPoint > 0 ) name = name.left( mPoint ); newKFTVI->setText( 0, name ); diff --git a/kio/kfile/kfiletreeview.cpp b/kio/kfile/kfiletreeview.cpp index 14a365392..06bce2881 100644 --- a/kio/kfile/kfiletreeview.cpp +++ b/kio/kfile/kfiletreeview.cpp @@ -413,7 +413,7 @@ KFileTreeBranchList& KFileTreeView::branches() bool KFileTreeView::removeBranch( KFileTreeBranch *branch ) { - if(m_branches.tqcontains(branch)) + if(m_branches.contains(branch)) { delete (branch->root()); m_branches.remove( branch ); @@ -558,7 +558,7 @@ void KFileTreeView::stopAnimation( KFileTreeViewItem * item ) kdDebug(250) << "Stoping Animation !" << endl; - MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.tqfind(item); + MapCurrentOpeningFolders::Iterator it = m_mapCurrentOpeningFolders.find(item); if ( it != m_mapCurrentOpeningFolders.end() ) { if( item->isDir() && isOpen( item) ) diff --git a/kio/kfile/kicondialog.cpp b/kio/kfile/kicondialog.cpp index ae83e880a..e600f2679 100644 --- a/kio/kfile/kicondialog.cpp +++ b/kio/kfile/kicondialog.cpp @@ -68,7 +68,7 @@ protected: public: IconPath(const TQString &ip) : TQString (ip) { - int n = tqfindRev('/'); + int n = findRev('/'); m_iconName = (n==-1) ? static_cast<TQString>(*this) : mid(n+1); } diff --git a/kio/kfile/kmetaprops.cpp b/kio/kfile/kmetaprops.cpp index d3d3f7c41..38906bbd3 100644 --- a/kio/kfile/kmetaprops.cpp +++ b/kio/kfile/kmetaprops.cpp @@ -216,7 +216,7 @@ void KFileMetaPropsPlugin::createLayout() d->m_add->setEnabled(false); for (TQStringList::Iterator it = sk.begin(); it!=sk.end(); ++it) { - if ( l.tqfind(*it)==l.end() ) + if ( l.find(*it)==l.end() ) { d->m_add->setEnabled(true); kdDebug(250) << "**first addable key is " << (*it).latin1() << "**" <<endl; diff --git a/kio/kfile/knotifydialog.cpp b/kio/kfile/knotifydialog.cpp index 3c0a85423..796144795 100644 --- a/kio/kfile/knotifydialog.cpp +++ b/kio/kfile/knotifydialog.cpp @@ -514,7 +514,7 @@ void KNotifyWidget::updatePixmaps( ListViewItem *item ) void KNotifyWidget::addVisibleApp( Application *app ) { - if ( !app || (m_visibleApps.tqfindRef( app ) != -1) ) + if ( !app || (m_visibleApps.findRef( app ) != -1) ) return; m_visibleApps.append( app ); @@ -830,8 +830,8 @@ void KNotifyWidget::save() // "/opt/kde3/share/apps/kwin/eventsrc" TQString KNotifyWidget::makeRelative( const TQString& fullPath ) { - int slash = fullPath.tqfindRev( '/' ) - 1; - slash = fullPath.tqfindRev( '/', slash ); + int slash = fullPath.findRev( '/' ) - 1; + slash = fullPath.findRev( '/', slash ); if ( slash < 0 ) return TQString::null; @@ -1001,7 +1001,7 @@ void KNotifyWidget::enableAll( int what, bool enable ) Application::Application( const TQString &path ) { TQString config_file = path; - config_file[config_file.tqfind('/')] = '.'; + config_file[config_file.find('/')] = '.'; m_events = 0L; config = new KConfig(config_file, false, false); kc = new KConfig(path, true, false, "data"); @@ -1011,7 +1011,7 @@ Application::Application( const TQString &path ) m_description = kc->readEntry( TQString::tqfromLatin1("Comment"), i18n("No description available") ); - int index = path.tqfind( '/' ); + int index = path.find( '/' ); if ( index >= 0 ) m_appname = path.left( index ); else diff --git a/kio/kfile/kopenwith.cpp b/kio/kfile/kopenwith.cpp index 8d79dadae..1822a0fc7 100644 --- a/kio/kfile/kopenwith.cpp +++ b/kio/kfile/kopenwith.cpp @@ -634,12 +634,12 @@ void KOpenWithDlg::slotOK() { TQString exec = serv->exec(); fullExec = exec; - exec.tqreplace("%u", "", false); - exec.tqreplace("%f", "", false); - exec.tqreplace("-caption %c", ""); - exec.tqreplace("-caption \"%c\"", ""); - exec.tqreplace("%i", ""); - exec.tqreplace("%m", ""); + exec.replace("%u", "", false); + exec.replace("%f", "", false); + exec.replace("-caption %c", ""); + exec.replace("-caption \"%c\"", ""); + exec.replace("%i", ""); + exec.replace("%m", ""); exec = exec.simplifyWhiteSpace(); if (exec == typedExec) { @@ -760,7 +760,7 @@ void KOpenWithDlg::slotOK() if (bRemember || d->saveNewApps) { TQStringList mimeList = desktop->readListEntry("MimeType", ';'); - if (!qServiceType.isEmpty() && !mimeList.tqcontains(qServiceType)) + if (!qServiceType.isEmpty() && !mimeList.contains(qServiceType)) mimeList.append(qServiceType); desktop->writeEntry("MimeType", mimeList, ';'); diff --git a/kio/kfile/kpreviewwidgetbase.h b/kio/kfile/kpreviewwidgetbase.h index e8f2ca48c..05176964f 100644 --- a/kio/kfile/kpreviewwidgetbase.h +++ b/kio/kfile/kpreviewwidgetbase.h @@ -84,7 +84,7 @@ protected: private: class KPreviewWidgetBasePrivate; KPreviewWidgetBasePrivate * d() const { - return s_private->tqfind( const_cast<KPreviewWidgetBase*>( this ) ); + return s_private->find( const_cast<KPreviewWidgetBase*>( this ) ); } static TQPtrDict<KPreviewWidgetBasePrivate> * s_private; }; diff --git a/kio/kfile/kpropertiesdialog.cpp b/kio/kfile/kpropertiesdialog.cpp index d953f830b..a3c1739ad 100644 --- a/kio/kfile/kpropertiesdialog.cpp +++ b/kio/kfile/kpropertiesdialog.cpp @@ -759,8 +759,8 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) { TQString path; if ( !m_bFromTemplate ) { - isTrash = ( properties->kurl().protocol().tqfind( "trash", 0, false)==0 ); - if ( properties->kurl().protocol().tqfind("device", 0, false)==0) + isTrash = ( properties->kurl().protocol().find( "trash", 0, false)==0 ); + if ( properties->kurl().protocol().find("device", 0, false)==0) isDevice = true; // Extract the full name, but without file: for local files if ( isReallyLocal ) @@ -908,11 +908,11 @@ KFilePropsPlugin::KFilePropsPlugin( KPropertiesDialog *_props ) // Enhanced rename: Don't highlight the file extension. TQString pattern; KServiceTypeFactory::self()->findFromPattern( filename, &pattern ); - if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.tqfind('*',1)==-1) + if (!pattern.isEmpty() && pattern.tqat(0)=='*' && pattern.find('*',1)==-1) d->m_lined->setSelection(0, filename.length()-pattern.stripWhiteSpace().length()+1); else { - int lastDot = filename.tqfindRev('.'); + int lastDot = filename.findRev('.'); if (lastDot > 0) d->m_lined->setSelection(0, lastDot); } @@ -1127,7 +1127,7 @@ void KFilePropsPlugin::slotEditFileType() #ifdef Q_WS_X11 TQString mime; if ( d->mimeType == KMimeType::defaultMimeType() ) { - int pos = d->oldFileName.tqfindRev( '.' ); + int pos = d->oldFileName.findRev( '.' ); if ( pos != -1 ) mime = "*" + d->oldFileName.mid(pos); else @@ -1563,7 +1563,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr TQString path = properties->kurl().path(-1); TQString fname = properties->kurl().fileName(); bool isLocal = properties->kurl().isLocalFile(); - bool isTrash = ( properties->kurl().protocol().tqfind("trash", 0, false)==0 ); + bool isTrash = ( properties->kurl().protocol().find("trash", 0, false)==0 ); bool IamRoot = (geteuid() == 0); KFileItem * item = properties->item(); @@ -1805,11 +1805,11 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr TQString name = TQString::tqfromLatin1(ge->gr_name); if (name.isEmpty()) name.setNum(ge->gr_gid); - if (groupList.tqfind(name) == groupList.end()) + if (groupList.find(name) == groupList.end()) groupList += name; } - bool isMyGroup = groupList.tqcontains(strGroup); + bool isMyGroup = groupList.contains(strGroup); /* add the group the file currently belongs to .. * .. if its not there already @@ -1843,7 +1843,7 @@ KFilePermissionsPropsPlugin::KFilePermissionsPropsPlugin( KPropertiesDialog *_pr { grpCombo = new TQComboBox(gb, "combogrouplist"); grpCombo->insertStringList(groupList); - grpCombo->setCurrentItem(groupList.tqfindIndex(strGroup)); + grpCombo->setCurrentItem(groupList.findIndex(strGroup)); gl->addWidget(grpCombo, 2, 1); connect( grpCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SIGNAL( changed() ) ); @@ -2945,7 +2945,7 @@ KDevicePropsPlugin::KDevicePropsPlugin( KPropertiesDialog *_props ) : KPropsDlgP device->setEditText( deviceStr ); if ( !deviceStr.isEmpty() ) { // Set default options for this device (first matching entry) - int index = m_devicelist.tqfindIndex(deviceStr); + int index = m_devicelist.findIndex(deviceStr); if (index != -1) { //kdDebug(250) << "found it " << index << endl; @@ -3020,7 +3020,7 @@ void KDevicePropsPlugin::slotActivated( int index ) void KDevicePropsPlugin::slotDeviceChanged() { // Update mountpoint so that it matches the typed device - int index = m_devicelist.tqfindIndex( device->currentText() ); + int index = m_devicelist.findIndex( device->currentText() ); if ( index != -1 ) mountpoint->setText( d->mountpointlist[index] ); else @@ -3255,11 +3255,11 @@ void KDesktopPropsPlugin::slotAddFiletype() TQString mimetype = (*it)->name(); if (mimetype == KMimeType::defaultMimeType()) continue; - int index = mimetype.tqfind("/"); + int index = mimetype.find("/"); TQString maj = mimetype.left(index); TQString min = mimetype.mid(index+1); - TQMapIterator<TQString,TQListViewItem*> mit = majorMap.tqfind( maj ); + TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( maj ); if ( mit == majorMap.end() ) { majorGroup = new TQListViewItem( mw->listView, maj ); majorGroup->setExpandable(true); @@ -3274,7 +3274,7 @@ void KDesktopPropsPlugin::slotAddFiletype() TQListViewItem *item = new TQListViewItem(majorGroup, min, (*it)->comment()); item->setPixmap(0, (*it)->pixmap(KIcon::Small, IconSize(KIcon::Small))); } - TQMapIterator<TQString,TQListViewItem*> mit = majorMap.tqfind( "all" ); + TQMapIterator<TQString,TQListViewItem*> mit = majorMap.find( "all" ); if ( mit != majorMap.end()) { mw->listView->setCurrentItem(mit.data()); diff --git a/kio/kfile/kurlcombobox.cpp b/kio/kfile/kurlcombobox.cpp index 0449795f5..d772cf431 100644 --- a/kio/kfile/kurlcombobox.cpp +++ b/kio/kfile/kurlcombobox.cpp @@ -152,7 +152,7 @@ void KURLComboBox::setURLs( TQStringList urls, OverLoadResolving remove ) // kill duplicates TQString text; while ( it != urls.end() ) { - while ( urls.tqcontains( *it ) > 1 ) { + while ( urls.contains( *it ) > 1 ) { it = urls.remove( it ); continue; } diff --git a/kio/kio/authinfo.cpp b/kio/kio/authinfo.cpp index 318e99277..b2449f79f 100644 --- a/kio/kio/authinfo.cpp +++ b/kio/kio/authinfo.cpp @@ -146,7 +146,7 @@ bool NetRC::lookup( const KURL& url, AutoLogin& login, bool userealnetrc, return false; } - if ( !loginMap.tqcontains( type ) ) + if ( !loginMap.contains( type ) ) return false; LoginList l = loginMap[type]; diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp index bcbd3191e..35bed5235 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -190,7 +190,7 @@ static void parseDataHeader(const KURL &url, DataHeader &header_info) { int raw_url_len = (int)raw_url.length(); // jump over scheme part (must be "data:", we don't even check that) - header_info.data_offset = raw_url.tqfind(':'); + header_info.data_offset = raw_url.find(':'); header_info.data_offset++; // jump over colon or to begin if scheme was missing // read mime type diff --git a/kio/kio/global.cpp b/kio/kio/global.cpp index 6cf30c505..9c0ae5e81 100644 --- a/kio/kio/global.cpp +++ b/kio/kio/global.cpp @@ -167,12 +167,12 @@ KIO_EXPORT TQString KIO::encodeFileName( const TQString & _str ) TQString str( _str ); int i = 0; - while ( ( i = str.tqfind( "%", i ) ) != -1 ) + while ( ( i = str.find( "%", i ) ) != -1 ) { str.replace( i, 1, "%%"); i += 2; } - while ( ( i = str.tqfind( "/" ) ) != -1 ) + while ( ( i = str.find( "/" ) ) != -1 ) str.replace( i, 1, "%2f"); return str; } diff --git a/kio/kio/global.h b/kio/kio/global.h index ea42f3e1d..03fb61dcc 100644 --- a/kio/kio/global.h +++ b/kio/kio/global.h @@ -536,7 +536,7 @@ public: it != metaData.end(); ++it) { - tqreplace(it.key(), it.data()); + replace(it.key(), it.data()); } return *this; } diff --git a/kio/kio/job.cpp b/kio/kio/job.cpp index 867d4004f..411604aba 100644 --- a/kio/kio/job.cpp +++ b/kio/kio/job.cpp @@ -392,7 +392,7 @@ MetaData Job::metaData() const TQString Job::queryMetaData(const TQString &key) { - if (!m_incomingMetaData.tqcontains(key)) + if (!m_incomingMetaData.contains(key)) return TQString::null; return m_incomingMetaData[key]; } @@ -821,8 +821,8 @@ StatJob::StatJob( const KURL& url, int command, void StatJob::start(Slave *slave) { - m_outgoingMetaData.tqreplace( "statSide", m_bSource ? "source" : "dest" ); - m_outgoingMetaData.tqreplace( "details", TQString::number(m_details) ); + m_outgoingMetaData.replace( "statSide", m_bSource ? "source" : "dest" ); + m_outgoingMetaData.replace( "details", TQString::number(m_details) ); connect( slave, TQT_SIGNAL( statEntry( const KIO::UDSEntry& ) ), TQT_SLOT( slotStatEntry( const KIO::UDSEntry & ) ) ); @@ -946,7 +946,7 @@ void TransferJob::slotRedirection( const KURL &url) // Some websites keep redirecting to themselves where each redirection // acts as the stage in a state-machine. We define "endless redirections" // as 5 redirections to the same URL. - if (m_redirectionList.tqcontains(url) > 5) + if (m_redirectionList.contains(url) > 5) { kdDebug(7007) << "TransferJob::slotRedirection: CYCLIC REDIRECTION!" << endl; m_error = ERR_CYCLIC_LINK; @@ -1328,7 +1328,7 @@ TransferJob *KIO::http_post( const KURL& url, const TQByteArray &postData, bool for( TQValueList< int >::ConstIterator it = overriden_ports->begin(); it != overriden_ports->end(); ++it ) - if( overriden_ports->tqcontains( url.port())) + if( overriden_ports->contains( url.port())) _error = 0; } @@ -2571,11 +2571,11 @@ void CopyJob::slotEntries(KIO::Job* job, const UDSEntryList& list) KProtocolInfo::fileNameUsedForCopying( url ) == KProtocolInfo::FromURL ) { //destFileName = url.fileName(); // Doesn't work for recursive listing // Count the number of prefixes used by the recursive listjob - int numberOfSlashes = displayName.tqcontains( '/' ); // don't make this a find()! + int numberOfSlashes = displayName.contains( '/' ); // don't make this a find()! TQString path = url.path(); int pos = 0; for ( int n = 0; n < numberOfSlashes + 1; ++n ) { - pos = path.tqfindRev( '/', pos - 1 ); + pos = path.findRev( '/', pos - 1 ); if ( pos == -1 ) { // error kdWarning(7007) << "kioslave bug: not enough slashes in UDS_URL " << path << " - looking for " << numberOfSlashes << " slashes" << endl; break; @@ -2789,7 +2789,7 @@ void CopyJob::skip( const KURL & sourceUrl ) // Check if this is one if toplevel sources // If yes, remove it from m_srcList, for a correct FilesRemoved() signal //kdDebug(7007) << "CopyJob::skip: looking for " << sourceUrl << endl; - KURL::List::Iterator sit = m_srcList.tqfind( sourceUrl ); + KURL::List::Iterator sit = m_srcList.find( sourceUrl ); if ( sit != m_srcList.end() ) { //kdDebug(7007) << "CopyJob::skip: removing " << sourceUrl << " from list" << endl; @@ -2967,7 +2967,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job ) TQString path = (*renamedirit).uDest.path(); if ( path.left(oldPath.length()) == oldPath ) { TQString n = path; - n.tqreplace( 0, oldPath.length(), newPath ); + n.replace( 0, oldPath.length(), newPath ); kdDebug(7007) << "dirs list: " << (*renamedirit).uSource.path() << " was going to be " << path << ", changed into " << n << endl; @@ -2981,7 +2981,7 @@ void CopyJob::slotResultConflictCreatingDirs( KIO::Job * job ) TQString path = (*renamefileit).uDest.path(); if ( path.left(oldPath.length()) == oldPath ) { TQString n = path; - n.tqreplace( 0, oldPath.length(), newPath ); + n.replace( 0, oldPath.length(), newPath ); kdDebug(7007) << "files list: " << (*renamefileit).uSource.path() << " was going to be " << path << ", changed into " << n << endl; @@ -4305,7 +4305,7 @@ void DeleteJob::slotResult( Job *job ) { // Add toplevel dir in list of dirs dirs.append( url ); - if ( url.isLocalFile() && !m_parentDirs.tqcontains( url.path(-1) ) ) + if ( url.isLocalFile() && !m_parentDirs.contains( url.path(-1) ) ) m_parentDirs.append( url.path(-1) ); if ( !KProtocolInfo::canDeleteRecursive( url ) ) { @@ -4334,7 +4334,7 @@ void DeleteJob::slotResult( Job *job ) //kdDebug(7007) << " Target is a file" << endl; files.append( url ); } - if ( url.isLocalFile() && !m_parentDirs.tqcontains( url.directory(false) ) ) + if ( url.isLocalFile() && !m_parentDirs.contains( url.directory(false) ) ) m_parentDirs.append( url.directory(false) ); ++m_currentStat; statNextSrc(); @@ -4585,12 +4585,12 @@ TQString CacheInfo::cachedFileName() TQString CEF = m_url.path(); - int p = CEF.tqfind('/'); + int p = CEF.find('/'); while(p != -1) { CEF[p] = separator; - p = CEF.tqfind('/', p); + p = CEF.find('/', p); } TQString host = m_url.host().lower(); diff --git a/kio/kio/kacl.cpp b/kio/kio/kacl.cpp index 5dd138b05..d05098102 100644 --- a/kio/kio/kacl.cpp +++ b/kio/kio/kacl.cpp @@ -619,7 +619,7 @@ TQString KACL::asString() const TQString KACL::KACLPrivate::getUserName( uid_t uid ) const { TQString *temp; - temp = m_usercache.tqfind( uid ); + temp = m_usercache.find( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { @@ -637,7 +637,7 @@ TQString KACL::KACLPrivate::getUserName( uid_t uid ) const TQString KACL::KACLPrivate::getGroupName( gid_t gid ) const { TQString *temp; - temp = m_groupcache.tqfind( gid ); + temp = m_groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { diff --git a/kio/kio/kar.cpp b/kio/kio/kar.cpp index a68df7a85..376a748a4 100644 --- a/kio/kio/kar.cpp +++ b/kio/kio/kar.cpp @@ -140,7 +140,7 @@ bool KAr::openArchive( int mode ) return false; } name = &ar_longnames[name.mid(1, 15).toInt()]; - name = name.left(name.tqfind("/")); + name = name.left(name.find("/")); } } if (skip_entry) continue; diff --git a/kio/kio/karchive.cpp b/kio/kio/karchive.cpp index 6eca7f2db..c5b9cad66 100644 --- a/kio/kio/karchive.cpp +++ b/kio/kio/karchive.cpp @@ -406,7 +406,7 @@ KArchiveDirectory * KArchive::findOrCreate( const TQString & path ) } // Otherwise go up and try again - int pos = path.tqfindRev( '/' ); + int pos = path.findRev( '/' ); KArchiveDirectory * parent; TQString dirname; if ( pos == -1 ) // no more slash => create in root dir @@ -548,13 +548,13 @@ KArchiveEntry* KArchiveDirectory::entry( TQString name ) // not "const TQString & name" since we want a local copy // (to remove leading slash if any) { - int pos = name.tqfind( '/' ); + int pos = name.find( '/' ); if ( pos == 0 ) // ouch absolute path (see also KArchive::findOrCreate) { if (name.length()>1) { name = name.mid( 1 ); // remove leading slash - pos = name.tqfind( '/' ); // look again + pos = name.find( '/' ); // look again } else // "/" return this; @@ -563,7 +563,7 @@ KArchiveEntry* KArchiveDirectory::entry( TQString name ) if ( pos != -1 && pos == (int)name.length()-1 ) { name = name.left( pos ); - pos = name.tqfind( '/' ); // look again + pos = name.find( '/' ); // look again } if ( pos != -1 ) { diff --git a/kio/kio/kdatatool.cpp b/kio/kio/kdatatool.cpp index 9708234d1..339b95136 100644 --- a/kio/kio/kdatatool.cpp +++ b/kio/kio/kdatatool.cpp @@ -47,7 +47,7 @@ KDataToolInfo::KDataToolInfo( const KService::Ptr& service, KInstance* instance m_service = service; m_instance = instance; - if ( !!m_service && !m_service->serviceTypes().tqcontains( "KDataTool" ) ) + if ( !!m_service && !m_service->serviceTypes().contains( "KDataTool" ) ) { kdDebug(30003) << "The service " << m_service->name().latin1() << " does not feature the service type KDataTool" << endl; @@ -196,7 +196,7 @@ TQValueList<KDataToolInfo> KDataToolInfo::query( const TQString& datatype, const { // Temporary replacement for the non-working trader query above if ( !instance || !(*it)->property("ExcludeFrom").toStringList() - .tqcontains( instance->instanceName() ) ) + .contains( instance->instanceName() ) ) lst.append( KDataToolInfo( *it, instance ) ); else kdDebug() << (*it)->entryPath() << " excluded." << endl; diff --git a/kio/kio/kdirlister.cpp b/kio/kio/kdirlister.cpp index 749c80b03..652101310 100644 --- a/kio/kio/kdirlister.cpp +++ b/kio/kio/kdirlister.cpp @@ -113,7 +113,7 @@ bool KDirListerCache::listDir( KDirLister *lister, const KURL& _u, lister->d->rootFileItem = 0; } - else if ( lister->d->lstDirs.tqfind( _url ) != lister->d->lstDirs.end() ) + else if ( lister->d->lstDirs.find( _url ) != lister->d->lstDirs.end() ) { // stop the job listing _url for this lister stop( lister, _url ); @@ -311,7 +311,7 @@ void KDirListerCache::stop( KDirLister *lister ) TQPtrList<KDirLister> *listers; while ( (listers = it.current()) ) { - if ( listers->tqfindRef( lister ) > -1 ) + if ( listers->findRef( lister ) > -1 ) { // lister is listing url TQString url = it.currentKey(); @@ -457,7 +457,7 @@ void KDirListerCache::forgetDirs( KDirLister *lister, const KURL& _url, bool not // that itemsInUse doesn't. When emitting the canceled signals lstDirs must // not contain anything that itemsInUse does not contain. (otherwise it // might crash in findByName()). - lister->d->lstDirs.remove( lister->d->lstDirs.tqfind( url ) ); + lister->d->lstDirs.remove( lister->d->lstDirs.find( url ) ); DirItem *item = itemsInUse[urlStr]; @@ -670,7 +670,7 @@ KFileItem *KDirListerCache::findByURL( const KDirLister *lister, const KURL& _u parentDir.setPath( parentDir.directory() ); // If lister is set, check that it contains this dir - if ( lister && !lister->d->lstDirs.tqcontains( parentDir ) ) + if ( lister && !lister->d->lstDirs.contains( parentDir ) ) return 0L; KFileItemList *itemList = itemsForDir( parentDir ); @@ -760,7 +760,7 @@ void KDirListerCache::FilesChanged( const KURL::List &fileList ) // Let's update the dir. KURL dir( *it ); dir.setPath( dir.directory( true ) ); - if ( dirsToUpdate.tqfind( dir ) == dirsToUpdate.end() ) + if ( dirsToUpdate.find( dir ) == dirsToUpdate.end() ) dirsToUpdate.prepend( dir ); } } @@ -1110,7 +1110,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url ) kdl->d->url = newUrl; } - *kdl->d->lstDirs.tqfind( oldUrl ) = newUrl; + *kdl->d->lstDirs.find( oldUrl ) = newUrl; if ( kdl->d->lstDirs.count() == 1 ) { @@ -1147,7 +1147,7 @@ void KDirListerCache::slotRedirection( KIO::Job *j, const KURL& url ) kdl->d->url = newUrl; } - *kdl->d->lstDirs.tqfind( oldUrl ) = newUrl; + *kdl->d->lstDirs.find( oldUrl ) = newUrl; if ( kdl->d->lstDirs.count() == 1 ) { @@ -1429,7 +1429,7 @@ void KDirListerCache::emitRedirections( const KURL &oldUrl, const KURL &url ) // And notify the dirlisters of the redirection for ( KDirLister *kdl = holders->first(); kdl; kdl = holders->next() ) { - *kdl->d->lstDirs.tqfind( oldUrl ) = url; + *kdl->d->lstDirs.find( oldUrl ) = url; if ( kdl->d->lstDirs.count() == 1 ) emit kdl->redirection( url ); @@ -1478,7 +1478,7 @@ void KDirListerCache::slotUpdateResult( KIO::Job * j ) if ( listers ) for ( kdl = tmpLst->first(); kdl; kdl = tmpLst->next() ) { - Q_ASSERT( listers->tqcontainsRef( kdl ) == 0 ); + Q_ASSERT( listers->containsRef( kdl ) == 0 ); listers->append( kdl ); } else @@ -2095,8 +2095,8 @@ void KDirLister::setMimeFilter( const TQStringList& mimeFilter ) if ( !(d->changes & MIME_FILTER) ) d->oldMimeFilter = d->mimeFilter; - if ( mimeFilter.tqfind("all/allfiles") != mimeFilter.end() || - mimeFilter.tqfind("all/all") != mimeFilter.end() ) + if ( mimeFilter.find("all/allfiles") != mimeFilter.end() || + mimeFilter.find("all/all") != mimeFilter.end() ) d->mimeFilter.clear(); else d->mimeFilter = mimeFilter; diff --git a/kio/kio/kdirwatch.cpp b/kio/kio/kdirwatch.cpp index c9418ef9d..cd32440b5 100644 --- a/kio/kio/kdirwatch.cpp +++ b/kio/kio/kdirwatch.cpp @@ -135,7 +135,7 @@ void KDirWatchPrivate::dnotify_handler(int, siginfo_t *si, void *) // (Richard Stevens, Advanced programming in the Unix Environment) int saved_errno = errno; - Entry* e = dwp_self->fd_Entry.tqfind(si->si_fd); + Entry* e = dwp_self->fd_Entry.find(si->si_fd); // kdDebug(7001) << "DNOTIFY Handler: fd " << si->si_fd << " path " // << TQString(e ? e->path:"unknown") << endl; @@ -551,7 +551,7 @@ KDirWatchPrivate::Entry* KDirWatchPrivate::entry(const TQString& _path) if ( path.length() > 1 && path.right(1) == "/" ) path.truncate( path.length() - 1 ); - EntryMap::Iterator it = m_mapEntries.tqfind( path ); + EntryMap::Iterator it = m_mapEntries.find( path ); if ( it == m_mapEntries.end() ) return 0; else @@ -684,7 +684,7 @@ bool KDirWatchPrivate::useDNotify(Entry* e) return false; } - fd_Entry.tqreplace(fd, e); + fd_Entry.replace(fd, e); e->dn_fd = fd; kdDebug(7001) << " Setup DNotify (fd " << fd @@ -782,7 +782,7 @@ void KDirWatchPrivate::addEntry(KDirWatch* instance, const TQString& _path, if ( path.length() > 1 && path.right(1) == "/" ) path.truncate( path.length() - 1 ); - EntryMap::Iterator it = m_mapEntries.tqfind( path ); + EntryMap::Iterator it = m_mapEntries.find( path ); if ( it != m_mapEntries.end() ) { if (sub_entry) { @@ -923,7 +923,7 @@ void KDirWatchPrivate::removeEntry( KDirWatch* instance, if (delayRemove) { // removeList is allowed to contain any entry at most once - if (removeList.tqfindRef(e)==-1) + if (removeList.findRef(e)==-1) removeList.append(e); // now e->isValid() is false return; diff --git a/kio/kio/kfileitem.cpp b/kio/kio/kfileitem.cpp index 6574ba012..363ab2752 100644 --- a/kio/kio/kfileitem.cpp +++ b/kio/kio/kfileitem.cpp @@ -973,12 +973,12 @@ void KFileItem::setExtraData( const void *key, void *value ) if ( !key ) return; - m_extra.tqreplace( key, value ); + m_extra.replace( key, value ); } const void * KFileItem::extraData( const void *key ) const { - TQMapConstIterator<const void*,void*> it = m_extra.tqfind( key ); + TQMapConstIterator<const void*,void*> it = m_extra.find( key ); if ( it != m_extra.end() ) return it.data(); return 0L; @@ -986,7 +986,7 @@ const void * KFileItem::extraData( const void *key ) const void * KFileItem::extraData( const void *key ) { - TQMapIterator<const void*,void*> it = m_extra.tqfind( key ); + TQMapIterator<const void*,void*> it = m_extra.find( key ); if ( it != m_extra.end() ) return it.data(); return 0L; diff --git a/kio/kio/kfilemetainfo.cpp b/kio/kio/kfilemetainfo.cpp index ee79e72a2..3c85363c4 100644 --- a/kio/kio/kfilemetainfo.cpp +++ b/kio/kio/kfilemetainfo.cpp @@ -410,7 +410,7 @@ TQStringList KFileMetaInfo::preferredGroups() const // move all keys from the preferred groups that are in our list to a new list for ( pref = preferred.begin(); pref != preferred.end(); ++pref ) { - TQStringList::Iterator group = list.tqfind(*pref); + TQStringList::Iterator group = list.find(*pref); if ( group != list.end() ) { newlist.append( *group ); @@ -440,7 +440,7 @@ TQStringList KFileMetaInfo::preferredKeys() const KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const { - TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.tqfind( key ); + TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( key ); if ( it != d->groups.end() ) return it.data(); else @@ -450,8 +450,8 @@ KFileMetaInfoGroup KFileMetaInfo::group(const TQString& key) const bool KFileMetaInfo::addGroup( const TQString& name ) { assert(isValid()); - if ( d->mimeTypeInfo->supportedGroups().tqcontains(name) && - ! d->groups.tqcontains(name) ) + if ( d->mimeTypeInfo->supportedGroups().contains(name) && + ! d->groups.contains(name) ) { KFileMetaInfoGroup group( name, d->mimeTypeInfo ); @@ -486,7 +486,7 @@ bool KFileMetaInfo::addGroup( const TQString& name ) bool KFileMetaInfo::removeGroup( const TQString& name ) { - TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.tqfind(name); + TQMapIterator<TQString, KFileMetaInfoGroup> it = d->groups.find(name); if ( (it==d->groups.end()) || !((*it).attributes() & KFileMimeTypeInfo::Removable)) return false; @@ -608,7 +608,7 @@ bool KFileMetaInfo::contains(const TQString& key) const bool KFileMetaInfo::containsGroup(const TQString& key) const { - return groups().tqcontains(key); + return groups().contains(key); } KFileMetaInfoItem KFileMetaInfo::item( const TQString& key) const @@ -642,15 +642,15 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key, // try the preferred groups first if ( !preferredGroup.isEmpty() ) { TQMapIterator<TQString,KFileMetaInfoGroup> it = - d->groups.tqfind( preferredGroup ); + d->groups.find( preferredGroup ); // try to create the preferred group, if necessary if ( it == d->groups.end() && createGroup ) { const KFileMimeTypeInfo::GroupInfo *groupInfo = d->mimeTypeInfo->groupInfo( preferredGroup ); - if ( groupInfo && groupInfo->supportedKeys().tqcontains( key ) ) { + if ( groupInfo && groupInfo->supportedKeys().contains( key ) ) { if ( addGroup( preferredGroup ) ) - it = d->groups.tqfind( preferredGroup ); + it = d->groups.find( preferredGroup ); } } @@ -668,7 +668,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key, TQStringList::ConstIterator groupIt = groups.begin(); for ( ; groupIt != groups.end(); ++groupIt ) { - TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.tqfind( *groupIt ); + TQMapIterator<TQString,KFileMetaInfoGroup> it = d->groups.find( *groupIt ); if ( it != d->groups.end() ) { KFileMetaInfoGroup group = it.data(); @@ -680,7 +680,7 @@ KFileMetaInfoItem KFileMetaInfo::saveItem( const TQString& key, { const KFileMimeTypeInfo::GroupInfo *groupInfo = d->mimeTypeInfo->groupInfo( *groupIt ); - if ( groupInfo && groupInfo->supportedKeys().tqcontains( key ) ) + if ( groupInfo && groupInfo->supportedKeys().contains( key ) ) { if ( addGroup( *groupIt ) ) { @@ -717,8 +717,8 @@ KFileMetaInfoItem KFileMetaInfo::findEditableItem( KFileMetaInfoGroup& group, KFileMetaInfoGroup KFileMetaInfo::appendGroup(const TQString& name) { assert(isValid()); - if ( d->mimeTypeInfo->supportedGroups().tqcontains(name) && - ! d->groups.tqcontains(name) ) + if ( d->mimeTypeInfo->supportedGroups().contains(name) && + ! d->groups.contains(name) ) { KFileMetaInfoGroup group( name, d->mimeTypeInfo ); d->groups.insert(name, group); @@ -986,7 +986,7 @@ KFilePlugin* KFileMetaInfoProvider::loadAndRegisterPlugin( const TQString& mimeT first = false; } // Hopefully the above includes the mimetype we asked for! - if ( m_pendingMimetypeInfos.tqfind( mimeType ) == 0 ) + if ( m_pendingMimetypeInfos.find( mimeType ) == 0 ) kdWarning(7033) << plugin->className() << " was created for " << mimeType << " but doesn't call addMimeTypeInfo for it!" << endl; } m_pendingMimetypeInfos.clear(); @@ -1003,7 +1003,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQSt //kdDebug(7033) << "plugin() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl; if ( !protocol.isEmpty() ) { - CachedPluginInfo *cache = m_plugins.tqfind( protocol ); + CachedPluginInfo *cache = m_plugins.find( protocol ); if ( cache && cache->plugin ) { return cache->plugin; } @@ -1014,7 +1014,7 @@ KFilePlugin * KFileMetaInfoProvider::plugin(const TQString& mimeType, const TQSt } } - CachedPluginInfo *cache = m_plugins.tqfind( mimeType ); + CachedPluginInfo *cache = m_plugins.find( mimeType ); if ( cache ) { return cache->plugin; } @@ -1072,27 +1072,27 @@ const KFileMimeTypeInfo * KFileMetaInfoProvider::mimeTypeInfo( const TQString& m { //kdDebug(7033) << "mimeTypeInfo() : looking for plugin for protocol=" << protocol << " mimeType=" << mimeType << endl; if ( !protocol.isEmpty() ) { - CachedPluginInfo *cache = m_plugins.tqfind( protocol ); + CachedPluginInfo *cache = m_plugins.find( protocol ); if ( cache && cache->mimeTypeInfo ) { return cache->mimeTypeInfo; } if ( !cache ) { loadAndRegisterPlugin( TQString::null, protocol ); - cache = m_plugins.tqfind( protocol ); + cache = m_plugins.find( protocol ); if ( cache && cache->mimeTypeInfo ) { return cache->mimeTypeInfo; } } } - CachedPluginInfo *cache = m_plugins.tqfind( mimeType ); + CachedPluginInfo *cache = m_plugins.find( mimeType ); if ( cache ) { return cache->mimeTypeInfo; } loadAndRegisterPlugin( mimeType, TQString::null ); - cache = m_plugins.tqfind( mimeType ); + cache = m_plugins.find( mimeType ); if ( cache ) { return cache->mimeTypeInfo; } @@ -1103,7 +1103,7 @@ KFileMimeTypeInfo * KFileMetaInfoProvider::addMimeTypeInfo( const TQString& mimeType ) { - KFileMimeTypeInfo *info = m_pendingMimetypeInfos.tqfind( mimeType ); + KFileMimeTypeInfo *info = m_pendingMimetypeInfos.find( mimeType ); Q_ASSERT( !info ); if ( !info ) { @@ -1129,7 +1129,7 @@ TQStringList KFileMetaInfoProvider::supportedMimeTypes() const const TQStringList mimeTypes = (*it)->serviceTypes(); TQStringList::ConstIterator it2 = mimeTypes.begin(); for ( ; it2 != mimeTypes.end(); ++it2 ) - if ( allMimeTypes.tqfind( *it2 ) == allMimeTypes.end() && + if ( allMimeTypes.find( *it2 ) == allMimeTypes.end() && *it2 != kfilePlugin ) // also in serviceTypes() allMimeTypes.append( *it2 ); } @@ -1235,7 +1235,7 @@ TQStringList KFileMetaInfoGroup::preferredKeys() const // move all keys from the preferred keys that are in our list to a new list for ( pref = begin; pref!=end; ++pref ) { - TQStringList::Iterator item = list.tqfind(*pref); + TQStringList::Iterator item = list.find(*pref); if ( item != list.end() ) { newlist.append( *item ); @@ -1288,12 +1288,12 @@ bool KFileMetaInfoGroup::supportsVariableKeys() const bool KFileMetaInfoGroup::contains( const TQString& key ) const { - return d->items.tqcontains(key); + return d->items.contains(key); } KFileMetaInfoItem KFileMetaInfoGroup::item( const TQString& key) const { - TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.tqfind( key ); + TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key ); if ( it != d->items.end() ) return it.data(); @@ -1356,7 +1356,7 @@ void KFileMetaInfoGroup::deref() KFileMetaInfoItem KFileMetaInfoGroup::addItem( const TQString& key ) { assert(isValid()); - TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.tqfind( key ); + TQMapIterator<TQString,KFileMetaInfoItem> it = d->items.find( key ); if ( it != d->items.end() ) return it.data(); @@ -1395,7 +1395,7 @@ bool KFileMetaInfoGroup::removeItem( const TQString& key ) return false; } - TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.tqfind(key); + TQMapIterator<TQString, KFileMetaInfoItem> it = d->items.find(key); if ( it==d->items.end() ) { kdDebug(7033) << "trying to remove the non existant item " << key << "\n"; @@ -1482,7 +1482,7 @@ KFileMimeTypeInfo::~KFileMimeTypeInfo() const KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::groupInfo( const TQString& group ) const { - return m_groups.tqfind( group ); + return m_groups.find( group ); } KFileMimeTypeInfo::GroupInfo * KFileMimeTypeInfo::addGroupInfo( @@ -1523,7 +1523,7 @@ TQStringList KFileMimeTypeInfo::supportedKeys() const for ( ; it.current(); ++it ) { // need to nuke dupes TQStringList list = it.current()->supportedKeys(); for ( lit = list.begin(); lit != list.end(); ++lit ) { - if ( keys.tqfind( *lit ) == keys.end() ) + if ( keys.find( *lit ) == keys.end() ) keys.append( *lit ); } } @@ -1564,7 +1564,7 @@ KFileMimeTypeInfo::GroupInfo::~GroupInfo() const KFileMimeTypeInfo::ItemInfo * KFileMimeTypeInfo::GroupInfo::itemInfo( const TQString& key ) const { - ItemInfo* item = m_itemDict.tqfind( key ); + ItemInfo* item = m_itemDict.find( key ); // if we the item isn't found and variable keys are supported, we need to // return the default variable key iteminfo. diff --git a/kio/kio/kfileshare.cpp b/kio/kio/kfileshare.cpp index 8fea509d7..62b5e6ddb 100644 --- a/kio/kio/kfileshare.cpp +++ b/kio/kio/kfileshare.cpp @@ -105,7 +105,7 @@ void KFileShare::readConfig() // static else { // check if current user is in fileshare group KUserGroup shareGroup(s_fileShareGroup); - if (shareGroup.users().tqfindIndex(KUser()) > -1 ) + if (shareGroup.users().findIndex(KUser()) > -1 ) s_authorization = Authorized; else s_authorization = UserNotAllowed; @@ -221,9 +221,9 @@ int KFileShare::isDirectoryShared( const TQString& _path ) if ( path[path.length()-1] != '/' ) path += '/'; //return s_shareList && s_shareList->contains( path ); - if( (*s_shareMap).tqcontains(path) && !((*s_shareMap)[path].isEmpty()) ) { + if( (*s_shareMap).contains(path) && !((*s_shareMap)[path].isEmpty()) ) { ret+=1; - if( (*s_shareMap)[path].tqfind("readwrite") != -1 ) + if( (*s_shareMap)[path].find("readwrite") != -1 ) ret+=2; } diff --git a/kio/kio/kimageio.cpp b/kio/kio/kimageio.cpp index 87bbf6879..72cc13f1f 100644 --- a/kio/kio/kimageio.cpp +++ b/kio/kio/kimageio.cpp @@ -489,7 +489,7 @@ TQString KImageIO::type(const TQString& filename) { KImageIOFormatList *formatList = KImageIOFactory::self()->formatList; TQString suffix = filename; - int dot = suffix.tqfindRev('.'); + int dot = suffix.findRev('.'); if (dot >= 0) suffix = suffix.mid(dot + 1); @@ -500,7 +500,7 @@ TQString KImageIO::type(const TQString& filename) ++it ) { KImageIOFormat *format = (*it); - if (format->mSuffices.tqcontains(suffix)) + if (format->mSuffices.contains(suffix)) return format->mType; } } diff --git a/kio/kio/kmimemagic.cpp b/kio/kio/kmimemagic.cpp index f59ee9d10..09615d9a7 100644 --- a/kio/kio/kmimemagic.cpp +++ b/kio/kio/kmimemagic.cpp @@ -565,8 +565,8 @@ public: bool restoreAccessTime( const TQString & file ) const { - TQString dir = file.left( file.tqfindRev( '/' ) ); - bool res = tmpDirs.tqcontains( dir ); + TQString dir = file.left( file.findRev( '/' ) ); + bool res = tmpDirs.contains( dir ); //kdDebug(7018) << "restoreAccessTime " << file << " dir=" << dir << " result=" << res << endl; return res; } @@ -2270,7 +2270,7 @@ refineResult(KMimeMagicResult *r, const TQString & _filename) else if ( tmp == "application/x-sharedlib" ) { - if ( _filename.tqfind( ".so" ) == -1 ) + if ( _filename.find( ".so" ) == -1 ) { tmp = "application/x-executable"; r->setMimeType( tmp ); diff --git a/kio/kio/kmimetype.cpp b/kio/kio/kmimetype.cpp index ab65c4c24..f62a7d2a8 100644 --- a/kio/kio/kmimetype.cpp +++ b/kio/kio/kmimetype.cpp @@ -632,9 +632,9 @@ TQString KFolderType::icon( const KURL& _url, bool _is_local ) const entries.append( ep->d_name ); if ( readdir( dp ) == 0 ) { // only three // check if we got "." ".." and ".directory" - isempty = entries.tqfind( "." ) != entries.end() && - entries.tqfind( ".." ) != entries.end() && - entries.tqfind( ".directory" ) != entries.end(); + isempty = entries.find( "." ) != entries.end() && + entries.find( ".." ) != entries.end() && + entries.find( ".directory" ) != entries.end(); } } if (!isempty && !strcmp(ep->d_name, ".directory")) diff --git a/kio/kio/kmimetypechooser.cpp b/kio/kio/kmimetypechooser.cpp index 7f041b722..f55b17caf 100644 --- a/kio/kio/kmimetypechooser.cpp +++ b/kio/kio/kmimetypechooser.cpp @@ -134,15 +134,15 @@ void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes ) for (; it != mimetypes.end(); ++it) { TQString mimetype = (*it)->name(); - int index = mimetype.tqfind("/"); + int index = mimetype.find("/"); TQString maj = mimetype.left(index); - if ( d->groups.count() && !d->groups.tqcontains( maj ) ) + if ( d->groups.count() && !d->groups.contains( maj ) ) continue; TQString min = mimetype.right(mimetype.length() - (index+1)); - TQMapIterator<TQString,TQListViewItem*> mit = groups.tqfind( maj ); + TQMapIterator<TQString,TQListViewItem*> mit = groups.find( maj ); if ( mit == groups.end() ) { groupItem = new TQListViewItem( d->lvMimeTypes, maj ); @@ -167,7 +167,7 @@ void KMimeTypeChooser::loadMimeTypes( const TQStringList &_selectedMimeTypes ) if ( d->visuals & Patterns ) item->setText( cl, (*it)->patterns().join("; ") ); - if ( selMimeTypes.tqcontains(mimetype) ) + if ( selMimeTypes.contains(mimetype) ) { item->setOn( true ); groupItem->setOpen( true ); diff --git a/kio/kio/knfsshare.cpp b/kio/kio/knfsshare.cpp index faf7448ee..f0fdfce6d 100644 --- a/kio/kio/knfsshare.cpp +++ b/kio/kio/knfsshare.cpp @@ -123,7 +123,7 @@ bool KNFSSharePrivate::readExportsFile() { // Handle quotation marks if ( completeLine[0] == '"' ) { - int i = completeLine.tqfind('"',1); + int i = completeLine.find('"',1); if (i == -1) { kdError() << "KNFSShare: Parse error: Missing quotation mark: " << completeLine << endl; continue; @@ -131,9 +131,9 @@ bool KNFSSharePrivate::readExportsFile() { path = completeLine.mid(1,i-1); } else { // no quotation marks - int i = completeLine.tqfind(' '); + int i = completeLine.find(' '); if (i == -1) - i = completeLine.tqfind('\t'); + i = completeLine.find('\t'); if (i == -1) path = completeLine; @@ -180,7 +180,7 @@ bool KNFSShare::isDirectoryShared( const TQString & path ) const { if ( path[path.length()-1] != '/' ) fixedPath += '/'; - return d->sharedPaths.tqfind(fixedPath) != 0; + return d->sharedPaths.find(fixedPath) != 0; } TQStringList KNFSShare::sharedDirectories() const { diff --git a/kio/kio/kprotocolmanager.cpp b/kio/kio/kprotocolmanager.cpp index 8b333da07..40aa7b236 100644 --- a/kio/kio/kprotocolmanager.cpp +++ b/kio/kio/kprotocolmanager.cpp @@ -471,10 +471,10 @@ TQString KProtocolManager::defaultUserAgent( const TQString &_modifiers ) if( modifiers.contains('l') ) { TQStringList languageList = KGlobal::locale()->languageList(); - TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); if( it != languageList.end() ) { - if( languageList.tqcontains( TQString::tqfromLatin1("en") ) > 0 ) + if( languageList.contains( TQString::tqfromLatin1("en") ) > 0 ) languageList.remove( it ); else (*it) = TQString::tqfromLatin1("en"); diff --git a/kio/kio/krun.cpp b/kio/kio/krun.cpp index 64932b2a3..133c686b9 100644 --- a/kio/kio/krun.cpp +++ b/kio/kio/krun.cpp @@ -391,7 +391,7 @@ TQStringList KRun::processDesktopExec(const KService &_service, const KURL::List TQChar c = exec.tqunicode()[pos]; if (c != '\'' && c != '"') goto synerr; // what else can we do? after normal parsing the substs would be insecure - int pos2 = exec.tqfind( c, pos + 1 ) - 1; + int pos2 = exec.find( c, pos + 1 ) - 1; if (pos2 < 0) goto synerr; // quoting error memcpy( (void *)(exec.tqunicode() + pos), exec.tqunicode() + pos + 1, (pos2 - pos) * sizeof(TQChar)); @@ -545,7 +545,7 @@ TQString KRun::binaryName( const TQString & execLine, bool removePath ) for (TQStringList::ConstIterator it = args.begin(); it != args.end(); ++it) if (!(*it).contains('=')) // Remove path if wanted - return removePath ? (*it).mid(TQString(*it).tqfindRev('/') + 1) : *it; + return removePath ? (*it).mid(TQString(*it).findRev('/') + 1) : *it; return TQString(); } @@ -708,7 +708,7 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service { // compat mode: assume KIO if not set and it's a KDE app TQStringList categories = _service.property("Categories").toStringList(); - if (( categories.tqfind("TDE") != categories.end() ) && ( categories.tqfind("KDE") != categories.end() )) + if (( categories.find("TDE") != categories.end() ) && ( categories.find("KDE") != categories.end() )) supportedProtocols.append( "KIO" ); else { // if no KDE app, be a bit over-generic supportedProtocols.append( "http"); @@ -719,10 +719,10 @@ static KURL::List resolveURLs( const KURL::List& _urls, const KService& _service kdDebug(7010) << "supportedProtocols:" << supportedProtocols << endl; KURL::List urls( _urls ); - if ( supportedProtocols.tqfind( "KIO" ) == supportedProtocols.end() ) { + if ( supportedProtocols.find( "KIO" ) == supportedProtocols.end() ) { for( KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it ) { const KURL url = *it; - bool supported = url.isLocalFile() || supportedProtocols.tqfind( url.protocol().lower() ) != supportedProtocols.end(); + bool supported = url.isLocalFile() || supportedProtocols.find( url.protocol().lower() ) != supportedProtocols.end(); kdDebug(7010) << "Looking at url=" << url << " supported=" << supported << endl; if ( !supported && KProtocolInfo::protocolClass(url.protocol()) == ":local" ) { @@ -861,7 +861,7 @@ pid_t KRun::runCommand( const TQString& cmd, const TQString &execName, const TQS *proc << cmd; KService::Ptr service = KService::serviceByDesktopName( binaryName( execName, true ) ); TQString bin = binaryName( cmd, false ); - int pos = bin.tqfindRev( '/' ); + int pos = bin.findRev( '/' ); if (pos != -1) { proc->setWorkingDirectory( bin.mid(0, pos) ); } @@ -927,7 +927,7 @@ void KRun::init() if (m_strURL.url().startsWith("$(")) { // check for environment variables and make necessary translations TQString aValue = m_strURL.url(); - int nDollarPos = aValue.tqfind( '$' ); + int nDollarPos = aValue.find( '$' ); while( nDollarPos != -1 && nDollarPos+1 < static_cast<int>(aValue.length())) { // there is at least one $ @@ -983,7 +983,7 @@ void KRun::init() aValue.remove( nDollarPos, 1 ); nDollarPos++; } - nDollarPos = aValue.tqfind( '$', nDollarPos ); + nDollarPos = aValue.find( '$', nDollarPos ); } m_strURL = KURL(aValue); bypassErrorMessage = true; diff --git a/kio/kio/ksambashare.cpp b/kio/kio/ksambashare.cpp index 3eea9e145..08da8352c 100644 --- a/kio/kio/ksambashare.cpp +++ b/kio/kio/ksambashare.cpp @@ -144,7 +144,7 @@ bool KSambaSharePrivate::readSmbConf() { } // parameter - int i = completeLine.tqfind('='); + int i = completeLine.find('='); if (i>-1) { @@ -203,7 +203,7 @@ bool KSambaShare::isDirectoryShared( const TQString & path ) const { if ( path[path.length()-1] != '/' ) fixedPath += '/'; - return d->sharedPaths.tqfind(fixedPath) != 0; + return d->sharedPaths.find(fixedPath) != 0; } TQStringList KSambaShare::sharedDirectories() const { diff --git a/kio/kio/kservice.cpp b/kio/kio/kservice.cpp index 8581c362c..fb6deb27c 100644 --- a/kio/kio/kservice.cpp +++ b/kio/kio/kservice.cpp @@ -128,9 +128,9 @@ KService::init( KDesktopFile *config ) } // Try to make up a name. m_strName = entryPath(); - int i = m_strName.tqfindRev('/'); + int i = m_strName.findRev('/'); m_strName = m_strName.mid(i+1); - i = m_strName.tqfindRev('.'); + i = m_strName.findRev('.'); if (i != -1) m_strName = m_strName.left(i); } @@ -189,10 +189,10 @@ KService::init( KDesktopFile *config ) } TQString name = entryPath(); - int pos = name.tqfindRev('/'); + int pos = name.findRev('/'); if (pos != -1) name = name.mid(pos+1); - pos = name.tqfind('.'); + pos = name.find('.'); if (pos != -1) name = name.left(pos); @@ -200,7 +200,7 @@ KService::init( KDesktopFile *config ) if (kde4application && !m_strExec.startsWith("/")) { m_strExec = "KDEHOME=$HOME/.kde XDG_DATA_DIRS=/usr/share KDEDIRS=/usr/ XDG_CONFIG_DIRS=/etc/xdg/ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:$PATH "+m_strExec; } else if (config->readBoolEntry("X-KDE-SubstituteUID")) { - int space = m_strExec.tqfind(" "); + int space = m_strExec.find(" "); if (space==-1) m_strExec = KStandardDirs::findExe(m_strExec); else { @@ -253,7 +253,7 @@ KService::init( KDesktopFile *config ) m_lstServiceTypes += config->readListEntry( "MimeType", ';' ); entryMap.remove("MimeType"); - if ( m_strType == "Application" && !m_lstServiceTypes.tqcontains("Application") ) + if ( m_strType == "Application" && !m_lstServiceTypes.contains("Application") ) // Applications implement the service type "Application" ;-) m_lstServiceTypes += "Application"; @@ -572,7 +572,7 @@ TQVariant KService::property( const TQString& _name, TQVariant::Type t ) const // Then we use a homebuild class based on KConfigBase to convert the TQString. // For some often used property types we do the conversion ourselves. - TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( _name ); + TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name ); if ( (it == m_mapProps.end()) || (!it.data().isValid())) { //kdDebug(7012) << "Property not found " << _name << endl; @@ -684,7 +684,7 @@ KService::Ptr KService::serviceByStorageId( const TQString& _storageId ) return new KService(_storageId); TQString tmp = _storageId; - tmp = tmp.mid(tmp.tqfindRev('/')+1); // Strip dir + tmp = tmp.mid(tmp.findRev('/')+1); // Strip dir if (tmp.endsWith(".desktop")) tmp.truncate(tmp.length()-8); @@ -720,7 +720,7 @@ TQString KService::username() const { } bool KService::noDisplay() const { - TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "NoDisplay" ); + TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "NoDisplay" ); if ( (it != m_mapProps.end()) && (it.data().isValid())) { TQString aValue = it.data().toString().lower(); @@ -728,21 +728,21 @@ bool KService::noDisplay() const { return true; } - it = m_mapProps.tqfind( "OnlyShowIn" ); + it = m_mapProps.find( "OnlyShowIn" ); if ( (it != m_mapProps.end()) && (it.data().isValid())) { TQString aValue = it.data().toString(); TQStringList aList = TQStringList::split(';', aValue); - if ((!aList.tqcontains("TDE")) && (!aList.tqcontains("KDE"))) + if ((!aList.contains("TDE")) && (!aList.contains("KDE"))) return true; } - it = m_mapProps.tqfind( "NotShowIn" ); + it = m_mapProps.find( "NotShowIn" ); if ( (it != m_mapProps.end()) && (it.data().isValid())) { TQString aValue = it.data().toString(); TQStringList aList = TQStringList::split(';', aValue); - if ((aList.tqcontains("TDE")) || (aList.tqcontains("KDE"))) + if ((aList.contains("TDE")) || (aList.contains("KDE"))) return true; } @@ -758,7 +758,7 @@ TQString KService::untranslatedGenericName() const { } bool KService::SuSEunimportant() const { - TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "X-SuSE-Unimportant" ); + TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-SuSE-Unimportant" ); if ( (it == m_mapProps.end()) || (!it.data().isValid())) { return false; @@ -772,7 +772,7 @@ bool KService::SuSEunimportant() const { } TQString KService::parentApp() const { - TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( "X-KDE-ParentApp" ); + TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( "X-KDE-ParentApp" ); if ( (it == m_mapProps.end()) || (!it.data().isValid())) { return TQString::null; @@ -783,8 +783,8 @@ TQString KService::parentApp() const { bool KService::allowMultipleFiles() const { // Can we pass multiple files on the command line or do we have to start the application for every single file ? - if ( m_strExec.tqfind( "%F" ) != -1 || m_strExec.tqfind( "%U" ) != -1 || - m_strExec.tqfind( "%N" ) != -1 || m_strExec.tqfind( "%D" ) != -1 ) + if ( m_strExec.find( "%F" ) != -1 || m_strExec.find( "%U" ) != -1 || + m_strExec.find( "%N" ) != -1 || m_strExec.find( "%D" ) != -1 ) return true; else return false; @@ -836,7 +836,7 @@ TQString KService::newServicePath(bool showInMenu, const TQString &suggestedName else result = base + TQString("-%1.desktop").arg(i); - if (reservedMenuIds && reservedMenuIds->tqcontains(result)) + if (reservedMenuIds && reservedMenuIds->contains(result)) continue; // Lookup service by menu-id diff --git a/kio/kio/kservicegroup.cpp b/kio/kio/kservicegroup.cpp index 5efb23937..6758ca1c0 100644 --- a/kio/kio/kservicegroup.cpp +++ b/kio/kio/kservicegroup.cpp @@ -84,12 +84,12 @@ KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relp TQStringList tmpList; if (config.hasKey("OnlyShowIn")) { - if ((!config.readListEntry("OnlyShowIn", ';').tqcontains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').tqcontains("KDE"))) + if ((!config.readListEntry("OnlyShowIn", ';').contains("TDE")) && (!config.readListEntry("OnlyShowIn", ';').contains("KDE"))) d->m_bNoDisplay = true; } if (config.hasKey("NotShowIn")) { - if ((config.readListEntry("NotShowIn", ';').tqcontains("TDE")) || (config.readListEntry("NotShowIn", ';').tqcontains("KDE"))) + if ((config.readListEntry("NotShowIn", ';').contains("TDE")) || (config.readListEntry("NotShowIn", ';').contains("KDE"))) d->m_bNoDisplay = true; } @@ -103,7 +103,7 @@ KServiceGroup::KServiceGroup( const TQString &configFile, const TQString & _relp m_strCaption = _relpath; if (m_strCaption.right(1) == "/") m_strCaption = m_strCaption.left(m_strCaption.length()-1); - int i = m_strCaption.tqfindRev('/'); + int i = m_strCaption.findRev('/'); if (i > 0) m_strCaption = m_strCaption.mid(i+1); } diff --git a/kio/kio/kservicetype.cpp b/kio/kio/kservicetype.cpp index b8b4e4659..f11cb99b9 100644 --- a/kio/kio/kservicetype.cpp +++ b/kio/kio/kservicetype.cpp @@ -82,7 +82,7 @@ KServiceType::init( KDesktopFile *config) for( ; gIt != tmpList.end(); ++gIt ) { - if ( (*gIt).tqfind( "Property::" ) == 0 ) + if ( (*gIt).find( "Property::" ) == 0 ) { config->setGroup( *gIt ); TQVariant v = config->readPropertyEntry( "Value", @@ -95,7 +95,7 @@ KServiceType::init( KDesktopFile *config) gIt = tmpList.begin(); for( ; gIt != tmpList.end(); ++gIt ) { - if( (*gIt).tqfind( "PropertyDef::" ) == 0 ) + if( (*gIt).find( "PropertyDef::" ) == 0 ) { config->setGroup( *gIt ); m_mapPropDefs.insert( (*gIt).mid( 13 ), @@ -129,7 +129,7 @@ KServiceType::load( TQDataStream& _str ) _str >> m_strName >> m_strIcon >> m_strComment >> m_mapProps >> m_mapPropDefs >> b; m_bValid = b; - m_bDerived = m_mapProps.tqcontains("X-KDE-Derived"); + m_bDerived = m_mapProps.contains("X-KDE-Derived"); } void @@ -182,7 +182,7 @@ KServiceType::property( const TQString& _name ) const else if ( _name == "Comment" ) v = TQVariant( m_strComment ); else { - TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.tqfind( _name ); + TQMap<TQString,TQVariant>::ConstIterator it = m_mapProps.find( _name ); if ( it != m_mapProps.end() ) v = it.data(); } @@ -209,7 +209,7 @@ KServiceType::propertyNames() const TQVariant::Type KServiceType::propertyDef( const TQString& _name ) const { - TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.tqfind( _name ); + TQMap<TQString,TQVariant::Type>::ConstIterator it = m_mapPropDefs.find( _name ); if ( it == m_mapPropDefs.end() ) return TQVariant::Invalid; return it.data(); @@ -239,7 +239,7 @@ static void addUnique(KService::List &lst, TQDict<KService> &dict, const KServic for( ; it != newLst.end(); ++it ) { KService *service = static_cast<KService*>(*it); - if (dict.tqfind(service->desktopEntryPath())) + if (dict.find(service->desktopEntryPath())) continue; dict.insert(service->desktopEntryPath(), service); lst.append(service); diff --git a/kio/kio/kservicetypefactory.cpp b/kio/kio/kservicetypefactory.cpp index cb0f66fa1..393526eff 100644 --- a/kio/kio/kservicetypefactory.cpp +++ b/kio/kio/kservicetypefactory.cpp @@ -102,7 +102,7 @@ TQVariant::Type KServiceTypeFactory::findPropertyTypeByName(const TQString &_nam assert (!KSycoca::self()->isBuilding()); - TQMapConstIterator<TQString,int> it = m_propertyTypeDict.tqfind(_name); + TQMapConstIterator<TQString,int> it = m_propertyTypeDict.find(_name); if (it != m_propertyTypeDict.end()) { return (TQVariant::Type)it.data(); } @@ -134,7 +134,7 @@ KMimeType * KServiceTypeFactory::findFromPattern(const TQString &_filename, TQSt TQ_INT32 right = nrOfEntries - 1; TQ_INT32 middle; // Extract extension - int lastDot = _filename.tqfindRev('.'); + int lastDot = _filename.findRev('.'); int ext_len = _filename.length() - lastDot - 1; if (lastDot != -1 && ext_len <= 4) // if no '.', skip the extension lookup { diff --git a/kio/kio/kshellcompletion.cpp b/kio/kio/kshellcompletion.cpp index bd3c43be7..2fb67a31f 100644 --- a/kio/kio/kshellcompletion.cpp +++ b/kio/kio/kshellcompletion.cpp @@ -217,22 +217,22 @@ bool KShellCompletion::quoteText(TQString *text, bool force, bool skip_last) con int pos = 0; if ( !force ) { - pos = text->tqfind( m_word_break_char ); + pos = text->find( m_word_break_char ); if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1; } if ( !force && pos == -1 ) { - pos = text->tqfind( m_quote_char1 ); + pos = text->find( m_quote_char1 ); if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1; } if ( !force && pos == -1 ) { - pos = text->tqfind( m_quote_char2 ); + pos = text->find( m_quote_char2 ); if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1; } if ( !force && pos == -1 ) { - pos = text->tqfind( m_escape_char ); + pos = text->find( m_escape_char ); if ( skip_last && (pos == (int)(text->length())-1) ) pos = -1; } diff --git a/kio/kio/ktar.cpp b/kio/kio/ktar.cpp index 7d646d8f3..a9bd1faca 100644 --- a/kio/kio/ktar.cpp +++ b/kio/kio/ktar.cpp @@ -385,7 +385,7 @@ bool KTar::openArchive( int mode ) name = name.left( name.length() - 1 ); } - int pos = name.tqfindRev( '/' ); + int pos = name.findRev( '/' ); if ( pos == -1 ) nm = name; else @@ -853,7 +853,7 @@ bool KTar::writeDir_impl(const TQString &name, const TQString &user, if ( dirName.right(1) != "/" ) dirName += "/"; - if ( d->dirList.tqcontains( dirName ) ) + if ( d->dirList.contains( dirName ) ) return true; // already there char buffer[ 0x201 ]; diff --git a/kio/kio/ktraderparsetree.cpp b/kio/kio/ktraderparsetree.cpp index 969599db6..711ec5356 100644 --- a/kio/kio/ktraderparsetree.cpp +++ b/kio/kio/ktraderparsetree.cpp @@ -415,7 +415,7 @@ bool ParseTreeMATCH::eval( ParseContext *_context ) const if ( c1.type != ParseContext::T_STRING || c2.type != ParseContext::T_STRING ) return false; - _context->b = ( c2.str.tqfind( c1.str ) != -1 ); + _context->b = ( c2.str.find( c1.str ) != -1 ); return true; } @@ -465,7 +465,7 @@ bool ParseTreeIN::eval( ParseContext *_context ) const if ( c1.type == ParseContext::T_STRING && c2.type == ParseContext::T_STR_SEQ ) { - _context->b = ( c2.strSeq.tqfind( c1.str ) != c2.strSeq.end() ); + _context->b = ( c2.strSeq.find( c1.str ) != c2.strSeq.end() ); return true; } @@ -535,7 +535,7 @@ bool ParseTreeMIN2::eval( ParseContext *_context ) const if ( !_context->initMaxima( m_strId ) ) return false; - TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.tqfind( m_strId ); + TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId ); if ( it == _context->maxima.end() ) return false; @@ -568,7 +568,7 @@ bool ParseTreeMAX2::eval( ParseContext *_context ) const return false; // Find extrema - TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.tqfind( m_strId ); + TQMap<TQString,PreferencesMaxima>::Iterator it = _context->maxima.find( m_strId ); if ( it == _context->maxima.end() ) return false; @@ -651,7 +651,7 @@ bool ParseContext::initMaxima( const TQString& _prop ) return false; // Did we cache the result ? - TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.tqfind( _prop ); + TQMap<TQString,PreferencesMaxima>::Iterator it = maxima.find( _prop ); if ( it != maxima.end() ) return ( it.data().type == PreferencesMaxima::PM_DOUBLE || it.data().type == PreferencesMaxima::PM_INT ); diff --git a/kio/kio/kurifilter.cpp b/kio/kio/kurifilter.cpp index e4b885ce5..ab65e0c66 100644 --- a/kio/kio/kurifilter.cpp +++ b/kio/kio/kurifilter.cpp @@ -171,7 +171,7 @@ TQString KURIFilterData::iconName() case KURIFilterData::EXECUTABLE: { TQString exeName = m_pURI.url(); - exeName = exeName.mid( exeName.tqfindRev( '/' ) + 1 ); // strip path if given + exeName = exeName.mid( exeName.findRev( '/' ) + 1 ); // strip path if given KService::Ptr service = KService::serviceByDesktopName( exeName ); if (service && service->icon() != TQString::tqfromLatin1( "unknown" )) m_strIconName = service->icon(); diff --git a/kio/kio/kurlcompletion.cpp b/kio/kio/kurlcompletion.cpp index 85429a6db..e09ce2ed8 100644 --- a/kio/kio/kurlcompletion.cpp +++ b/kio/kio/kurlcompletion.cpp @@ -786,7 +786,7 @@ bool KURLCompletion::envCompletion(const MyURL &url, TQString *match) while ( *env ) { TQString s = TQString::fromLocal8Bit( *env ); - int pos = s.tqfind('='); + int pos = s.find('='); if ( pos == -1 ) pos = s.length(); @@ -1407,7 +1407,7 @@ static bool expandEnv( TQString &text ) bool expanded = false; - while ( (pos = text.tqfind('$', pos)) != -1 ) { + while ( (pos = text.find('$', pos)) != -1 ) { // Skip escaped '$' // @@ -1419,8 +1419,8 @@ static bool expandEnv( TQString &text ) else { // Find the end of the variable = next '/' or ' ' // - int pos2 = text.tqfind( ' ', pos+1 ); - int pos_tmp = text.tqfind( '/', pos+1 ); + int pos2 = text.find( ' ', pos+1 ); + int pos_tmp = text.find( '/', pos+1 ); if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) ) pos2 = pos_tmp; @@ -1467,8 +1467,8 @@ static bool expandTilde(TQString &text) // Find the end of the user name = next '/' or ' ' // - int pos2 = text.tqfind( ' ', 1 ); - int pos_tmp = text.tqfind( '/', 1 ); + int pos2 = text.find( ' ', 1 ); + int pos_tmp = text.find( '/', 1 ); if ( pos2 == -1 || (pos_tmp != -1 && pos_tmp < pos2) ) pos2 = pos_tmp; diff --git a/kio/kio/kuserprofile.cpp b/kio/kio/kuserprofile.cpp index 8fddf763d..b7ef68c76 100644 --- a/kio/kio/kuserprofile.cpp +++ b/kio/kio/kuserprofile.cpp @@ -165,7 +165,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers( const TQString& _ser if (_genericServiceType.isEmpty() /*no constraint*/ || (*it)->hasServiceType( _genericServiceType )) { // Check that we don't already have it ;) - if ( serviceList.tqfind( (*it)->desktopEntryPath() ) == serviceList.end() ) + if ( serviceList.find( (*it)->desktopEntryPath() ) == serviceList.end() ) { bool allow = (*it)->allowAsDefault(); KServiceOffer o( (*it), (*it)->initialPreferenceForMimeType(_servicetype), allow ); @@ -215,7 +215,7 @@ int KServiceTypeProfile::preference( const TQString& _service ) const KService::Ptr service = KService::serviceByName( _service ); if (!service) return 0; - TQMap<TQString,Service>::ConstIterator it = m_mapServices.tqfind( service->storageId() ); + TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() ); if ( it == m_mapServices.end() ) return 0; @@ -233,7 +233,7 @@ bool KServiceTypeProfile::allowAsDefault( const TQString& _service ) const return false; // Look what the user says ... - TQMap<TQString,Service>::ConstIterator it = m_mapServices.tqfind( service->storageId() ); + TQMap<TQString,Service>::ConstIterator it = m_mapServices.find( service->storageId() ); if ( it == m_mapServices.end() ) return 0; @@ -270,7 +270,7 @@ KServiceTypeProfile::OfferList KServiceTypeProfile::offers() const if ( m_strGenericServiceType.isEmpty() || (*it)->hasServiceType( m_strGenericServiceType ) ) { // Now look into the profile, to find this service's preference. - TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.tqfind( (*it)->storageId() ); + TQMap<TQString,Service>::ConstIterator it2 = m_mapServices.find( (*it)->storageId() ); if( it2 != m_mapServices.end() ) { diff --git a/kio/kio/kzip.cpp b/kio/kio/kzip.cpp index 01d2dc4c9..ccc573697 100644 --- a/kio/kio/kzip.cpp +++ b/kio/kio/kzip.cpp @@ -736,7 +736,7 @@ kdDebug(7040) << "dev->tqat() now : " << dev->tqat() << endl; else Q_ASSERT(access & S_IFDIR); } - int pos = name.tqfindRev( '/' ); + int pos = name.findRev( '/' ); if ( pos == -1 ) entryName = name; else @@ -1133,7 +1133,7 @@ bool KZip::prepareWriting_impl(const TQString &name, const TQString &user, // Find or create parent dir KArchiveDirectory* parentDir = rootDir(); TQString fileName( name ); - int i = name.tqfindRev( '/' ); + int i = name.findRev( '/' ); if ( i != -1 ) { TQString dir = name.left( i ); diff --git a/kio/kio/metainfojob.cpp b/kio/kio/metainfojob.cpp index 28bc23633..3998584e3 100644 --- a/kio/kio/metainfojob.cpp +++ b/kio/kio/metainfojob.cpp @@ -86,7 +86,7 @@ void MetaInfoJob::removeItem(const KFileItem* item) determineNextFile(); } - d->items.remove(d->items.tqfind(item)); + d->items.remove(d->items.find(item)); } void MetaInfoJob::determineNextFile() diff --git a/kio/kio/netaccess.cpp b/kio/kio/netaccess.cpp index 975a42c10..d32396a00 100644 --- a/kio/kio/netaccess.cpp +++ b/kio/kio/netaccess.cpp @@ -293,7 +293,7 @@ void NetAccess::removeTempFile(const TQString& name) { if (!tmpfiles) return; - if (tmpfiles->tqcontains(name)) + if (tmpfiles->contains(name)) { unlink(TQFile::encodeName(name)); tmpfiles->remove(name); @@ -403,7 +403,7 @@ TQString NetAccess::fish_executeInternal(const KURL & url, const TQString comman remoteTempFileName = tmpFile.name(); // only need the filename KTempFile adds some KDE specific dirs // that probably does not exist on the remote side - int pos = remoteTempFileName.tqfindRev('/'); + int pos = remoteTempFileName.findRev('/'); remoteTempFileName = "/tmp/fishexec_" + remoteTempFileName.mid(pos + 1); tempPathUrl.setPath( remoteTempFileName ); bJobOK = true; // success unless further error occurs @@ -465,13 +465,13 @@ bool NetAccess::synchronousRunInternal( Job* job, TQWidget* window, TQByteArray* TQMetaObject *meta = job->tqmetaObject(); static const char dataSignal[] = "data(KIO::Job*,const TQByteArray&)"; - if ( meta->tqfindSignal( dataSignal ) != -1 ) { + if ( meta->findSignal( dataSignal ) != -1 ) { connect( job, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)), this, TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) ); } static const char redirSignal[] = "redirection(KIO::Job*,const KURL&)"; - if ( meta->tqfindSignal( redirSignal ) != -1 ) { + if ( meta->findSignal( redirSignal ) != -1 ) { connect( job, TQT_SIGNAL(redirection(KIO::Job*,const KURL&)), this, TQT_SLOT(slotRedirection(KIO::Job*, const KURL&)) ); } diff --git a/kio/kio/passdlg.cpp b/kio/kio/passdlg.cpp index 1670e83bb..3b2a1058f 100644 --- a/kio/kio/passdlg.cpp +++ b/kio/kio/passdlg.cpp @@ -321,7 +321,7 @@ void PasswordDialog::setKnownLogins( const TQMap<TQString, TQString>& knownLogin void PasswordDialog::slotActivated( const TQString& userName ) { - TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.tqfind( userName ); + TQMap<TQString, TQString>::ConstIterator it = d->knownLogins.find( userName ); if ( it != d->knownLogins.end() ) setPassword( it.data() ); } diff --git a/kio/kio/previewjob.cpp b/kio/kio/previewjob.cpp index 34735c26d..0fc13b4b2 100644 --- a/kio/kio/previewjob.cpp +++ b/kio/kio/previewjob.cpp @@ -163,7 +163,7 @@ void PreviewJob::startPreview() TQMap<TQString, KService::Ptr> mimeMap; for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - if (!d->enabledPlugins || d->enabledPlugins->tqcontains((*it)->desktopEntryName())) + if (!d->enabledPlugins || d->enabledPlugins->contains((*it)->desktopEntryName())) { TQStringList mimeTypes = (*it)->property("MimeTypes").toStringList(); for (TQStringList::ConstIterator mt = mimeTypes.begin(); mt != mimeTypes.end(); ++mt) @@ -176,7 +176,7 @@ void PreviewJob::startPreview() { PreviewItem item; item.item = it.current(); - TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.tqfind(it.current()->mimetype()); + TQMap<TQString, KService::Ptr>::ConstIterator plugin = mimeMap.find(it.current()->mimetype()); if (plugin == mimeMap.end() && (it.current()->mimetype() != "application/x-desktop") && (it.current()->mimetype() != "media/builtin-mydocuments") @@ -187,7 +187,7 @@ void PreviewJob::startPreview() && (it.current()->mimetype() != "media/builtin-webbrowser")) { TQString mimeType = it.current()->mimetype(); - plugin = mimeMap.tqfind(mimeType.replace(TQRegExp("/.*"), "/*")); + plugin = mimeMap.find(mimeType.replace(TQRegExp("/.*"), "/*")); if (plugin == mimeMap.end()) { @@ -196,7 +196,7 @@ void PreviewJob::startPreview() TQString parentMimeType = mimeInfo->parentMimeType(); while (!parentMimeType.isEmpty()) { - plugin = mimeMap.tqfind(parentMimeType); + plugin = mimeMap.find(parentMimeType); if (plugin != mimeMap.end()) break; KMimeType::Ptr parentMimeInfo = KMimeType::mimeType(parentMimeType); @@ -215,10 +215,10 @@ void PreviewJob::startPreview() { if (textProperty.toBool()) { - plugin = mimeMap.tqfind("text/plain"); + plugin = mimeMap.find("text/plain"); if (plugin == mimeMap.end()) { - plugin = mimeMap.tqfind( "text/*" ); + plugin = mimeMap.find( "text/*" ); } } } @@ -553,7 +553,7 @@ TQStringList PreviewJob::availablePlugins() TQStringList result; KTrader::OfferList plugins = KTrader::self()->query("ThumbCreator"); for (KTrader::OfferList::ConstIterator it = plugins.begin(); it != plugins.end(); ++it) - if (!result.tqcontains((*it)->desktopEntryName())) + if (!result.contains((*it)->desktopEntryName())) result.append((*it)->desktopEntryName()); return result; } diff --git a/kio/kio/renamedlg.cpp b/kio/kio/renamedlg.cpp index 2cc928692..8f1b2d087 100644 --- a/kio/kio/renamedlg.cpp +++ b/kio/kio/renamedlg.cpp @@ -440,13 +440,13 @@ TQString RenameDlg::suggestName(const KURL& baseURL, const TQString& oldName) TQString dotSuffix, suggestedName; TQString basename = oldName; - int index = basename.tqfind( '.' ); + int index = basename.find( '.' ); if ( index != -1 ) { dotSuffix = basename.mid( index ); basename.truncate( index ); } - int pos = basename.tqfindRev( '_' ); + int pos = basename.findRev( '_' ); if(pos != -1 ){ TQString tmp = basename.mid( pos+1 ); bool ok; diff --git a/kio/kio/scheduler.cpp b/kio/kio/scheduler.cpp index 38e7d10d4..020bc62dd 100644 --- a/kio/kio/scheduler.cpp +++ b/kio/kio/scheduler.cpp @@ -110,7 +110,7 @@ class KIO::Scheduler::ProtocolInfoDict : public TQDict<KIO::Scheduler::ProtocolI KIO::Scheduler::ProtocolInfo * KIO::Scheduler::ProtocolInfoDict::get(const TQString &protocol) { - ProtocolInfo *info = tqfind(protocol); + ProtocolInfo *info = find(protocol); if (!info) { info = new ProtocolInfo; @@ -206,7 +206,7 @@ void Scheduler::_doJob(SimpleJob *job) { jobData->checkOnHold = checkOnHold; checkOnHold = false; } - extraJobData->tqreplace(job, jobData); + extraJobData->replace(job, jobData); newJobs.append(job); slaveTimer.start(0, true); #ifndef NDEBUG @@ -217,7 +217,7 @@ void Scheduler::_doJob(SimpleJob *job) { void Scheduler::_scheduleJob(SimpleJob *job) { newJobs.removeRef(job); - JobData *jobData = extraJobData->tqfind(job); + JobData *jobData = extraJobData->find(job); if (!jobData) { kdFatal(7006) << "BUG! _ScheduleJob(): No extraJobData for job!" << endl; @@ -237,7 +237,7 @@ void Scheduler::_cancelJob(SimpleJob *job) { if ( !slave ) { // was not yet running (don't call this on a finished job!) - JobData *jobData = extraJobData->tqfind(job); + JobData *jobData = extraJobData->find(job); if (!jobData) return; // I said: "Don't call this on a finished job!" @@ -249,7 +249,7 @@ void Scheduler::_cancelJob(SimpleJob *job) { slave = slaveList->first(); for(; slave; slave = slaveList->next()) { - JobList *list = coSlaves.tqfind(slave); + JobList *list = coSlaves.find(slave); if (list && list->removeRef(job)) break; // Job was found and removed. // Fall through to kill the slave as well! @@ -402,7 +402,7 @@ bool Scheduler::startJobScheduled(ProtocolInfo *protInfo) // kdDebug(7006) << "scheduler: job started " << job << endl; - JobData *jobData = extraJobData->tqfind(job); + JobData *jobData = extraJobData->find(job); setupSlave(slave, job->url(), jobData->protocol, jobData->proxy, newSlave); job->start(slave); @@ -414,7 +414,7 @@ bool Scheduler::startJobDirect() { debug_info(); SimpleJob *job = newJobs.take(0); - JobData *jobData = extraJobData->tqfind(job); + JobData *jobData = extraJobData->find(job); if (!jobData) { kdFatal(7006) << "BUG! startjobDirect(): No extraJobData for job!" @@ -481,7 +481,7 @@ static Slave *searchIdleList(SlaveList *idleSlaves, const KURL &url, const TQStr Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact) { Slave *slave = 0; - JobData *jobData = extraJobData->tqfind(job); + JobData *jobData = extraJobData->find(job); if (!jobData) { kdFatal(7006) << "BUG! findIdleSlave(): No extraJobData for job!" << endl; @@ -504,7 +504,7 @@ Slave *Scheduler::findIdleSlave(ProtocolInfo *, SimpleJob *job, bool &exact) if ( bCanReuse ) { KIO::MetaData outgoing = tJob->outgoingMetaData(); - TQString resume = (!outgoing.tqcontains("resume")) ? TQString() : outgoing["resume"]; + TQString resume = (!outgoing.contains("resume")) ? TQString() : outgoing["resume"]; kdDebug(7006) << "Resume metadata is '" << resume << "'" << endl; bCanReuse = (resume.isEmpty() || resume == "0"); } @@ -582,11 +582,11 @@ void Scheduler::_jobFinished(SimpleJob *job, Slave *slave) protInfo->activeSlaves.removeRef(slave); if (slave->isAlive()) { - JobList *list = coSlaves.tqfind(slave); + JobList *list = coSlaves.find(slave); if (list) { assert(slave->isConnected()); - assert(!coIdleSlaves->tqcontains(slave)); + assert(!coIdleSlaves->contains(slave)); coIdleSlaves->append(slave); if (!list->isEmpty()) coSlaveTimer.start(0, true); @@ -618,7 +618,7 @@ void Scheduler::slotSlaveDied(KIO::Slave *slave) urlOnHold = KURL(); } idleSlaves->removeRef(slave); - JobList *list = coSlaves.tqfind(slave); + JobList *list = coSlaves.find(slave); if (list) { // coSlave dies, kill jobs waiting in queue @@ -733,7 +733,7 @@ Scheduler::slotScheduleCoSlave() slave = nextSlave) { nextSlave = coIdleSlaves->next(); - JobList *list = coSlaves.tqfind(slave); + JobList *list = coSlaves.find(slave); assert(list); if (list && !list->isEmpty()) { @@ -741,7 +741,7 @@ Scheduler::slotScheduleCoSlave() coIdleSlaves->removeRef(slave); // kdDebug(7006) << "scheduler: job started " << job << endl; - assert(!coIdleSlaves->tqcontains(slave)); + assert(!coIdleSlaves->contains(slave)); KURL url =job->url(); TQString host = url.host(); @@ -775,7 +775,7 @@ Scheduler::slotSlaveConnected() disconnect(slave, TQT_SIGNAL(connected()), this, TQT_SLOT(slotSlaveConnected())); emit slaveConnected(slave); - assert(!coIdleSlaves->tqcontains(slave)); + assert(!coIdleSlaves->contains(slave)); coIdleSlaves->append(slave); coSlaveTimer.start(0, true); } @@ -784,7 +784,7 @@ void Scheduler::slotSlaveError(int errorNr, const TQString &errorMsg) { Slave *slave = (Slave *)sender(); - if (!slave->isConnected() || (coIdleSlaves->tqfind(slave) != -1)) + if (!slave->isConnected() || (coIdleSlaves->find(slave) != -1)) { // Only forward to application if slave is idle or still connecting. emit slaveError(slave, errorNr, errorMsg); @@ -805,7 +805,7 @@ Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job) return false; } - JobList *list = coSlaves.tqfind(slave); + JobList *list = coSlaves.find(slave); assert(list); if (!list) { @@ -814,7 +814,7 @@ Scheduler::_assignJobToSlave(KIO::Slave *slave, SimpleJob *job) return false; } - assert(list->tqcontains(job) == 0); + assert(list->contains(job) == 0); list->append(job); coSlaveTimer.start(0, true); // Start job on timer event @@ -837,7 +837,7 @@ Scheduler::_disconnectSlave(KIO::Slave *slave) } delete list; coIdleSlaves->removeRef(slave); - assert(!coIdleSlaves->tqcontains(slave)); + assert(!coIdleSlaves->contains(slave)); disconnect(slave, TQT_SIGNAL(connected()), this, TQT_SLOT(slotSlaveConnected())); disconnect(slave, TQT_SIGNAL(error(int, const TQString &)), @@ -866,7 +866,7 @@ Scheduler::_registerWindow(TQWidget *wid) return; TQObject *obj = TQT_TQOBJECT(wid); - if (!m_windowList.tqcontains(obj)) + if (!m_windowList.contains(obj)) { // We must store the window Id because by the time // the destroyed signal is emitted we can no longer @@ -890,7 +890,7 @@ Scheduler::slotUnregisterWindow(TQObject *obj) if (!obj) return; - TQMap<TQObject *, WId>::Iterator it = m_windowList.tqfind(obj); + TQMap<TQObject *, WId>::Iterator it = m_windowList.find(obj); if (it == m_windowList.end()) return; WId windowId = it.data(); diff --git a/kio/kio/sessiondata.cpp b/kio/kio/sessiondata.cpp index 2381bde91..c94fe3b40 100644 --- a/kio/kio/sessiondata.cpp +++ b/kio/kio/sessiondata.cpp @@ -236,8 +236,8 @@ SessionData::~SessionData() void SessionData::configDataFor( MetaData &configData, const TQString &proto, const TQString & ) { - if ( (proto.tqfind("http", 0, false) == 0 ) || - (proto.tqfind("webdav", 0, false) == 0) ) + if ( (proto.find("http", 0, false) == 0 ) || + (proto.find("webdav", 0, false) == 0) ) { if (!d->initDone) reset(); @@ -273,15 +273,15 @@ void SessionData::reset() // Get language settings... TQStringList languageList = KGlobal::locale()->languagesTwoAlpha(); - TQStringList::Iterator it = languageList.tqfind( TQString::tqfromLatin1("C") ); + TQStringList::Iterator it = languageList.find( TQString::tqfromLatin1("C") ); if ( it != languageList.end() ) { - if ( languageList.tqcontains( english ) > 0 ) + if ( languageList.contains( english ) > 0 ) languageList.remove( it ); else (*it) = english; } - if ( !languageList.tqcontains( english ) ) + if ( !languageList.contains( english ) ) languageList.append( english ); d->language = languageList.join( ", " ); diff --git a/kio/kio/slavebase.cpp b/kio/kio/slavebase.cpp index 187e82524..13e7c636f 100644 --- a/kio/kio/slavebase.cpp +++ b/kio/kio/slavebase.cpp @@ -360,23 +360,23 @@ void SlaveBase::disconnectSlave() void SlaveBase::setMetaData(const TQString &key, const TQString &value) { - mOutgoingMetaData.tqreplace(key, value); + mOutgoingMetaData.replace(key, value); } TQString SlaveBase::metaData(const TQString &key) const { - if (mIncomingMetaData.tqcontains(key)) + if (mIncomingMetaData.contains(key)) return mIncomingMetaData[key]; - if (d->configData.tqcontains(key)) + if (d->configData.contains(key)) return d->configData[key]; return TQString::null; } bool SlaveBase::hasMetaData(const TQString &key) const { - if (mIncomingMetaData.tqcontains(key)) + if (mIncomingMetaData.contains(key)) return true; - if (d->configData.tqcontains(key)) + if (d->configData.contains(key)) return true; return false; } diff --git a/kio/kio/slaveconfig.cpp b/kio/kio/slaveconfig.cpp index d9efdb6cc..fe888c99c 100644 --- a/kio/kio/slaveconfig.cpp +++ b/kio/kio/slaveconfig.cpp @@ -79,7 +79,7 @@ void SlaveConfigPrivate::readGlobalConfig() SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_protocol) { - SlaveConfigProtocol *scp = protocol.tqfind(_protocol); + SlaveConfigProtocol *scp = protocol.find(_protocol); if (!scp) { TQString filename = KProtocolInfo::config(_protocol); @@ -94,7 +94,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::readProtocolConfig(const TQString &_pro SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_protocol) { - SlaveConfigProtocol *scp = protocol.tqfind(_protocol); + SlaveConfigProtocol *scp = protocol.find(_protocol); if (!scp) scp = readProtocolConfig(_protocol); return scp; @@ -103,7 +103,7 @@ SlaveConfigProtocol* SlaveConfigPrivate::findProtocolConfig(const TQString &_pro void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigProtocol *scp, const TQString &host) { MetaData *metaData = new MetaData; - scp->host.tqreplace(host, metaData); + scp->host.replace(host, metaData); // Read stuff // Break host into domains @@ -119,7 +119,7 @@ void SlaveConfigPrivate::readConfigProtocolHost(const TQString &, SlaveConfigPro int pos = 0; do { - pos = host.tqfindRev('.', pos-1); + pos = host.findRev('.', pos-1); if (pos < 0) domain = host; @@ -178,11 +178,11 @@ void SlaveConfig::setConfigData(const TQString &protocol, const TQString &host, } else { - MetaData *hostConfig = scp->host.tqfind(host); + MetaData *hostConfig = scp->host.find(host); if (!hostConfig) { d->readConfigProtocolHost(protocol, scp, host); - hostConfig = scp->host.tqfind(host); + hostConfig = scp->host.find(host); assert(hostConfig); } *hostConfig += config; @@ -197,12 +197,12 @@ MetaData SlaveConfig::configData(const TQString &protocol, const TQString &host) config += scp->global; if (host.isEmpty()) return config; - MetaData *hostConfig = scp->host.tqfind(host); + MetaData *hostConfig = scp->host.find(host); if (!hostConfig) { d->readConfigProtocolHost(protocol, scp, host); emit configNeeded(protocol, host); - hostConfig = scp->host.tqfind(host); + hostConfig = scp->host.find(host); assert(hostConfig); } config += *hostConfig; diff --git a/kio/kio/tcpslavebase.cpp b/kio/kio/tcpslavebase.cpp index 5547c4d23..78093577d 100644 --- a/kio/kio/tcpslavebase.cpp +++ b/kio/kio/tcpslavebase.cpp @@ -774,7 +774,7 @@ int TCPSlaveBase::verifyCertificate() } #endif if (!_IPmatchesCN && !d->militantSSL) { // force this if the user wants it - if (d->cc->getHostList(pc).tqcontains(ourHost)) { + if (d->cc->getHostList(pc).contains(ourHost)) { _IPmatchesCN = true; } } diff --git a/kio/kpasswdserver/kpasswdserver.cpp b/kio/kpasswdserver/kpasswdserver.cpp index 858cad37b..06694dd72 100644 --- a/kio/kpasswdserver/kpasswdserver.cpp +++ b/kio/kpasswdserver/kpasswdserver.cpp @@ -115,12 +115,12 @@ static bool storeInWallet( KWallet::Wallet* wallet, const TQString& key, const K kdDebug(130) << "storeInWallet: walletKey=" << walletKey << " reading existing map" << endl; if ( wallet->readMap( walletKey, map ) == 0 ) { Map::ConstIterator end = map.end(); - Map::ConstIterator it = map.tqfind( "login" ); + Map::ConstIterator it = map.find( "login" ); while ( it != end ) { if ( it.data() == info.username ) { break; // OK, overwrite this entry } - it = map.tqfind( TQString( "login-" ) + TQString::number( ++entryNumber ) ); + it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) ); } // If no entry was found, create a new entry - entryNumber is set already. } @@ -148,17 +148,17 @@ static bool readFromWallet( KWallet::Wallet* wallet, const TQString& key, const typedef TQMap<TQString,TQString> Map; int entryNumber = 1; Map::ConstIterator end = map.end(); - Map::ConstIterator it = map.tqfind( "login" ); + Map::ConstIterator it = map.find( "login" ); while ( it != end ) { //kdDebug(130) << "readFromWallet: found " << it.key() << "=" << it.data() << endl; - Map::ConstIterator pwdIter = map.tqfind( makeMapKey( "password", entryNumber ) ); + Map::ConstIterator pwdIter = map.find( makeMapKey( "password", entryNumber ) ); if ( pwdIter != end ) { if ( it.data() == username ) password = pwdIter.data(); knownLogins.insert( it.data(), pwdIter.data() ); } - it = map.tqfind( TQString( "login-" ) + TQString::number( ++entryNumber ) ); + it = map.find( TQString( "login-" ) + TQString::number( ++entryNumber ) ); } //kdDebug(130) << knownLogins.count() << " known logins" << endl; @@ -541,7 +541,7 @@ KPasswdServer::copyAuthInfo(const AuthInfo *i) const KPasswdServer::AuthInfo * KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) { - AuthInfoList *authList = m_authDict.tqfind(key); + AuthInfoList *authList = m_authDict.find(key); if (!authList) return 0; @@ -579,7 +579,7 @@ KPasswdServer::findAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) void KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info) { - AuthInfoList *authList = m_authDict.tqfind(key); + AuthInfoList *authList = m_authDict.find(key); if (!authList) return; @@ -606,7 +606,7 @@ KPasswdServer::removeAuthInfoItem(const TQString &key, const KIO::AuthInfo &info void KPasswdServer::addAuthInfoItem(const TQString &key, const KIO::AuthInfo &info, long windowId, long seqNr, bool canceled) { - AuthInfoList *authList = m_authDict.tqfind(key); + AuthInfoList *authList = m_authDict.find(key); if (!authList) { authList = new AuthInfoList; @@ -659,7 +659,7 @@ KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long else if (windowId && (current->expire != AuthInfo::expNever)) { current->expire = AuthInfo::expWindowClose; - if (!current->windowList.tqcontains(windowId)) + if (!current->windowList.contains(windowId)) current->windowList.append(windowId); } else if (current->expire == AuthInfo::expTime) @@ -670,13 +670,13 @@ KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long // Update mWindowIdList if (windowId) { - TQStringList *keysChanged = mWindowIdList.tqfind(windowId); + TQStringList *keysChanged = mWindowIdList.find(windowId); if (!keysChanged) { keysChanged = new TQStringList; mWindowIdList.insert(windowId, keysChanged); } - if (!keysChanged->tqcontains(key)) + if (!keysChanged->contains(key)) keysChanged->append(key); } } @@ -684,14 +684,14 @@ KPasswdServer::updateAuthExpire(const TQString &key, const AuthInfo *auth, long void KPasswdServer::removeAuthForWindowId(long windowId) { - TQStringList *keysChanged = mWindowIdList.tqfind(windowId); + TQStringList *keysChanged = mWindowIdList.find(windowId); if (!keysChanged) return; for(TQStringList::ConstIterator it = keysChanged->begin(); it != keysChanged->end(); ++it) { TQString key = *it; - AuthInfoList *authList = m_authDict.tqfind(key); + AuthInfoList *authList = m_authDict.find(key); if (!authList) continue; diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc index 79a36ba5f..70d36cd8e 100644 --- a/kio/kssl/kopenssl.cc +++ b/kio/kssl/kopenssl.cc @@ -245,7 +245,7 @@ static TQString findMostRecentLib(TQString dir, TQString name) uint s = filter.length()-1; for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it) { TQString numberpart = (*it).mid(s); - uint endmaj = numberpart.tqfind('.'); + uint endmaj = numberpart.find('.'); if (endmaj == -1) continue; bool ok; diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc index 7971e57ba..7211e510f 100644 --- a/kio/kssl/ksslcertificate.cc +++ b/kio/kssl/ksslcertificate.cc @@ -243,7 +243,7 @@ TQString KSSLCertificate::getKDEKey() const { TQString KSSLCertificate::getMD5DigestFromKDEKey(const TQString &k) { TQString rc; - int pos = k.tqfindRev('('); + int pos = k.findRev('('); if (pos != -1) { unsigned int len = k.length(); if (k.tqat(len-1) == ')') { diff --git a/kio/kssl/ksslsettings.cc b/kio/kssl/ksslsettings.cc index c060c6c7c..d9286433e 100644 --- a/kio/kssl/ksslsettings.cc +++ b/kio/kssl/ksslsettings.cc @@ -169,7 +169,7 @@ TQString KSSLSettings::getCipherList() { int bits = d->kossl->SSL_CIPHER_get_bits(sc, NULL); if (m_cfg->readBoolEntry(tcipher, bits >= 56)) { CipherNode *xx = new CipherNode(sc->name,bits); - if (!cipherList.tqcontains(xx)) + if (!cipherList.contains(xx)) cipherList.prepend(xx); else delete xx; diff --git a/kio/kssl/ksslx509map.cc b/kio/kssl/ksslx509map.cc index 222d187cb..7896fdfcf 100644 --- a/kio/kssl/ksslx509map.cc +++ b/kio/kssl/ksslx509map.cc @@ -33,12 +33,12 @@ KSSLX509Map::~KSSLX509Map() { void KSSLX509Map::setValue(const TQString& key, const TQString& value) { - m_pairs.tqreplace(key, value); + m_pairs.replace(key, value); } TQString KSSLX509Map::getValue(const TQString& key) const { - if (!m_pairs.tqcontains(key)) { + if (!m_pairs.contains(key)) { return TQString::null; } @@ -63,7 +63,7 @@ unsigned int length = str.length(); for(head = 0, tail = 0; tail < length-1; head = tail+1) { TQString thisline; - tail = str.tqfind(tok, head); + tail = str.find(tok, head); if (tail > length) // last token - none at end tail = length; @@ -85,11 +85,11 @@ TQStringList vl = tokenizeBy(name, TQRegExp("/[A-Za-z]+="), false); for (TQStringList::Iterator j = vl.begin(); j != vl.end(); ++j) { TQStringList apair = tokenizeBy(*j, TQRegExp("="), false); - if (m_pairs.tqcontains(apair[0])) { + if (m_pairs.contains(apair[0])) { TQString oldValue = m_pairs[apair[0]]; oldValue += "\n"; oldValue += apair[1]; - m_pairs.tqreplace(apair[0], oldValue); + m_pairs.replace(apair[0], oldValue); } else { m_pairs.insert(apair[0], apair[1]); } diff --git a/kio/misc/kdesasl/kdesasl.cpp b/kio/misc/kdesasl/kdesasl.cpp index e9bc75dc1..b547f7e6b 100644 --- a/kio/misc/kdesasl/kdesasl.cpp +++ b/kio/misc/kdesasl/kdesasl.cpp @@ -49,10 +49,10 @@ KDESasl::~KDESasl() { TQCString KDESasl::chooseMethod(const TQStrIList aMethods) { - if (aMethods.tqcontains("DIGEST-MD5")) mMethod = "DIGEST-MD5"; - else if (aMethods.tqcontains("CRAM-MD5")) mMethod = "CRAM-MD5"; - else if (aMethods.tqcontains("PLAIN")) mMethod = "PLAIN"; - else if (aMethods.tqcontains("LOGIN")) mMethod = "LOGIN"; + if (aMethods.contains("DIGEST-MD5")) mMethod = "DIGEST-MD5"; + else if (aMethods.contains("CRAM-MD5")) mMethod = "CRAM-MD5"; + else if (aMethods.contains("PLAIN")) mMethod = "PLAIN"; + else if (aMethods.contains("LOGIN")) mMethod = "LOGIN"; else mMethod = TQCString(); return mMethod; } diff --git a/kio/misc/kpac/discovery.cpp b/kio/misc/kpac/discovery.cpp index 671c2a941..7a84958f7 100644 --- a/kio/misc/kpac/discovery.cpp +++ b/kio/misc/kpac/discovery.cpp @@ -126,7 +126,7 @@ namespace KPAC return; } - int dot = m_hostname.tqfind( '.' ); + int dot = m_hostname.find( '.' ); if ( dot >= 0 ) { m_hostname.remove( 0, dot + 1 ); // remove one domain level diff --git a/kio/misc/kpac/proxyscout.cpp b/kio/misc/kpac/proxyscout.cpp index 48ff7ae84..5d8b008bf 100644 --- a/kio/misc/kpac/proxyscout.cpp +++ b/kio/misc/kpac/proxyscout.cpp @@ -162,9 +162,9 @@ namespace KPAC // this particular case, simply calling setProtocol() on // it trashes the whole URL. int len = proxyURL.protocol().length(); - if ( !proxyURL.isValid() || proxy.tqfind( ":/", len ) != len ) + if ( !proxyURL.isValid() || proxy.find( ":/", len ) != len ) proxy.prepend("http://"); - BlackList::Iterator it = m_blackList.tqfind( proxy ); + BlackList::Iterator it = m_blackList.find( proxy ); if ( it == m_blackList.end() ) return proxy; else if ( std::time( 0 ) - *it > 1800 ) // 30 minutes { diff --git a/kio/misc/ksendbugmail/smtp.cpp b/kio/misc/ksendbugmail/smtp.cpp index ac3e7b74f..a9f69792d 100644 --- a/kio/misc/ksendbugmail/smtp.cpp +++ b/kio/misc/ksendbugmail/smtp.cpp @@ -74,22 +74,22 @@ void SMTP::setTimeOut(int timeout) void SMTP::setSenderAddress(const TQString& sender) { senderAddress = sender; - int index = senderAddress.tqfind('<'); + int index = senderAddress.find('<'); if (index == -1) return; senderAddress = senderAddress.mid(index + 1); - index = senderAddress.tqfind('>'); + index = senderAddress.find('>'); if (index != -1) senderAddress = senderAddress.left(index); senderAddress = senderAddress.simplifyWhiteSpace(); while (1) { - index = senderAddress.tqfind(' '); + index = senderAddress.find(' '); if (index != -1) senderAddress = senderAddress.mid(index + 1); // take one side else break; } - index = senderAddress.tqfind('@'); + index = senderAddress.find('@'); if (index == -1) senderAddress.append("@localhost"); // won't go through without a local mail system @@ -218,7 +218,7 @@ void SMTP::socketRead(KSocket *socket) readBuffer[n] = '\0'; lineBuffer += readBuffer; - nl = lineBuffer.tqfind('\n'); + nl = lineBuffer.find('\n'); if(nl == -1) return; lastLine = lineBuffer.left(nl); @@ -249,7 +249,7 @@ void SMTP::processLine(TQString *line) int i, stat; TQString tmpstr; - i = line->tqfind(' '); + i = line->find(' '); tmpstr = line->left(i); if(i > 3) kdDebug() << "warning: SMTP status code longer then 3 digits: " << tmpstr << endl; diff --git a/kio/misc/kssld/kssld.cpp b/kio/misc/kssld/kssld.cpp index 79b5998d1..45d523d2e 100644 --- a/kio/misc/kssld/kssld.cpp +++ b/kio/misc/kssld/kssld.cpp @@ -572,7 +572,7 @@ KSSLCNode *node; return false; } - if (!node->hosts.tqcontains(host)) { + if (!node->hosts.contains(host)) { node->hosts << host; } @@ -857,14 +857,14 @@ void KSSLD::searchAddCert(KSSLCertificate *cert) { cert->getEmails(mails); for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { TQString email = static_cast<const TQString &>(*iter).lower(); - TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.tqfind(email); + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email); if (it == skEmail.end()) it = skEmail.insert(email, TQPtrVector<KSSLCertificate>()); TQPtrVector<KSSLCertificate> &elem = *it; - if (elem.tqfindRef(cert) == -1) { + if (elem.findRef(cert) == -1) { unsigned int n = 0; for(; n < elem.size(); n++) { if (!elem.tqat(n)) { @@ -887,14 +887,14 @@ void KSSLD::searchRemoveCert(KSSLCertificate *cert) { TQStringList mails; cert->getEmails(mails); for(TQStringList::const_iterator iter = mails.begin(); iter != mails.end(); ++iter) { - TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.tqfind(static_cast<const TQString &>(*iter).lower()); + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(static_cast<const TQString &>(*iter).lower()); if (it == skEmail.end()) break; TQPtrVector<KSSLCertificate> &elem = *it; - int n = elem.tqfindRef(cert); + int n = elem.findRef(cert); if (n != -1) elem.remove(n); } @@ -903,7 +903,7 @@ void KSSLD::searchRemoveCert(KSSLCertificate *cert) { TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) { TQStringList rc; - TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.tqfind(email.lower()); + TQMap<TQString, TQPtrVector<KSSLCertificate> >::iterator it = skEmail.find(email.lower()); kdDebug() << "GETKDEKey " << email.latin1() << endl; @@ -924,7 +924,7 @@ TQStringList KSSLD::getKDEKeyByEmail(const TQString &email) { KSSLCertificate KSSLD::getCertByMD5Digest(const TQString &key) { - TQMap<TQString, KSSLCertificate *>::iterator iter = skMD5Digest.tqfind(key); + TQMap<TQString, KSSLCertificate *>::iterator iter = skMD5Digest.find(key); kdDebug() << "Searching cert for " << key.latin1() << endl; diff --git a/kio/misc/kwalletd/ktimeout.cpp b/kio/misc/kwalletd/ktimeout.cpp index d4c87bd28..c431ecf69 100644 --- a/kio/misc/kwalletd/ktimeout.cpp +++ b/kio/misc/kwalletd/ktimeout.cpp @@ -39,7 +39,7 @@ void KTimeout::clear() { void KTimeout::removeTimer(int id) { - TQTimer *t = _timers.tqfind(id); + TQTimer *t = _timers.find(id); if (t != 0L) { _timers.remove(id); // autodeletes } @@ -47,7 +47,7 @@ void KTimeout::removeTimer(int id) { void KTimeout::addTimer(int id, int timeout) { - if (_timers.tqfind(id) != 0L) { + if (_timers.find(id) != 0L) { return; } @@ -59,7 +59,7 @@ void KTimeout::addTimer(int id, int timeout) { void KTimeout::resetTimer(int id, int timeout) { - TQTimer *t = _timers.tqfind(id); + TQTimer *t = _timers.find(id); if (t) { t->changeInterval(timeout); } diff --git a/kio/misc/kwalletd/kwalletd.cpp b/kio/misc/kwalletd/kwalletd.cpp index b2b27d363..0513305bd 100644 --- a/kio/misc/kwalletd/kwalletd.cpp +++ b/kio/misc/kwalletd/kwalletd.cpp @@ -121,7 +121,7 @@ int KWalletD::generateHandle() { // ASSUMPTION: RAND_MAX is fairly large. do { rc = rand(); - } while (_wallets.tqfind(rc) || rc == 0); + } while (_wallets.find(rc) || rc == 0); return rc; } @@ -308,7 +308,7 @@ void KWalletD::checkActiveDialog() { } int KWalletD::doTransactionOpen(const TQCString& appid, const TQString& wallet, uint wId, bool modal) { - if (_firstUse && !wallets().tqcontains(KWallet::Wallet::LocalWallet())) { + if (_firstUse && !wallets().contains(KWallet::Wallet::LocalWallet())) { // First use wizard KWalletWizard *wiz = new KWalletWizard(0); setupDialog( wiz, wId, appid, modal ); @@ -529,11 +529,11 @@ int KWalletD::internalOpen(const TQCString& appid, const TQString& wallet, bool KApplication::startServiceByDesktopName("kwalletmanager-kwalletd"); } } else { - if (!_handles[appid].tqcontains(rc) && _openPrompt && !isAuthorizedApp(appid, wallet, w)) { + if (!_handles[appid].contains(rc) && _openPrompt && !isAuthorizedApp(appid, wallet, w)) { return -1; } _handles[appid].append(rc); - _wallets.tqfind(rc)->ref(); + _wallets.find(rc)->ref(); } return rc; @@ -567,7 +567,7 @@ bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, W KConfig cfg("kwalletrc"); cfg.setGroup("Auto Allow"); TQStringList apps = cfg.readListEntry(wallet); - if (!apps.tqcontains(thisApp)) { + if (!apps.contains(thisApp)) { apps += thisApp; _implicitAllowMap[wallet] += thisApp; cfg.writeEntry(wallet, apps); @@ -578,7 +578,7 @@ bool KWalletD::isAuthorizedApp(const TQCString& appid, const TQString& wallet, W KConfig cfg("kwalletrc"); cfg.setGroup("Auto Deny"); TQStringList apps = cfg.readListEntry(wallet); - if (!apps.tqcontains(thisApp)) { + if (!apps.contains(thisApp)) { apps += thisApp; _implicitDenyMap[wallet] += thisApp; cfg.writeEntry(wallet, apps); @@ -646,7 +646,7 @@ void KWalletD::doTransactionChangePassword(const TQCString& appid, const TQStrin return; } - w = _wallets.tqfind(handle); + w = _wallets.find(handle); reclose = true; } else { handle = it.currentKey(); @@ -710,14 +710,14 @@ int KWalletD::close(const TQString& wallet, bool force) { int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { if (w) { const TQString& wallet = w->walletName(); - assert(_passwords.tqcontains(wallet)); + assert(_passwords.contains(wallet)); if (w->refCount() == 0 || force) { invalidateHandle(handle); if (_closeIdle && _timeouts) { _timeouts->removeTimer(handle); } _wallets.remove(handle); - if (_passwords.tqcontains(wallet)) { + if (_passwords.contains(wallet)) { w->close(TQByteArray().duplicate(_passwords[wallet].data(), _passwords[wallet].length())); _passwords[wallet].fill(0); _passwords.remove(wallet); @@ -735,14 +735,14 @@ int KWalletD::closeWallet(KWallet::Backend *w, int handle, bool force) { int KWalletD::close(int handle, bool force) { TQCString appid = friendlyDCOPPeerName(); - KWallet::Backend *w = _wallets.tqfind(handle); + KWallet::Backend *w = _wallets.find(handle); bool contains = false; if (w) { // the handle is valid - if (_handles.tqcontains(appid)) { // we know this app - if (_handles[appid].tqcontains(handle)) { + if (_handles.contains(appid)) { // we know this app + if (_handles[appid].contains(handle)) { // the app owns this handle - _handles[appid].remove(_handles[appid].tqfind(handle)); + _handles[appid].remove(_handles[appid].find(handle)); contains = true; if (_handles[appid].isEmpty()) { _handles.remove(appid); @@ -759,7 +759,7 @@ int KWalletD::close(int handle, bool force) { if (force) { invalidateHandle(handle); } - if (_passwords.tqcontains(w->walletName())) { + if (_passwords.contains(w->walletName())) { w->close(TQByteArray().duplicate(_passwords[w->walletName()].data(), _passwords[w->walletName()].length())); _passwords[w->walletName()].fill(0); _passwords.remove(w->walletName()); @@ -792,7 +792,7 @@ bool KWalletD::isOpen(int handle) { return false; } - KWallet::Backend *rc = _wallets.tqfind(handle); + KWallet::Backend *rc = _wallets.find(handle); if (rc == 0 && ++_failed > 5) { _failed = 0; @@ -1179,11 +1179,11 @@ int KWalletD::removeEntry(int handle, const TQString& folder, const TQString& ke void KWalletD::slotAppUnregistered(const TQCString& app) { - if (_handles.tqcontains(app)) { + if (_handles.contains(app)) { TQValueList<int> l = _handles[app]; for (TQValueList<int>::Iterator i = l.begin(); i != l.end(); ++i) { _handles[app].remove(*i); - KWallet::Backend *w = _wallets.tqfind(*i); + KWallet::Backend *w = _wallets.find(*i); if (w && !_leaveOpen && 0 == w->deref()) { close(w->walletName(), true); } @@ -1207,11 +1207,11 @@ KWallet::Backend *KWalletD::getWallet(const TQCString& appid, int handle) { return 0L; } - KWallet::Backend *w = _wallets.tqfind(handle); + KWallet::Backend *w = _wallets.find(handle); if (w) { // the handle is valid - if (_handles.tqcontains(appid)) { // we know this app - if (_handles[appid].tqcontains(handle)) { + if (_handles.contains(appid)) { // we know this app + if (_handles[appid].contains(handle)) { // the app owns this handle _failed = 0; if (_closeIdle && _timeouts) { @@ -1285,7 +1285,7 @@ TQStringList KWalletD::users(const TQString& wallet) const { ++it) { if (it.current()->walletName() == wallet) { for (TQMap<TQCString,TQValueList<int> >::ConstIterator hit = _handles.begin(); hit != _handles.end(); ++hit) { - if (hit.data().tqcontains(it.currentKey())) { + if (hit.data().contains(it.currentKey())) { rc += hit.key(); } } @@ -1302,7 +1302,7 @@ bool KWalletD::disconnectApplication(const TQString& wallet, const TQCString& ap it.current(); ++it) { if (it.current()->walletName() == wallet) { - if (_handles[application].tqcontains(it.currentKey())) { + if (_handles[application].contains(it.currentKey())) { _handles[application].remove(it.currentKey()); if (_handles[application].isEmpty()) { @@ -1416,7 +1416,7 @@ bool KWalletD::isEnabled() const { bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder) { - if (!wallets().tqcontains(wallet)) { + if (!wallets().contains(wallet)) { return true; } @@ -1435,7 +1435,7 @@ bool KWalletD::folderDoesNotExist(const TQString& wallet, const TQString& folder bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, const TQString& key) { - if (!wallets().tqcontains(wallet)) { + if (!wallets().contains(wallet)) { return true; } @@ -1454,12 +1454,12 @@ bool KWalletD::keyDoesNotExist(const TQString& wallet, const TQString& folder, c bool KWalletD::implicitAllow(const TQString& wallet, const TQCString& app) { - return _implicitAllowMap[wallet].tqcontains(TQString::fromLocal8Bit(app)); + return _implicitAllowMap[wallet].contains(TQString::fromLocal8Bit(app)); } bool KWalletD::implicitDeny(const TQString& wallet, const TQCString& app) { - return _implicitDenyMap[wallet].tqcontains(TQString::fromLocal8Bit(app)); + return _implicitDenyMap[wallet].contains(TQString::fromLocal8Bit(app)); } @@ -1468,12 +1468,12 @@ TQCString KWalletD::friendlyDCOPPeerName() { if (!dc) { return ""; } - return dc->senderId().tqreplace(TQRegExp("-[0-9]+$"), ""); + return dc->senderId().replace(TQRegExp("-[0-9]+$"), ""); } void KWalletD::timedOut(int id) { - KWallet::Backend *w = _wallets.tqfind(id); + KWallet::Backend *w = _wallets.find(id); if (w) { closeWallet(w, id, true); } diff --git a/kio/misc/uiserver.cpp b/kio/misc/uiserver.cpp index 2ce91feb3..bf8b606dc 100644 --- a/kio/misc/uiserver.cpp +++ b/kio/misc/uiserver.cpp @@ -272,8 +272,8 @@ void ProgressItem::setPercent( unsigned long percent ) { void ProgressItem::setInfoMessage( const TQString & msg ) { TQString plainTextMsg(msg); - plainTextMsg.tqreplace( TQRegExp( "</?b>" ), TQString() ); - plainTextMsg.tqreplace( TQRegExp( "<img.*>" ), TQString() ); + plainTextMsg.replace( TQRegExp( "</?b>" ), TQString() ); + plainTextMsg.replace( TQRegExp( "<img.*>" ), TQString() ); setText( ListProgress::TB_PROGRESS, plainTextMsg ); defaultProgress->slotInfoMessage( 0, msg ); @@ -1195,7 +1195,7 @@ void UIServer::showSSLInfoDialog(const TQString &url, const KIO::MetaData &meta, kdDebug(7024) << "ssl_cert_errors=" << meta["ssl_cert_errors"] << endl; kid->setCertState(meta["ssl_cert_errors"]); - TQString ip = meta.tqcontains("ssl_proxied") ? "" : meta["ssl_peer_ip"]; + TQString ip = meta.contains("ssl_proxied") ? "" : meta["ssl_peer_ip"]; kid->setup( x, ip, url, // the URL diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp index 64167d9ea..0c8470a61 100644 --- a/kio/tests/dataprotocoltest.cpp +++ b/kio/tests/dataprotocoltest.cpp @@ -47,7 +47,7 @@ public: // meta_data[key] = value; // cout << "§ " << key << " = " << value << endl; TQString prefix = "Metadata[\""+key+"\"]: "; - KIO::MetaData::Iterator it = attributes_expected.tqfind(key); + KIO::MetaData::Iterator it = attributes_expected.find(key); if (it != attributes_expected.end()) { testStrings(prefix,it.data(),value); // remove key from map diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp index 4750636b8..612dab558 100644 --- a/kio/tests/kurlcompletiontest.cpp +++ b/kio/tests/kurlcompletiontest.cpp @@ -96,8 +96,8 @@ void KURLCompletionTest::testLocalRelativePath() waitForCompletion(); TQStringList comp1all = m_completion->allMatches(); assert( comp1all.count() == 2 ); - assert( comp1all.tqfind( "file1" ) != comp1all.end() ); - assert( comp1all.tqfind( "file#a" ) != comp1all.end() ); + assert( comp1all.find( "file1" ) != comp1all.end() ); + assert( comp1all.find( "file#a" ) != comp1all.end() ); TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does assert( comp1 == "file1" ); @@ -138,9 +138,9 @@ void KURLCompletionTest::testLocalURL() TQStringList comp1all = m_completion->allMatches(); kdDebug() << comp1all << endl; assert( comp1all.count() == 2 ); - assert( comp1all.tqfind( m_dirURL.url() + "file1" ) != comp1all.end() ); + assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() ); TQString filehash = m_dirURL.url() + "file%23a"; - assert( comp1all.tqfind( filehash ) != comp1all.end() ); + assert( comp1all.find( filehash ) != comp1all.end() ); TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!! kdDebug() << filehashPath << endl; assert( filehashPath == m_dirURL.path() + "file#a" ); diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc index 88ba3b94d..d977bbd9c 100644 --- a/kioslave/file/file.cc +++ b/kioslave/file/file.cc @@ -960,7 +960,7 @@ void FileProtocol::del( const KURL& url, bool isfile) TQString FileProtocol::getUserName( uid_t uid ) { TQString *temp; - temp = usercache.tqfind( uid ); + temp = usercache.find( uid ); if ( !temp ) { struct passwd *user = getpwuid( uid ); if ( user ) { @@ -977,7 +977,7 @@ TQString FileProtocol::getUserName( uid_t uid ) TQString FileProtocol::getGroupName( gid_t gid ) { TQString *temp; - temp = groupcache.tqfind( gid ); + temp = groupcache.find( gid ); if ( !temp ) { struct group *grp = getgrgid( gid ); if ( grp ) { diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc index 68bcf2064..e310930fe 100644 --- a/kioslave/ftp/ftp.cc +++ b/kioslave/ftp/ftp.cc @@ -693,8 +693,8 @@ bool Ftp::ftpLogin() } TQString sTmp = remoteEncoding()->decode( ftpResponse(3) ); - int iBeg = sTmp.tqfind('"'); - int iEnd = sTmp.tqfindRev('"'); + int iBeg = sTmp.find('"'); + int iEnd = sTmp.findRev('"'); if(iBeg > 0 && iBeg < iEnd) { m_initialPath = sTmp.mid(iBeg+1, iEnd-iBeg-1); @@ -749,7 +749,7 @@ bool Ftp::ftpSendCmd( const TQCString& cmd, int maxretries ) { assert(m_control != NULL); // must have control connection socket - if ( cmd.tqfind( '\r' ) != -1 || cmd.tqfind( '\n' ) != -1) + if ( cmd.find( '\r' ) != -1 || cmd.find( '\n' ) != -1) { kdWarning(7102) << "Invalid command received (contains CR or LF):" << cmd.data() << endl; @@ -1285,7 +1285,7 @@ bool Ftp::ftpRename( const TQString & src, const TQString & dst, bool overwrite return false; } - int pos = src.tqfindRev("/"); + int pos = src.findRev("/"); if( !ftpFolder(src.left(pos+1), false) ) return false; @@ -1838,7 +1838,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) TQCString tmp( p_name ); if ( p_access[0] == 'l' ) { - int i = tmp.tqfindRev( " -> " ); + int i = tmp.findRev( " -> " ); if ( i != -1 ) { de.link = remoteEncoding()->decode(p_name + i + 4); tmp.truncate( i ); @@ -1852,7 +1852,7 @@ bool Ftp::ftpReadDir(FtpEntry& de) if ( tmp[0] == '/' ) // listing on ftp://ftp.gnupg.org/ starts with '/' tmp.remove( 0, 1 ); - if (tmp.tqfind('/') != -1) + if (tmp.find('/') != -1) continue; // Don't trick us! // Some sites put more than one space between the date and the name // e.g. ftp://ftp.uni-marburg.de/mirror/ diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc index fa8997eca..3d957aaef 100644 --- a/kioslave/http/http.cc +++ b/kioslave/http/http.cc @@ -171,7 +171,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header) TQString header = (*it).lower(); // Do not allow Request line to be specified and ignore // the other HTTP headers. - if (header.tqfind(':') == -1 || + if (header.find(':') == -1 || header.startsWith("host") || header.startsWith("via")) continue; @@ -431,7 +431,7 @@ void HTTPProtocol::setHost( const TQString& host, int port, m_davHostOk = m_davHostUnsupported = false; // is it an IPv6 address? - if (host.tqfind(':') == -1) + if (host.find(':') == -1) { m_request.hostname = host; m_request.encoded_hostname = KIDNA::toAscii(host); @@ -439,7 +439,7 @@ void HTTPProtocol::setHost( const TQString& host, int port, else { m_request.hostname = host; - int pos = host.tqfind('%'); + int pos = host.find('%'); if (pos == -1) m_request.encoded_hostname = '[' + host + ']'; else @@ -828,8 +828,8 @@ void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method ) int HTTPProtocol::codeFromResponse( const TQString& response ) { - int firstSpace = response.tqfind( ' ' ); - int secondSpace = response.tqfind( ' ', firstSpace + 1 ); + int firstSpace = response.find( ' ' ); + int secondSpace = response.find( ' ', firstSpace + 1 ); return response.mid( firstSpace + 1, secondSpace - firstSpace - 1 ).toInt(); } @@ -3278,7 +3278,7 @@ try_again: // path, thus we extract the filename only. if ( !dispositionFilename.isEmpty() ) { - int pos = dispositionFilename.tqfindRev( '/' ); + int pos = dispositionFilename.findRev( '/' ); if( pos > -1 ) dispositionFilename = dispositionFilename.mid(pos+1); @@ -4680,12 +4680,12 @@ FILE* HTTPProtocol::checkCacheEntry( bool readWrite) TQString CEF = m_request.path; - int p = CEF.tqfind('/'); + int p = CEF.find('/'); while(p != -1) { CEF[p] = separator; - p = CEF.tqfind('/', p); + p = CEF.find('/', p); } TQString host = m_request.hostname.lower(); @@ -4875,7 +4875,7 @@ void HTTPProtocol::updateExpireDate(time_t expireDate, bool updateCreationDate) void HTTPProtocol::createCacheEntry( const TQString &mimetype, time_t expireDate) { TQString dir = m_request.cef; - int p = dir.tqfindRev('/'); + int p = dir.findRev('/'); if (p == -1) return; // Error. dir.truncate(p); @@ -5233,13 +5233,13 @@ bool HTTPProtocol::getAuthorization() { bool isStaleNonce = false; TQString auth = ( m_responseCode == 401 ) ? m_strAuthorization : m_strProxyAuthorization; - int pos = auth.tqfind("stale", 0, false); + int pos = auth.find("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.tqfind("true", pos, false) != -1 ) + if ( pos < len && auth.find("true", pos, false) != -1 ) { isStaleNonce = true; kdDebug(7113) << "(" << m_pid << ") Stale nonce value. " @@ -5358,13 +5358,13 @@ bool HTTPProtocol::getAuthorization() else auth = m_strProxyAuthorization; - int pos = auth.tqfind("stale", 0, false); + int pos = auth.find("stale", 0, false); if ( pos != -1 ) { pos += 5; int len = auth.length(); while( pos < len && (auth[pos] == ' ' || auth[pos] == '=') ) pos++; - if ( pos < len && auth.tqfind("true", pos, false) != -1 ) + if ( pos < len && auth.find("true", pos, false) != -1 ) { info.digestInfo = (m_responseCode == 401) ? m_strAuthorization : m_strProxyAuthorization; kdDebug(7113) << "(" << m_pid << ") Just a stale nonce value! " @@ -5880,7 +5880,7 @@ TQString HTTPProtocol::createDigestAuth ( bool isForProxy ) TQCString uri = TQCString(p,i+1); do { - pos = uri.tqfind( ' ', idx ); + pos = uri.find( ' ', idx ); if ( pos != -1 ) { KURL u (m_request.url, uri.mid(idx, pos-idx)); diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp index ca544ac62..136fba0b1 100644 --- a/kioslave/http/kcookiejar/kcookiejar.cpp +++ b/kioslave/http/kcookiejar/kcookiejar.cpp @@ -194,14 +194,14 @@ bool KHttpCookie::match(const TQString &fqdn, const TQStringList &domains, if (fqdn != mHost) return false; } - else if (!domains.tqcontains(mDomain)) + else if (!domains.contains(mDomain)) { if (mDomain[0] == '.') return false; // Maybe the domain needs an extra dot. TQString domain = '.' + mDomain; - if ( !domains.tqcontains( domain ) ) + if ( !domains.contains( domain ) ) if ( fqdn != mDomain ) return false; } @@ -261,7 +261,7 @@ KCookieJar::KCookieJar() for(TQStringList::ConstIterator it = countries.begin(); it != countries.end(); ++it) { - m_twoLevelTLD.tqreplace(*it, (int *) 1); + m_twoLevelTLD.replace(*it, (int *) 1); } } @@ -301,7 +301,7 @@ static void removeDuplicateFromList(KHttpCookieList *list, KHttpCookie *cookiePt it != cookie->windowIds().end(); ++it) { long windowId = *it; - if (windowId && (cookiePtr->windowIds().tqfind(windowId) == cookiePtr->windowIds().end())) + if (windowId && (cookiePtr->windowIds().find(windowId) == cookiePtr->windowIds().end())) { cookiePtr->windowIds().append(windowId); } @@ -337,8 +337,8 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w if (!parseURL(_url, fqdn, path)) return cookieStr; - bool secureRequest = (_url.tqfind( L1("https://"), 0, false) == 0 || - _url.tqfind( L1("webdavs://"), 0, false) == 0); + bool secureRequest = (_url.find( L1("https://"), 0, false) == 0 || + _url.find( L1("webdavs://"), 0, false) == 0); // kdDebug(7104) << "findCookies: URL= " << _url << ", secure = " << secureRequest << endl; @@ -399,7 +399,7 @@ TQString KCookieJar::findCookies(const TQString &_url, bool useDOMFormat, long w continue; } - if (windowId && (cookie->windowIds().tqfind(windowId) == cookie->windowIds().end())) + if (windowId && (cookie->windowIds().find(windowId) == cookie->windowIds().end())) { cookie->windowIds().append(windowId); } @@ -591,7 +591,7 @@ bool KCookieJar::parseURL(const TQString &_url, // Cookie spoofing protection. Since there is no way a path separator // or escape encoded character is allowed in the hostname according // to RFC 2396, reject attempts to include such things there! - if(_fqdn.tqfind('/') > -1 || _fqdn.tqfind('%') > -1) + if(_fqdn.find('/') > -1 || _fqdn.find('%') > -1) { return false; // deny everything!! } @@ -620,7 +620,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, // Return numeric IPv4 addresses as is... if ((_fqdn.tqat(0) >= TQChar('0')) && (_fqdn.tqat(0) <= TQChar('9'))) { - if (_fqdn.tqfind(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) + if (_fqdn.find(TQRegExp(IP_ADDRESS_EXPRESSION)) > -1) { _domains.append( _fqdn ); return; @@ -683,7 +683,7 @@ void KCookieJar::extractDomains(const TQString &_fqdn, */ static TQString fixupDateTime(const TQString& dt) { - const int index = dt.tqfind(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); + const int index = dt.find(TQRegExp("[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}")); if (index > -1) { @@ -729,7 +729,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url, return KHttpCookieList(); } TQString defaultPath; - int i = path.tqfindRev('/'); + int i = path.findRev('/'); if (i > 0) defaultPath = path.left(i); @@ -811,7 +811,7 @@ KHttpCookieList KCookieJar::makeCookies(const TQString &_url, if(dom.length() > 2 && dom[dom.length()-1] == '.') dom = dom.left(dom.length()-1); - if(dom.tqcontains('.') > 1 || dom == ".local") + if(dom.contains('.') > 1 || dom == ".local") lastCookie->mDomain = dom; } else if (cName == "max-age") @@ -1020,7 +1020,7 @@ KCookieAdvice KCookieJar::cookieAdvice(KHttpCookiePtr cookiePtr) // cross-site cookie injection. if (!cookiePtr->domain().isEmpty()) { - if (!domains.tqcontains(cookiePtr->domain()) && + if (!domains.contains(cookiePtr->domain()) && !cookiePtr->domain().endsWith("."+cookiePtr->host())) cookiePtr->fixDomain(TQString::null); } @@ -1546,7 +1546,7 @@ void KCookieJar::loadConfig(KConfig *_config, bool reparse ) { const TQString &value = *it++; - int sepPos = value.tqfindRev(':'); + int sepPos = value.findRev(':'); if (sepPos <= 0) continue; diff --git a/kioslave/http/kcookiejar/kcookiewin.cpp b/kioslave/http/kcookiejar/kcookiewin.cpp index ca8560bf0..50477e40d 100644 --- a/kioslave/http/kcookiejar/kcookiewin.cpp +++ b/kioslave/http/kcookiejar/kcookiewin.cpp @@ -115,7 +115,7 @@ KCookieWin::KCookieWin( TQWidget *parent, KHttpCookieList cookieList, KHttpCookiePtr cookie = cookieList.first(); TQString host (cookie->host()); - int pos = host.tqfind(':'); + int pos = host.find(':'); if ( pos > 0 ) { TQString portNum = host.left(pos); diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp index aa51b2f91..1ce1c4d8f 100644 --- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp +++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp @@ -53,7 +53,7 @@ static void FAIL(const TQString &msg) static void popArg(TQCString &command, TQCString & line) { - int i = line.tqfind(' '); + int i = line.find(' '); if (i != -1) { command = line.left(i); @@ -69,7 +69,7 @@ static void popArg(TQCString &command, TQCString & line) static void popArg(TQString &command, TQCString & line) { - int i = line.tqfind(' '); + int i = line.find(' '); if (i != -1) { command = TQString::tqfromLatin1(line.left(i)); diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp index 310e222c7..a772dafe5 100644 --- a/kioslave/iso/iso.cpp +++ b/kioslave/iso/iso.cpp @@ -130,7 +130,7 @@ bool kio_isoProtocol::checkNewFile( TQString fullPath, TQString & path, int star fullPath += '/'; kdDebug() << "the full path is " << fullPath << endl; - while ( (pos=fullPath.tqfind( '/', pos+1 )) != -1 ) + while ( (pos=fullPath.find( '/', pos+1 )) != -1 ) { TQString tryPath = fullPath.left( pos ); kdDebug() << fullPath << " trying " << tryPath << endl; diff --git a/kmdi/kmdi/dockcontainer.cpp b/kmdi/kmdi/dockcontainer.cpp index 6ac025c7f..19b013d6b 100644 --- a/kmdi/kmdi/dockcontainer.cpp +++ b/kmdi/kmdi/dockcontainer.cpp @@ -118,7 +118,7 @@ DockContainer::~DockContainer() while (m_map.count()) { it = m_map.begin(); KDockWidget *w=it.key(); - if (m_overlapButtons.tqcontains(w)) { + if (m_overlapButtons.contains(w)) { (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]); m_overlapButtons.remove(w); } @@ -164,7 +164,7 @@ void DockContainer::insertWidget (KDockWidget *dwdg, TQPixmap pixmap, const TQSt { KDockWidget* w = (KDockWidget*) dwdg; int tab; - bool alreadyThere=m_map.tqcontains(w); + bool alreadyThere=m_map.contains(w); if (alreadyThere) { @@ -296,7 +296,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event ) } void DockContainer::showWidget(KDockWidget *w) { - if (!m_map.tqcontains(w)) return; + if (!m_map.contains(w)) return; kdDebug()<<"KMDI::DockContainer::<showWidget"<<endl; int id=m_map[w]; @@ -341,7 +341,7 @@ void DockContainer::hideIfNeeded() { void DockContainer::removeWidget(KDockWidget* dwdg) { KDockWidget* w = (KDockWidget*) dwdg; - if (!m_map.tqcontains(w)) return; + if (!m_map.contains(w)) return; int id=m_map[w]; if (m_tb->isTabRaised(id)) { //why do we hide the tab if we're just going @@ -354,7 +354,7 @@ void DockContainer::removeWidget(KDockWidget* dwdg) m_ws->removeWidget(w); m_map.remove(w); m_revMap.remove(id); - if (m_overlapButtons.tqcontains(w)) { + if (m_overlapButtons.contains(w)) { (::tqqt_cast<KDockWidgetHeader*>(w->getHeader()))->removeButton(m_overlapButtons[w]); m_overlapButtons.remove(w); } @@ -370,7 +370,7 @@ void DockContainer::undockWidget(KDockWidget *dwdg) { KDockWidget* w = (KDockWidget*) dwdg; - if (!m_map.tqcontains(w)) + if (!m_map.contains(w)) return; int id=m_map[w]; @@ -629,7 +629,7 @@ void DockContainer::toggle() { void DockContainer::prevToolView() { TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs(); - int pos=tabs->tqfindRef(m_tb->tab(oldtab)); + int pos=tabs->findRef(m_tb->tab(oldtab)); if (pos==-1) return; pos--; if (pos<0) pos=tabs->count()-1; @@ -641,7 +641,7 @@ void DockContainer::prevToolView() { void DockContainer::nextToolView() { TQPtrList<KMultiTabBarTab>* tabs=m_tb->tabs(); - int pos=tabs->tqfindRef(m_tb->tab(oldtab)); + int pos=tabs->findRef(m_tb->tab(oldtab)); if (pos==-1) return; pos++; if (pos>=(int)tabs->count()) pos=0; diff --git a/kmdi/kmdi/mainwindow.cpp b/kmdi/kmdi/mainwindow.cpp index aea04fa01..eb2382f08 100644 --- a/kmdi/kmdi/mainwindow.cpp +++ b/kmdi/kmdi/mainwindow.cpp @@ -302,7 +302,7 @@ void MainWindow::deleteToolWindow( TQWidget* pWnd) if (!pWnd) return; - if (m_toolViews->tqcontains(pWnd)) { + if (m_toolViews->contains(pWnd)) { deleteToolWindow((*m_toolViews)[pWnd]); } } diff --git a/kmdi/kmdichildarea.cpp b/kmdi/kmdichildarea.cpp index 3360a0e60..491afc06b 100644 --- a/kmdi/kmdichildarea.cpp +++ b/kmdi/kmdichildarea.cpp @@ -75,11 +75,11 @@ void KMdiChildArea::manageChild( KMdiChildFrm* child, bool show, bool cascade ) KMdiChildFrm* top = topChild(); //remove old references. There can be more than one so we remove them all - if ( m_pZ->tqfindRef( child ) != -1 ) + if ( m_pZ->findRef( child ) != -1 ) { //TQPtrList::find* moves current() to the found item m_pZ->take(); - while ( m_pZ->tqfindNextRef( child ) != -1 ) + while ( m_pZ->findNextRef( child ) != -1 ) m_pZ->take(); } @@ -323,7 +323,7 @@ TQPoint KMdiChildArea::getCascadePoint( int indexOfWindow ) void KMdiChildArea::childMinimized( KMdiChildFrm *minimizedChild, bool wasMaximized ) { //can't find the child in our list, so we don't care. - if ( m_pZ->tqfindRef( minimizedChild ) == -1 ) + if ( m_pZ->findRef( minimizedChild ) == -1 ) { kdDebug( 760 ) << k_funcinfo << "child was minimized but wasn't in our list!" << endl; return; diff --git a/kmdi/kmdichildfrm.cpp b/kmdi/kmdichildfrm.cpp index 63bdc5a24..47bb7b49f 100644 --- a/kmdi/kmdichildfrm.cpp +++ b/kmdi/kmdichildfrm.cpp @@ -842,7 +842,7 @@ void KMdiChildFrm::unsetClient( TQPoint positionOffset ) { // for each found object... TQWidget * widg = ( TQWidget* ) obj; ++it; - TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol ) widg->setFocusPolicy( *pFocPol ); @@ -894,7 +894,7 @@ void KMdiChildFrm::linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict ) { // for each found object... TQWidget* widg = ( TQWidget* ) obj; ++it; - TQ_FocusPolicy* pFocPol = pFocPolDict->tqfind( widg->name() ); // remember the focus policy from before the reparent + TQ_FocusPolicy* pFocPol = pFocPolDict->find( widg->name() ); // remember the focus policy from before the reparent if ( pFocPol != 0 ) widg->setFocusPolicy( *pFocPol ); diff --git a/kmdi/kmdichildview.cpp b/kmdi/kmdichildview.cpp index 9c1d18c7b..7b626d027 100644 --- a/kmdi/kmdichildview.cpp +++ b/kmdi/kmdichildview.cpp @@ -546,7 +546,7 @@ bool KMdiChildView::eventFilter( TQObject *obj, TQEvent *e ) if ( obj->isWidgetType() ) { TQObjectList * list = queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( list->tqfind( obj ) != -1 ) + if ( list->find( obj ) != -1 ) m_focusedChildWidget = ( TQWidget* ) obj; delete list; // delete the list, not the objects diff --git a/kmdi/kmdidockcontainer.cpp b/kmdi/kmdidockcontainer.cpp index caf335a85..6dc2a5cd0 100644 --- a/kmdi/kmdidockcontainer.cpp +++ b/kmdi/kmdidockcontainer.cpp @@ -138,7 +138,7 @@ KMdiDockContainer::~KMdiDockContainer() { it = m_map.begin(); KDockWidget *w = it.key(); - if ( m_overlapButtons.tqcontains( w ) ) + if ( m_overlapButtons.contains( w ) ) { ( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[w] ); m_overlapButtons.remove( w ); @@ -188,7 +188,7 @@ void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl; KDockWidget* w = dwdg; int tab; - bool alreadyThere = m_map.tqcontains( w ); + bool alreadyThere = m_map.contains( w ); if ( alreadyThere ) { @@ -322,7 +322,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event ) void KMdiDockContainer::showWidget( KDockWidget *w ) { - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return ; int id = m_map[ w ]; @@ -369,7 +369,7 @@ void KMdiDockContainer::hideIfNeeded() void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return; //we don't have this widget in our container kdDebug( 760 ) << k_funcinfo << endl; @@ -385,7 +385,7 @@ void KMdiDockContainer::removeWidget( KDockWidget* dwdg ) m_ws->removeWidget( w ); m_map.remove( w ); m_revMap.remove( id ); - if ( m_overlapButtons.tqcontains( w ) ) + if ( m_overlapButtons.contains( w ) ) { ( ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() ) )->removeButton( m_overlapButtons[ w ] ); m_overlapButtons.remove( w ); @@ -401,7 +401,7 @@ void KMdiDockContainer::undockWidget( KDockWidget *dwdg ) { KDockWidget * w = dwdg; - if ( !m_map.tqcontains( w ) ) + if ( !m_map.contains( w ) ) return ; int id = m_map[ w ]; @@ -817,7 +817,7 @@ void KMdiDockContainer::prevToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs(); - int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); + int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; @@ -838,7 +838,7 @@ void KMdiDockContainer::nextToolView() { kdDebug( 760 ) << k_funcinfo << endl; TQPtrList<KMultiTabBarTab>* tabs = m_tb->tabs(); - int pos = tabs->tqfindRef( m_tb->tab( oldtab ) ); + int pos = tabs->findRef( m_tb->tab( oldtab ) ); if ( pos == -1 ) return ; diff --git a/kmdi/kmdimainfrm.cpp b/kmdi/kmdimainfrm.cpp index 36c743bf8..46ba7870f 100644 --- a/kmdi/kmdimainfrm.cpp +++ b/kmdi/kmdimainfrm.cpp @@ -553,7 +553,7 @@ KMdiToolViewAccessor *KMdiMainFrm::createToolWindow() void KMdiMainFrm::deleteToolWindow( TQWidget* pWnd ) { - if ( m_pToolViews->tqcontains( pWnd ) ) + if ( m_pToolViews->contains( pWnd ) ) deleteToolWindow( ( *m_pToolViews ) [ pWnd ] ); } @@ -959,13 +959,13 @@ bool KMdiMainFrm::windowExists( KMdiChildView *pWnd, ExistsAs as ) { if ( ( as == ToolView ) || ( as == AnyView ) ) { - if ( m_pToolViews->tqcontains( pWnd ) ) + if ( m_pToolViews->contains( pWnd ) ) return true; if ( as == ToolView ) return false; } - if ( m_pDocumentViews->tqfindRef( pWnd ) != -1 ) + if ( m_pDocumentViews->findRef( pWnd ) != -1 ) return true; return false; @@ -2357,7 +2357,7 @@ void KMdiMainFrm::activateFirstWin() return ; TQDateTime current = activeWindow() ->getTimeStamp(); - TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.tqfind( current ) ); + TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) ); TQMap<TQDateTime, KMdiChildView*>::iterator newPos = pos; if ( pos != m.end() ) { @@ -2390,7 +2390,7 @@ void KMdiMainFrm::activateLastWin() return ; TQDateTime current = activeWindow() ->getTimeStamp(); - TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.tqfind( current ) ); + TQMap<TQDateTime, KMdiChildView*>::iterator pos( m.find( current ) ); if ( pos != m.begin() ) { --pos; diff --git a/knewstuff/downloaddialog.cpp b/knewstuff/downloaddialog.cpp index 40605f40d..cda530e86 100644 --- a/knewstuff/downloaddialog.cpp +++ b/knewstuff/downloaddialog.cpp @@ -421,19 +421,19 @@ void DownloadDialog::addEntry(Entry *entry, const TQStringList& variants) TQString lang = KGlobal::locale()->language(); - if(variants.tqcontains("score")) + if(variants.contains("score")) { KListViewItem *tmp_r = new NumSortListViewItem(lv_r, entry->name(lang), entry->version(), TQString("%1").arg(entry->rating())); tmp_r->setPixmap(0, pix); } - if(variants.tqcontains("downloads")) + if(variants.contains("downloads")) { KListViewItem *tmp_d = new NumSortListViewItem(lv_d, entry->name(lang), entry->version(), TQString("%1").arg(entry->downloads())); tmp_d->setPixmap(0, pix); } - if(variants.tqcontains("latest")) + if(variants.contains("latest")) { KListViewItem *tmp_l = new DateSortListViewItem(lv_l, entry->name(lang), entry->version(), KGlobal::locale()->formatDate(entry->releaseDate())); @@ -559,11 +559,11 @@ void DownloadDialog::install(Entry *e) m_entryitem->setPixmap(0, pix); TQListViewItem *item; - item = lv_r->tqfindItem(e->name(lang), 0); + item = lv_r->findItem(e->name(lang), 0); if(item) item->setPixmap(0, pix); - item = lv_d->tqfindItem(e->name(lang), 0); + item = lv_d->findItem(e->name(lang), 0); if(item) item->setPixmap(0, pix); - item = lv_l->tqfindItem(e->name(lang), 0); + item = lv_l->findItem(e->name(lang), 0); if(item) item->setPixmap(0, pix); } @@ -651,19 +651,19 @@ void DownloadDialog::slotSelected() if(m_curtab != 0) { lv_r->clearSelection(); - item = lv_r->tqfindItem(e->name(lang), 0); + item = lv_r->findItem(e->name(lang), 0); if(item) lv_r->setSelected(item, true); } if(m_curtab != 1) { lv_d->clearSelection(); - item = lv_d->tqfindItem(e->name(lang), 0); + item = lv_d->findItem(e->name(lang), 0); if(item) lv_d->setSelected(item, true); } if(m_curtab != 2) { lv_l->clearSelection(); - item = lv_l->tqfindItem(e->name(lang), 0); + item = lv_l->findItem(e->name(lang), 0); if(item) lv_l->setSelected(item, true); } @@ -743,7 +743,7 @@ void DownloadDialog::slotPage(TQWidget *w) kdDebug() << "changed widget!!!" << endl; - if(m_map.tqfind(w) == m_map.end()) return; + if(m_map.find(w) == m_map.end()) return; d->m_page = w; @@ -794,7 +794,7 @@ void DownloadDialog::loadProvider(Provider *p) for(TQStringList::Iterator it = variants.begin(); it != variants.end(); it++) { TQString url = p->downloadUrlVariant((*it)).url(); - if(!urls.tqcontains(url)) + if(!urls.contains(url)) { urls[url] = TQStringList(); } diff --git a/knewstuff/entry.cpp b/knewstuff/entry.cpp index e224bb0a3..55d60579c 100644 --- a/knewstuff/entry.cpp +++ b/knewstuff/entry.cpp @@ -47,11 +47,11 @@ static EntryPrivate *d(const Entry *e) d_ptr = new TQPtrDict<EntryPrivate>(); d_ptr->setAutoDelete(true); } - EntryPrivate *ret = d_ptr->tqfind((void*)e); + EntryPrivate *ret = d_ptr->find((void*)e); if(!ret) { ret = new EntryPrivate(); - d_ptr->tqreplace((void*)e, ret); + d_ptr->replace((void*)e, ret); } return ret; } @@ -84,7 +84,7 @@ void Entry::setName( const TQString &name, const TQString &lang ) { d(this)->mNameMap.insert( lang, name ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } // BCI part ends here @@ -105,7 +105,7 @@ Entry::~Entry() { if (d_ptr) { - EntryPrivate *p = d_ptr->tqfind(this); + EntryPrivate *p = d_ptr->find(this); if (p) d_ptr->remove(p); @@ -166,7 +166,7 @@ void Entry::setSummary( const TQString &text, const TQString &lang ) { mSummaryMap.insert( lang, text ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } TQString Entry::summary( const TQString &lang ) const @@ -221,7 +221,7 @@ void Entry::setPayload( const KURL &url, const TQString &lang ) { mPayloadMap.insert( lang, url ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::payload( const TQString &lang ) const @@ -244,7 +244,7 @@ void Entry::setPreview( const KURL &url, const TQString &lang ) { mPreviewMap.insert( lang, url ); - if ( mLangs.tqfind( lang ) == mLangs.end() ) mLangs.append( lang ); + if ( mLangs.find( lang ) == mLangs.end() ) mLangs.append( lang ); } KURL Entry::preview( const TQString &lang ) const diff --git a/knewstuff/provider.cpp b/knewstuff/provider.cpp index 813aee041..c1d12853c 100644 --- a/knewstuff/provider.cpp +++ b/knewstuff/provider.cpp @@ -53,11 +53,11 @@ static ProviderPrivate *d_prov(const Provider *p) d_ptr_prov = new TQPtrDict<ProviderPrivate>(); d_ptr_prov->setAutoDelete(true); } - ProviderPrivate *ret = d_ptr_prov->tqfind((void*)p); + ProviderPrivate *ret = d_ptr_prov->find((void*)p); if(!ret) { ret = new ProviderPrivate(); - d_ptr_prov->tqreplace((void*)p, ret); + d_ptr_prov->replace((void*)p, ret); } return ret; } @@ -89,7 +89,7 @@ Provider::~Provider() { if (d_ptr_prov) { - ProviderPrivate *p = d_ptr_prov->tqfind(this); + ProviderPrivate *p = d_ptr_prov->find(this); if (p) d_ptr_prov->remove(p); diff --git a/knewstuff/security.cpp b/knewstuff/security.cpp index 7db2ccfe7..247c6d5bc 100644 --- a/knewstuff/security.cpp +++ b/knewstuff/security.cpp @@ -125,7 +125,7 @@ void Security::slotDataArrived(KProcIO *procIO) key.mail=data.section('<', -1, -1); key.mail.truncate(key.mail.length() - 1); key.name=data.section('<',0,0); - if (key.name.tqfind("(")!=-1) + if (key.name.find("(")!=-1) key.name=key.name.section('(',0,0); m_keys[shortId] = key; } @@ -137,7 +137,7 @@ void Security::slotDataArrived(KProcIO *procIO) m_result &= SIGNED_BAD_CLEAR; m_result |= SIGNED_OK; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.tqcontains(id)) + if (!m_keys.contains(id)) { m_result |= UNKNOWN; } else @@ -154,7 +154,7 @@ void Security::slotDataArrived(KProcIO *procIO) { m_result |= SIGNED_BAD; TQString id = data.section(" ", 1 , 1).right(8); - if (!m_keys.tqcontains(id)) + if (!m_keys.contains(id)) { m_result |= UNKNOWN; } else @@ -170,7 +170,7 @@ void Security::slotDataArrived(KProcIO *procIO) break; case Sign: - if (data.tqfind("passphrase.enter") != -1) + if (data.find("passphrase.enter") != -1) { TQCString password; KeyStruct key = m_keys[m_secretKey]; @@ -187,7 +187,7 @@ void Security::slotDataArrived(KProcIO *procIO) return; } } else - if (data.tqfind("BAD_PASSPHRASE") != -1) + if (data.find("BAD_PASSPHRASE") != -1) { m_result |= BAD_PASSPHRASE; } diff --git a/kparts/browserextension.cpp b/kparts/browserextension.cpp index f014255b4..e3ae1a516 100644 --- a/kparts/browserextension.cpp +++ b/kparts/browserextension.cpp @@ -374,7 +374,7 @@ BrowserExtension::BrowserExtension( KParts::ReadOnlyPart *parent, for ( int i=0 ; it != itEnd ; ++it, ++i ) { // Does the extension have a slot with the name of this action ? - d->m_actionStatus.setBit( i, slotNames.tqcontains( it.key()+"()" ) ); + d->m_actionStatus.setBit( i, slotNames.contains( it.key()+"()" ) ); } connect( m_part, TQT_SIGNAL( completed() ), @@ -552,7 +552,7 @@ void BrowserExtension::slotSetActionText( const char * name, const TQString& tex TQString BrowserExtension::actionText( const char * name ) const { int actionNumber = (*s_actionNumberMap)[ name ]; - TQMap<int, TQString>::ConstIterator it = d->m_actionText.tqfind( actionNumber ); + TQMap<int, TQString>::ConstIterator it = d->m_actionText.find( actionNumber ); if ( it != d->m_actionText.end() ) return *it; return TQString::null; diff --git a/kparts/browserinterface.cpp b/kparts/browserinterface.cpp index 52200a20b..6882132fe 100644 --- a/kparts/browserinterface.cpp +++ b/kparts/browserinterface.cpp @@ -19,7 +19,7 @@ BrowserInterface::~BrowserInterface() void BrowserInterface::callMethod( const char *name, const TQVariant &argument ) { - int slot = tqmetaObject()->tqfindSlot( name ); + int slot = tqmetaObject()->findSlot( name ); if ( slot == -1 ) return; diff --git a/kparts/browserrun.cpp b/kparts/browserrun.cpp index a0d7aee80..5546cdd97 100644 --- a/kparts/browserrun.cpp +++ b/kparts/browserrun.cpp @@ -128,7 +128,7 @@ void BrowserRun::scanFile() } // Set the PropagateHttpHeader meta-data if it has not already been set... - if (!m_args.metaData().tqcontains("PropagateHttpHeader")) + if (!m_args.metaData().contains("PropagateHttpHeader")) m_args.metaData().insert("PropagateHttpHeader", "TRUE"); } @@ -236,7 +236,7 @@ BrowserRun::NonEmbeddableResult BrowserRun::handleNonEmbeddable( const TQString& m_sMimeType = mimeType; TQString extension; TQString fileName = m_suggestedFilename.isEmpty() ? m_strURL.fileName() : m_suggestedFilename; - int extensionPos = fileName.tqfindRev( '.' ); + int extensionPos = fileName.findRev( '.' ); if ( extensionPos != -1 ) extension = fileName.mid( extensionPos ); // keep the '.' KTempFile tempFile( TQString::null, extension ); diff --git a/kparts/historyprovider.cpp b/kparts/historyprovider.cpp index d62d94b3a..17cf609a1 100644 --- a/kparts/historyprovider.cpp +++ b/kparts/historyprovider.cpp @@ -63,13 +63,13 @@ HistoryProvider::~HistoryProvider() bool HistoryProvider::contains( const TQString& item ) const { - return (bool) d->dict.tqfind( item ); + return (bool) d->dict.find( item ); } void HistoryProvider::insert( const TQString& item ) { // no need to allocate memory, we only want to have fast lookup, no mapping - d->dict.tqreplace( item, (void*) 1 ); + d->dict.replace( item, (void*) 1 ); emit inserted( item ); } diff --git a/kparts/partmanager.cpp b/kparts/partmanager.cpp index e1f211b84..ca8a3a76d 100644 --- a/kparts/partmanager.cpp +++ b/kparts/partmanager.cpp @@ -206,7 +206,7 @@ bool PartManager::eventFilter( TQObject *obj, TQEvent *ev ) { TQPoint pos; - if ( !d->m_managedTopLevelWidgets.tqcontainsRef( w->tqtopLevelWidget() ) ) + if ( !d->m_managedTopLevelWidgets.containsRef( w->tqtopLevelWidget() ) ) return false; if ( d->m_bIgnoreScrollBars && w->inherits( TQSCROLLBAR_OBJECT_NAME_STRING ) ) @@ -313,7 +313,7 @@ Part * PartManager::findPartFromWidget( TQWidget * widget, const TQPoint &pos ) for ( ; it.current() ; ++it ) { Part *part = it.current()->hitTest( widget, pos ); - if ( part && d->m_parts.tqfindRef( part ) != -1 ) + if ( part && d->m_parts.findRef( part ) != -1 ) return part; } return 0L; @@ -332,7 +332,7 @@ Part * PartManager::findPartFromWidget( TQWidget * widget ) void PartManager::addPart( Part *part, bool setActive ) { - if ( d->m_parts.tqfindRef( part ) != -1 ) // don't add parts more than once :) + if ( d->m_parts.findRef( part ) != -1 ) // don't add parts more than once :) { #ifdef DEBUG_PARTMANAGER kdWarning(1000) << k_funcinfo << part << " already added" << kdBacktrace(5) << endl; @@ -368,7 +368,7 @@ void PartManager::addPart( Part *part, bool setActive ) void PartManager::removePart( Part *part ) { - if ( d->m_parts.tqfindRef( part ) == -1 ) + if ( d->m_parts.findRef( part ) == -1 ) { kdFatal(1000) << TQString(TQString("Can't remove part %1, not in KPartManager's list.").arg(part->name())) << endl; return; @@ -394,7 +394,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive ) { //kdDebug(1000) << "replacePart " << oldPart->name() << "-> " << newPart->name() << " setActive=" << setActive << endl; // This methods does exactly removePart + addPart but without calling setActivePart(0) in between - if ( d->m_parts.tqfindRef( oldPart ) == -1 ) + if ( d->m_parts.findRef( oldPart ) == -1 ) { kdFatal(1000) << TQString(TQString("Can't remove part %1, not in KPartManager's list.").arg(oldPart->name())) << endl; return; @@ -410,7 +410,7 @@ void PartManager::replacePart( Part * oldPart, Part * newPart, bool setActive ) void PartManager::setActivePart( Part *part, TQWidget *widget ) { - if ( part && d->m_parts.tqfindRef( part ) == -1 ) + if ( part && d->m_parts.findRef( part ) == -1 ) { kdWarning( 1000 ) << "PartManager::setActivePart : trying to activate a non-registered part! " << part->name() << endl; return; // don't allow someone call setActivePart with a part we don't know about @@ -565,7 +565,7 @@ void PartManager::addManagedTopLevelWidget( const TQWidget *topLevel ) if ( !topLevel->isTopLevel() ) return; - if ( d->m_managedTopLevelWidgets.tqcontainsRef( topLevel ) ) + if ( d->m_managedTopLevelWidgets.containsRef( topLevel ) ) return; d->m_managedTopLevelWidgets.append( topLevel ); @@ -578,7 +578,7 @@ void PartManager::removeManagedTopLevelWidget( const TQWidget *topLevel ) if ( !topLevel->isTopLevel() ) return; - if ( d->m_managedTopLevelWidgets.tqfindRef( topLevel ) == -1 ) + if ( d->m_managedTopLevelWidgets.findRef( topLevel ) == -1 ) return; d->m_managedTopLevelWidgets.remove(); diff --git a/kparts/plugin.cpp b/kparts/plugin.cpp index b9b60fc0b..a42839c23 100644 --- a/kparts/plugin.cpp +++ b/kparts/plugin.cpp @@ -107,7 +107,7 @@ TQValueList<Plugin::PluginInfo> Plugin::pluginInfos( const KInstance * instance if ( fInfo.extension() == TQString::tqfromLatin1( "desktop" ) ) continue; - TQMap<TQString,TQStringList>::Iterator mapIt = sortedPlugins.tqfind( fInfo.fileName() ); + TQMap<TQString,TQStringList>::Iterator mapIt = sortedPlugins.find( fInfo.fileName() ); if ( mapIt == sortedPlugins.end() ) mapIt = sortedPlugins.insert( fInfo.fileName(), TQStringList() ); @@ -249,7 +249,7 @@ void Plugin::loadPlugins( TQObject *parent, KXMLGUIClient* parentGUIClient, KIns else { // no user-setting, load plugin default setting TQString relPath = TQString( instance->instanceName() ) + "/" + (*pIt).m_relXMLFileName; - relPath.truncate( relPath.tqfindRev( '.' ) ); // remove extension + relPath.truncate( relPath.findRev( '.' ) ); // remove extension relPath += ".desktop"; //kdDebug(1000) << "looking for " << relPath << endl; const TQString desktopfile = instance->dirs()->findResource( "data", relPath ); diff --git a/kresources/configpage.cpp b/kresources/configpage.cpp index c6c9fcf5b..fa098b105 100644 --- a/kresources/configpage.cpp +++ b/kresources/configpage.cpp @@ -179,7 +179,7 @@ void ConfigPage::load() KTrader::OfferList::ConstIterator end = plugins.end(); for ( ; it != end; ++it ) { const TQString family = (*it)->property( "X-KDE-ResourceFamily" ).toString(); - if ( compatFamilyNames.tqfind( family ) == compatFamilyNames.end() ) + if ( compatFamilyNames.find( family ) == compatFamilyNames.end() ) compatFamilyNames.append( family ); } @@ -300,7 +300,7 @@ void ConfigPage::slotAdd() if ( !ok ) return; - TQString type = types[ descs.tqfindIndex( desc ) ]; + TQString type = types[ descs.findIndex( desc ) ]; // Create new resource Resource *resource = mCurrentManager->createResource( type ); diff --git a/kresources/factory.cpp b/kresources/factory.cpp index 14f905603..462d6be9c 100644 --- a/kresources/factory.cpp +++ b/kresources/factory.cpp @@ -45,7 +45,7 @@ Factory *Factory::self( const TQString& resourceFamily ) if ( !mSelves ) staticDeleter.setObject( mSelves, new TQDict<Factory> ); - factory = mSelves->tqfind( resourceFamily ); + factory = mSelves->find( resourceFamily ); if ( !factory ) { factory = new Factory( resourceFamily ); @@ -79,7 +79,7 @@ TQStringList Factory::typeNames() const ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent ) { - if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) + if ( type.isEmpty() || !mTypeMap.contains( type ) ) return 0; KService::Ptr ptr = mTypeMap[ type ]; @@ -109,7 +109,7 @@ ConfigWidget *Factory::configWidget( const TQString& type, TQWidget *parent ) TQString Factory::typeName( const TQString &type ) const { - if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) + if ( type.isEmpty() || !mTypeMap.contains( type ) ) return TQString(); KService::Ptr ptr = mTypeMap[ type ]; @@ -118,7 +118,7 @@ TQString Factory::typeName( const TQString &type ) const TQString Factory::typeDescription( const TQString &type ) const { - if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) + if ( type.isEmpty() || !mTypeMap.contains( type ) ) return TQString(); KService::Ptr ptr = mTypeMap[ type ]; @@ -129,7 +129,7 @@ Resource *Factory::resource( const TQString& type, const KConfig *config ) { kdDebug(5650) << "Factory::resource( " << type << ", config )" << endl; - if ( type.isEmpty() || !mTypeMap.tqcontains( type ) ) { + if ( type.isEmpty() || !mTypeMap.contains( type ) ) { kdDebug(5650) << "Factory::resource() no such type " << type << endl; return 0; } diff --git a/kresources/managerimpl.cpp b/kresources/managerimpl.cpp index 15dd33428..b5d9ec32f 100644 --- a/kresources/managerimpl.cpp +++ b/kresources/managerimpl.cpp @@ -353,7 +353,7 @@ Resource *ManagerImpl::readResourceConfig( const TQString &identifier, if ( checkActive ) { TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); - resource->setActive( activeKeys.tqcontains( identifier ) ); + resource->setActive( activeKeys.contains( identifier ) ); } mResources.append( resource ); @@ -383,20 +383,20 @@ void ManagerImpl::writeResourceConfig( Resource *resource, bool checkActive ) TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); TQStringList passiveKeys = mConfig->readListEntry( "PassiveResourceKeys" ); if ( resource->isActive() ) { - if ( passiveKeys.tqcontains( key ) ) { // remove it from passive list + if ( passiveKeys.contains( key ) ) { // remove it from passive list passiveKeys.remove( key ); mConfig->writeEntry( "PassiveResourceKeys", passiveKeys ); } - if ( !activeKeys.tqcontains( key ) ) { // add it to active list + if ( !activeKeys.contains( key ) ) { // add it to active list activeKeys.append( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } } else if ( !resource->isActive() ) { - if ( activeKeys.tqcontains( key ) ) { // remove it from active list + if ( activeKeys.contains( key ) ) { // remove it from active list activeKeys.remove( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } - if ( !passiveKeys.tqcontains( key ) ) { // add it to passive list + if ( !passiveKeys.contains( key ) ) { // add it to passive list passiveKeys.append( key ); mConfig->writeEntry( "PassiveResourceKeys", passiveKeys ); } @@ -414,7 +414,7 @@ void ManagerImpl::removeResource( Resource *resource ) mConfig->setGroup( "General" ); TQStringList activeKeys = mConfig->readListEntry( "ResourceKeys" ); - if ( activeKeys.tqcontains( key ) ) { + if ( activeKeys.contains( key ) ) { activeKeys.remove( key ); mConfig->writeEntry( "ResourceKeys", activeKeys ); } else { diff --git a/kspell2/broker.cpp b/kspell2/broker.cpp index b24f20beb..0149dace1 100644 --- a/kspell2/broker.cpp +++ b/kspell2/broker.cpp @@ -65,7 +65,7 @@ Broker *Broker::openBroker( KSharedConfig *config ) preventDeletion = config; if ( s_brokers ) { - Broker *broker = s_brokers->tqfind( preventDeletion ); + Broker *broker = s_brokers->find( preventDeletion ); if ( broker ) return broker; } diff --git a/kspell2/settings.cpp b/kspell2/settings.cpp index c220520e6..664ae24e0 100644 --- a/kspell2/settings.cpp +++ b/kspell2/settings.cpp @@ -75,7 +75,7 @@ KSharedConfig *Settings::sharedConfig() const void Settings::setDefaultLanguage( const TQString& lang ) { TQStringList cs = d->broker->languages(); - if ( cs.tqfind( lang ) != cs.end() && + if ( cs.find( lang ) != cs.end() && d->defaultLanguage != lang ) { d->defaultLanguage = lang; readIgnoreList(); @@ -94,7 +94,7 @@ void Settings::setDefaultClient( const TQString& client ) //Different from setDefaultLanguage because //the number of clients can't be even close //as big as the number of languages - if ( d->broker->clients().tqcontains( client ) ) { + if ( d->broker->clients().contains( client ) ) { d->defaultClient = client; d->modified = true; d->broker->changed(); @@ -167,7 +167,7 @@ TQStringList Settings::currentIgnoreList() const void Settings::addWordToIgnore( const TQString& word ) { - if ( !d->ignore.tqcontains( word ) ) { + if ( !d->ignore.contains( word ) ) { d->modified = true; d->ignore.insert( word, true ); } @@ -175,7 +175,7 @@ void Settings::addWordToIgnore( const TQString& word ) bool Settings::ignore( const TQString& word ) { - return d->ignore.tqcontains( word ); + return d->ignore.contains( word ); } void Settings::readIgnoreList() diff --git a/kspell2/ui/dialog.cpp b/kspell2/ui/dialog.cpp index 46e31ad82..e8444bec6 100644 --- a/kspell2/ui/dialog.cpp +++ b/kspell2/ui/dialog.cpp @@ -261,7 +261,7 @@ void Dialog::slotMisspelling(const TQString& word, int start ) { kdDebug()<<"Dialog misspelling!!"<<endl; d->currentWord = Word( word, start ); - if ( d->replaceAllMap.tqcontains( word ) ) { + if ( d->replaceAllMap.contains( word ) ) { d->ui->m_replacement->setText( d->replaceAllMap[ word ] ); slotReplaceWord(); } else { diff --git a/kspell2/ui/highlighter.cpp b/kspell2/ui/highlighter.cpp index a3c33d7ae..2d185462d 100644 --- a/kspell2/ui/highlighter.cpp +++ b/kspell2/ui/highlighter.cpp @@ -110,7 +110,7 @@ TQString Highlighter::currentLanguage() const void Highlighter::setCurrentLanguage( const TQString& lang ) { - if ( !d->dictCache.tqfind( lang ) ) { + if ( !d->dictCache.find( lang ) ) { Dictionary *dict = d->broker->dictionary( lang ); if ( dict ) { d->dictCache.insert( lang, dict ); diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index d449d5a73..9d09055b1 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -1555,7 +1555,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQString s = mi->text(); if(!s.isNull()) { - int t = s.tqfind('\t'); + int t = s.find('\t'); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; @@ -2267,7 +2267,7 @@ TQSize AsteroidStyle::tqsizeFromContents(ContentsType ct, } if (!mi->text().isNull()) { - if ((mi->text().tqfind('\t') >= 0)) { + if ((mi->text().find('\t') >= 0)) { sw += 16; } else if (mi->popup()) { sw += 8; diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp index d02e9484c..602a138ca 100644 --- a/kstyles/highcolor/highcolor.cpp +++ b/kstyles/highcolor/highcolor.cpp @@ -1407,7 +1407,7 @@ void HighColorStyle::tqdrawControl( TQ_ControlElement element, // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -1901,7 +1901,7 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 ) + if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 ) w += 12; else if ( mi->popup() ) w += 2 * arrowHMargin; @@ -2037,7 +2037,7 @@ void HighColorStyle::renderGradient( TQPainter* p, const TQRect& r, // We use these to draw parent-relative pixmaps for toolbar buttons // and menubar items. - GradientSet* grSet = gDict.tqfind( clr.rgb() ); + GradientSet* grSet = gDict.find( clr.rgb() ); if (!grSet) { grSet = new GradientSet(clr); diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index e8f8d7792..4bc417f7e 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -1078,7 +1078,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -1756,7 +1756,7 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 ) + if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 ) w += 12; else if ( mi->popup() ) w += 2 * arrowHMargin; diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp index b79147dda..18608205d 100644 --- a/kstyles/keramik/genembed.cpp +++ b/kstyles/keramik/genembed.cpp @@ -146,7 +146,7 @@ int main(int argc, char** argv) int readJustID = 0; - if ((pos = s.tqfindRev("-")) != -1) + if ((pos = s.findRev("-")) != -1) { int suffix = evalSuffix(s.mid(pos)); if (suffix !=-1 ) @@ -156,7 +156,7 @@ int main(int argc, char** argv) } } - if (!assignID.tqcontains(id)) + if (!assignID.contains(id)) { assignID[id] = nextID; nextID += 256; diff --git a/kstyles/keramik/gradients.cpp b/kstyles/keramik/gradients.cpp index 4a5c7dfc9..ab804d117 100644 --- a/kstyles/keramik/gradients.cpp +++ b/kstyles/keramik/gradients.cpp @@ -96,7 +96,7 @@ void GradientPainter::renderGradient( TQPainter* p, const TQRect& r, TQColor c, int key = entry.key(); - if ((cacheEntry = cache.tqfind(key, false))) + if ((cacheEntry = cache.find(key, false))) { if (entry == *cacheEntry) { diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 5a4112025..cb3078063 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -1725,7 +1725,7 @@ void KeramikStyle::tqdrawControl( TQ_ControlElement element, TQString s = mi->text(); // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -2501,7 +2501,7 @@ TQSize KeramikStyle::tqsizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 ) + if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 ) w += itemHMargin + itemFrame*2 + 7; else if ( mi->popup() ) w += 2 * arrowHMargin; diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp index 79d26955e..414965c01 100644 --- a/kstyles/keramik/pixmaploader.cpp +++ b/kstyles/keramik/pixmaploader.cpp @@ -260,7 +260,7 @@ TQPixmap PixmapLoader::scale( int name, int width, int height, const TQColor& co int key = entry.key(); - if ((cacheEntry = m_pixmapCache.tqfind(key, true))) + if ((cacheEntry = m_pixmapCache.find(key, true))) { if (entry == *cacheEntry) //True match! return *cacheEntry->m_pixmap; diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index 1579ac1cf..cb3ddf1fa 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -1156,7 +1156,7 @@ bool KLegacyStylePrivate::parseClass() { return false; } - KLegacyStyleData *styledata = styleDict.tqfind(stylename); + KLegacyStyleData *styledata = styleDict.find(stylename); if (! styledata) { qWarning("no such style '%s' for class '%s' (%p)", stylename.latin1(), @@ -1227,10 +1227,10 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) { TQString border =filestream.readLine(); int lp, rp, tp, bp, l, r, t, b; - lp = border.tqfind(','); - rp = border.tqfind(',', lp + 1); - tp = border.tqfind(',', rp + 1); - bp = border.tqfind('}', tp + 1); + lp = border.find(','); + rp = border.find(',', lp + 1); + tp = border.find(',', rp + 1); + bp = border.find('}', tp + 1); l = border.left(lp).toUInt(); r = border.mid(lp + 1, rp - lp - 1).toUInt(); @@ -1336,10 +1336,10 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) { TQString border = filestream.readLine(); int lp, rp, tp, bp, l, r, t, b; - lp = border.tqfind(','); - rp = border.tqfind(',', lp + 1); - tp = border.tqfind(',', rp + 1); - bp = border.tqfind('}', tp + 1); + lp = border.find(','); + rp = border.find(',', lp + 1); + tp = border.find(',', rp + 1); + bp = border.find('}', tp + 1); l = border.left(lp).toUInt(); r = border.mid(lp + 1, rp - lp - 1).toUInt(); @@ -1486,7 +1486,7 @@ bool KLegacyStylePrivate::parsePixmapPath() { next = next.mid(1, next.length() - 2); - int start = 0, end = next.tqfind(":"); + int start = 0, end = next.find(":"); while (end != -1) { TQString path(next.mid(start, end - start)); @@ -1500,7 +1500,7 @@ bool KLegacyStylePrivate::parsePixmapPath() { } start = end + 1; - end = next.tqfind(":", start); + end = next.find(":", start); } // get the straggler @@ -1543,7 +1543,7 @@ bool KLegacyStylePrivate::parseStyle() { newstylename = newstylename.mid(1, newstylename.length() - 2); - KLegacyStyleData *styledata = styleDict.tqfind(stylename); + KLegacyStyleData *styledata = styleDict.find(stylename); if (! styledata) return false; @@ -1573,7 +1573,7 @@ bool KLegacyStylePrivate::parseStyle() { } if (next.left(5) == "base[") { - int l = next.tqfind('['), r = next.tqfind(']'), state; + int l = next.find('['), r = next.find(']'), state; if (l < 1 || r < 1 || r < l) continue; @@ -1605,9 +1605,9 @@ bool KLegacyStylePrivate::parseStyle() { int rp, gp, bp; float ri, gi, bi; - rp = color.tqfind(','); - gp = color.tqfind(',', rp + 1); - bp = color.tqfind('}', gp + 1); + rp = color.find(','); + gp = color.find(',', rp + 1); + bp = color.find('}', gp + 1); ri = color.left(rp).toFloat(); gi = color.mid(rp + 1, gp - rp - 1).toFloat(); @@ -1619,7 +1619,7 @@ bool KLegacyStylePrivate::parseStyle() { styledata->base[state].setRgb(red, green, blue); } } else if (next.left(3) == "bg[") { - int l = next.tqfind('['), r = next.tqfind(']'), state; + int l = next.find('['), r = next.find(']'), state; if (l < 1 || r < 1 || r < l) continue; @@ -1651,9 +1651,9 @@ bool KLegacyStylePrivate::parseStyle() { int rp, gp, bp; float ri, gi, bi; - rp = color.tqfind(','); - gp = color.tqfind(',', rp + 1); - bp = color.tqfind('}', gp + 1); + rp = color.find(','); + gp = color.find(',', rp + 1); + bp = color.find('}', gp + 1); ri = color.left(rp).toFloat(); gi = color.mid(rp + 1, gp - rp - 1).toFloat(); @@ -1668,7 +1668,7 @@ bool KLegacyStylePrivate::parseStyle() { if (! parseEngine(styledata)) fprintf(stderr, "engine parse error\n"); } else if (next.left(3) == "fg[") { - int l = next.tqfind('['), r = next.tqfind(']'), state; + int l = next.find('['), r = next.find(']'), state; if (l < 1 || r < 1 || r < l) continue; @@ -1700,9 +1700,9 @@ bool KLegacyStylePrivate::parseStyle() { int rp, gp, bp; float ri, gi, bi; - rp = color.tqfind(','); - gp = color.tqfind(',', rp + 1); - bp = color.tqfind('}', gp + 1); + rp = color.find(','); + gp = color.find(',', rp + 1); + bp = color.find('}', gp + 1); ri = color.left(rp).toFloat(); gi = color.mid(rp + 1, gp - rp - 1).toFloat(); @@ -1767,7 +1767,7 @@ void KLegacyStyle::polish(TQApplication *app) { priv->oldfont = app->font(); priv->oldpalette = app->palette(); - GtkObject *gobj = priv->gtkDict.tqfind(TQMainWindow::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject()); if (gobj) { if (gobj->font()) { @@ -1974,7 +1974,7 @@ void KLegacyStyle::polish(TQWidget *widget) { widget->setBackgroundMode(TQWidget::PaletteBackground); } - GtkObject *gobj = gobj = priv->gtkDict.tqfind(((metaobject) ? metaobject : + GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject : widget->tqmetaObject())); if (gobj) { @@ -2115,7 +2115,7 @@ void KLegacyStyle::drawMenuBarItem(TQPainter *p, int x, int y, int w, int h, TQM TQColorGroup &g, bool enabled, bool active) { if (enabled && active) { - GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr); + GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr); if (gobj) { KLegacyImageDataKey key; @@ -2147,7 +2147,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h, const TQColorGroup & g, bool sunken, const TQBrush *fill) { - GtkObject *gobj = priv->gtkDict.tqfind(TQButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQButton::staticMetaObject()); if (! gobj) { KStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill); @@ -2170,7 +2170,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h, void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { - GtkObject *gobj = priv->gtkDict.tqfind(TQPushButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQPushButton::staticMetaObject()); if (! gobj) { KStyle::drawPushButton(btn, p); @@ -2237,7 +2237,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, int state, bool down, bool enabled) { - GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (! gobj) { KStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled); @@ -2260,7 +2260,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h, void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, int state) { - GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (! gobj) { KStyle::drawIndicatorMask(p, x, y, w, h, state); @@ -2283,7 +2283,7 @@ void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, i TQSize KLegacyStyle::indicatorSize(void) const { - GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (! gobj) return KStyle::indicatorSize(); @@ -2320,7 +2320,7 @@ void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int const TQColorGroup &g, bool on, bool down, bool enabled) { - GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (! gobj) { drawExclusiveIndicator(p, x, y, w, h, g, on, down, enabled); @@ -2345,7 +2345,7 @@ void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, int h, bool on) { - GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (! gobj) { KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on); @@ -2368,7 +2368,7 @@ void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, TQSize KLegacyStyle::exclusiveIndicatorSize(void) const { - GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (! gobj) { return KStyle::indicatorSize(); @@ -2427,7 +2427,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i } if ( act && enabled ) { - GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr); + GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr); if (gobj) { KLegacyImageDataKey key; @@ -2501,7 +2501,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i TQString s = mi->text(); if ( !s.isNull() ) { // draw text - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = 2; const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine; if ( t >= 0 ) { // draw tab text @@ -2531,7 +2531,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool sunken, bool editable, bool enabled, const TQBrush *b) { - GtkObject *gobj = priv->gtkDict.tqfind(TQComboBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject()); if (! gobj) { KStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b); @@ -2571,7 +2571,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h, TQRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) { - GtkObject *gobj = priv->gtkDict.tqfind(TQComboBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject()); if (! gobj) { return KStyle::comboButtonRect(x, y, w, h); @@ -2648,7 +2648,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll { if (! scrollbar->isVisible()) return; - GtkObject *gobj = priv->gtkDict.tqfind(TQScrollBar::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQScrollBar::staticMetaObject()); if (! gobj) { KStyle::drawScrollBarControls(p, scrollbar, start, controls, active); @@ -2762,7 +2762,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, Orientation orientation, bool tickAbove, bool tickBelow) { - GtkObject *gobj = priv->gtkDict.tqfind(TQSlider::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject()); if (! gobj) { KStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow); @@ -2789,7 +2789,7 @@ void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQ void KLegacyStyle::drawSliderGroove(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, QCOORD c, Orientation o) { - GtkObject *gobj = priv->gtkDict.tqfind(TQSlider::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject()); if (! gobj) { KStyle::drawSliderGroove(p, x, y, w, h, g, c, o); @@ -2816,7 +2816,7 @@ void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down, int x, int y, int w, int h, const TQColorGroup &g, bool enabled, const TQBrush *b) { - GtkObject *gobj = priv->gtkDict.tqfind(&arrow_ptr); + GtkObject *gobj = priv->gtkDict.find(&arrow_ptr); if (! gobj) { KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); @@ -2848,7 +2848,7 @@ void KLegacyStyle::drawMenuArrow(TQPainter *p, ArrowType type, bool down, int x, int y, int w, int h, const TQColorGroup &g, bool enabled, const TQBrush *b) { - GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr); + GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr); if (! gobj) { KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b); @@ -2891,7 +2891,7 @@ void KLegacyStyle::drawPopupPanel(TQPainter *p, int x, int y, int w, int h, void KLegacyStyle::drawCheckMark(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, bool activated, bool disabled) { - GtkObject *gobj = priv->gtkDict.tqfind(&checkmenuitem_ptr); + GtkObject *gobj = priv->gtkDict.find(&checkmenuitem_ptr); if (! gobj) { KStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled); @@ -2942,7 +2942,7 @@ void KLegacyStyle::drawSplitter(TQPainter *p, int x, int y, int w, int h, void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, bool selected) { - GtkObject *gobj = priv->gtkDict.tqfind(TQTabBar::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQTabBar::staticMetaObject()); if (! gobj) { KStyle::drawTab(p, tabbar, tab, selected); @@ -2981,7 +2981,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g, KToolBarPos type, TQBrush *fill) { - GtkObject *gobj = priv->gtkDict.tqfind(TQToolBar::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject()); if (! gobj) { KStyle::drawKBarHandle(p, x, y, w, h, g, type, fill); @@ -3043,7 +3043,7 @@ void KLegacyStyle::drawKickerTaskButton(TQPainter *p, int x, int y, int w, int h static const TQString &modStr = KGlobal::staticQString( TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]")); - int modStrPos = s.tqfind(modStr); + int modStrPos = s.find(modStr); if (modStrPos != -1) { s.remove(modStrPos, modStr.length()+1); @@ -3082,7 +3082,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { TQWidget *w = (TQWidget *) obj; if (w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING) && w->width() < 700) { - GtkObject *gobj = priv->gtkDict.tqfind(TQPopupMenu::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQPopupMenu::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; @@ -3139,7 +3139,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { } } } else if (w->isTopLevel() || w->inherits("QWorkspaceChild")) { - GtkObject *gobj = priv->gtkDict.tqfind(TQMainWindow::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; @@ -3152,7 +3152,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { w->setBackgroundPixmap(*p); } } else if (w->inherits(TQLINEEDIT_OBJECT_NAME_STRING)) { - GtkObject *gobj = priv->gtkDict.tqfind(TQLineEdit::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQLineEdit::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; @@ -3193,7 +3193,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { } } else if (w->inherits(TQMENUBAR_OBJECT_NAME_STRING) || w->inherits(TQTOOLBAR_OBJECT_NAME_STRING)) { - GtkObject *gobj = priv->gtkDict.tqfind(TQMenuBar::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQMenuBar::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; @@ -3266,7 +3266,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { TQWidget *w = (TQWidget *) obj; if (! w->isTopLevel() && w->isEnabled()) { - GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; @@ -3294,7 +3294,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { TQWidget *w = (TQWidget *) obj; if (! w->isTopLevel() && w->isEnabled()) { - GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject()); + GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject()); if (gobj) { KLegacyImageDataKey key; diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 6edb234e7..70d820212 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -78,7 +78,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey, { bool bOK; // find first part (red) - int nIndex = aValue.tqfind( ',' ); + int nIndex = aValue.find( ',' ); if ( nIndex == -1 ) { // return a sensible default -- Bernd @@ -91,7 +91,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey, // find second part (green) int nOldIndex = nIndex; - nIndex = aValue.tqfind( ',', nOldIndex + 1 ); + nIndex = aValue.find( ',', nOldIndex + 1 ); if ( nIndex == -1 ) { @@ -176,7 +176,7 @@ public: */ TQColor pixmapAveColor( const TQPixmap* p ) { - if ( colorCache.tqcontains( p ) ) + if ( colorCache.contains( p ) ) return colorCache[ p ]; TQImage to_ave = p->convertToImage(); @@ -565,7 +565,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) { TQStringList keys = config.entryList( configFileName ); - if ( keys.tqcontains( "foreground" ) ) + if ( keys.contains( "foreground" ) ) { d->overrideForeground = true; d->overrideForegroundCol = readColorEntry( &config, ( configFileName + "foreground" ).latin1(), 0 ); @@ -573,7 +573,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) else d->overrideForeground = false; - if ( keys.tqcontains( "background" ) ) + if ( keys.contains( "background" ) ) { d->overrideBackground = true; d->overrideBackgroundCol = readColorEntry( &config, ( configFileName + "background" ).latin1(), 0 ); @@ -583,7 +583,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) - if ( keys.tqcontains( "selectForeground" ) ) + if ( keys.contains( "selectForeground" ) ) { d->overrideSelectForeground = true; d->overrideSelectForegroundCol = readColorEntry( &config, ( configFileName + "selectForeground" ).latin1(), 0 ); @@ -591,7 +591,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) else d->overrideSelectForeground = false; - if ( keys.tqcontains( "selectBackground" ) ) + if ( keys.contains( "selectBackground" ) ) { d->overrideSelectBackground = true; d->overrideSelectBackgroundCol = readColorEntry( &config, ( configFileName + "selectBackground" ).latin1(), 0 ); @@ -599,7 +599,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) else d->overrideSelectBackground = false; - if ( keys.tqcontains( "windowBackground" ) ) + if ( keys.contains( "windowBackground" ) ) { d->overrideWindowBackground = true; d->overrideWindowBackgroundCol = readColorEntry( &config, ( configFileName + "windowBackground" ).latin1(), 0 ); @@ -608,7 +608,7 @@ void KThemeBase::applyConfigFile( TQSettings& config ) d->overrideWindowBackground = false; - if ( keys.tqcontains( "windowForeground" ) ) + if ( keys.contains( "windowForeground" ) ) { d->overrideWindowForeground = true; d->overrideWindowForegroundCol = readColorEntry( &config, ( configFileName + "windowForeground" ).latin1(), 0 ); @@ -1271,22 +1271,22 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i ) TQStringList keys = config->entryList( base ); // Gradient low color or blend background - if ( keys.tqcontains( "GradientLow" ) ) + if ( keys.contains( "GradientLow" ) ) prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(), &TQApplication::tqpalette().active().background() ).name(); // Gradient high color - if ( keys.tqcontains( "GradientHigh" ) ) + if ( keys.contains( "GradientHigh" ) ) prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(), &TQApplication::tqpalette().active().foreground() ).name(); // Extended color attributes - if ( keys.tqcontains( "Foreground" ) || keys.tqcontains( "Background" ) ) + if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) ) { TQColor fg, bg; - if ( keys.tqcontains( "Background" ) ) + if ( keys.contains( "Background" ) ) bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg ); - if ( keys.tqcontains( "Foreground" ) ) + if ( keys.contains( "Foreground" ) ) fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg ); prop[ "Foreground" ] = fg.name(); prop[ "Background" ] = bg.name(); @@ -1320,7 +1320,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i ) prop[ "Width" ] = TQString::number( config->readNumEntry( base + "Width", 10 ) ); else if ( i == ComboBox || i == ComboBoxDown ) { - if ( keys.tqcontains( "Round" ) ) + if ( keys.contains( "Round" ) ) prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) ); else prop[ "Round" ] = "5000"; // invalid, used w/multiple groups @@ -1328,25 +1328,25 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i ) } else if ( i == PushButton || i == PushButtonDown ) { - if ( keys.tqcontains( "XShift" ) ) + if ( keys.contains( "XShift" ) ) prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) ); else prop[ "XShift" ] = "5000"; - if ( keys.tqcontains( "YShift" ) ) + if ( keys.contains( "YShift" ) ) prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) ); else prop[ "YShift" ] = "5000"; - if ( keys.tqcontains( "3DFocusRect" ) ) + if ( keys.contains( "3DFocusRect" ) ) prop[ "3DFRect" ] = TQString::number( config-> readBoolEntry( base + "3DFocusRect", false ) ); else prop[ "3DFRect" ] = "5000"; - if ( keys.tqcontains( "3DFocusOffset" ) ) + if ( keys.contains( "3DFocusOffset" ) ) prop[ "3DFOffset" ] = TQString::number( config-> readBoolEntry( base + "3DFocusOffset", 0 ) ); else prop[ "3DFOffset" ] = "5000"; - if ( keys.tqcontains( "Round" ) ) + if ( keys.contains( "Round" ) ) prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) ); else prop[ "Round" ] = "5000"; @@ -1765,7 +1765,7 @@ KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border, key.data.border = border; key.data.mask = mask; - KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey ); + KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey ); if ( pix ) pix->updateAccessed(); return ( pix ); @@ -1780,7 +1780,7 @@ KThemePixmap* KThemeCache::horizontalPixmap( int w, int widgetID ) key.data.height = 0; key.data.border = false; key.data.mask = false; - KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey ); + KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey ); if ( pix ) pix->updateAccessed(); return ( pix ); @@ -1795,7 +1795,7 @@ KThemePixmap* KThemeCache::verticalPixmap( int h, int widgetID ) key.data.height = h; key.data.border = false; key.data.mask = false; - KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey ); + KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey ); if ( pix ) pix->updateAccessed(); return ( pix ); @@ -1814,7 +1814,7 @@ bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID, key.data.border = border; key.data.mask = mask; - if ( cache.tqfind( ( unsigned long ) key.cacheKey, true ) != NULL ) + if ( cache.find( ( unsigned long ) key.cacheKey, true ) != NULL ) { return ( true ); // a pixmap of this scale is already in there } diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 817d078e6..59ff2c30f 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -286,7 +286,7 @@ TQSize KThemeStyle::tqsizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().tqfind( '\t' ) >= 0 ) + if ( ! mi->text().isNull() && mi->text().find( '\t' ) >= 0 ) w += 12; else if ( mi->popup() ) w += 2 * arrowHMargin; @@ -1580,7 +1580,7 @@ void KThemeStyle::tqdrawControl( ControlElement element, // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp index 8ccc1ac96..f6007a1f0 100644 --- a/kstyles/light/lightstyle-v2.cpp +++ b/kstyles/light/lightstyle-v2.cpp @@ -890,7 +890,7 @@ void LightStyleV2::tqdrawControl( TQ_ControlElement control, TQString text = mi->text(); if (! text.isNull()) { - int t = text.tqfind('\t'); + int t = text.find('\t'); // draw accelerator/tab-text if (t >= 0) { @@ -1556,7 +1556,7 @@ TQSize LightStyleV2::tqsizeFromContents( ContentsType contents, maxpmw = QMAX(maxpmw, 16); w += (maxpmw * 2) + 8; - if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0) + if (! mi->text().isNull() && mi->text().find('\t') >= 0) w += 8; ret = TQSize(w, h); diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp index 3401b66d7..9af257bf1 100644 --- a/kstyles/light/lightstyle-v3.cpp +++ b/kstyles/light/lightstyle-v3.cpp @@ -1010,7 +1010,7 @@ void LightStyleV3::tqdrawControl( TQ_ControlElement control, TQString text = mi->text(); if (! text.isNull()) { - int t = text.tqfind('\t'); + int t = text.find('\t'); // draw accelerator/tab-text if (t >= 0) { @@ -1783,7 +1783,7 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, maxpmw = QMAX(maxpmw, 16); w += (maxpmw * 2) + 8; - if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0) + if (! mi->text().isNull() && mi->text().find('\t') >= 0) w += 8; ret = TQSize(w, h); diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp index 3779bfd9b..4cc2a0fbc 100644 --- a/kstyles/plastik/plastik.cpp +++ b/kstyles/plastik/plastik.cpp @@ -662,7 +662,7 @@ void PlastikStyle::renderPixel(TQPainter *p, int key = search.key(); CacheEntry *cacheEntry; - if( (cacheEntry = pixmapCache->tqfind(key)) ) { + if( (cacheEntry = pixmapCache->find(key)) ) { if( search == *cacheEntry ) { // match! we can draw now... if(cacheEntry->pixmap) p->drawPixmap(pos, *(cacheEntry->pixmap) ); @@ -798,7 +798,7 @@ void PlastikStyle::renderGradient(TQPainter *painter, int key = search.key(); CacheEntry *cacheEntry; - if( (cacheEntry = pixmapCache->tqfind(key)) ) { + if( (cacheEntry = pixmapCache->find(key)) ) { if( search == *cacheEntry ) { // match! we can draw now... if(cacheEntry->pixmap) { painter->drawTiledPixmap(rect, *(cacheEntry->pixmap) ); @@ -1515,7 +1515,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, case PE_ButtonTool: case PE_ButtonDropDown: case PE_ButtonCommand: { - bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.tqcontains(opt.widget()); + bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.contains(opt.widget()); renderButton(p, r, cg, (on||down), mouseOver, true, enabled, khtmlMode ); break; } @@ -2265,7 +2265,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, } else { // find the animation Offset for the current Widget TQWidget* nonConstWidget = const_cast<TQWidget*>(widget); - TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.tqfind(nonConstWidget); + TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.find(nonConstWidget); if (iter != progAnimWidgets.end()) animShift = iter.data(); } @@ -2605,7 +2605,7 @@ void PlastikStyle::tqdrawControl(TQ_ControlElement element, TQString s = mi->text(); // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.tqfind( '\t' ); + int t = s.find( '\t' ); int m = 2; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -2785,7 +2785,7 @@ void PlastikStyle::tqdrawComplexControl(TQ_ComplexControl control, :cg.background(); uint contourFlags = 0; - if( khtmlWidgets.tqcontains(cb) ) + if( khtmlWidgets.contains(cb) ) contourFlags |= Draw_AlphaBlend; if (_inputFocusHighlight && hasFocus && editable && enabled) @@ -3386,7 +3386,7 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t, } } - if (!mi->text().isNull() && (mi->text().tqfind('\t') >= 0)) { + if (!mi->text().isNull() && (mi->text().find('\t') >= 0)) { w += itemHMargin + itemFrame*2 + 7; } else if (mi->popup()) { w += 2 * arrowHMargin; diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp index 10945d57f..5ddf8cd56 100644 --- a/kstyles/utils/installtheme/main.cpp +++ b/kstyles/utils/installtheme/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char **argv) if (config.readEntry( "widgetStyle" ) == "basicstyle.la") { //OK, emit a style entry... - if (!themes.tqcontains(name)) //Only add first occurrence, i.e. user local one. + if (!themes.contains(name)) //Only add first occurrence, i.e. user local one. themes[name] = file; } } diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index 08474c701..f1416526e 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -1603,7 +1603,7 @@ WebStyle::drawKickerTaskButton static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"); - int modStrPos = s.tqfind(modStr); + int modStrPos = s.find(modStr); if (-1 != modStrPos) { diff --git a/kunittest/runner.cpp b/kunittest/runner.cpp index ebf74e213..972a34276 100644 --- a/kunittest/runner.cpp +++ b/kunittest/runner.cpp @@ -203,7 +203,7 @@ namespace KUnitTest void Runner::runTest(const char *name) { - Tester *test = m_registry.tqfind(name); + Tester *test = m_registry.find(name); if ( test == 0L ) return; if ( s_debugCapturingEnabled ) diff --git a/kunittest/tester.cpp b/kunittest/tester.cpp index 0ad956ba0..ea8159421 100644 --- a/kunittest/tester.cpp +++ b/kunittest/tester.cpp @@ -50,7 +50,7 @@ namespace KUnitTest { TQStrList allSlots = tqmetaObject()->slotNames(); - if ( allSlots.tqcontains("setUp()") > 0 ) invokeMember("setUp()"); + if ( allSlots.contains("setUp()") > 0 ) invokeMember("setUp()"); for ( char *sl = allSlots.first(); sl; sl = allSlots.next() ) { @@ -67,14 +67,14 @@ namespace KUnitTest } } - if ( allSlots.tqcontains("tearDown()") > 0 ) invokeMember("tearDown()"); + if ( allSlots.contains("tearDown()") > 0 ) invokeMember("tearDown()"); m_total->clear(); } TestResults *SlotTester::results(const char *sl) { - if ( m_resultsList.tqfind(sl) == 0L ) m_resultsList.insert(sl, new TestResults()); + if ( m_resultsList.find(sl) == 0L ) m_resultsList.insert(sl, new TestResults()); return m_resultsList[sl]; } diff --git a/kutils/kcmoduleproxy.cpp b/kutils/kcmoduleproxy.cpp index f4b4a9655..9ce81f700 100644 --- a/kutils/kcmoduleproxy.cpp +++ b/kutils/kcmoduleproxy.cpp @@ -347,7 +347,7 @@ void KCModuleProxy::runAsRoot() /* Remove all kdesu switches */ while( cmd.length() > 1 && cmd[ 0 ] == '-' ) - cmd = TQString(cmd.remove( 0, cmd.tqfind( ' ' ) )).stripWhiteSpace(); + cmd = TQString(cmd.remove( 0, cmd.find( ' ' ) )).stripWhiteSpace(); } if (cmd.left(8) == "kcmshell") diff --git a/kutils/kcmultidialog.cpp b/kutils/kcmultidialog.cpp index d9ea63d9e..768f787fe 100644 --- a/kutils/kcmultidialog.cpp +++ b/kutils/kcmultidialog.cpp @@ -148,7 +148,7 @@ void KCMultiDialog::apply() TQStringList * names = moduleParentComponents[ m ]; kdDebug(710) << k_funcinfo << *names << " saved and added to the list" << endl; for( TQStringList::ConstIterator it = names->begin(); it != names->end(); ++it ) - if( updatedModules.tqfind( *it ) == updatedModules.end() ) + if( updatedModules.find( *it ) == updatedModules.end() ) updatedModules.append( *it ); } } @@ -275,7 +275,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, return; } KCModuleProxy * module; - if( m_orphanModules.tqcontains( moduleinfo.service() ) ) + if( m_orphanModules.contains( moduleinfo.service() ) ) { // the KCModule already exists - it was removed from the dialog in // removeAllModules diff --git a/kutils/kfind.cpp b/kutils/kfind.cpp index 0bd5aa892..7b2da6899 100644 --- a/kutils/kfind.cpp +++ b/kutils/kfind.cpp @@ -368,7 +368,7 @@ KFind::Result KFind::find() delete d->emptyMatch; d->emptyMatch = new Private::Match( d->currentId, m_index, m_matchedLength ); } else - d->incrementalPath.tqreplace(m_pattern, new Private::Match(d->currentId, m_index, m_matchedLength)); + d->incrementalPath.replace(m_pattern, new Private::Match(d->currentId, m_index, m_matchedLength)); if ( m_pattern.length() < d->matchedPattern.length() ) { @@ -471,7 +471,7 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o while (index >= 0) { // ...find the next match. - index = text.tqfindRev(pattern, index, caseSensitive); + index = text.findRev(pattern, index, caseSensitive); if (index == -1) break; @@ -488,7 +488,7 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o while (index < (int)text.length()) { // ...find the next match. - index = text.tqfind(pattern, index, caseSensitive); + index = text.find(pattern, index, caseSensitive); if (index == -1) break; @@ -507,11 +507,11 @@ int KFind::find(const TQString &text, const TQString &pattern, int index, long o // Non-whole-word search. if (options & KFindDialog::FindBackwards) { - index = text.tqfindRev(pattern, index, caseSensitive); + index = text.findRev(pattern, index, caseSensitive); } else { - index = text.tqfind(pattern, index, caseSensitive); + index = text.find(pattern, index, caseSensitive); } if (index != -1) { @@ -532,7 +532,7 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o while (index >= 0) { // ...find the next match. - index = text.tqfindRev(pattern, index); + index = text.findRev(pattern, index); if (index == -1) break; @@ -551,7 +551,7 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o while (index < (int)text.length()) { // ...find the next match. - index = text.tqfind(pattern, index); + index = text.find(pattern, index); if (index == -1) break; @@ -572,11 +572,11 @@ int KFind::find(const TQString &text, const TQRegExp &pattern, int index, long o // Non-whole-word search. if (options & KFindDialog::FindBackwards) { - index = text.tqfindRev(pattern, index); + index = text.findRev(pattern, index); } else { - index = text.tqfind(pattern, index); + index = text.find(pattern, index); } if (index != -1) { diff --git a/kutils/kpluginselector.cpp b/kutils/kpluginselector.cpp index 505e165a5..fcd6dcae7 100644 --- a/kutils/kpluginselector.cpp +++ b/kutils/kpluginselector.cpp @@ -332,7 +332,7 @@ void KPluginSelectionWidget::updateConfigPage( KPluginInfo * plugininfo, d->kps->configPage( 1 ); else { - if( !d->widgetIDs.tqcontains( plugininfo->pluginName() ) ) + if( !d->widgetIDs.contains( plugininfo->pluginName() ) ) // if no widget exists for the plugin create it embeddPluginKCMs( plugininfo, checked ); else @@ -464,7 +464,7 @@ void KPluginSelectionWidget::save() names->append( TQString::null ); for( TQStringList::ConstIterator nameit = names->begin(); nameit != names->end(); ++nameit ) - if( updatedModules.tqfind( *nameit ) == updatedModules.end() ) + if( updatedModules.find( *nameit ) == updatedModules.end() ) updatedModules.append( *nameit ); } for( TQStringList::ConstIterator it = updatedModules.begin(); it != updatedModules.end(); ++it ) diff --git a/kutils/ksettings/dialog.cpp b/kutils/ksettings/dialog.cpp index aedfee9d4..3ec83aeee 100644 --- a/kutils/ksettings/dialog.cpp +++ b/kutils/ksettings/dialog.cpp @@ -484,12 +484,12 @@ bool Dialog::isPluginForKCMEnabled( KCModuleInfo * moduleinfo ) const pcit != parentComponents.end(); ++pcit ) { // if the parentComponent is not registered ignore it - if( d->registeredComponents.tqfind( *pcit ) == + if( d->registeredComponents.find( *pcit ) == d->registeredComponents.end() ) continue; // we check if the parent component is a plugin - if( ! d->plugininfomap.tqcontains( *pcit ) ) + if( ! d->plugininfomap.contains( *pcit ) ) { // if not the KCModule must be enabled enabled = true; diff --git a/kutils/ksettings/dispatcher.cpp b/kutils/ksettings/dispatcher.cpp index b3a92f600..7f20c1bc3 100644 --- a/kutils/ksettings/dispatcher.cpp +++ b/kutils/ksettings/dispatcher.cpp @@ -67,7 +67,7 @@ void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const kdDebug( 701 ) << k_funcinfo << instanceName << endl; m_instanceName[ recv ] = instanceName; TQSignal * sig; - if( m_instanceInfo.tqcontains( instanceName ) ) + if( m_instanceInfo.contains( instanceName ) ) { sig = m_instanceInfo[ instanceName ].signal; } @@ -86,7 +86,7 @@ void Dispatcher::registerInstance( KInstance * instance, TQObject * recv, const KConfig * Dispatcher::configForInstanceName( const TQCString & instanceName ) { kdDebug( 701 ) << k_funcinfo << endl; - if( m_instanceInfo.tqcontains( instanceName ) ) + if( m_instanceInfo.contains( instanceName ) ) { KInstance * inst = m_instanceInfo[ instanceName ].instance; if( inst ) @@ -111,7 +111,7 @@ void Dispatcher::reparseConfiguration( const TQCString & instanceName ) { kdDebug( 701 ) << k_funcinfo << instanceName << endl; // check if the instanceName is valid: - if( ! m_instanceInfo.tqcontains( instanceName ) ) + if( ! m_instanceInfo.contains( instanceName ) ) return; // first we reparse the config of the instance so that the KConfig object // will be up to date diff --git a/kwallet/backend/kwalletbackend.cc b/kwallet/backend/kwalletbackend.cc index 571032e8f..bf67ba854 100644 --- a/kwallet/backend/kwalletbackend.cc +++ b/kwallet/backend/kwalletbackend.cc @@ -693,7 +693,7 @@ TQPtrList<Entry> Backend::readEntryList(const TQString& key) { bool Backend::createFolder(const TQString& f) { - if (_entries.tqcontains(f)) { + if (_entries.contains(f)) { return false; } @@ -709,8 +709,8 @@ return true; int Backend::renameEntry(const TQString& oldName, const TQString& newName) { EntryMap& emap = _entries[_folder]; -EntryMap::Iterator oi = emap.tqfind(oldName); -EntryMap::Iterator ni = emap.tqfind(newName); +EntryMap::Iterator oi = emap.find(oldName); +EntryMap::Iterator ni = emap.find(newName); if (oi != emap.end() && ni == emap.end()) { Entry *e = oi.data(); @@ -720,7 +720,7 @@ EntryMap::Iterator ni = emap.tqfind(newName); KMD5 folderMd5; folderMd5.update(_folder.utf8()); - HashMap::iterator i = _hashes.tqfind(MD5Digest(folderMd5.rawDigest())); + HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.rawDigest())); if (i != _hashes.end()) { KMD5 oldMd5, newMd5; oldMd5.update(oldName.utf8()); @@ -747,7 +747,7 @@ void Backend::writeEntry(Entry *e) { KMD5 folderMd5; folderMd5.update(_folder.utf8()); - HashMap::iterator i = _hashes.tqfind(MD5Digest(folderMd5.rawDigest())); + HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.rawDigest())); if (i != _hashes.end()) { KMD5 md5; md5.update(e->key().utf8()); @@ -757,7 +757,7 @@ void Backend::writeEntry(Entry *e) { bool Backend::hasEntry(const TQString& key) const { - return _entries.tqcontains(_folder) && _entries[_folder].tqcontains(key); + return _entries.contains(_folder) && _entries[_folder].contains(key); } @@ -766,8 +766,8 @@ bool Backend::removeEntry(const TQString& key) { return false; } - FolderMap::Iterator fi = _entries.tqfind(_folder); - EntryMap::Iterator ei = fi.data().tqfind(key); + FolderMap::Iterator fi = _entries.find(_folder); + EntryMap::Iterator ei = fi.data().find(key); if (fi != _entries.end() && ei != fi.data().end()) { delete ei.data(); @@ -775,7 +775,7 @@ bool Backend::removeEntry(const TQString& key) { KMD5 folderMd5; folderMd5.update(_folder.utf8()); - HashMap::iterator i = _hashes.tqfind(MD5Digest(folderMd5.rawDigest())); + HashMap::iterator i = _hashes.find(MD5Digest(folderMd5.rawDigest())); if (i != _hashes.end()) { KMD5 md5; md5.update(key.utf8()); @@ -793,7 +793,7 @@ bool Backend::removeFolder(const TQString& f) { return false; } - FolderMap::Iterator fi = _entries.tqfind(f); + FolderMap::Iterator fi = _entries.find(f); if (fi != _entries.end()) { if (_folder == f) { @@ -819,18 +819,18 @@ return false; bool Backend::folderDoesNotExist(const TQString& folder) const { KMD5 md5; md5.update(folder.utf8()); - return !_hashes.tqcontains(MD5Digest(md5.rawDigest())); + return !_hashes.contains(MD5Digest(md5.rawDigest())); } bool Backend::entryDoesNotExist(const TQString& folder, const TQString& entry) const { KMD5 md5; md5.update(folder.utf8()); - HashMap::const_iterator i = _hashes.tqfind(MD5Digest(md5.rawDigest())); + HashMap::const_iterator i = _hashes.find(MD5Digest(md5.rawDigest())); if (i != _hashes.end()) { md5.reset(); md5.update(entry.utf8()); - return !i.data().tqcontains(MD5Digest(md5.rawDigest())); + return !i.data().contains(MD5Digest(md5.rawDigest())); } return true; } diff --git a/kwallet/backend/kwalletbackend.h b/kwallet/backend/kwalletbackend.h index 6592c23bd..59df303d6 100644 --- a/kwallet/backend/kwalletbackend.h +++ b/kwallet/backend/kwalletbackend.h @@ -72,7 +72,7 @@ class KDE_EXPORT Backend { const TQString& folder() const { return _folder; } // Does it have this folder? - bool hasFolder(const TQString& f) const { return _entries.tqcontains(f); } + bool hasFolder(const TQString& f) const { return _entries.contains(f); } // Look up an entry. Returns null if it doesn't exist. Entry *readEntry(const TQString& key); diff --git a/libkmid/deviceman.cc b/libkmid/deviceman.cc index 07a0af9b2..c8030f44e 100644 --- a/libkmid/deviceman.cc +++ b/libkmid/deviceman.cc @@ -119,7 +119,7 @@ DeviceManager::DeviceManager(int def) TQString mapurl(config->readPathEntry("mapFilename")); if ((config->readBoolEntry("useMidiMapper", false))&&(!mapurl.isEmpty())) { - mapper_tmp = new MidiMapper( mapurl.mid(mapurl.tqfind(":")+1 ).local8Bit() ); + mapper_tmp = new MidiMapper( mapurl.mid(mapurl.find(":")+1 ).local8Bit() ); } else mapper_tmp = 0L; diff --git a/networkstatus/networkstatus.cpp b/networkstatus/networkstatus.cpp index 8e73e4e68..21e34d978 100644 --- a/networkstatus/networkstatus.cpp +++ b/networkstatus/networkstatus.cpp @@ -279,7 +279,7 @@ void NetworkStatusModule::setNetworkStatus( const TQString & networkName, int st for ( NetworkUsageList::iterator it = usage.begin(); it != end; ++it ) { // only notify once per host - if ( !notified.tqcontains( (*it).host ) ) + if ( !notified.contains( (*it).host ) ) { kdDebug() << "notifying statusChange of " << networkName << " to " << (int)status << " because " << (*it).appId << " is using " << (*it).host << endl; diff --git a/win/win32_utils2.cpp b/win/win32_utils2.cpp index 24630667a..2e46d2acb 100644 --- a/win/win32_utils2.cpp +++ b/win/win32_utils2.cpp @@ -98,7 +98,7 @@ TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter) // escaped '/' characters. TQString copy (kde_filters); - for (pos = 0; (pos = copy.tqfind("\\/", pos)) != -1; ++pos) + for (pos = 0; (pos = copy.find("\\/", pos)) != -1; ++pos) copy.remove(pos, 1); //<js> @@ -112,7 +112,7 @@ TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter) current = *it; TQString new_f;//filter part TQString new_name;//filter name part - int p = (*it).tqfind('|'); + int p = (*it).find('|'); if (p!=-1) { new_f = current.left(p); new_name = current.mid(p+1); @@ -122,7 +122,7 @@ TQString convertKFileDialogFilterToQFileDialogFilter(const TQString& filter) new_name = current; //nothing better } //remove (.....) from name - p=new_name.tqfind('('); + p=new_name.find('('); int p2 = new_name.findRev(')'); TQString new_name1, new_name2; if (p!=-1) |