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 /kpilot/lib/pilotAddress.cc | |
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 '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 |