diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-15 19:11:41 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-15 19:11:41 +0000 |
commit | 374d939d8af431477ce2601815f0ba121b66871c (patch) | |
tree | ad878478dcc0bedf51e3cffb2ed611ada422b290 /kabc | |
parent | f9279733bf71e446933b46f40cbe9c9b9f57b778 (diff) | |
download | tdelibs-374d939d8af431477ce2601815f0ba121b66871c.tar.gz tdelibs-374d939d8af431477ce2601815f0ba121b66871c.zip |
Allow kdelibs to function correctly with TQt for Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1220926 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc')
-rw-r--r-- | kabc/formats/binaryformat.cpp | 2 | ||||
-rw-r--r-- | kabc/kab2kabc.cpp | 20 | ||||
-rw-r--r-- | kabc/resourceselectdialog.cpp | 2 | ||||
-rw-r--r-- | kabc/tests/testaddresseelist.cpp | 80 | ||||
-rw-r--r-- | kabc/vcard/AdrValue.cpp | 14 | ||||
-rw-r--r-- | kabc/vcard/ContentLine.cpp | 2 | ||||
-rw-r--r-- | kabc/vcard/LangValue.cpp | 2 | ||||
-rw-r--r-- | kabc/vcard/NValue.cpp | 10 | ||||
-rw-r--r-- | kabc/vcard/OrgValue.cpp | 2 | ||||
-rw-r--r-- | kabc/vcard/TextListValue.cpp | 2 | ||||
-rw-r--r-- | kabc/vcard/VCard.cpp | 2 | ||||
-rw-r--r-- | kabc/vcardparser/vcardparser.cpp | 2 |
12 files changed, 70 insertions, 70 deletions
diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp index 2e66a6be7..f9d0d705d 100644 --- a/kabc/formats/binaryformat.cpp +++ b/kabc/formats/binaryformat.cpp @@ -113,7 +113,7 @@ void BinaryFormat::saveAll( AddressBook*, Resource *resource, TQFile *file ) } // set real number of entries - stream.tqdevice()->at( 2 * sizeof( TQ_UINT32 ) ); + stream.tqdevice()->tqat( 2 * sizeof( TQ_UINT32 ) ); stream << counter; } diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index 8c8823f1e..26adeea56 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -57,12 +57,12 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) TQString name; TQString comment; - if ( entry.at( entry.length() -1 ) == ')' ) { + if ( entry.tqat( entry.length() -1 ) == ')' ) { int br = entry.tqfindRev( '(' ); if ( br >= 0 ) { comment = entry.mid( br + 1, entry.length() - br - 2 ); entry.truncate( br ); - if ( entry.at( entry.length() - 1 ).isSpace() ) { + if ( entry.tqat( entry.length() - 1 ).isSpace() ) { entry.truncate( br - 1 ); } } @@ -80,22 +80,22 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) name = entry.left( posSpace ); } - if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) { + if ( email.tqat( 0 ) == '<' && email.tqat( email.length() - 1) == '>' ) { email = email.mid( 1, email.length() - 2 ); } - if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) { + if ( name.tqat( 0 ) == '"' && name.tqat( name.length() - 1) == '"' ) { name = name.mid( 1, name.length() - 2 ); } - if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) { + if ( name.tqat( 0 ) == '\'' && name.tqat( name.length() - 1) == '\'' ) { name = name.mid( 1, name.length() - 2 ); } - if ( name.at( name.length() -1 ) == ')' ) { + if ( name.tqat( name.length() -1 ) == ')' ) { int br = name.tqfindRev( '(' ); if ( br >= 0 ) { comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; name.truncate( br ); - if ( name.at( name.length() - 1 ).isSpace() ) { + if ( name.tqat( name.length() - 1 ).isSpace() ) { name.truncate( br - 1 ); } } @@ -148,16 +148,16 @@ void importKMailAddressBook( KABC::AddressBook *ab ) TQStringList::ConstIterator it; for ( it = kmailEntries.begin(); it != kmailEntries.end(); ++it ) { - if ( (*it).at( 0 ) == '#' ) continue; + if ( (*it).tqat( 0 ) == '#' ) continue; bool insideQuote = false; int end = (*it).length() - 1; for ( int i = end; i; i-- ) { - if ( (*it).at( i ) == '"' ) { + if ( (*it).tqat( i ) == '"' ) { if ( insideQuote ) insideQuote = false; else insideQuote = true; - } else if ( (*it).at( i ) == ',' && !insideQuote ) { + } else if ( (*it).tqat( i ) == ',' && !insideQuote ) { readKMailEntry( (*it).mid( i + 1, end - i ), ab ); end = i - 1; } diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index 256125cd2..3d01bfc8e 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -64,7 +64,7 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c uint counter = 0; TQPtrList<Resource> list = ab->resources(); for ( uint i = 0; i < list.count(); ++i ) { - Resource *resource = list.at( i ); + Resource *resource = list.tqat( i ); if ( resource && !resource->readOnly() ) { mResourceMap.insert( counter, resource ); mResourceId->insertItem( resource->resourceName() ); diff --git a/kabc/tests/testaddresseelist.cpp b/kabc/tests/testaddresseelist.cpp index e7cc123f1..7075dcdd8 100644 --- a/kabc/tests/testaddresseelist.cpp +++ b/kabc/tests/testaddresseelist.cpp @@ -64,12 +64,12 @@ int main(int /*argc*/,char /* **argv*/) list.append(f); list.sortBy(FamilyName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(5)).uid()=="Z2hk" + if ( !( (*list.tqat(0)).uid()=="78ze" + && (*list.tqat(1)).uid()=="Rsdf" + && (*list.tqat(2)).uid()=="Fhwn" + && (*list.tqat(3)).uid()=="kk45" + && (*list.tqat(4)).uid()=="Asdf" + && (*list.tqat(5)).uid()=="Z2hk" ) ) { kdError() << "SORTING BY FAMILY NAME NOT CORRECT!" << endl; kdDebug() << "list sorted by family name:" << endl; @@ -79,12 +79,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(0)).uid()=="Z2hk" + if ( !( (*list.tqat(5)).uid()=="78ze" + && (*list.tqat(4)).uid()=="Rsdf" + && (*list.tqat(3)).uid()=="Fhwn" + && (*list.tqat(2)).uid()=="kk45" + && (*list.tqat(1)).uid()=="Asdf" + && (*list.tqat(0)).uid()=="Z2hk" ) ) { kdError() << "REVERSE SORTING BY FAMILY NAME NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by family name:" << endl; @@ -95,12 +95,12 @@ int main(int /*argc*/,char /* **argv*/) list.setReverseSorting(false); list.sortBy(FormattedName); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Rsdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="kk45" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="Asdf" + if ( !( (*list.tqat(0)).uid()=="78ze" + && (*list.tqat(1)).uid()=="Rsdf" + && (*list.tqat(2)).uid()=="Fhwn" + && (*list.tqat(3)).uid()=="kk45" + && (*list.tqat(4)).uid()=="Z2hk" + && (*list.tqat(5)).uid()=="Asdf" ) ) { kdError() << "SORTING BY FORMATTED NAME NOT CORRECT!" << endl; kdDebug() << "list sorted by formatted name:" << endl; @@ -110,12 +110,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sort(); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Rsdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="kk45" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="Asdf" + if ( !( (*list.tqat(5)).uid()=="78ze" + && (*list.tqat(4)).uid()=="Rsdf" + && (*list.tqat(3)).uid()=="Fhwn" + && (*list.tqat(2)).uid()=="kk45" + && (*list.tqat(1)).uid()=="Z2hk" + && (*list.tqat(0)).uid()=="Asdf" ) ) { kdError() << "REVERSE SORTING BY FORMATTED NAME NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by formatted name:" << endl; @@ -127,12 +127,12 @@ int main(int /*argc*/,char /* **argv*/) list.setReverseSorting(false); list.sortBy(Uid); - if ( !( (*list.at(0)).uid()=="78ze" - && (*list.at(1)).uid()=="Asdf" - && (*list.at(2)).uid()=="Fhwn" - && (*list.at(3)).uid()=="Rsdf" - && (*list.at(4)).uid()=="Z2hk" - && (*list.at(5)).uid()=="kk45" + if ( !( (*list.tqat(0)).uid()=="78ze" + && (*list.tqat(1)).uid()=="Asdf" + && (*list.tqat(2)).uid()=="Fhwn" + && (*list.tqat(3)).uid()=="Rsdf" + && (*list.tqat(4)).uid()=="Z2hk" + && (*list.tqat(5)).uid()=="kk45" ) ) { kdError() << "SORTING BY UID NOT CORRECT!" << endl; kdDebug() << "list sorted by Uid:" << endl; @@ -142,12 +142,12 @@ int main(int /*argc*/,char /* **argv*/) } list.setReverseSorting(true); list.sortBy(Uid); - if ( !( (*list.at(5)).uid()=="78ze" - && (*list.at(4)).uid()=="Asdf" - && (*list.at(3)).uid()=="Fhwn" - && (*list.at(2)).uid()=="Rsdf" - && (*list.at(1)).uid()=="Z2hk" - && (*list.at(0)).uid()=="kk45" + if ( !( (*list.tqat(5)).uid()=="78ze" + && (*list.tqat(4)).uid()=="Asdf" + && (*list.tqat(3)).uid()=="Fhwn" + && (*list.tqat(2)).uid()=="Rsdf" + && (*list.tqat(1)).uid()=="Z2hk" + && (*list.tqat(0)).uid()=="kk45" ) ) { kdError() << "REVERSE SORTING BY UID NOT CORRECT!" << endl; kdDebug() << "list sorted by Uid:" << endl; @@ -170,8 +170,8 @@ int main(int /*argc*/,char /* **argv*/) list2.append(f); list2.setReverseSorting(false); list2.sort(); - if ( !( (*list2.at(0)).uid()=="78ze" - && (*list2.at(1)).uid()=="Asdf" + if ( !( (*list2.tqat(0)).uid()=="78ze" + && (*list2.tqat(1)).uid()=="Asdf" ) ) { kdError() << "SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; kdDebug() << "list sorted by formatted name, two entries:" << endl; @@ -181,8 +181,8 @@ int main(int /*argc*/,char /* **argv*/) } list2.setReverseSorting(true); list2.sort(); - if ( !( (*list2.at(1)).uid()=="78ze" - && (*list2.at(0)).uid()=="Asdf" + if ( !( (*list2.tqat(1)).uid()=="78ze" + && (*list2.tqat(0)).uid()=="Asdf" ) ) { kdError() << "REVERSE SORTING BY FORMATTED NAME IN A TWO ENTRY LIST NOT CORRECT!" << endl; kdDebug() << "list reverse sorted by formatted name, two entries:" << endl; diff --git a/kabc/vcard/AdrValue.cpp b/kabc/vcard/AdrValue.cpp index 535ba6980..dc6384417 100644 --- a/kabc/vcard/AdrValue.cpp +++ b/kabc/vcard/AdrValue.cpp @@ -112,13 +112,13 @@ AdrValue::_parse() switch (i) { - case 0: poBox_ = l.at(0); break; - case 1: extAddress_ = l.at(1); break; - case 2: street_ = l.at(2); break; - case 3: locality_ = l.at(3); break; - case 4: region_ = l.at(4); break; - case 5: postCode_ = l.at(5); break; - case 6: countryName_ = l.at(6); break; + case 0: poBox_ = l.tqat(0); break; + case 1: extAddress_ = l.tqat(1); break; + case 2: street_ = l.tqat(2); break; + case 3: locality_ = l.tqat(3); break; + case 4: region_ = l.tqat(4); break; + case 5: postCode_ = l.tqat(5); break; + case 6: countryName_ = l.tqat(6); break; default: break; } } diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index a301a0244..8babc9292 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -174,7 +174,7 @@ ContentLine::_parse() return; } - name_ = l.at(0); + name_ = l.tqat(0); // Now we have the name, so the rest of 'l' is the params. // Remove the name part. diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp index f7e5a759e..d41c61d96 100644 --- a/kabc/vcard/LangValue.cpp +++ b/kabc/vcard/LangValue.cpp @@ -79,7 +79,7 @@ LangValue::_parse() if (l.count() == 0) return; - primary_ = l.at(0); + primary_ = l.tqat(0); l.remove(0u); diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp index e63268134..7bcfa1397 100644 --- a/kabc/vcard/NValue.cpp +++ b/kabc/vcard/NValue.cpp @@ -106,11 +106,11 @@ NValue::_parse() for (unsigned int i = 0; i < l.count(); i++) { switch (i) { - case 0: family_ = l.at(0); break; - case 1: given_ = l.at(1); break; - case 2: middle_ = l.at(2); break; - case 3: prefix_ = l.at(3); break; - case 4: suffix_ = l.at(4); break; + case 0: family_ = l.tqat(0); break; + case 1: given_ = l.tqat(1); break; + case 2: middle_ = l.tqat(2); break; + case 3: prefix_ = l.tqat(3); break; + case 4: suffix_ = l.tqat(4); break; default: break; } } diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp index 94ca18243..d3fb93ac7 100644 --- a/kabc/vcard/OrgValue.cpp +++ b/kabc/vcard/OrgValue.cpp @@ -102,6 +102,6 @@ OrgValue::numValues() OrgValue::value(unsigned int i) { parse(); - return valueList_.at(i); + return valueList_.tqat(i); } diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp index 2bec2e181..ef2b5d07d 100644 --- a/kabc/vcard/TextListValue.cpp +++ b/kabc/vcard/TextListValue.cpp @@ -102,6 +102,6 @@ TextListValue::numValues() TextListValue::value(unsigned int i) { parse(); - return valueList_.at(i); + return valueList_.tqat(i); } diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp index c63e978d4..25d3a7a2d 100644 --- a/kabc/vcard/VCard.cpp +++ b/kabc/vcard/VCard.cpp @@ -95,7 +95,7 @@ VCard::_parse() } // Get the first line - TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace(); + TQCString beginLine = TQCString(l.tqat(0)).stripWhiteSpace(); vDebug("Begin line == \"" + beginLine + "\""); diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 35d48f77c..b92f341a0 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -144,7 +144,7 @@ VCard::List VCardParser::parseVCards( const TQString& text ) } else if ( vCardLine.parameter( "encoding" ).lower() == "quoted-printable" ) { // join any qp-folded lines - while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) { + while ( value.tqat( value.length() - 1 ) == '=' && it != linesEnd ) { value = value.remove( value.length() - 1, 1 ) + (*it); ++it; } |