From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/sms/smsaccount.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'kopete/protocols/sms/smsaccount.cpp') diff --git a/kopete/protocols/sms/smsaccount.cpp b/kopete/protocols/sms/smsaccount.cpp index 8fea6a12..f4cf21f5 100644 --- a/kopete/protocols/sms/smsaccount.cpp +++ b/kopete/protocols/sms/smsaccount.cpp @@ -34,14 +34,14 @@ #include "smsprotocol.h" #include "smscontact.h" -SMSAccount::SMSAccount( SMSProtocol *parent, const TQString &accountID, const char *name ) - : Kopete::Account( parent, accountID, name ) +SMSAccount::SMSAccount( SMSProtocol *tqparent, const TQString &accountID, const char *name ) + : Kopete::Account( tqparent, accountID, name ) { setMyself( new SMSContact(this, accountID, accountID, Kopete::ContactList::self()->myself()) ); loadConfig(); myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOffline ); - TQString sName = configGroup()->readEntry("ServiceName", TQString::null); + TQString sName = configGroup()->readEntry("ServiceName", TQString()); theService = ServiceLoader::loadService(sName, this); if( theService ) @@ -65,14 +65,14 @@ SMSAccount::~SMSAccount() void SMSAccount::loadConfig() { theSubEnable = configGroup()->readBoolEntry("SubEnable", false); - theSubCode = configGroup()->readEntry("SubCode", TQString::null); + theSubCode = configGroup()->readEntry("SubCode", TQString()); theLongMsgAction = (SMSMsgAction)configGroup()->readNumEntry("MsgAction", 0); } void SMSAccount::translateNumber(TQString &theNumber) { if(theNumber[0] == TQChar('0') && theSubEnable) - theNumber.replace(0, 1, theSubCode); + theNumber.tqreplace(0, 1, theSubCode); } const bool SMSAccount::splitNowMsgTooLong(int msgLength) @@ -83,7 +83,7 @@ const bool SMSAccount::splitNowMsgTooLong(int msgLength) int max = theService->maxSize(); if(theLongMsgAction == ACT_CANCEL) return false; if(theLongMsgAction == ACT_SPLIT) return true; - if(KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("This message is longer than the maximum length (%1). Should it be divided to %2 messages?").arg(max).arg(msgLength / max + 1), + if(KMessageBox::questionYesNo(Kopete::UI::Global::mainWidget(), i18n("This message is longer than the maximum length (%1). Should it be divided to %2 messages?").tqarg(max).tqarg(msgLength / max + 1), i18n("Message Too Long"), i18n("Divide"), i18n("Do Not Divide")) == KMessageBox::Yes) return true; else @@ -104,7 +104,7 @@ void SMSAccount::connect(const Kopete::OnlineStatus&) void SMSAccount::slotConnected() { myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOnline ); - setAllContactsStatus( SMSProtocol::protocol()->SMSOnline ); + setAllContactstqStatus( SMSProtocol::protocol()->SMSOnline ); } void SMSAccount::disconnect() @@ -116,7 +116,7 @@ void SMSAccount::disconnect() void SMSAccount::slotDisconnected() { myself()->setOnlineStatus( SMSProtocol::protocol()->SMSOffline ); - setAllContactsStatus( SMSProtocol::protocol()->SMSOffline ); + setAllContactstqStatus( SMSProtocol::protocol()->SMSOffline ); } void SMSAccount::slotSendMessage(Kopete::Message &msg) @@ -170,9 +170,9 @@ void SMSAccount::slotSendingFailure(const Kopete::Message &msg, const TQString & } bool SMSAccount::createContact( const TQString &contactId, - Kopete::MetaContact * parentContact ) + Kopete::MetaContact * tqparentContact ) { - if (new SMSContact(this, contactId, parentContact->displayName(), parentContact)) + if (new SMSContact(this, contactId, tqparentContact->displayName(), tqparentContact)) return true; else return false; @@ -186,11 +186,11 @@ KActionMenu* SMSAccount::actionMenu() void SMSAccount::setOnlineStatus( const Kopete::OnlineStatus & status , const TQString &reason) { - if ( myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online ) + if ( myself()->onlinetqStatus().status() == Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Online ) connect(); - else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Offline ) + else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Offline ) disconnect(); - else if ( myself()->onlineStatus().status() != Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Away ) + else if ( myself()->onlinetqStatus().status() != Kopete::OnlineStatus::Offline && status.status() == Kopete::OnlineStatus::Away ) setAway( true, reason ); } -- cgit v1.2.1