summaryrefslogtreecommitdiffstats
path: root/kabc
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-19 11:57:02 -0600
committerSlávek Banko <slavek.banko@axis.cz>2012-06-02 19:04:59 +0200
commit41b1d53a0144afe4c31425c18af25c2d6ade881b (patch)
tree4bf4a434c5db64325f317e56cc9d8d2a729df3e4 /kabc
parente2867c1f1eec514d56386f2fc5350eaaf760532a (diff)
downloadtdelibs-41b1d53a0144afe4c31425c18af25c2d6ade881b.tar.gz
tdelibs-41b1d53a0144afe4c31425c18af25c2d6ade881b.zip
Remove additional unneeded tq method conversions
(cherry picked from commit a51cd9949c4e6c726a84a61de3cfadd30cefb5c7)
Diffstat (limited to 'kabc')
-rw-r--r--kabc/formats/binaryformat.cpp2
-rw-r--r--kabc/kab2kabc.cpp20
-rw-r--r--kabc/resourceselectdialog.cpp2
-rw-r--r--kabc/tests/testaddresseelist.cpp80
-rw-r--r--kabc/vcard/AdrValue.cpp14
-rw-r--r--kabc/vcard/ContentLine.cpp2
-rw-r--r--kabc/vcard/LangValue.cpp2
-rw-r--r--kabc/vcard/NValue.cpp10
-rw-r--r--kabc/vcard/OrgValue.cpp2
-rw-r--r--kabc/vcard/TextListValue.cpp2
-rw-r--r--kabc/vcard/VCard.cpp2
-rw-r--r--kabc/vcardparser/vcardparser.cpp2
-rw-r--r--kabc/vcardtool.cpp2
13 files changed, 71 insertions, 71 deletions
diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp
index f9d0d705d..a82a017a3 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()->tqat( 2 * sizeof( TQ_UINT32 ) );
+ stream.device()->at( 2 * sizeof( TQ_UINT32 ) );
stream << counter;
}
diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp
index 2a3683597..9d8ea75ee 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.tqat( entry.length() -1 ) == ')' ) {
+ if ( entry.at( entry.length() -1 ) == ')' ) {
int br = entry.findRev( '(' );
if ( br >= 0 ) {
comment = entry.mid( br + 1, entry.length() - br - 2 );
entry.truncate( br );
- if ( entry.tqat( entry.length() - 1 ).isSpace() ) {
+ if ( entry.at( 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.tqat( 0 ) == '<' && email.tqat( email.length() - 1) == '>' ) {
+ if ( email.at( 0 ) == '<' && email.at( email.length() - 1) == '>' ) {
email = email.mid( 1, email.length() - 2 );
}
- if ( name.tqat( 0 ) == '"' && name.tqat( name.length() - 1) == '"' ) {
+ if ( name.at( 0 ) == '"' && name.at( name.length() - 1) == '"' ) {
name = name.mid( 1, name.length() - 2 );
}
- if ( name.tqat( 0 ) == '\'' && name.tqat( name.length() - 1) == '\'' ) {
+ if ( name.at( 0 ) == '\'' && name.at( name.length() - 1) == '\'' ) {
name = name.mid( 1, name.length() - 2 );
}
- if ( name.tqat( name.length() -1 ) == ')' ) {
+ if ( name.at( name.length() -1 ) == ')' ) {
int br = name.findRev( '(' );
if ( br >= 0 ) {
comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment;
name.truncate( br );
- if ( name.tqat( name.length() - 1 ).isSpace() ) {
+ if ( name.at( 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).tqat( 0 ) == '#' ) continue;
+ if ( (*it).at( 0 ) == '#' ) continue;
bool insideQuote = false;
int end = (*it).length() - 1;
for ( int i = end; i; i-- ) {
- if ( (*it).tqat( i ) == '"' ) {
+ if ( (*it).at( i ) == '"' ) {
if ( insideQuote )
insideQuote = false;
else
insideQuote = true;
- } else if ( (*it).tqat( i ) == ',' && !insideQuote ) {
+ } else if ( (*it).at( i ) == ',' && !insideQuote ) {
readKMailEntry( (*it).mid( i + 1, end - i ), ab );
end = i - 1;
}
diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp
index 3d01bfc8e..256125cd2 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.tqat( i );
+ Resource *resource = list.at( 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 7075dcdd8..e7cc123f1 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.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"
+ 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"
) ) {
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.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"
+ 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"
) ) {
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.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"
+ 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"
) ) {
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.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"
+ 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"
) ) {
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.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"
+ 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"
) ) {
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.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"
+ 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"
) ) {
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.tqat(0)).uid()=="78ze"
- && (*list2.tqat(1)).uid()=="Asdf"
+ if ( !( (*list2.at(0)).uid()=="78ze"
+ && (*list2.at(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.tqat(1)).uid()=="78ze"
- && (*list2.tqat(0)).uid()=="Asdf"
+ if ( !( (*list2.at(1)).uid()=="78ze"
+ && (*list2.at(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 dc6384417..535ba6980 100644
--- a/kabc/vcard/AdrValue.cpp
+++ b/kabc/vcard/AdrValue.cpp
@@ -112,13 +112,13 @@ AdrValue::_parse()
switch (i) {
- 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;
+ 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;
default: break;
}
}
diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp
index 034cb1d32..52bcdf4f5 100644
--- a/kabc/vcard/ContentLine.cpp
+++ b/kabc/vcard/ContentLine.cpp
@@ -174,7 +174,7 @@ ContentLine::_parse()
return;
}
- name_ = l.tqat(0);
+ name_ = l.at(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 d41c61d96..f7e5a759e 100644
--- a/kabc/vcard/LangValue.cpp
+++ b/kabc/vcard/LangValue.cpp
@@ -79,7 +79,7 @@ LangValue::_parse()
if (l.count() == 0) return;
- primary_ = l.tqat(0);
+ primary_ = l.at(0);
l.remove(0u);
diff --git a/kabc/vcard/NValue.cpp b/kabc/vcard/NValue.cpp
index 7bcfa1397..e63268134 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.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;
+ 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;
default: break;
}
}
diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp
index d3fb93ac7..94ca18243 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_.tqat(i);
+ return valueList_.at(i);
}
diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp
index ef2b5d07d..2bec2e181 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_.tqat(i);
+ return valueList_.at(i);
}
diff --git a/kabc/vcard/VCard.cpp b/kabc/vcard/VCard.cpp
index a1a9d1ba1..50c25da59 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.tqat(0)).stripWhiteSpace();
+ TQCString beginLine = TQCString(l.at(0)).stripWhiteSpace();
vDebug("Begin line == \"" + beginLine + "\"");
diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp
index 82ab96714..40a0dbba0 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.tqat( value.length() - 1 ) == '=' && it != linesEnd ) {
+ while ( value.at( value.length() - 1 ) == '=' && it != linesEnd ) {
value = value.remove( value.length() - 1, 1 ) + (*it);
++it;
}
diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp
index 08bcf93e4..295360a03 100644
--- a/kabc/vcardtool.cpp
+++ b/kabc/vcardtool.cpp
@@ -36,7 +36,7 @@ static bool needsEncoding( const TQString &value )
{
uint length = value.length();
for ( uint i = 0; i < length; ++i ) {
- char c = value.tqat( i ).latin1();
+ char c = value.at( i ).latin1();
if ( (c < 33 || c > 126) && c != ' ' && c != '=' )
return true;
}