summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services/smssendprovider.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-22 00:30:31 +0000
commit69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch)
tree073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /kopete/protocols/sms/services/smssendprovider.cpp
parent3467e6464beac3a162839bf7078e22e3a74d73e7 (diff)
downloadtdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz
tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip
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
Diffstat (limited to 'kopete/protocols/sms/services/smssendprovider.cpp')
-rw-r--r--kopete/protocols/sms/services/smssendprovider.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp
index 5f0f37ee..c886cb3d 100644
--- a/kopete/protocols/sms/services/smssendprovider.cpp
+++ b/kopete/protocols/sms/services/smssendprovider.cpp
@@ -32,8 +32,8 @@
#include "smsprotocol.h"
#include "smscontact.h"
-SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name)
- : TQObject( parent, name ), m_account(account)
+SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* tqparent, const char *name)
+ : TQObject( tqparent, name ), m_account(account)
{
kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl;
@@ -49,7 +49,7 @@ SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& p
if (f.open(IO_ReadOnly))
{
TQTextStream t(&f);
- TQString group = TQString("SMSSend-%1").arg(provider);
+ TQString group = TQString("SMSSend-%1").tqarg(provider);
bool exactNumberMatch = false;
TQStringList numberWords;
numberWords.append("Tel");
@@ -71,7 +71,7 @@ SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& p
TQStringList args = TQStringList::split(':',s);
TQStringList options = TQStringList::split(' ', args[0]);
- names.append(options[0].replace(0,1,""));
+ names.append(options[0].tqreplace(0,1,""));
bool hidden = false;
for(unsigned i = 1; i < options.count(); i++)
@@ -87,21 +87,21 @@ SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& p
descriptions.append(args[1]);
if (m_account)
- values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]),
- TQString::null));
+ values.append(m_account->configGroup()->readEntry(TQString("%1:%2").tqarg(group).tqarg(names[names.count()-1]),
+ TQString()));
else
values.append("");
- if( args[0].contains("Message") || args[0].contains("message")
- || args[0].contains("message") || args[0].contains("nachricht")
- || args[0].contains("Msg") || args[0].contains("Mensagem") )
+ if( args[0].tqcontains("Message") || args[0].tqcontains("message")
+ || args[0].tqcontains("message") || args[0].tqcontains("nachricht")
+ || args[0].tqcontains("Msg") || args[0].tqcontains("Mensagem") )
{
for( unsigned i = 0; i < options.count(); i++)
{
- if (options[i].contains("Size="))
+ if (options[i].tqcontains("Size="))
{
TQString option = options[i];
- option.replace(0,5,"");
+ option.tqreplace(0,5,"");
m_maxSize = option.toInt();
}
}
@@ -111,7 +111,7 @@ SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& p
{
for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it)
{
- if (args[0].contains(*it))
+ if (args[0].tqcontains(*it))
{
telPos = names.count() - 1;
if (args[0] == *it)
@@ -119,7 +119,7 @@ SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& p
// kdDebug(14160) << "Exact match for " << args[0] << endl;
exactNumberMatch = true;
}
-// kdDebug(14160) << "args[0] (" << args[0] << ") contains " << *it << endl;
+// kdDebug(14160) << "args[0] (" << args[0] << ") tqcontains " << *it << endl;
}
}
}
@@ -150,7 +150,7 @@ void SMSSendProvider::setAccount(Kopete::Account *account)
const TQString& SMSSendProvider::name(int i)
{
if ( telPos == i || messagePos == i)
- return TQString::null;
+ return TQString();
else
return names[i];
}
@@ -175,7 +175,7 @@ void SMSSendProvider::save(TQPtrList<KLineEdit>& args)
kdDebug( 14160 ) << k_funcinfo << "m_account = " << m_account << " (should be non-zero!!)" << endl;
if (!m_account) return; // prevent crash in worst case
- TQString group = TQString("SMSSend-%1").arg(provider);
+ TQString group = TQString("SMSSend-%1").tqarg(provider);
int namesI=0;
for (unsigned i=0; i < args.count(); i++)
@@ -194,7 +194,7 @@ void SMSSendProvider::save(TQPtrList<KLineEdit>& args)
// kdDebug(14160) << k_funcinfo << "saving " << args.at(i) << " to " << names[namesI] << endl;
if (!args.at(i)->text().isEmpty())
{ values[namesI] = args.at(i)->text();
- m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]);
+ m_account->configGroup()->writeEntry(TQString("%1:%2").tqarg(group).tqarg(names[namesI]), values[namesI]);
}
namesI++;
}
@@ -239,9 +239,9 @@ void SMSSendProvider::send(const Kopete::Message& msg)
KProcess* p = new KProcess;
- kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
+ kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").tqarg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
- *p << TQString("%1/bin/smssend").arg(prefix) << provider << values;
+ *p << TQString("%1/bin/smssend").tqarg(prefix) << provider << values;
output = "";
connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *)));