[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdelibs/kabc
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2003-09-11 9:45:09
[Download RAW message or body]

CVS commit by tokoe: 

further contains() => find() replacements


  M +1 -1      address.cpp   1.24
  M +4 -4      addresslineedit.cpp   1.17
  M +1 -1      ldifconverter.cpp   1.8


--- kdelibs/kabc/address.cpp  #1.23:1.24
@@ -433,5 +433,5 @@ bool Address::parseAddressTemplateSectio
   // It substitutes !_P_! for empty fields so conditional tags work later
 #define REPLTAG(R_TAG,R_FIELD) \
-  if ( result.contains(R_TAG, false) ) { \
+  if ( result.find(R_TAG, false) != -1 ) { \
     QString rpl = R_FIELD.isEmpty() ? QString("!_P_!") : R_FIELD; \
     result.replace( R_TAG, rpl ); \

--- kdelibs/kabc/addresslineedit.cpp  #1.16:1.17
@@ -224,5 +224,5 @@ void AddressLineEdit::insert(const QStri
     if ( newText.startsWith( "mailto:" ) )
         newText.remove( 0, 7 );
-    else if (newText.contains(" at "))
+    else if (newText.find(" at ") != -1)
     {
        // Anti-spam stuff
@@ -230,5 +230,5 @@ void AddressLineEdit::insert(const QStri
        newText.replace( " dot ", "." );
     }
-    else if (newText.contains("(at)"))
+    else if (newText.find("(at)") != -1)
     {
       newText.replace( QRegExp("\\s*\\(at\\)\\s*"), "@" );
@@ -345,5 +345,5 @@ void AddressLineEdit::doCompletion(bool 
             uint beforeDollarCompletionCount = items.count();
 
-            if( !s.contains( ' ' )) // one word, possibly given name
+            if( s.find( ' ' ) == -1 ) // one word, possibly given name
                 items += s_completion->allMatches( "$$" + s );
 

--- kdelibs/kabc/ldifconverter.cpp  #1.7:1.8
@@ -386,5 +386,5 @@ bool LDIFConverter::evaluatePair( Addres
   if ( fieldname == QString::fromLatin1( "mail" ) ||
        fieldname == QString::fromLatin1( "mozillasecondemail" ) ) { // mozilla
-    if (!a.emails().contains(value))
+    if ( a.emails().find( value ) == a.emails().end() )
       a.insertEmail( value );
     return true;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic