diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kabc/vcardparser | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc/vcardparser')
-rw-r--r-- | kabc/vcardparser/README.testing | 2 | ||||
-rw-r--r-- | kabc/vcardparser/testwrite.cpp | 2 | ||||
-rw-r--r-- | kabc/vcardparser/vcard.cpp | 6 | ||||
-rw-r--r-- | kabc/vcardparser/vcardline.cpp | 6 | ||||
-rw-r--r-- | kabc/vcardparser/vcardparser.cpp | 30 |
5 files changed, 23 insertions, 23 deletions
diff --git a/kabc/vcardparser/README.testing b/kabc/vcardparser/README.testing index a7794931d..e412416ba 100644 --- a/kabc/vcardparser/README.testing +++ b/kabc/vcardparser/README.testing @@ -1,5 +1,5 @@ For testing the vcardparser there are some test files and a small testsuite -automatically checking for regressions. The tests directory contains some vCard +automatically checking for regressions. The tests directory tqcontains some vCard files and correpsonding reference output files (with an additional ".ref" suffix). For running the geression test do "make check". This will compile some test programs, parse the test files, write them out as vCard again and compare diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp index f6e894f4b..f24f1ad25 100644 --- a/kabc/vcardparser/testwrite.cpp +++ b/kabc/vcardparser/testwrite.cpp @@ -60,7 +60,7 @@ int main( int argc, char **argv ) addressee.setOrganization( "KDE" ); addressee.setNote( "nerver\ntouch a running system" ); addressee.setProductId( "testId" ); - addressee.setRevision( TQDateTime::currentDateTime() ); + addressee.setRevision( TQDateTime::tqcurrentDateTime() ); addressee.setSortString( "koenig" ); addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); diff --git a/kabc/vcardparser/vcard.cpp b/kabc/vcardparser/vcard.cpp index 30a8e1c49..8b6c9570a 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.find( identifier ); + LineMap::ConstIterator it = mLineMap.tqfind( 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.find( identifier ); + LineMap::ConstIterator it = mLineMap.tqfind( 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.find( "VERSION" ); + LineMap::ConstIterator versionEntry = mLineMap.tqfind( "VERSION" ); if ( versionEntry == mLineMap.end() ) return v3_0; diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp index 6680cf7d0..50e9fa53e 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.findIndex( value ) == -1 ) // not included yet + if ( list.tqfindIndex( value ) == -1 ) // not included yet list.append( value ); } TQStringList VCardLine::parameters( const TQString& param ) const { - ParamMap::ConstIterator it = mParamMap.find( param ); + ParamMap::ConstIterator it = mParamMap.tqfind( 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.find( param ); + ParamMap::ConstIterator it = mParamMap.tqfind( param ); if ( it == mParamMap.end() ) return TQString::null; else { diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 67b1bc306..a0e2061a4 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -36,18 +36,18 @@ static TQString cr( "\\r" ); static void addEscapes( TQString &str ) { - str.replace( '\\', backslash ); - str.replace( ',', comma ); - str.replace( '\r', cr ); - str.replace( '\n', newline ); + str.tqreplace( '\\', backslash ); + str.tqreplace( ',', comma ); + str.tqreplace( '\r', cr ); + str.tqreplace( '\n', newline ); } static void removeEscapes( TQString &str ) { - str.replace( cr, "\\r" ); - str.replace( newline, "\n" ); - str.replace( comma, "," ); - str.replace( backslash, "\\" ); + str.tqreplace( cr, "\\r" ); + str.tqreplace( newline, "\n" ); + str.tqreplace( comma, "," ); + str.tqreplace( backslash, "\\" ); } VCardParser::VCardParser() @@ -81,7 +81,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) continue; } else { if ( inVCard && !currentLine.isEmpty() ) { // now parse the line - int colon = currentLine.find( ':' ); + int colon = currentLine.tqfind( ':' ); if ( colon == -1 ) { // invalid line currentLine = (*it); continue; @@ -94,14 +94,14 @@ VCard::List VCardParser::parseVCards( const TQString& text ) TQStringList params = TQStringList::split( ';', key ); // check for group - if ( params[0].find( '.' ) != -1 ) { + if ( params[0].tqfind( '.' ) != -1 ) { const TQStringList groupList = TQStringList::split( '.', params[0] ); vCardLine.setGroup( groupList[0] ); vCardLine.setIdentifier( groupList[1] ); } else vCardLine.setIdentifier( params[0] ); - if ( params.count() > 1 ) { // find all parameters + if ( params.count() > 1 ) { // tqfind all parameters TQStringList::ConstIterator paramIt = params.begin(); for ( ++paramIt; paramIt != params.end(); ++paramIt ) { TQStringList pair = TQStringList::split( '=', *paramIt ); @@ -117,8 +117,8 @@ VCard::List VCardParser::parseVCards( const TQString& text ) pair.prepend( "type" ); } } - // This is pretty much a faster pair[1].contains( ',' )... - if ( pair[1].find( ',' ) != -1 ) { // parameter in type=x,y,z format + // This is pretty much a faster pair[1].tqcontains( ',' )... + if ( pair[1].tqfind( ',' ) != -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.findIndex( "encoding" ) != -1 ) { // have to decode the data + if ( params.tqfindIndex( "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.findIndex( "charset" ) != -1 ) { // have to convert the data + if ( params.tqfindIndex( "charset" ) != -1 ) { // have to convert the data TQTextCodec *codec = TQTextCodec::codecForName( vCardLine.parameter( "charset" ).latin1() ); if ( codec ) { |