summaryrefslogtreecommitdiffstats
path: root/libkdepim/kaddrbook.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkdepim/kaddrbook.cpp')
-rw-r--r--libkdepim/kaddrbook.cpp72
1 files changed, 36 insertions, 36 deletions
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 <dcopref.h>
#include <dcopclient.h>
-#include <qeventloop.h>
-#include <qregexp.h>
+#include <tqeventloop.h>
+#include <tqregexp.h>
#include <unistd.h>
//-----------------------------------------------------------------------------
-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("<qt>The email address <b>%1</b> cannot be "
+ TQString text = i18n("<qt>The email address <b>%1</b> cannot be "
"found in your addressbook.</qt>").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("<qt>The email address <b>%1</b> was added to your "
+ TQString text = i18n("<qt>The email address <b>%1</b> was added to your "
"addressbook; you can add more information to this "
"entry by opening the addressbook.</qt>").arg( addr );
- KMessageBox::information( parent, text, QString::null, "addedtokabc" );
+ KMessageBox::information( parent, text, TQString::null, "addedtokabc" );
}
} else {
- QString text = i18n("<qt>The email address <b>%1</b> is already in your "
+ TQString text = i18n("<qt>The email address <b>%1</b> is already in your "
"addressbook.</qt>").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<KABC::Resource> kabcResources = addressBook->resources();
+ TQPtrList<KABC::Resource> kabcResources = addressBook->resources();
- QPtrList<KRES::Resource> kresResources;
- QPtrListIterator<KABC::Resource> resIt( kabcResources );
+ TQPtrList<KRES::Resource> kresResources;
+ TQPtrListIterator<KABC::Resource> 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;
}