diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-16 02:40:35 +0000 |
commit | bab40890696ec68c337dc290880423a0602b83c7 (patch) | |
tree | 6ba03f720b1fa88235ba339e7aedb4455430357e /kabc | |
parent | f7e71d47719ab6094cf4a9fafffa5ea351973522 (diff) | |
download | tdelibs-bab40890696ec68c337dc290880423a0602b83c7.tar.gz tdelibs-bab40890696ec68c337dc290880423a0602b83c7.zip |
Finished remaining porting to new TQt API
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214736 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc')
41 files changed, 232 insertions, 231 deletions
diff --git a/kabc/addresseedialog.cpp b/kabc/addresseedialog.cpp index fa15f4317..b1d3e4137 100644 --- a/kabc/addresseedialog.cpp +++ b/kabc/addresseedialog.cpp @@ -92,7 +92,7 @@ AddresseeDialog::AddresseeDialog( TQWidget *parent, bool multiple ) : topLayout->addLayout( selectedLayout ); topLayout->setSpacing( spacingHint() ); - TQGroupBox *selectedGroup = new TQGroupBox( 1, Horizontal, i18n("Selected"), + TQGroupBox *selectedGroup = new TQGroupBox( 1, Qt::Horizontal, i18n("Selected"), topWidget ); selectedLayout->addWidget( selectedGroup ); diff --git a/kabc/addresseehelper.cpp b/kabc/addresseehelper.cpp index 2ca4a1b10..f04adc95f 100644 --- a/kabc/addresseehelper.cpp +++ b/kabc/addresseehelper.cpp @@ -92,17 +92,17 @@ void AddresseeHelper::initSettings() bool AddresseeHelper::containsTitle( const TQString& title ) const { - return mTitles.tqfind( title ) != mTitles.end(); + return mTitles.find( title ) != mTitles.end(); } bool AddresseeHelper::containsPrefix( const TQString& prefix ) const { - return mPrefixes.tqfind( prefix ) != mPrefixes.end(); + return mPrefixes.find( prefix ) != mPrefixes.end(); } bool AddresseeHelper::containsSuffix( const TQString& suffix ) const { - return mSuffixes.tqfind( suffix ) != mSuffixes.end(); + return mSuffixes.find( suffix ) != mSuffixes.end(); } bool AddresseeHelper::tradeAsFamilyName() const diff --git a/kabc/addresslineedit.cpp b/kabc/addresslineedit.cpp index 9fb2e423a..8ac43081d 100644 --- a/kabc/addresslineedit.cpp +++ b/kabc/addresslineedit.cpp @@ -190,7 +190,7 @@ void AddressLineEdit::keyPressEvent(TQKeyEvent *e) void AddressLineEdit::mouseReleaseEvent( TQMouseEvent * e ) { - if (m_useCompletion && (e->button() == MidButton)) + if (m_useCompletion && (e->button() == Qt::MidButton)) { m_smartPaste = true; KLineEdit::mouseReleaseEvent(e); @@ -293,7 +293,7 @@ void AddressLineEdit::doCompletion(bool ctrlT) TQString prevAddr; TQString s(text()); - int n = s.findRev(','); + int n = s.tqfindRev(','); if (n >= 0) { @@ -465,7 +465,7 @@ void AddressLineEdit::startLoadingLDAPEntries() TQString s( *s_LDAPText ); // TODO cache last? TQString prevAddr; - int n = s.findRev(','); + int n = s.tqfindRev(','); if (n>= 0) { prevAddr = s.left(n+1) + ' '; diff --git a/kabc/distributionlistdialog.cpp b/kabc/distributionlistdialog.cpp index 737984077..b00b14d42 100644 --- a/kabc/distributionlistdialog.cpp +++ b/kabc/distributionlistdialog.cpp @@ -66,7 +66,7 @@ EmailSelector::EmailSelector( const TQStringList &emails, const TQString ¤ TQFrame *topFrame = plainPage(); TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); topLayout->addWidget( mButtonGroup ); @@ -100,7 +100,7 @@ TQString EmailSelector::getEmail( const TQStringList &emails, const TQString &cu return result; } -class EntryItem : public QListViewItem +class EntryItem : public TQListViewItem { public: EntryItem( TQListView *parent, const Addressee &addressee, diff --git a/kabc/distributionlisteditor.cpp b/kabc/distributionlisteditor.cpp index ba4280515..573f0970a 100644 --- a/kabc/distributionlisteditor.cpp +++ b/kabc/distributionlisteditor.cpp @@ -46,7 +46,7 @@ EmailSelectDialog::EmailSelectDialog( const TQStringList &emails, const TQString TQFrame *topFrame = plainPage(); TQBoxLayout *topLayout = new TQVBoxLayout( topFrame ); - mButtonGroup = new TQButtonGroup( 1, Horizontal, i18n("Email Addresses"), + mButtonGroup = new TQButtonGroup( 1, Qt::Horizontal, i18n("Email Addresses"), topFrame ); mButtonGroup->setRadioButtonExclusive( true ); topLayout->addWidget( mButtonGroup ); @@ -80,7 +80,7 @@ TQString EmailSelectDialog::getEmail( const TQStringList &emails, const TQString return result; } -class EditEntryItem : public QListViewItem +class EditEntryItem : public TQListViewItem { public: EditEntryItem( TQListView *parent, const Addressee &addressee, diff --git a/kabc/formats/binaryformat.cpp b/kabc/formats/binaryformat.cpp index d09be306b..2e66a6be7 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.device()->at( 2 * sizeof( TQ_UINT32 ) ); + stream.tqdevice()->at( 2 * sizeof( TQ_UINT32 ) ); stream << counter; } @@ -140,12 +140,12 @@ bool BinaryFormat::checkHeader( TQDataStream &stream ) const } if ( magic != 0x2e93e ) { - kdError() << i18n("File '%1' is not binary format.").arg( file->name() ) << endl; + kdError() << TQString(i18n("File '%1' is not binary format.").arg( file->name() )) << endl; return false; } if ( version != BINARY_FORMAT_VERSION ) { - kdError() << i18n("File '%1' is the wrong version.").arg( file->name() ) << endl; + kdError() << TQString(i18n("File '%1' is the wrong version.").arg( file->name() )) << endl; return false; } diff --git a/kabc/kab2kabc.cpp b/kabc/kab2kabc.cpp index c83c29c38..8c8823f1e 100644 --- a/kabc/kab2kabc.cpp +++ b/kabc/kab2kabc.cpp @@ -58,7 +58,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) TQString comment; if ( entry.at( entry.length() -1 ) == ')' ) { - int br = entry.findRev( '(' ); + int br = entry.tqfindRev( '(' ); if ( br >= 0 ) { comment = entry.mid( br + 1, entry.length() - br - 2 ); entry.truncate( br ); @@ -68,7 +68,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) } } - int posSpace = entry.findRev( ' ' ); + int posSpace = entry.tqfindRev( ' ' ); if ( posSpace < 0 ) { email = entry; if ( !comment.isEmpty() ) { @@ -91,7 +91,7 @@ void readKMailEntry( const TQString &kmailEntry, KABC::AddressBook *ab ) } if ( name.at( name.length() -1 ) == ')' ) { - int br = name.findRev( '(' ); + int br = name.tqfindRev( '(' ); if ( br >= 0 ) { comment = name.mid( br + 1, name.length() - br - 2 ) + " " + comment; name.truncate( br ); diff --git a/kabc/ldapclient.cpp b/kabc/ldapclient.cpp index 4f60dfa78..637d77da6 100644 --- a/kabc/ldapclient.cpp +++ b/kabc/ldapclient.cpp @@ -408,7 +408,7 @@ void LdapSearch::makeSearchData( TQStringList& ret, LdapResultList& resList ) } LdapResult sr; - sr.clientNumber = mClients.findIndex( (*it1).client ); + sr.clientNumber = mClients.tqfindIndex( (*it1).client ); sr.name = name; sr.email = mail; resList.append( sr ); diff --git a/kabc/ldapconfigwidget.cpp b/kabc/ldapconfigwidget.cpp index 671cac98f..3edccf2ac 100644 --- a/kabc/ldapconfigwidget.cpp +++ b/kabc/ldapconfigwidget.cpp @@ -607,8 +607,8 @@ void LdapConfigWidget::setFlags( int flags ) // First delete all the child widgets. // FIXME: I hope it's correct - const TQObjectList *ch = children(); - TQObjectList ch2 = *ch; + const TQObjectList ch = childrenListObject(); + TQObjectList ch2 = ch; TQObject *obj; TQWidget *widget; diff --git a/kabc/ldapconfigwidget.h b/kabc/ldapconfigwidget.h index aeba6572b..e0eb70a7f 100644 --- a/kabc/ldapconfigwidget.h +++ b/kabc/ldapconfigwidget.h @@ -50,7 +50,8 @@ namespace KABC { class KABC_EXPORT LdapConfigWidget : public TQWidget { Q_OBJECT - Q_PROPERTY( LCW_Flags flags READ flags WRITE setFlags ) + TQ_OBJECT + TQ_PROPERTY( LCW_Flags flags READ flags WRITE setFlags ) Q_PROPERTY( TQString user READ user WRITE setUser ) Q_PROPERTY( TQString password READ password WRITE setPassword ) Q_PROPERTY( TQString bindDN READ bindDN WRITE setBindDN ) @@ -69,7 +70,7 @@ namespace KABC { Q_PROPERTY( bool authSASL READ isAuthSASL WRITE setAuthSASL ) Q_PROPERTY( int sizeLimit READ sizeLimit WRITE setSizeLimit ) Q_PROPERTY( int timeLimit READ timeLimit WRITE setTimeLimit ) - Q_SETS ( LCW_Flags ) + TQ_SETS ( LCW_Flags ) public: diff --git a/kabc/ldapurl.cpp b/kabc/ldapurl.cpp index 8315b1cfe..6bca31b39 100644 --- a/kabc/ldapurl.cpp +++ b/kabc/ldapurl.cpp @@ -58,7 +58,7 @@ void LDAPUrl::setDn( const TQString &dn) bool LDAPUrl::hasExtension( const TQString &key ) const { - return m_extensions.contains( key ); + return m_extensions.tqcontains( key ); } LDAPUrl::Extension LDAPUrl::extension( const TQString &key ) const diff --git a/kabc/ldif.cpp b/kabc/ldif.cpp index 27cf16cf1..3be20c48a 100644 --- a/kabc/ldif.cpp +++ b/kabc/ldif.cpp @@ -178,7 +178,7 @@ bool LDIF::splitControl( const TQCString &line, TQString &oid, bool &critical, critical = false; bool url = splitLine( line, tmp, value ); - kdDebug(5700) << "splitControl: value: " << TQString::fromUtf8(value, value.size()) << endl; + kdDebug(5700) << "splitControl: value: " << TQString(TQString::fromUtf8(value, value.size())) << endl; if ( tmp.isEmpty() ) { tmp = TQString::fromUtf8( value, value.size() ); value.resize( 0 ); @@ -211,7 +211,7 @@ LDIF::ParseVal LDIF::processLine() if ( attrLower == "version" ) { if ( !mDn.isEmpty() ) retval = Err; } else if ( attrLower == "dn" ) { - kdDebug(5700) << "ldapentry dn: " << TQString::fromUtf8( mVal, mVal.size() ) << endl; + kdDebug(5700) << "ldapentry dn: " << TQString(TQString::fromUtf8( mVal, mVal.size() )) << endl; mDn = TQString::fromUtf8( mVal, mVal.size() ); mModType = Mod_None; retval = NewEntry; diff --git a/kabc/ldifconverter.cpp b/kabc/ldifconverter.cpp index a05076db3..ee242b332 100644 --- a/kabc/ldifconverter.cpp +++ b/kabc/ldifconverter.cpp @@ -87,11 +87,11 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) const Address workAddr = addr.address( Address::Work ); ldif_out( t, "dn", TQString( "cn=%1,mail=%2" ) - .arg( addr.formattedName().simplifyWhiteSpace() ) + .arg( TQString(addr.formattedName()).simplifyWhiteSpace() ) .arg( addr.preferredEmail() ) ); ldif_out( t, "givenname", addr.givenName() ); ldif_out( t, "sn", addr.familyName() ); - ldif_out( t, "cn", addr.formattedName().simplifyWhiteSpace() ); + ldif_out( t, "cn", TQString(addr.formattedName()).simplifyWhiteSpace() ); ldif_out( t, "uid", addr.uid() ); ldif_out( t, "nickname", addr.nickName() ); ldif_out( t, "xmozillanickname", addr.nickName() ); @@ -152,7 +152,7 @@ bool LDIFConverter::addresseeToLDIF( const Addressee &addr, TQString &str ) ldif_out( t, "homeurl", addr.url().prettyURL() ); ldif_out( t, "description", addr.note() ); if (addr.revision().isValid()) - ldif_out(t, "modifytimestamp", dateToVCardString( addr.revision()) ); + ldif_out(t, "modifytimestamp", dateToVCardString( TQT_TQDATETIME_OBJECT(addr.revision())) ); t << "objectclass: top\n"; t << "objectclass: person\n"; @@ -271,7 +271,7 @@ bool LDIFConverter::evaluatePair( Addressee &a, Address &homeAddr, } if ( fieldname == TQString::tqfromLatin1( "mail" ) || fieldname == TQString::tqfromLatin1( "mozillasecondemail" ) ) { // mozilla - if ( a.emails().findIndex( value ) == -1 ) + if ( a.emails().tqfindIndex( value ) == -1 ) a.insertEmail( value ); return true; } @@ -489,8 +489,8 @@ addComment: if ( fieldname == TQString::tqfromLatin1( "objectclass" ) ) // ignore return true; - kdWarning() << TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") - .arg(a.formattedName()).arg(fieldname).arg(value); + kdWarning() << TQString(TQString("LDIFConverter: Unknown field for '%1': '%2=%3'\n") + .arg(a.formattedName()).arg(fieldname).arg(value)); return true; } @@ -554,7 +554,7 @@ TQString LDIFConverter::makeLDIFfieldString( TQString formatStr, TQString value, } // generate the new string and split it to 72 chars/line - TQCString txt = (formatStr.arg(value)).utf8(); + TQCString txt = TQString(formatStr.arg(value)).utf8(); if (allowEncode) { len = txt.length(); diff --git a/kabc/plugins/dir/resourcedirconfig.cpp b/kabc/plugins/dir/resourcedirconfig.cpp index 819d75d96..41774b593 100644 --- a/kabc/plugins/dir/resourcedirconfig.cpp +++ b/kabc/plugins/dir/resourcedirconfig.cpp @@ -82,7 +82,7 @@ void ResourceDirConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); mFileNameEdit->setURL( resource->path() ); if ( mFileNameEdit->url().isEmpty() ) diff --git a/kabc/plugins/file/resourcefileconfig.cpp b/kabc/plugins/file/resourcefileconfig.cpp index 92b07594f..51cfdcfcf 100644 --- a/kabc/plugins/file/resourcefileconfig.cpp +++ b/kabc/plugins/file/resourcefileconfig.cpp @@ -86,7 +86,7 @@ void ResourceFileConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); mFileNameEdit->setURL( resource->fileName() ); if ( mFileNameEdit->url().isEmpty() ) diff --git a/kabc/plugins/ldapkio/resourceldapkio.cpp b/kabc/plugins/ldapkio/resourceldapkio.cpp index 0a12ea34f..893a4a90f 100644 --- a/kabc/plugins/ldapkio/resourceldapkio.cpp +++ b/kabc/plugins/ldapkio/resourceldapkio.cpp @@ -122,8 +122,8 @@ ResourceLDAPKIO::~ResourceLDAPKIO() void ResourceLDAPKIO::enter_loop() { - TQWidget dummy(0,0,WType_Dialog | WShowModal); - dummy.setFocusPolicy( TQWidget::NoFocus ); + TQWidget dummy(0,0,(WFlags)(WType_Dialog | WShowModal)); + dummy.setFocusPolicy( TQ_NoFocus ); qt_enter_modal(&dummy); tqApp->enter_loop(); qt_leave_modal(&dummy); @@ -308,7 +308,7 @@ bool ResourceLDAPKIO::AddresseeToLDIF( TQByteArray &ldif, const Addressee &addr, } tmp += "\n"; - kdDebug(7125) << "ldif: " << TQString::fromUtf8(tmp) << endl; + kdDebug(7125) << "ldif: " << TQString(TQString::fromUtf8(tmp)) << endl; ldif = tmp; return true; } @@ -330,49 +330,49 @@ void ResourceLDAPKIO::init() handle them in the load() method below. These are the default values */ - if ( !mAttributes.contains("objectClass") ) + if ( !mAttributes.tqcontains("objectClass") ) mAttributes.insert( "objectClass", "inetOrgPerson" ); - if ( !mAttributes.contains("commonName") ) + if ( !mAttributes.tqcontains("commonName") ) mAttributes.insert( "commonName", "cn" ); - if ( !mAttributes.contains("formattedName") ) + if ( !mAttributes.tqcontains("formattedName") ) mAttributes.insert( "formattedName", "displayName" ); - if ( !mAttributes.contains("familyName") ) + if ( !mAttributes.tqcontains("familyName") ) mAttributes.insert( "familyName", "sn" ); - if ( !mAttributes.contains("givenName") ) + if ( !mAttributes.tqcontains("givenName") ) mAttributes.insert( "givenName", "givenName" ); - if ( !mAttributes.contains("mail") ) + if ( !mAttributes.tqcontains("mail") ) mAttributes.insert( "mail", "mail" ); - if ( !mAttributes.contains("mailAlias") ) + if ( !mAttributes.tqcontains("mailAlias") ) mAttributes.insert( "mailAlias", "" ); - if ( !mAttributes.contains("phoneNumber") ) + if ( !mAttributes.tqcontains("phoneNumber") ) mAttributes.insert( "phoneNumber", "homePhone" ); - if ( !mAttributes.contains("telephoneNumber") ) + if ( !mAttributes.tqcontains("telephoneNumber") ) mAttributes.insert( "telephoneNumber", "telephoneNumber" ); - if ( !mAttributes.contains("facsimileTelephoneNumber") ) + if ( !mAttributes.tqcontains("facsimileTelephoneNumber") ) mAttributes.insert( "facsimileTelephoneNumber", "facsimileTelephoneNumber" ); - if ( !mAttributes.contains("mobile") ) + if ( !mAttributes.tqcontains("mobile") ) mAttributes.insert( "mobile", "mobile" ); - if ( !mAttributes.contains("pager") ) + if ( !mAttributes.tqcontains("pager") ) mAttributes.insert( "pager", "pager" ); - if ( !mAttributes.contains("description") ) + if ( !mAttributes.tqcontains("description") ) mAttributes.insert( "description", "description" ); - if ( !mAttributes.contains("title") ) + if ( !mAttributes.tqcontains("title") ) mAttributes.insert( "title", "title" ); - if ( !mAttributes.contains("street") ) + if ( !mAttributes.tqcontains("street") ) mAttributes.insert( "street", "street" ); - if ( !mAttributes.contains("state") ) + if ( !mAttributes.tqcontains("state") ) mAttributes.insert( "state", "st" ); - if ( !mAttributes.contains("city") ) + if ( !mAttributes.tqcontains("city") ) mAttributes.insert( "city", "l" ); - if ( !mAttributes.contains("organization") ) + if ( !mAttributes.tqcontains("organization") ) mAttributes.insert( "organization", "o" ); - if ( !mAttributes.contains("postalcode") ) + if ( !mAttributes.tqcontains("postalcode") ) mAttributes.insert( "postalcode", "postalCode" ); - if ( !mAttributes.contains("uid") ) + if ( !mAttributes.tqcontains("uid") ) mAttributes.insert( "uid", "uid" ); - if ( !mAttributes.contains("jpegPhoto") ) + if ( !mAttributes.tqcontains("jpegPhoto") ) mAttributes.insert( "jpegPhoto", "jpegPhoto" ); d->mLDAPUrl = KURL(); diff --git a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp index 271328525..c23bd22da 100644 --- a/kabc/plugins/ldapkio/resourceldapkioconfig.cpp +++ b/kabc/plugins/ldapkio/resourceldapkioconfig.cpp @@ -281,7 +281,7 @@ AttributesDialog::AttributesDialog( const TQMap<TQString, TQString> &attributes, for ( i = 1; i < mMapCombo->count(); i++ ) { TQDictIterator<KLineEdit> it2( mLineEditDict ); for ( ; it2.current(); ++it2 ) { - if ( mMapList[ i ].contains( it2.currentKey() ) ) { + if ( mMapList[ i ].tqcontains( it2.currentKey() ) ) { if ( mMapList[ i ][ it2.currentKey() ] != it2.current()->text() ) break; } else { if ( mDefaultMap[ it2.currentKey() ] != it2.current()->text() ) break; diff --git a/kabc/plugins/net/resourcenetconfig.cpp b/kabc/plugins/net/resourcenetconfig.cpp index b441fbd98..325d99377 100644 --- a/kabc/plugins/net/resourcenetconfig.cpp +++ b/kabc/plugins/net/resourcenetconfig.cpp @@ -79,7 +79,7 @@ void ResourceNetConfig::loadSettings( KRES::Resource *res ) return; } - mFormatBox->setCurrentItem( mFormatTypes.findIndex( resource->format() ) ); + mFormatBox->setCurrentItem( mFormatTypes.tqfindIndex( resource->format() ) ); mUrlEdit->setURL( resource->url().url() ); } diff --git a/kabc/resourceselectdialog.cpp b/kabc/resourceselectdialog.cpp index a52754be3..256125cd2 100644 --- a/kabc/resourceselectdialog.cpp +++ b/kabc/resourceselectdialog.cpp @@ -54,8 +54,8 @@ ResourceSelectDialog::ResourceSelectDialog( AddressBook *ab, TQWidget *parent, c KButtonBox *buttonBox = new KButtonBox( this ); buttonBox->addStretch(); - buttonBox->addButton( KStdGuiItem::ok(), this, TQT_SLOT( accept() ) ); - buttonBox->addButton( KStdGuiItem::cancel(), this, TQT_SLOT( reject() ) ); + buttonBox->addButton( KStdGuiItem::ok(), TQT_TQOBJECT(this), TQT_SLOT( accept() ) ); + buttonBox->addButton( KStdGuiItem::cancel(), TQT_TQOBJECT(this), TQT_SLOT( reject() ) ); buttonBox->layout(); mainLayout->addWidget( buttonBox ); diff --git a/kabc/scripts/addressee.src.cpp b/kabc/scripts/addressee.src.cpp index 11384e456..9be85b22b 100644 --- a/kabc/scripts/addressee.src.cpp +++ b/kabc/scripts/addressee.src.cpp @@ -212,11 +212,11 @@ void Addressee::setNameFromString( const TQString &s ) setName( str ); // clear all name parts - setPrefix( TQString::null ); - setGivenName( TQString::null ); - setAdditionalName( TQString::null ); - setFamilyName( TQString::null ); - setSuffix( TQString::null ); + setPrefix( TQString() ); + setGivenName( TQString() ); + setAdditionalName( TQString() ); + setFamilyName( TQString() ); + setSuffix( TQString() ); if ( str.isEmpty() ) return; @@ -391,7 +391,7 @@ TQString Addressee::fullEmail( const TQString &email ) const } else { e = email; } - if ( e.isEmpty() ) return TQString::null; + if ( e.isEmpty() ) return TQString(); TQString text; if ( realName().isEmpty() ) @@ -444,7 +444,7 @@ void Addressee::removeEmail( const TQString &email ) TQString Addressee::preferredEmail() const { - if ( mData->emails.count() == 0 ) return TQString::null; + if ( mData->emails.count() == 0 ) return TQString(); else return mData->emails.first(); } @@ -755,7 +755,7 @@ void Addressee::insertCategory( const TQString &c ) detach(); mData->empty = false; - if ( mData->categories.findIndex( c ) != -1 ) return; + if ( mData->categories.tqfindIndex( c ) != -1 ) return; mData->categories.append( c ); } @@ -772,7 +772,7 @@ void Addressee::removeCategory( const TQString &c ) bool Addressee::hasCategory( const TQString &c ) const { - return ( mData->categories.findIndex( c ) != -1 ); + return ( mData->categories.tqfindIndex( c ) != -1 ); } void Addressee::setCategories( const TQStringList &c ) diff --git a/kabc/scripts/entrylist b/kabc/scripts/entrylist index 40af0d0c2..87c342a06 100644 --- a/kabc/scripts/entrylist +++ b/kabc/scripts/entrylist @@ -13,64 +13,64 @@ # Field Category : Categories the field belongs to (see Field::FieldCategory). # Output function: Function used to convert type to string for debug output (optional) -ALE,name,,QString,name +ALE,name,,TQString,name -ALFE,formatted name,,QString,formattedName,Frequent +ALFE,formatted name,,TQString,formattedName,Frequent -ALFE,family name,,QString,familyName,Frequent -ALFE,given name,,QString,givenName,Frequent -ALFE,additional names,,QString,additionalName -ALFE,honorific prefixes,,QString,prefix -ALFE,honorific suffixes,,QString,suffix +ALFE,family name,,TQString,familyName,Frequent +ALFE,given name,,TQString,givenName,Frequent +ALFE,additional names,,TQString,additionalName +ALFE,honorific prefixes,,TQString,prefix +ALFE,honorific suffixes,,TQString,suffix -ALFE,nick name,,QString,nickName,Personal +ALFE,nick name,,TQString,nickName,Personal -ALFE,birthday,,QDateTime,birthday,Personal,.toString() +ALFE,birthday,,TQDateTime,birthday,Personal,.toString() #Address address -LF,home address street,,QString,homeAddressStreet,Address|Personal -LF,home address city,,QString,homeAddressLocality,Address|Personal -LF,home address state,,QString,homeAddressRegion,Address|Personal -LF,home address zip code,,QString,homeAddressPostalCode,Address|Personal -LF,home address country,,QString,homeAddressCountry,Address|Personal -LF,home address label,,QString,homeAddressLabel,Address|Personal - -LF,business address street,,QString,businessAddressStreet,Address|Organization -LF,business address city,,QString,businessAddressLocality,Address|Organization -LF,business address state,,QString,businessAddressRegion,Address|Organization -LF,business address zip code,,QString,businessAddressPostalCode,Address|Organization -LF,business address country,,QString,businessAddressCountry,Address|Organization -LF,business address label,,QString,businessAddressLabel,Address|Organization +LF,home address street,,TQString,homeAddressStreet,Address|Personal +LF,home address city,,TQString,homeAddressLocality,Address|Personal +LF,home address state,,TQString,homeAddressRegion,Address|Personal +LF,home address zip code,,TQString,homeAddressPostalCode,Address|Personal +LF,home address country,,TQString,homeAddressCountry,Address|Personal +LF,home address label,,TQString,homeAddressLabel,Address|Personal + +LF,business address street,,TQString,businessAddressStreet,Address|Organization +LF,business address city,,TQString,businessAddressLocality,Address|Organization +LF,business address state,,TQString,businessAddressRegion,Address|Organization +LF,business address zip code,,TQString,businessAddressPostalCode,Address|Organization +LF,business address country,,TQString,businessAddressCountry,Address|Organization +LF,business address label,,TQString,businessAddressLabel,Address|Organization #phoneNumbers -LF,home phone,,QString,homePhone,Personal|Frequent -LF,business phone,,QString,businessPhone,Organization|Frequent -LF,mobile phone,,QString,mobilePhone,Frequent -LF,home fax,,QString,homeFax -LF,business fax,,QString,businessFax -LF,car phone,,QString,carPhone -LF,ISDN,,QString,isdn -LF,pager,,QString,pager +LF,home phone,,TQString,homePhone,Personal|Frequent +LF,business phone,,TQString,businessPhone,Organization|Frequent +LF,mobile phone,,TQString,mobilePhone,Frequent +LF,home fax,,TQString,homeFax +LF,business fax,,TQString,businessFax +LF,car phone,,TQString,carPhone +LF,ISDN,,TQString,isdn +LF,pager,,TQString,pager #emails -LF,email address,,QString,email,Email|Frequent +LF,email address,,TQString,email,Email|Frequent -ALFE,mail client,,QString,mailer,Email +ALFE,mail client,,TQString,mailer,Email ALE,time zone,,TimeZone,timeZone,,.asString() ALE,geographic position,,Geo,geo,,.asString() -ALFE,title,person,QString,title,Organization -ALFE,role,person in organization,QString,role,Organization -ALFE,organization,,QString,organization,Organization -ALFE,department,,QString,department,Organization +ALFE,title,person,TQString,title,Organization +ALFE,role,person in organization,TQString,role,Organization +ALFE,organization,,TQString,organization,Organization +ALFE,department,,TQString,department,Organization -ALFE,note,,QString,note +ALFE,note,,TQString,note -ALE,product identifier,,QString,productId -ALE,revision date,,QDateTime,revision,,.toString() +ALE,product identifier,,TQString,productId +ALE,revision date,,TQDateTime,revision,,.toString() -ALE,sort string,,QString,sortString +ALE,sort string,,TQString,sortString ALF,homepage,,KURL,url,,.url() diff --git a/kabc/scripts/field.src.cpp b/kabc/scripts/field.src.cpp index 8a270f2d4..5291303f5 100644 --- a/kabc/scripts/field.src.cpp +++ b/kabc/scripts/field.src.cpp @@ -344,7 +344,7 @@ bool Field::setValue( KABC::Addressee &a, const TQString &value ) return true; } case FieldImpl::Birthday: - a.setBirthday( TQDate::fromString( value, Qt::ISODate ) ); + a.setBirthday( TQT_TQDATE_OBJECT(TQDate::fromString( value, Qt::ISODate )) ); return true; case FieldImpl::CustomField: a.insertCustom( mImpl->app(), mImpl->key(), value ); @@ -360,7 +360,7 @@ TQString Field::sortKey( const KABC::Addressee &a ) --CASEVALUE-- case FieldImpl::Birthday: if ( a.birthday().isValid() ) { - TQDate date = a.birthday().date(); + TQDate date = TQT_TQDATE_OBJECT(a.birthday().date()); TQString key; key.sprintf( "%02d-%02d", date.month(), date.day() ); return key; diff --git a/kabc/scripts/makeaddressee b/kabc/scripts/makeaddressee index cbc69543a..fa955b0bf 100755 --- a/kabc/scripts/makeaddressee +++ b/kabc/scripts/makeaddressee @@ -55,7 +55,7 @@ if (!open( H_OUT, ">../addressee.h" ) ) { print H_OUT " /**\n"; print H_OUT " Return translated label for $entryNames[$i] field.\n"; print H_OUT " */\n"; - print H_OUT " static QString $entryNames[$i]Label();\n\n"; + print H_OUT " static TQString $entryNames[$i]Label();\n\n"; } } else { print H_OUT; @@ -100,7 +100,7 @@ if (!open( CPP_OUT, ">../addressee.cpp" ) ) { $labelwords[$j] = ucfirst $labelwords[$j]; } $label = join ' ', @labelwords; - print CPP_OUT "QString Addressee::$entryNames[$i]Label()\n{\n"; + print CPP_OUT "TQString Addressee::$entryNames[$i]Label()\n{\n"; if ( $entryComments[$i] ) { print CPP_OUT " return i18n(\"$entryComments[$i]\",\"$label\");\n"; } else { @@ -112,7 +112,7 @@ if (!open( CPP_OUT, ">../addressee.cpp" ) ) { for( $i=0; $i<@entryNames; ++$i ) { if ( $entryCtrl[$i] =~ /E/ ) { if ( $entryNames[$i] !~ "revision" ) { - if ( $entryTypes[$i] =~ "QString" ) { + if ( $entryTypes[$i] =~ "TQString" ) { print CPP_OUT " if ( mData->$entryNames[$i] != a.mData->$entryNames[$i] &&\n"; print CPP_OUT " !( mData->$entryNames[$i].isEmpty() && a.mData->$entryNames[$i].isEmpty() ) ) {\n"; print CPP_OUT " kdDebug(5700) << \"$entryNames[$i] differs\" << endl;\n"; @@ -184,7 +184,7 @@ if (!open( CPP_OUT, ">../field.cpp" ) ) { for( $i=0; $i<@entryNames; ++$i ) { if ( $entryCtrl[$i] !~ /A/ ) { next; } if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "QString" ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; print CPP_OUT " return a.$entryNames[$i]();\n"; } @@ -192,7 +192,7 @@ if (!open( CPP_OUT, ">../field.cpp" ) ) { for( $i=0; $i<@entryNames; ++$i ) { if ( $entryCtrl[$i] !~ /A/ ) { next; } if ( $entryCtrl[$i] !~ /F/ ) { next; } - if ( $entryTypes[$i] ne "QString" ) { next; } + if ( $entryTypes[$i] ne "TQString" ) { next; } print CPP_OUT " case FieldImpl::" . ucfirst($entryNames[$i]) . ":\n"; print CPP_OUT " a.set" . ucfirst($entryNames[$i]) . "( value );\n"; print CPP_OUT " return true;\n"; diff --git a/kabc/vcard/ContentLine.cpp b/kabc/vcard/ContentLine.cpp index 31151be9f..a301a0244 100644 --- a/kabc/vcard/ContentLine.cpp +++ b/kabc/vcard/ContentLine.cpp @@ -140,7 +140,7 @@ ContentLine::_parse() vDebug("parse"); // Unqote newlines - strRep_ = strRep_.replace( TQRegExp( "\\\\n" ), "\n" ); + strRep_ = strRep_.tqreplace( TQRegExp( "\\\\n" ), "\n" ); int split = strRep_.tqfind(':'); @@ -275,7 +275,7 @@ ContentLine::_assemble() } // Quote newlines - line = line.replace( TQRegExp( "\n" ), "\\n" ); + line = line.tqreplace( TQRegExp( "\n" ), "\\n" ); // Fold lines longer than 72 chars const int maxLen = 72; diff --git a/kabc/vcard/DateValue.cpp b/kabc/vcard/DateValue.cpp index 0311ac2e2..6828380fc 100644 --- a/kabc/vcard/DateValue.cpp +++ b/kabc/vcard/DateValue.cpp @@ -173,7 +173,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// DATE - dateStr.replace(TQRegExp("-"), ""); + dateStr.tqreplace(TQRegExp("-"), ""); kdDebug(5710) << "dateStr: " << dateStr << endl; @@ -208,7 +208,7 @@ DateValue::_parse() //////////////////////////////////////////////////// SECOND FRACTION - int secFracSep = timeStr.findRev(','); + int secFracSep = timeStr.tqfindRev(','); if (secFracSep != -1 && zoneSep != -1) { // zoneSep checked to avoid errors. TQCString quirkafleeg = "0." + timeStr.mid(secFracSep + 1, zoneSep); @@ -217,7 +217,7 @@ DateValue::_parse() /////////////////////////////////////////////////////////////// HMS - timeStr.replace(TQRegExp(":"), ""); + timeStr.tqreplace(TQRegExp(":"), ""); hour_ = timeStr.left(2).toInt(); minute_ = timeStr.mid(2, 2).toInt(); @@ -398,7 +398,7 @@ DateValue::setZoneMinute(unsigned int i) assembled_ = false; } - QDate + TQDate DateValue::qdate() { parse(); @@ -406,7 +406,7 @@ DateValue::qdate() return d; } - QTime + TQTime DateValue::qtime() { parse(); @@ -415,7 +415,7 @@ DateValue::qtime() return t; } - QDateTime + TQDateTime DateValue::qdt() { parse(); diff --git a/kabc/vcard/Entity.cpp b/kabc/vcard/Entity.cpp index 83ee8d40d..5eaf6a1d0 100644 --- a/kabc/vcard/Entity.cpp +++ b/kabc/vcard/Entity.cpp @@ -99,7 +99,7 @@ Entity::~Entity() // empty } - QCString + TQCString Entity::asString() { // vDebug("Entity::asString()"); diff --git a/kabc/vcard/Enum.cpp b/kabc/vcard/Enum.cpp index 4d8d167a0..bcb48f98a 100644 --- a/kabc/vcard/Enum.cpp +++ b/kabc/vcard/Enum.cpp @@ -31,7 +31,7 @@ using namespace VCARD; // There are 31 possible types, not including extensions. // URI is a custom field designed to store the upstream URI for each contact // in order to handle certain limited CardDAV systems such as Zimbra - const QCString + const TQCString VCARD::paramNames [] = { "NAME", @@ -228,7 +228,7 @@ VCARD::EntityTypeToValueType(EntityType e) return t; } - QCString + TQCString VCARD::EntityTypeToParamName(EntityType e) { if ( e > EntityUnknown ) e = EntityUnknown; diff --git a/kabc/vcard/LangValue.cpp b/kabc/vcard/LangValue.cpp index 6ef46c98f..f7e5a759e 100644 --- a/kabc/vcard/LangValue.cpp +++ b/kabc/vcard/LangValue.cpp @@ -97,14 +97,14 @@ LangValue::_assemble() strRep_ += TQCString('-') + it.current(); } - QCString + TQCString LangValue::primary() { parse(); return primary_; } - QStrList + TQStrList LangValue::subtags() { parse(); diff --git a/kabc/vcard/OrgValue.cpp b/kabc/vcard/OrgValue.cpp index cfd9c6f73..94ca18243 100644 --- a/kabc/vcard/OrgValue.cpp +++ b/kabc/vcard/OrgValue.cpp @@ -98,7 +98,7 @@ OrgValue::numValues() return valueList_.count(); } - QCString + TQCString OrgValue::value(unsigned int i) { parse(); diff --git a/kabc/vcard/Param.cpp b/kabc/vcard/Param.cpp index d631f2319..8c5ad9e2c 100644 --- a/kabc/vcard/Param.cpp +++ b/kabc/vcard/Param.cpp @@ -116,13 +116,13 @@ Param::setValue(const TQCString & value) assembled_ = false; } - QCString + TQCString Param::name() { return name_; } - QCString + TQCString Param::value() { return value_; diff --git a/kabc/vcard/TextListValue.cpp b/kabc/vcard/TextListValue.cpp index e29a8dcc2..2bec2e181 100644 --- a/kabc/vcard/TextListValue.cpp +++ b/kabc/vcard/TextListValue.cpp @@ -98,7 +98,7 @@ TextListValue::numValues() return valueList_.count(); } - QCString + TQCString TextListValue::value(unsigned int i) { parse(); diff --git a/kabc/vcard/URIValue.cpp b/kabc/vcard/URIValue.cpp index ea598c5f5..9b13119d3 100644 --- a/kabc/vcard/URIValue.cpp +++ b/kabc/vcard/URIValue.cpp @@ -103,14 +103,14 @@ URIValue::_assemble() strRep_ = scheme_ + ':' + schemeSpecificPart_; } - QCString + TQCString URIValue::scheme() { parse(); return scheme_; } - QCString + TQCString URIValue::schemeSpecificPart() { parse(); diff --git a/kabc/vcard/include/VCardAdrParam.h b/kabc/vcard/include/VCardAdrParam.h index ed5497deb..d40165f4a 100644 --- a/kabc/vcard/include/VCardAdrParam.h +++ b/kabc/vcard/include/VCardAdrParam.h @@ -56,8 +56,8 @@ class KVCARD_EXPORT AdrParam : public Param private: - QStrList adrTypeList_; - QCString textParam_; + TQStrList adrTypeList_; + TQCString textParam_; }; } diff --git a/kabc/vcard/include/VCardContentLine.h b/kabc/vcard/include/VCardContentLine.h index 20d5c5033..ea59444a0 100644 --- a/kabc/vcard/include/VCardContentLine.h +++ b/kabc/vcard/include/VCardContentLine.h @@ -39,8 +39,8 @@ class KVCARD_EXPORT ContentLine : public Entity #include "ContentLine-generated.h" - QCString group() { parse(); return group_; } - QCString name() { parse(); return name_; } + TQCString group() { parse(); return group_; } + TQCString name() { parse(); return name_; } Value * value() { parse(); return value_; } ParamList paramList() { parse(); return paramList_; } ParamType paramType() { parse(); return paramType_; } @@ -63,8 +63,8 @@ class KVCARD_EXPORT ContentLine : public Entity private: - QCString group_; - QCString name_; + TQCString group_; + TQCString name_; TQPtrList<Param> paramList_; Value * value_; diff --git a/kabc/vcard/include/VCardEmailParam.h b/kabc/vcard/include/VCardEmailParam.h index 55086faec..1fe558afd 100644 --- a/kabc/vcard/include/VCardEmailParam.h +++ b/kabc/vcard/include/VCardEmailParam.h @@ -36,7 +36,7 @@ class KVCARD_EXPORT EmailParam : public Param #include "EmailParam-generated.h" - QCString emailType() { parse(); return emailType_; } + TQCString emailType() { parse(); return emailType_; } bool pref() { parse(); return pref_; } void setEmailType(const TQCString & s) @@ -47,7 +47,7 @@ class KVCARD_EXPORT EmailParam : public Param private: - QCString emailType_; + TQCString emailType_; bool pref_; }; diff --git a/kabc/vcard/include/VCardVCard.h b/kabc/vcard/include/VCardVCard.h index 64ed5c787..53563e8c0 100644 --- a/kabc/vcard/include/VCardVCard.h +++ b/kabc/vcard/include/VCardVCard.h @@ -54,7 +54,7 @@ class KVCARD_EXPORT VCard : public Entity private: - QCString group_; + TQCString group_; TQPtrList<ContentLine> contentLineList_; }; diff --git a/kabc/vcard21parser.cpp b/kabc/vcard21parser.cpp index 94ad3b723..64696003a 100644 --- a/kabc/vcard21parser.cpp +++ b/kabc/vcard21parser.cpp @@ -41,12 +41,12 @@ bool VCardLineX::isValid() const switch( name[0] ) { case 'a': if ( name == VCARD_ADR && qualified && - (qualifiers.contains(VCARD_ADR_DOM) || - qualifiers.contains(VCARD_ADR_INTL) || - qualifiers.contains(VCARD_ADR_POSTAL) || - qualifiers.contains(VCARD_ADR_HOME) || - qualifiers.contains(VCARD_ADR_WORK) || - qualifiers.contains(VCARD_ADR_PREF) + (qualifiers.tqcontains(VCARD_ADR_DOM) || + qualifiers.tqcontains(VCARD_ADR_INTL) || + qualifiers.tqcontains(VCARD_ADR_POSTAL) || + qualifiers.tqcontains(VCARD_ADR_HOME) || + qualifiers.tqcontains(VCARD_ADR_WORK) || + qualifiers.tqcontains(VCARD_ADR_PREF) ) ) return true; @@ -63,18 +63,18 @@ bool VCardLineX::isValid() const if ( name == VCARD_CATEGORIES ) return true; if ( name == VCARD_CLASS && qualified && - (qualifiers.contains(VCARD_CLASS_PUBLIC) || - qualifiers.contains(VCARD_CLASS_PRIVATE) || - qualifiers.contains(VCARD_CLASS_CONFIDENTIAL) + (qualifiers.tqcontains(VCARD_CLASS_PUBLIC) || + qualifiers.tqcontains(VCARD_CLASS_PRIVATE) || + qualifiers.tqcontains(VCARD_CLASS_CONFIDENTIAL) ) ) return true; break; case 'e': if ( name == VCARD_EMAIL && qualified && - (qualifiers.contains(VCARD_EMAIL_INTERNET) || - qualifiers.contains(VCARD_EMAIL_PREF) || - qualifiers.contains(VCARD_EMAIL_X400) + (qualifiers.tqcontains(VCARD_EMAIL_INTERNET) || + qualifiers.tqcontains(VCARD_EMAIL_PREF) || + qualifiers.tqcontains(VCARD_EMAIL_X400) ) ) return true; break; @@ -91,8 +91,8 @@ bool VCardLineX::isValid() const case 'k': if ( name == VCARD_KEY && qualified && - (qualifiers.contains(VCARD_KEY_X509) || - qualifiers.contains(VCARD_KEY_PGP) + (qualifiers.tqcontains(VCARD_KEY_X509) || + qualifiers.tqcontains(VCARD_KEY_PGP) ) ) return true; break; @@ -150,20 +150,20 @@ bool VCardLineX::isValid() const case 't': if ( name == VCARD_TEL && qualified && - (qualifiers.contains(VCARD_TEL_HOME) || - qualifiers.contains(VCARD_TEL_WORK) || - qualifiers.contains(VCARD_TEL_PREF) || - qualifiers.contains(VCARD_TEL_VOICE) || - qualifiers.contains(VCARD_TEL_FAX) || - qualifiers.contains(VCARD_TEL_MSG) || - qualifiers.contains(VCARD_TEL_CELL) || - qualifiers.contains(VCARD_TEL_PAGER) || - qualifiers.contains(VCARD_TEL_BBS) || - qualifiers.contains(VCARD_TEL_MODEM) || - qualifiers.contains(VCARD_TEL_CAR) || - qualifiers.contains(VCARD_TEL_ISDN) || - qualifiers.contains(VCARD_TEL_VIDEO) || - qualifiers.contains(VCARD_TEL_PCS) + (qualifiers.tqcontains(VCARD_TEL_HOME) || + qualifiers.tqcontains(VCARD_TEL_WORK) || + qualifiers.tqcontains(VCARD_TEL_PREF) || + qualifiers.tqcontains(VCARD_TEL_VOICE) || + qualifiers.tqcontains(VCARD_TEL_FAX) || + qualifiers.tqcontains(VCARD_TEL_MSG) || + qualifiers.tqcontains(VCARD_TEL_CELL) || + qualifiers.tqcontains(VCARD_TEL_PAGER) || + qualifiers.tqcontains(VCARD_TEL_BBS) || + qualifiers.tqcontains(VCARD_TEL_MODEM) || + qualifiers.tqcontains(VCARD_TEL_CAR) || + qualifiers.tqcontains(VCARD_TEL_ISDN) || + qualifiers.tqcontains(VCARD_TEL_VIDEO) || + qualifiers.tqcontains(VCARD_TEL_PCS) ) ) return true; if ( name == VCARD_TZ ) @@ -266,33 +266,33 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) if ( (*i).name == VCARD_TEL ) { int type = 0; if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_TEL_HOME ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_HOME ) ) type |= PhoneNumber::Home; - if ( (*i).qualifiers.contains( VCARD_TEL_WORK ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_WORK ) ) type |= PhoneNumber::Work; - if ( (*i).qualifiers.contains( VCARD_TEL_PREF ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_PREF ) ) type |= PhoneNumber::Pref; - // if ( (*i).qualifiers.contains( VCARD_TEL_VOICE ) ) + // if ( (*i).qualifiers.tqcontains( VCARD_TEL_VOICE ) ) // type |= PhoneNumber::Voice; - if ( (*i).qualifiers.contains( VCARD_TEL_FAX ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_FAX ) ) type |= PhoneNumber::Fax; - if ( (*i).qualifiers.contains( VCARD_TEL_MSG ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_MSG ) ) type |= PhoneNumber::Msg; - if ( (*i).qualifiers.contains( VCARD_TEL_CELL ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_CELL ) ) type |= PhoneNumber::Cell; - if ( (*i).qualifiers.contains( VCARD_TEL_PAGER ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_PAGER ) ) type |= PhoneNumber::Pager; - if ( (*i).qualifiers.contains( VCARD_TEL_BBS ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_BBS ) ) type |= PhoneNumber::Bbs; - if ( (*i).qualifiers.contains( VCARD_TEL_MODEM ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_MODEM ) ) type |= PhoneNumber::Modem; - if ( (*i).qualifiers.contains( VCARD_TEL_CAR ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_CAR ) ) type |= PhoneNumber::Car; - if ( (*i).qualifiers.contains( VCARD_TEL_ISDN ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_ISDN ) ) type |= PhoneNumber::Isdn; - if ( (*i).qualifiers.contains( VCARD_TEL_VIDEO ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_VIDEO ) ) type |= PhoneNumber::Video; - if ( (*i).qualifiers.contains( VCARD_TEL_PCS ) ) + if ( (*i).qualifiers.tqcontains( VCARD_TEL_PCS ) ) type |= PhoneNumber::Pcs; } addressee.insertPhoneNumber( PhoneNumber( (*i).parameters[ 0 ], type ) ); @@ -304,19 +304,19 @@ KABC::Addressee VCard21Parser::readFromString( const TQString &data) if ( (*i).name == VCARD_ADR ) { int type = 0; if ( (*i).qualified ) { - if ( (*i).qualifiers.contains( VCARD_ADR_DOM ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_DOM ) ) type |= Address::Dom; - if ( (*i).qualifiers.contains( VCARD_ADR_INTL ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_INTL ) ) type |= Address::Intl; - if ( (*i).qualifiers.contains( VCARD_ADR_POSTAL ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_POSTAL ) ) type |= Address::Postal; - if ( (*i).qualifiers.contains( VCARD_ADR_PARCEL ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_PARCEL ) ) type |= Address::Parcel; - if ( (*i).qualifiers.contains( VCARD_ADR_HOME ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_HOME ) ) type |= Address::Home; - if ( (*i).qualifiers.contains( VCARD_ADR_WORK ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_WORK ) ) type |= Address::Work; - if ( (*i).qualifiers.contains( VCARD_ADR_PREF ) ) + if ( (*i).qualifiers.tqcontains( VCARD_ADR_PREF ) ) type |= Address::Pref; } addressee.insertAddress( readAddressFromQStringList( (*i).parameters, type ) ); @@ -492,7 +492,7 @@ VCard21ParserImpl *VCard21ParserImpl::parseVCard( const TQString& vc, int *err ) _vcl.parameters = TQStringList::split( ';', value, true ); if ( qp ) { // decode the quoted printable for ( TQStringList::Iterator z = _vcl.parameters.begin(); z != _vcl.parameters.end(); ++z ) - *z = KCodecs::quotedPrintableDecode( (*z).latin1() ); + *z = KCodecs::quotedPrintableDecode( TQCString((*z).latin1()) ); } } } else { @@ -556,7 +556,7 @@ TQString VCard21ParserImpl::getValue(const TQString& name, const TQString& quali const TQString lowqualifier = qualifier.lower(); for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) { + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier)) { if ((*i).parameters.count() > 0) return (*i).parameters[0]; else return failed; @@ -598,7 +598,7 @@ TQStringList VCard21ParserImpl::getValues(const TQString& name, const TQString& const TQString lowname = name.lower(); const TQString lowqualifier = qualifier.lower(); for (TQValueListIterator<VCardLineX> i = _vcdata->begin();i != _vcdata->end();++i) { - if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.contains(lowqualifier)) + if ((*i).name == lowname && (*i).qualified && (*i).qualifiers.tqcontains(lowqualifier)) return (*i).parameters; } // failed. diff --git a/kabc/vcardformatimpl.cpp b/kabc/vcardformatimpl.cpp index ae70c434d..8c0b551e5 100644 --- a/kabc/vcardformatimpl.cpp +++ b/kabc/vcardformatimpl.cpp @@ -331,8 +331,8 @@ void VCardFormatImpl::saveAddressee( const Addressee &addressee, VCARD::VCard *v addTextValue( v, EntityCategories, addressee.categories().join(",") ); - addDateValue( v, EntityBirthday, addressee.birthday().date() ); - addDateTimeValue( v, EntityRevision, addressee.revision() ); + addDateValue( v, EntityBirthday, TQT_TQDATE_OBJECT(addressee.birthday().date()) ); + addDateTimeValue( v, EntityRevision, TQT_TQDATETIME_OBJECT(addressee.revision()) ); addGeoValue( v, addressee.geo() ); addUTCValue( v, addressee.timeZone() ); @@ -540,11 +540,11 @@ void VCardFormatImpl::addNValue( VCARD::VCard *vcard, const Addressee &a ) ContentLine cl; cl.setName(EntityTypeToParamName( EntityN ) ); NValue *v = new NValue; - v->setFamily( a.familyName().utf8() ); - v->setGiven( a.givenName().utf8() ); - v->setMiddle( a.additionalName().utf8() ); - v->setPrefix( a.prefix().utf8() ); - v->setSuffix( a.suffix().utf8() ); + v->setFamily( TQString(a.familyName()).utf8() ); + v->setGiven( TQString(a.givenName()).utf8() ); + v->setMiddle( TQString(a.additionalName()).utf8() ); + v->setPrefix( TQString(a.prefix()).utf8() ); + v->setSuffix( TQString(a.suffix()).utf8() ); cl.setValue( v ); vcard->add(cl); diff --git a/kabc/vcardparser/vcardline.cpp b/kabc/vcardparser/vcardline.cpp index dc43056cd..50e9fa53e 100644 --- a/kabc/vcardparser/vcardline.cpp +++ b/kabc/vcardparser/vcardline.cpp @@ -124,7 +124,7 @@ 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 ); } diff --git a/kabc/vcardparser/vcardparser.cpp b/kabc/vcardparser/vcardparser.cpp index 5fe6b3154..35d48f77c 100644 --- a/kabc/vcardparser/vcardparser.cpp +++ b/kabc/vcardparser/vcardparser.cpp @@ -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,18 +155,18 @@ 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 ) { vCardLine.setValue( codec->toUnicode( output ) ); } else { - vCardLine.setValue( TQString::fromUtf8( output ) ); + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); } } else if ( wasBase64Encoded ) { vCardLine.setValue( output ); } else { // if charset not given, assume it's in UTF-8 (as used in previous KDE versions) - vCardLine.setValue( TQString::fromUtf8( output ) ); + vCardLine.setValue( TQString(TQString::fromUtf8( output )) ); } currentVCard.addLine( vCardLine ); diff --git a/kabc/vcardtool.cpp b/kabc/vcardtool.cpp index 4e08915d7..44d3f1464 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.at( i ).latin1(); + char c = value.tqat( i ).latin1(); if ( (c < 33 || c > 126) && c != ' ' && c != '=' ) return true; } @@ -138,7 +138,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) card.addLine( createAgent( version, (*addrIt).agent() ) ); // BDAY - card.addLine( VCardLine( "BDAY", createDateTime( (*addrIt).birthday() ) ) ); + card.addLine( VCardLine( "BDAY", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).birthday()) ) ) ); // CATEGORIES if ( version == VCard::v3_0 ) { @@ -174,7 +174,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) } // FN - VCardLine fnLine( "FN", (*addrIt).formattedName() ); + VCardLine fnLine( "FN", TQString((*addrIt).formattedName()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).formattedName() ) ) { fnLine.addParameter( "charset", "UTF-8" ); fnLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -199,7 +199,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) card.addLine( createPicture( "LOGO", (*addrIt).logo() ) ); // MAILER - VCardLine mailerLine( "MAILER", (*addrIt).mailer() ); + VCardLine mailerLine( "MAILER", TQString((*addrIt).mailer()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).mailer() ) ) { mailerLine.addParameter( "charset", "UTF-8" ); mailerLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -222,7 +222,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) card.addLine( nLine ); // NAME - VCardLine nameLine( "NAME", (*addrIt).name() ); + VCardLine nameLine( "NAME", TQString((*addrIt).name()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).name() ) ) { nameLine.addParameter( "charset", "UTF-8" ); nameLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -231,10 +231,10 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // NICKNAME if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "NICKNAME", (*addrIt).nickName() ) ); + card.addLine( VCardLine( "NICKNAME", TQString((*addrIt).nickName()) ) ); // NOTE - VCardLine noteLine( "NOTE", (*addrIt).note() ); + VCardLine noteLine( "NOTE", TQString((*addrIt).note()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).note() ) ) { noteLine.addParameter( "charset", "UTF-8" ); noteLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -258,13 +258,13 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // PROID if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "PRODID", (*addrIt).productId() ) ); + card.addLine( VCardLine( "PRODID", TQString((*addrIt).productId()) ) ); // REV - card.addLine( VCardLine( "REV", createDateTime( (*addrIt).revision() ) ) ); + card.addLine( VCardLine( "REV", createDateTime( TQT_TQDATETIME_OBJECT((*addrIt).revision()) ) ) ); // ROLE - VCardLine roleLine( "ROLE", (*addrIt).role() ); + VCardLine roleLine( "ROLE", TQString((*addrIt).role()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).role() ) ) { roleLine.addParameter( "charset", "UTF-8" ); roleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -273,7 +273,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) // SORT-STRING if ( version == VCard::v3_0 ) - card.addLine( VCardLine( "SORT-STRING", (*addrIt).sortString() ) ); + card.addLine( VCardLine( "SORT-STRING", TQString((*addrIt).sortString()) ) ); // SOUND card.addLine( createSound( (*addrIt).sound() ) ); @@ -294,7 +294,7 @@ TQString VCardTool::createVCards( Addressee::List list, VCard::Version version ) } // TITLE - VCardLine titleLine( "TITLE", (*addrIt).title() ); + VCardLine titleLine( "TITLE", TQString((*addrIt).title()) ); if ( version == VCard::v2_1 && needsEncoding( (*addrIt).title() ) ) { titleLine.addParameter( "charset", "UTF-8" ); titleLine.addParameter( "encoding", "QUOTED-PRINTABLE" ); @@ -428,7 +428,7 @@ Addressee::List VCardTool::parseVCards( const TQString& vcard ) // EMAIL else if ( identifier == "email" ) { const TQStringList types = (*lineIt).parameters( "type" ); - addr.insertEmail( (*lineIt).value().asString(), types.findIndex( "PREF" ) != -1 ); + addr.insertEmail( (*lineIt).value().asString(), types.tqfindIndex( "PREF" ) != -1 ); } // FN @@ -653,16 +653,16 @@ Picture VCardTool::parsePicture( const VCardLine &line ) Picture pic; const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) { + if ( params.tqfindIndex( "encoding" ) != -1 ) { TQImage img; img.loadFromData( line.value().asByteArray() ); pic.setData( img ); - } else if ( params.findIndex( "value" ) != -1 ) { + } else if ( params.tqfindIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) pic.setUrl( line.value().asString() ); } - if ( params.findIndex( "type" ) != -1 ) + if ( params.tqfindIndex( "type" ) != -1 ) pic.setType( line.parameter( "type" ) ); return pic; @@ -700,9 +700,9 @@ Sound VCardTool::parseSound( const VCardLine &line ) Sound snd; const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) + if ( params.tqfindIndex( "encoding" ) != -1 ) snd.setData( line.value().asByteArray() ); - else if ( params.findIndex( "value" ) != -1 ) { + else if ( params.tqfindIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) snd.setUrl( line.value().asString() ); } @@ -738,12 +738,12 @@ Key VCardTool::parseKey( const VCardLine &line ) Key key; const TQStringList params = line.parameterList(); - if ( params.findIndex( "encoding" ) != -1 ) + if ( params.tqfindIndex( "encoding" ) != -1 ) key.setBinaryData( line.value().asByteArray() ); else key.setTextData( line.value().asString() ); - if ( params.findIndex( "type" ) != -1 ) { + if ( params.tqfindIndex( "type" ) != -1 ) { if ( line.parameter( "type" ).lower() == "x509" ) key.setType( Key::X509 ); else if ( line.parameter( "type" ).lower() == "pgp" ) @@ -814,7 +814,7 @@ Agent VCardTool::parseAgent( const VCardLine &line ) Agent agent; const TQStringList params = line.parameterList(); - if ( params.findIndex( "value" ) != -1 ) { + if ( params.tqfindIndex( "value" ) != -1 ) { if ( line.parameter( "value" ).lower() == "uri" ) agent.setUrl( line.value().asString() ); } else { |