diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kabc/kabc2mutt/kabc2mutt.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kabc/kabc2mutt/kabc2mutt.cpp')
-rw-r--r-- | kabc/kabc2mutt/kabc2mutt.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
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 <kapplication.h> #include <klocale.h> -#include <qregexp.h> +#include <tqregexp.h> #include <iostream> #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; |