diff options
Diffstat (limited to 'kpilot/lib/pilotAddress.cc')
-rw-r--r-- | kpilot/lib/pilotAddress.cc | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kpilot/lib/pilotAddress.cc b/kpilot/lib/pilotAddress.cc index 418c705b4..f12e9cc50 100644 --- a/kpilot/lib/pilotAddress.cc +++ b/kpilot/lib/pilotAddress.cc @@ -35,8 +35,8 @@ #include <stdlib.h> #include <assert.h> -#include <qnamespace.h> -#include <qstringlist.h> +#include <tqnamespace.h> +#include <tqstringlist.h> #include "pilotAddress.h" @@ -91,7 +91,7 @@ void PilotAddressInfo::resetToDefault() } } -QString PilotAddressInfo::phoneLabel(EPhoneType i) const +TQString PilotAddressInfo::phoneLabel(EPhoneType i) const { if (i<=eMobile) { @@ -99,7 +99,7 @@ QString PilotAddressInfo::phoneLabel(EPhoneType i) const } else { - return QString(); + return TQString(); } } @@ -169,9 +169,9 @@ unsigned int PhoneSlot::toField() const } } -PhoneSlot::operator QString() const +PhoneSlot::operator TQString() const { - return QString("%1,%2").arg(toOffset()).arg(toField()); + return TQString("%1,%2").arg(toOffset()).arg(toField()); } #define MAXFIELDS 19 @@ -273,13 +273,13 @@ PilotAddress::~PilotAddress() free_Address(&fAddressInfo); } -QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const +TQString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::TextFormat richText) const { - QString text, tmp; + TQString text, tmp; - QString par = (richText==Qt::RichText) ?CSL1("<p>"): QString(); - QString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); - QString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); + TQString par = (richText==Qt::RichText) ?CSL1("<p>"): TQString(); + TQString ps = (richText==Qt::RichText) ?CSL1("</p>"):CSL1("\n"); + TQString br = (richText==Qt::RichText) ?CSL1("<br/>"):CSL1("\n"); // title + name text += par; @@ -290,11 +290,11 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te } tmp = richText ? CSL1("<b><big>%1 %2</big></b>") : CSL1("%1 %2"); - QString firstName = getField(entryFirstname); + TQString firstName = getField(entryFirstname); if (firstName.isEmpty()) { // So replace placeholder for first name (%1) with empty - tmp = tmp.arg(QString()); + tmp = tmp.arg(TQString()); } else { @@ -392,7 +392,7 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te // category if (info) { - QString categoryName = info->categoryName( category() ); + TQString categoryName = info->categoryName( category() ); if (!categoryName.isEmpty()) { text += par; @@ -413,16 +413,16 @@ QString PilotAddress::getTextRepresentation(const PilotAddressInfo *info, Qt::Te return text; } -QStringList PilotAddress::getEmails() const +TQStringList PilotAddress::getEmails() const { - QStringList list; + TQStringList list; for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i) { PilotAddressInfo::EPhoneType t = getPhoneType( i ); if ( t == PilotAddressInfo::eEmail ) { - QString s = getField(i.toField()); + TQString s = getField(i.toField()); if (!s.isEmpty()) { list.append(s); @@ -433,10 +433,10 @@ QStringList PilotAddress::getEmails() const return list; } -void PilotAddress::setEmails(const QStringList &list) +void PilotAddress::setEmails(const TQStringList &list) { FUNCTIONSETUPL(4); - QString test; + TQString test; // clear all e-mails first for ( PhoneSlot i = PhoneSlot::begin(); i.isValid(); ++i ) @@ -444,14 +444,14 @@ void PilotAddress::setEmails(const QStringList &list) PilotAddressInfo::EPhoneType t = getPhoneType( i ); if (t == PilotAddressInfo::eEmail) { - setField(i.toField(), QString() ); + setField(i.toField(), TQString() ); } } - for(QStringList::ConstIterator listIter = list.begin(); + for(TQStringList::ConstIterator listIter = list.begin(); listIter != list.end(); ++listIter) { - QString email = *listIter; + TQString email = *listIter; if (!setPhoneField(PilotAddressInfo::eEmail, email, NoFlags).isValid()) { WARNINGKPILOT << "Email accounts overflowed, silently dropped." << endl; @@ -459,7 +459,7 @@ void PilotAddress::setEmails(const QStringList &list) } } -QString PilotAddress::getField(int field) const +TQString PilotAddress::getField(int field) const { if ( (entryLastname <= field) && (field <= entryNote) ) { @@ -467,7 +467,7 @@ QString PilotAddress::getField(int field) const } else { - return QString(); + return TQString(); } } @@ -487,7 +487,7 @@ PhoneSlot PilotAddress::_getNextEmptyPhoneSlot() const } PhoneSlot PilotAddress::setPhoneField(PilotAddressInfo::EPhoneType type, - const QString &field, + const TQString &field, PhoneHandlingFlags flags) { FUNCTIONSETUPL(4); @@ -531,7 +531,7 @@ PhoneSlot PilotAddress::_findPhoneFieldSlot(PilotAddressInfo::EPhoneType t) cons return PhoneSlot(); } -QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const +TQString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const { FUNCTIONSETUPL(4); PhoneSlot fieldSlot = _findPhoneFieldSlot(type); @@ -541,7 +541,7 @@ QString PilotAddress::getPhoneField(PilotAddressInfo::EPhoneType type) const return getField(fieldSlot.toField()); } - return QString(); + return TQString(); } PhoneSlot PilotAddress::getShownPhone() const @@ -599,7 +599,7 @@ PilotAddressInfo::EPhoneType PilotAddress::getPhoneType( const PhoneSlot &field } } -void PilotAddress::setField(int field, const QString &text) +void PilotAddress::setField(int field, const TQString &text) { FUNCTIONSETUPL(4); // This will have either been created with unpack_Address, and/or will |