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 --- libkdepim/kaddrbook.cpp | 72 ++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'libkdepim/kaddrbook.cpp') diff --git a/libkdepim/kaddrbook.cpp b/libkdepim/kaddrbook.cpp index 45c34863e..ade6ef706 100644 --- a/libkdepim/kaddrbook.cpp +++ b/libkdepim/kaddrbook.cpp @@ -26,15 +26,15 @@ #include #include -#include -#include +#include +#include #include //----------------------------------------------------------------------------- -void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) { - QString email; - QString name; +void KAddrBookExternal::openEmail( const TQString &addr, TQWidget *parent ) { + TQString email; + TQString name; KABC::Addressee::parseEmailAddress( addr, name, email ); @@ -49,7 +49,7 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) { #if KDE_IS_VERSION(3,4,89) // This ugly hack will be removed in 4.0 while ( !ab->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); @@ -69,23 +69,23 @@ void KAddrBookExternal::openEmail( const QString &addr, QWidget *parent ) { } DCOPRef call( "kaddressbook", "KAddressBookIface" ); - call.send( "showContactEditor(QString)", addressees.first().uid() ); + call.send( "showContactEditor(TQString)", addressees.first().uid() ); } else { //TODO: Enable the better message at the next string unfreeze #if 0 - QString text = i18n("The email address %1 cannot be " + TQString text = i18n("The email address %1 cannot be " "found in your addressbook.").arg( email ); #else - QString text = email + " " + i18n( "is not in address book" ); + TQString text = email + " " + i18n( "is not in address book" ); #endif - KMessageBox::information( parent, text, QString::null, "notInAddressBook" ); + KMessageBox::information( parent, text, TQString::null, "notInAddressBook" ); } } //----------------------------------------------------------------------------- -void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) { - QString email; - QString name; +void KAddrBookExternal::addEmail( const TQString& addr, TQWidget *parent) { + TQString email; + TQString name; KABC::Addressee::parseEmailAddress( addr, name, email ); @@ -102,7 +102,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) { #if KDE_IS_VERSION(3,4,89) // This ugly hack will be removed in 4.0 while ( !ab->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); @@ -121,7 +121,7 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) { config.setGroup( "General" ); int type = config.readNumEntry( "FormattedNameType", 1 ); - QString name; + TQString name; switch ( type ) { case 1: name = a.givenName() + " " + a.familyName(); @@ -148,32 +148,32 @@ void KAddrBookExternal::addEmail( const QString& addr, QWidget *parent) { } if ( KAddrBookExternal::addAddressee( a ) ) { - QString text = i18n("The email address %1 was added to your " + TQString text = i18n("The email address %1 was added to your " "addressbook; you can add more information to this " "entry by opening the addressbook.").arg( addr ); - KMessageBox::information( parent, text, QString::null, "addedtokabc" ); + KMessageBox::information( parent, text, TQString::null, "addedtokabc" ); } } else { - QString text = i18n("The email address %1 is already in your " + TQString text = i18n("The email address %1 is already in your " "addressbook.").arg( addr ); - KMessageBox::information( parent, text, QString::null, + KMessageBox::information( parent, text, TQString::null, "alreadyInAddressBook" ); } ab->setErrorHandler( 0 ); } -void KAddrBookExternal::openAddressBook(QWidget *) { +void KAddrBookExternal::openAddressBook(TQWidget *) { kapp->startServiceByDesktopName( "kaddressbook" ); } -void KAddrBookExternal::addNewAddressee( QWidget* ) +void KAddrBookExternal::addNewAddressee( TQWidget* ) { kapp->startServiceByDesktopName("kaddressbook"); DCOPRef call("kaddressbook", "KAddressBookIface"); call.send("newContact()"); } -bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *parent ) +bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, TQWidget *parent ) { KABC::AddressBook *ab = KABC::StdAddressBook::self( true ); bool inserted = false; @@ -185,14 +185,14 @@ bool KAddrBookExternal::addVCard( const KABC::Addressee& addressee, QWidget *par if ( addressees.isEmpty() ) { if ( KAddrBookExternal::addAddressee( addressee ) ) { - QString text = i18n("The VCard was added to your addressbook; " + TQString text = i18n("The VCard was added to your addressbook; " "you can add more information to this " "entry by opening the addressbook."); - KMessageBox::information( parent, text, QString::null, "addedtokabc" ); + KMessageBox::information( parent, text, TQString::null, "addedtokabc" ); inserted = true; } } else { - QString text = i18n("The VCard's primary email address is already in " + TQString text = i18n("The VCard's primary email address is already in " "your addressbook; however, you may save the VCard " "into a file and import it into the addressbook " "manually."); @@ -211,7 +211,7 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr ) #if KDE_IS_VERSION(3,4,89) // This ugly hack will be removed in 4.0 while ( !addressBook->loadingHasFinished() ) { - QApplication::eventLoop()->processEvents( QEventLoop::ExcludeUserInput ); + TQApplication::eventLoop()->processEvents( TQEventLoop::ExcludeUserInput ); // use sleep here to reduce cpu usage usleep( 100 ); @@ -219,10 +219,10 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr ) #endif // Select a resource - QPtrList kabcResources = addressBook->resources(); + TQPtrList kabcResources = addressBook->resources(); - QPtrList kresResources; - QPtrListIterator resIt( kabcResources ); + TQPtrList kresResources; + TQPtrListIterator resIt( kabcResources ); KABC::Resource *kabcResource; while ( ( kabcResource = resIt.current() ) != 0 ) { ++resIt; @@ -251,12 +251,12 @@ bool KAddrBookExternal::addAddressee( const KABC::Addressee& addr ) return saved; } -QString KAddrBookExternal::expandDistributionList( const QString& listName ) +TQString KAddrBookExternal::expandDistributionList( const TQString& listName ) { if ( listName.isEmpty() ) - return QString::null; + return TQString::null; - const QString lowerListName = listName.lower(); + const TQString lowerListName = listName.lower(); KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); #ifdef KDEPIM_NEW_DISTRLISTS KPIM::DistributionList distrList = KPIM::DistributionList::findByName( addressBook, lowerListName, false ); @@ -266,15 +266,15 @@ QString KAddrBookExternal::expandDistributionList( const QString& listName ) #else KABC::DistributionListManager manager( addressBook ); manager.load(); - const QStringList listNames = manager.listNames(); + const TQStringList listNames = manager.listNames(); - for ( QStringList::ConstIterator it = listNames.begin(); + for ( TQStringList::ConstIterator it = listNames.begin(); it != listNames.end(); ++it) { if ( (*it).lower() == lowerListName ) { - const QStringList addressList = manager.list( *it )->emails(); + const TQStringList addressList = manager.list( *it )->emails(); return addressList.join( ", " ); } } #endif - return QString::null; + return TQString::null; } -- cgit v1.2.1