From 984c25aa6969e55896e9a13c8e7f7b8a58991a4e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:32:40 -0600 Subject: Rename old tq methods that no longer need a unique name --- kabc/address.cpp | 4 +- kabc/addressbook.cpp | 2 +- kabc/ldapclient.cpp | 2 +- kabc/ldifconverter.cpp | 112 ++++++++++++++++++++--------------------- kabc/ldifconverter.h | 2 +- kabc/vcardparser/testwrite.cpp | 2 +- 6 files changed, 62 insertions(+), 62 deletions(-) (limited to 'kabc') diff --git a/kabc/address.cpp b/kabc/address.cpp index 714dd571e..0787bcc4e 100644 --- a/kabc/address.cpp +++ b/kabc/address.cpp @@ -521,7 +521,7 @@ TQString Address::countryToISO( const TQString &cname ) return it.data(); TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { @@ -551,7 +551,7 @@ TQString Address::ISOtoCountry( const TQString &ISOname ) return TQString::null; TQString mapfile = KGlobal::dirs()->findResource( "data", - TQString::tqfromLatin1( "kabc/countrytransl.map" ) ); + TQString::fromLatin1( "kabc/countrytransl.map" ) ); TQFile file( mapfile ); if ( file.open( IO_ReadOnly ) ) { diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp index 29bbd0f1f..bf6d0d17a 100644 --- a/kabc/addressbook.cpp +++ b/kabc/addressbook.cpp @@ -527,7 +527,7 @@ void AddressBook::insertAddressee( const Addressee &a ) Addressee addr( a ); if ( !fAddr.isEmpty() ) { if ( fAddr != a ) - addr.setRevision( TQDateTime::tqcurrentDateTime() ); + addr.setRevision( TQDateTime::currentDateTime() ); else { if ( fAddr.resource() == 0 ) { fAddr.setResource( resource ); diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 6ce467a46..724f039ec 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -50,7 +50,7 @@ public: TQString LdapObject::toString() const { - TQString result = TQString::tqfromLatin1( "\ndn: %1\n" ).arg( dn ); + TQString result = TQString::fromLatin1( "\ndn: %1\n" ).arg( dn ); for ( LdapAttrMap::ConstIterator it = attrs.begin(); it != attrs.end(); ++it ) { TQString attr = it.key(); for ( LdapAttrValue::ConstIterator it2 = (*it).begin(); it2 != (*it).end(); ++it2 ) { diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp index d4c7b22df..4bf989395 100644 --- a/kabc/ldifconverter.cpp +++ b/kabc/ldifconverter.cpp @@ -183,7 +183,7 @@ bool LDIFConverter::LDIFToAddressee( const TQString &str, AddresseeList &addrLis data.setRawData( latinstr, latinstrlen ); ldif.setLDIF( data ); if (!dt.isValid()) - dt = TQDateTime::tqcurrentDateTime(); + dt = TQDateTime::currentDateTime(); a.setRevision(dt); homeAddr = Address( Address::Home ); workAddr = Address( Address::Work ); @@ -235,7 +235,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, Address &workAddr, TQString &fieldname, TQString &value ) { - if ( fieldname == TQString::tqfromLatin1( "dn" ) ) // ignore & return false! + if ( fieldname == TQString::fromLatin1( "dn" ) ) // ignore & return false! return false; if ( fieldname.startsWith("#") ) { @@ -249,56 +249,56 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, return true; } - if ( fieldname == TQString::tqfromLatin1( "givenname" ) ) { + if ( fieldname == TQString::fromLatin1( "givenname" ) ) { a.setGivenName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillanickname") || - fieldname == TQString::tqfromLatin1( "nickname") ) { + if ( fieldname == TQString::fromLatin1( "xmozillanickname") || + fieldname == TQString::fromLatin1( "nickname") ) { a.setNickName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "sn" ) ) { + if ( fieldname == TQString::fromLatin1( "sn" ) ) { a.setFamilyName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "uid" ) ) { + if ( fieldname == TQString::fromLatin1( "uid" ) ) { a.setUid( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mail" ) || - fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mail" ) || + fieldname == TQString::fromLatin1( "mozillasecondemail" ) ) { // mozilla if ( a.emails().findIndex( value ) == -1 ) a.insertEmail( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "title" ) ) { + if ( fieldname == TQString::fromLatin1( "title" ) ) { a.setTitle( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "vocation" ) ) { + if ( fieldname == TQString::fromLatin1( "vocation" ) ) { a.setPrefix( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cn" ) ) { + if ( fieldname == TQString::fromLatin1( "cn" ) ) { a.setFormattedName( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "o" ) || - fieldname == TQString::tqfromLatin1( "organization" ) || // Exchange - fieldname == TQString::tqfromLatin1( "organizationname" ) ) { // Exchange + if ( fieldname == TQString::fromLatin1( "o" ) || + fieldname == TQString::fromLatin1( "organization" ) || // Exchange + fieldname == TQString::fromLatin1( "organizationname" ) ) { // Exchange a.setOrganization( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "description" ) ) { + if ( fieldname == TQString::fromLatin1( "description" ) ) { addComment: if ( !a.note().isEmpty() ) a.setNote( a.note() + "\n" ); @@ -306,15 +306,15 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "custom1" ) || - fieldname == TQString::tqfromLatin1( "custom2" ) || - fieldname == TQString::tqfromLatin1( "custom3" ) || - fieldname == TQString::tqfromLatin1( "custom4" ) ) { + if ( fieldname == TQString::fromLatin1( "custom1" ) || + fieldname == TQString::fromLatin1( "custom2" ) || + fieldname == TQString::fromLatin1( "custom3" ) || + fieldname == TQString::fromLatin1( "custom4" ) ) { goto addComment; } - if ( fieldname == TQString::tqfromLatin1( "homeurl" ) || - fieldname == TQString::tqfromLatin1( "workurl" ) ) { + if ( fieldname == TQString::fromLatin1( "homeurl" ) || + fieldname == TQString::fromLatin1( "workurl" ) ) { if (a.url().isEmpty()) { a.setUrl( KURL( value ) ); return true; @@ -325,139 +325,139 @@ addComment: // TODO: change this with KDE 4 } - if ( fieldname == TQString::tqfromLatin1( "homephone" ) ) { + if ( fieldname == TQString::fromLatin1( "homephone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Home ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "telephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "telephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mobile" ) ) { // mozilla/Netscape 7 + if ( fieldname == TQString::fromLatin1( "mobile" ) ) { // mozilla/Netscape 7 a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "cellphone" ) ) { + if ( fieldname == TQString::fromLatin1( "cellphone" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Cell ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "pager" ) || // mozilla - fieldname == TQString::tqfromLatin1( "pagerphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "pager" ) || // mozilla + fieldname == TQString::fromLatin1( "pagerphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Pager ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "facsimiletelephonenumber" ) ) { + if ( fieldname == TQString::fromLatin1( "facsimiletelephonenumber" ) ) { a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Fax ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "xmozillaanyphone" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "xmozillaanyphone" ) ) { // mozilla a.insertPhoneNumber( PhoneNumber( value, PhoneNumber::Work ) ); return true; } - if ( fieldname == TQString::tqfromLatin1( "street" ) || - fieldname == TQString::tqfromLatin1( "streethomeaddress" ) ) { + if ( fieldname == TQString::fromLatin1( "street" ) || + fieldname == TQString::fromLatin1( "streethomeaddress" ) ) { homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postaladdress" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "postaladdress" ) ) { // mozilla workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillapostaladdress2" ) ) { // mozilla - workAddr.setStreet( workAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillapostaladdress2" ) ) { // mozilla + workAddr.setStreet( workAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postalcode" ) ) { + if ( fieldname == TQString::fromLatin1( "postalcode" ) ) { workAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "postofficebox" ) ) { + if ( fieldname == TQString::fromLatin1( "postofficebox" ) ) { workAddr.setPostOfficeBox( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "homepostaladdress" ) ) { // Netscape 7 + if ( fieldname == TQString::fromLatin1( "homepostaladdress" ) ) { // Netscape 7 homeAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla - homeAddr.setStreet( homeAddr.street() + TQString::tqfromLatin1( "\n" ) + value ); + if ( fieldname == TQString::fromLatin1( "mozillahomepostaladdress2" ) ) { // mozilla + homeAddr.setStreet( homeAddr.street() + TQString::fromLatin1( "\n" ) + value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomelocalityname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomelocalityname" ) ) { // mozilla homeAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomestate" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomestate" ) ) { // mozilla homeAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomepostalcode" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomepostalcode" ) ) { // mozilla homeAddr.setPostalCode( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "mozillahomecountryname" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "mozillahomecountryname" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); homeAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "locality" ) ) { + if ( fieldname == TQString::fromLatin1( "locality" ) ) { workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "streetaddress" ) ) { // Netscape 4.x + if ( fieldname == TQString::fromLatin1( "streetaddress" ) ) { // Netscape 4.x workAddr.setStreet( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "countryname" ) || - fieldname == TQString::tqfromLatin1( "c" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "countryname" ) || + fieldname == TQString::fromLatin1( "c" ) ) { // mozilla if ( value.length() <= 2 ) value = Address::ISOtoCountry(value); workAddr.setCountry( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "l" ) ) { // mozilla + if ( fieldname == TQString::fromLatin1( "l" ) ) { // mozilla workAddr.setLocality( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "st" ) ) { + if ( fieldname == TQString::fromLatin1( "st" ) ) { workAddr.setRegion( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "ou" ) ) { + if ( fieldname == TQString::fromLatin1( "ou" ) ) { a.setRole( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "department" ) ) { + if ( fieldname == TQString::fromLatin1( "department" ) ) { a.setDepartment( value ); return true; } - if ( fieldname == TQString::tqfromLatin1( "member" ) ) { + if ( fieldname == TQString::fromLatin1( "member" ) ) { // this is a mozilla list member (cn=xxx, mail=yyy) TQStringList list( TQStringList::split( ',', value ) ); TQString name, email; @@ -476,8 +476,8 @@ addComment: return true; } - if ( fieldname == TQString::tqfromLatin1( "modifytimestamp" ) ) { - if (value == TQString::tqfromLatin1("0Z")) // ignore + if ( fieldname == TQString::fromLatin1( "modifytimestamp" ) ) { + if (value == TQString::fromLatin1("0Z")) // ignore return true; TQDateTime dt = VCardStringToDate( value ); if ( dt.isValid() ) { @@ -486,7 +486,7 @@ addComment: } } - if ( fieldname == TQString::tqfromLatin1( "objectclass" ) ) // ignore + if ( fieldname == TQString::fromLatin1( "objectclass" ) ) // ignore return true; kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") diff --git a/kabc/ldifconverter.h b/kabc/ldifconverter.h index a2225ad2d..a8052a65f 100644 --- a/kabc/ldifconverter.h +++ b/kabc/ldifconverter.h @@ -44,7 +44,7 @@ namespace KABC { * @param dt The date & time value of the last modification (e.g. file modification time). * @since 3.2 */ - KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::tqcurrentDateTime() ); + KABC_EXPORT bool LDIFToAddressee( const TQString &str, AddresseeList &addrList, TQDateTime dt = TQDateTime::currentDateTime() ); /** * Converts a list of addressees to a LDIF string. diff --git a/kabc/vcardparser/testwrite.cpp b/kabc/vcardparser/testwrite.cpp index f24f1ad25..f6e894f4b 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::tqcurrentDateTime() ); + addressee.setRevision( TQDateTime::currentDateTime() ); addressee.setSortString( "koenig" ); addressee.setUrl( KURL( "http://wgess16.dyndns.org") ); addressee.setSecrecy( KABC::Secrecy( KABC::Secrecy::Confidential ) ); -- cgit v1.2.1