Browse Source

rename the following methods:

tqfind find
tqreplace replace
tqcontains contains


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
6e21bc798b
100 changed files with 552 additions and 552 deletions
  1. 1
    1
      arts/kde/kplayobjectfactory.cc
  2. 4
    4
      arts/knotify/knotify.cpp
  3. 15
    15
      dcop/client/dcop.cpp
  4. 4
    4
      dcop/client/dcopfind.cpp
  5. 3
    3
      dcop/client/marshall.cpp
  6. 9
    9
      dcop/dcopclient.cpp
  7. 2
    2
      dcop/dcopidl/scanner.cc
  8. 1
    1
      dcop/dcopidl/yacc.cc
  9. 1
    1
      dcop/dcopidl/yacc.yy
  10. 3
    3
      dcop/dcopidl2cpp/main.cpp
  11. 2
    2
      dcop/dcopidl2cpp/skel.cpp
  12. 5
    5
      dcop/dcopidl2cpp/stub.cpp
  13. 1
    1
      dcop/dcopidl2cpp/stubimpl.cpp
  14. 1
    1
      dcop/dcopobject.cpp
  15. 4
    4
      dcop/dcopref.cpp
  16. 17
    17
      dcop/dcopserver.cpp
  17. 1
    1
      dcop/dcopserver.h
  18. 9
    9
      dcop/dcopsignals.cpp
  19. 1
    1
      dnssd/domainbrowser.cpp
  20. 2
    2
      dnssd/servicebase.cpp
  21. 5
    5
      interfaces/kimproxy/library/kimproxy.cpp
  22. 1
    1
      interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp
  23. 1
    1
      interfaces/ktexteditor/editorchooser.cpp
  24. 1
    1
      interfaces/ktexteditor/templateinterface.cpp
  25. 5
    5
      kab/qconfigDB.cc
  26. 8
    8
      kabc/address.cpp
  27. 2
    2
      kabc/addresseedialog.cpp
  28. 16
    16
      kabc/addresslineedit.cpp
  29. 1
    1
      kabc/distributionlist.cpp
  30. 5
    5
      kabc/kab2kabc.cpp
  31. 3
    3
      kabc/ldapclient.cpp
  32. 2
    2
      kabc/ldapurl.cpp
  33. 1
    1
      kabc/ldif.cpp
  34. 4
    4
      kabc/ldifconverter.cpp
  35. 1
    1
      kabc/plugins/dir/resourcedirconfig.cpp
  36. 1
    1
      kabc/plugins/file/resourcefileconfig.cpp
  37. 21
    21
      kabc/plugins/ldapkio/resourceldapkio.cpp
  38. 1
    1
      kabc/plugins/ldapkio/resourceldapkioconfig.cpp
  39. 1
    1
      kabc/plugins/net/resourcenetconfig.cpp
  40. 2
    2
      kabc/plugins/sql/resourcesql.cpp
  41. 1
    1
      kabc/resource.cpp
  42. 10
    10
      kabc/scripts/addressee.src.cpp
  43. 1
    1
      kabc/vcard/AdrParam.cpp
  44. 6
    6
      kabc/vcard/ContentLine.cpp
  45. 5
    5
      kabc/vcard/DateValue.cpp
  46. 1
    1
      kabc/vcard/GeoValue.cpp
  47. 1
    1
      kabc/vcard/SourceParam.cpp
  48. 1
    1
      kabc/vcard/URIValue.cpp
  49. 1
    1
      kabc/vcard/UTCValue.cpp
  50. 4
    4
      kabc/vcard/VCard.cpp
  51. 2
    2
      kabc/vcard/VCardEntity.cpp
  52. 52
    52
      kabc/vcard21parser.cpp
  53. 3
    3
      kabc/vcardformatimpl.cpp
  54. 3
    3
      kabc/vcardparser/vcard.cpp
  55. 3
    3
      kabc/vcardparser/vcardline.cpp
  56. 5
    5
      kabc/vcardparser/vcardparser.cpp
  57. 19
    19
      kabc/vcardtool.cpp
  58. 2
    2
      kate/part/katearbitraryhighlight.cpp
  59. 30
    30
      kate/part/kateautoindent.cpp
  60. 1
    1
      kate/part/katebookmarks.cpp
  61. 3
    3
      kate/part/katecmds.cpp
  62. 1
    1
      kate/part/katecodefoldinghelpers.h
  63. 2
    2
      kate/part/katedialogs.cpp
  64. 15
    15
      kate/part/katedocument.cpp
  65. 7
    7
      kate/part/katefiletype.cpp
  66. 24
    24
      kate/part/katehighlight.cpp
  67. 1
    1
      kate/part/katehighlight.h
  68. 2
    2
      kate/part/kateprinter.cpp
  69. 9
    9
      kate/part/kateschema.cpp
  70. 4
    4
      kate/part/katesearch.cpp
  71. 1
    1
      kate/part/katespell.cpp
  72. 1
    1
      kate/part/katesupercursor.cpp
  73. 2
    2
      kate/part/katetextline.cpp
  74. 1
    1
      kate/part/kateview.cpp
  75. 1
    1
      kate/part/test_regression.cpp
  76. 2
    2
      kate/plugins/kdatatool/kate_kdatatool.cpp
  77. 1
    1
      kcert/kcertpart.cc
  78. 18
    18
      kconf_update/kconf_update.cpp
  79. 3
    3
      kdecore/kaccel.cpp
  80. 8
    8
      kdecore/kaccelbase.cpp
  81. 15
    15
      kdecore/kaccelmanager.cpp
  82. 13
    13
      kdecore/kapplication.cpp
  83. 7
    7
      kdecore/kcharsets.cpp
  84. 2
    2
      kdecore/kclipboard.cpp
  85. 6
    6
      kdecore/kcmdlineargs.cpp
  86. 2
    2
      kdecore/kcompletion.cpp
  87. 1
    1
      kdecore/kcompletionbase.cpp
  88. 5
    5
      kdecore/kconfig.cpp
  89. 11
    11
      kdecore/kconfig_compiler/kconfig_compiler.cpp
  90. 2
    2
      kdecore/kconfigbackend.cpp
  91. 10
    10
      kdecore/kconfigbase.cpp
  92. 6
    6
      kdecore/kconfigdialogmanager.cpp
  93. 1
    1
      kdecore/kconfigskeleton.cpp
  94. 3
    3
      kdecore/kdcoppropertyproxy.cpp
  95. 24
    24
      kdecore/kde-config.cpp.cmake
  96. 12
    12
      kdecore/kde-config.cpp.in
  97. 2
    2
      kdecore/kdebug.cpp
  98. 3
    3
      kdecore/kdesktopfile.cpp
  99. 2
    2
      kdecore/kglobal.cpp
  100. 0
    0
      kdecore/kglobalaccel_x11.cpp

+ 1
- 1
arts/kde/kplayobjectfactory.cc View File

@@ -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 );

+ 4
- 4
arts/knotify/knotify.cpp View File

@@ -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 );

+ 15
- 15
dcop/client/dcop.cpp View File

@@ -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);

+ 4
- 4
dcop/client/dcopfind.cpp View File

@@ -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++;
}

+ 3
- 3
dcop/client/marshall.cpp View File

@@ -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 );

+ 9
- 9
dcop/dcopclient.cpp View File

@@ -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 ];

+ 2
- 2
dcop/dcopidl/scanner.cc View File

@@ -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;

+ 1
- 1
dcop/dcopidl/yacc.cc View File

@@ -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

+ 1
- 1
dcop/dcopidl/yacc.yy View File

@@ -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

+ 3
- 3
dcop/dcopidl2cpp/main.cpp View File

@@ -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);

+ 2
- 2
dcop/dcopidl2cpp/skel.cpp View File

@@ -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();

+ 5
- 5
dcop/dcopidl2cpp/stub.cpp View File

@@ -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;

+ 1
- 1
dcop/dcopidl2cpp/stubimpl.cpp View File

@@ -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;

+ 1
- 1
dcop/dcopobject.cpp View File

@@ -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;

+ 4
- 4
dcop/dcopref.cpp View File

@@ -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 );

+ 17
- 17
dcop/dcopserver.cpp View File

@@ -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();

+ 1
- 1
dcop/dcopserver.h View File

@@ -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,

+ 9
- 9
dcop/dcopsignals.cpp View File

@@ -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);

+ 1
- 1
dnssd/domainbrowser.cpp View File

@@ -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);
}

+ 2
- 2
dnssd/servicebase.cpp View File

@@ -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="";

+ 5
- 5
interfaces/kimproxy/library/kimproxy.cpp View File

@@ -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;

+ 1
- 1
interfaces/kmediaplayer/kfileaudiopreview/kfileaudiopreview.cpp View File

@@ -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;

+ 1
- 1
interfaces/ktexteditor/editorchooser.cpp View File

@@ -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);
}

+ 1
- 1
interfaces/ktexteditor/templateinterface.cpp View File

@@ -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();

+ 5
- 5
kab/qconfigDB.cc View File

@@ -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)

+ 8
- 8
kabc/address.cpp View File

@@ -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() );
}

+ 2
- 2
kabc/addresseedialog.cpp View File

@@ -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 );

+ 16
- 16
kabc/addresslineedit.cpp View File

@@ -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;

+ 1
- 1
kabc/distributionlist.cpp View File

@@ -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 ) {

+ 5
- 5
kabc/kab2kabc.cpp View File

@@ -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 );

+ 3
- 3
kabc/ldapclient.cpp View File

@@ -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 );

+ 2
- 2
kabc/ldapurl.cpp View File

@@ -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 {

+ 1
- 1
kabc/ldif.cpp View File

@@ -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 = "";

+ 4
- 4
kabc/ldifconverter.cpp View File

@@ -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, ':');
}

+ 1
- 1
kabc/plugins/dir/resourcedirconfig.cpp View File

@@ -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() )

+ 1
- 1
kabc/plugins/file/resourcefileconfig.cpp View File

@@ -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() )

+ 21
- 21
kabc/plugins/ldapkio/resourceldapkio.cpp View File

@@ -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();

+ 1
- 1
kabc/plugins/ldapkio/resourceldapkioconfig.cpp View File

@@ -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;

+ 1
- 1
kabc/plugins/net/resourcenetconfig.cpp View File

@@ -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() );
}

+ 2
- 2
kabc/plugins/sql/resourcesql.cpp View File

@@ -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 );

+ 1
- 1
kabc/resource.cpp View File

@@ -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();

+ 10
- 10
kabc/scripts/addressee.src.cpp View File

@@ -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;

+ 1
- 1
kabc/vcard/AdrParam.cpp View File

@@ -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;

+ 6
- 6
kabc/vcard/ContentLine.cpp View File

@@ -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;

+ 5
- 5
kabc/vcard/DateValue.cpp View File

@@ -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();

+ 1
- 1
kabc/vcard/GeoValue.cpp View File

@@ -84,7 +84,7 @@ GeoValue::clone()
void
GeoValue::_parse()
{
int semiColon = strRep_.tqfind( ";" );
int semiColon = strRep_.find( ";" );

if ( semiColon == -1 ) // invalid
return;

+ 1
- 1
kabc/vcard/SourceParam.cpp View File

@@ -80,7 +80,7 @@ SourceParam::~SourceParam()
void
SourceParam::_parse()
{
int i = strRep_.tqfind('=');
int i = strRep_.find('=');
if (i == -1) // Invalid
return;

+ 1
- 1
kabc/vcard/URIValue.cpp View File

@@ -89,7 +89,7 @@ URIValue::~URIValue()
void
URIValue::_parse()
{
int split = strRep_.tqfind(':');
int split = strRep_.find(':');
if (split == -1)
return;

+ 1
- 1
kabc/vcard/UTCValue.cpp View File

@@ -93,7 +93,7 @@ UTCValue::_parse()

positive_ = ( strRep_[0] == '+' );
int colon = strRep_.tqfind( ':' );
int colon = strRep_.find( ':' );
if ( colon == -1 ) // Not valid.
return;

+ 4
- 4
kabc/vcard/VCard.cpp View File

@@ -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);

+ 2
- 2
kabc/vcard/VCardEntity.cpp View File

@@ -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));

+ 52
- 52
kabc/vcard21parser.cpp View File

@@ -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.

+ 3
- 3
kabc/vcardformatimpl.cpp View File

@@ -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() ) );

+ 3
- 3
kabc/vcardparser/vcard.cpp View File

@@ -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;


+ 3
- 3
kabc/vcardparser/vcardline.cpp View File

@@ -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 {

+ 5
- 5
kabc/vcardparser/vcardparser.cpp View File

@@ -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 ) {

+ 19
- 19
kabc/vcardtool.cpp View File

@@ -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( "-" );