From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kabc/kabc2mutt/kabc2mutt.cpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'kabc/kabc2mutt/kabc2mutt.cpp') diff --git a/kabc/kabc2mutt/kabc2mutt.cpp b/kabc/kabc2mutt/kabc2mutt.cpp index 84f4626bb..96cf79232 100644 --- a/kabc/kabc2mutt/kabc2mutt.cpp +++ b/kabc/kabc2mutt/kabc2mutt.cpp @@ -21,16 +21,16 @@ #include #include -#include +#include #include #include "kabc2mutt.h" -static std::ostream & operator<< ( std::ostream &os, const QString &s ); +static std::ostream & operator<< ( std::ostream &os, const TQString &s ); -KABC2Mutt::KABC2Mutt( QObject *parent, const char *name ) - : QObject( parent, name ), mFormat( Aliases ), +KABC2Mutt::KABC2Mutt( TQObject *parent, const char *name ) + : TQObject( parent, name ), mFormat( Aliases ), mIgnoreCase( false ), mAllAddresses( false ), mAlternateKeyFormat( false ), mAddressBook( 0 ) @@ -42,8 +42,8 @@ void KABC2Mutt::run() mAddressBook = KABC::StdAddressBook::self( true ); KABC::StdAddressBook::setAutomaticSave( false ); - connect( mAddressBook, SIGNAL( addressBookChanged( AddressBook* ) ), - this, SLOT( loadingFinished() ) ); + connect( mAddressBook, TQT_SIGNAL( addressBookChanged( AddressBook* ) ), + this, TQT_SLOT( loadingFinished() ) ); } void KABC2Mutt::loadingFinished() @@ -51,7 +51,7 @@ void KABC2Mutt::loadingFinished() // print addressees KABC::AddressBook::ConstIterator iaddr; for ( iaddr = mAddressBook->begin(); iaddr != mAddressBook->end(); ++iaddr ) { - const QString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); + const TQString name = (*iaddr).givenName() + ' ' + (*iaddr).familyName(); if ( !mQuery.isEmpty() ) { bool match = (name.find(mQuery, 0, mIgnoreCase) > -1) || ((*iaddr).preferredEmail().find( mQuery, 0, mIgnoreCase ) > -1 ); @@ -59,8 +59,8 @@ void KABC2Mutt::loadingFinished() continue; } - const QStringList &allAddresses = (*iaddr).emails(); - QStringList::const_iterator from, to; + const TQStringList &allAddresses = (*iaddr).emails(); + TQStringList::const_iterator from, to; bool multiple = false; if ( mAllAddresses ) { @@ -77,10 +77,10 @@ void KABC2Mutt::loadingFinished() size_t index = 0; if ( mFormat == Aliases ) { - static const QChar space = QChar( ' ' ); - static const QChar underscore = QChar( '_' ); + static const TQChar space = TQChar( ' ' ); + static const TQChar underscore = TQChar( '_' ); - QString key; + TQString key; if ( !mAlternateKeyFormat ) key = (*iaddr).givenName().left( 3 ) + (*iaddr).familyName().left( 3 ); else @@ -125,8 +125,8 @@ void KABC2Mutt::loadingFinished() KABC::DistributionListManager manager( mAddressBook ); manager.load(); - QStringList dists = manager.listNames(); - for ( QStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) { + TQStringList dists = manager.listNames(); + for ( TQStringList::Iterator iaddr = dists.begin(); iaddr != dists.end(); ++iaddr ) { KABC::DistributionList *list = manager.list( *iaddr ); if ( list ) { if ( !mQuery.isEmpty() ) { @@ -135,12 +135,12 @@ void KABC2Mutt::loadingFinished() continue; } - QStringList emails = list->emails(); + TQStringList emails = list->emails(); if ( emails.isEmpty() ) continue; if ( mFormat == Aliases ) { - std::cout << "alias " << (*iaddr).replace( QRegExp( " " ), "_" ) + std::cout << "alias " << (*iaddr).replace( TQRegExp( " " ), "_" ) << '\t' << emails.join( "," ) << std::endl; } else { std::cout << emails.join( "," ) << '\t' << (*iaddr) << '\t' << std::endl; @@ -151,7 +151,7 @@ void KABC2Mutt::loadingFinished() kapp->quit(); } -static std::ostream & operator<< ( std::ostream &os, const QString &s ) +static std::ostream & operator<< ( std::ostream &os, const TQString &s ) { os << s.local8Bit().data(); return os; -- cgit v1.2.1