summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/sms/services/smssendprovider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/protocols/sms/services/smssendprovider.cpp')
-rw-r--r--kopete/protocols/sms/services/smssendprovider.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/kopete/protocols/sms/services/smssendprovider.cpp b/kopete/protocols/sms/services/smssendprovider.cpp
index 82827aab..5f0f37ee 100644
--- a/kopete/protocols/sms/services/smssendprovider.cpp
+++ b/kopete/protocols/sms/services/smssendprovider.cpp
@@ -14,9 +14,9 @@
*************************************************************************
*/
-#include <qvaluelist.h>
-#include <qlabel.h>
-#include <qfile.h>
+#include <tqvaluelist.h>
+#include <tqlabel.h>
+#include <tqfile.h>
#include <kconfigbase.h>
#include <kprocess.h>
@@ -32,8 +32,8 @@
#include "smsprotocol.h"
#include "smscontact.h"
-SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& prefixValue, Kopete::Account* account, QObject* parent, const char *name)
- : QObject( parent, name ), m_account(account)
+SMSSendProvider::SMSSendProvider(const TQString& providerName, const TQString& prefixValue, Kopete::Account* account, TQObject* parent, const char *name)
+ : TQObject( parent, name ), m_account(account)
{
kdWarning( 14160 ) << k_funcinfo << "this = " << this << ", m_account = " << m_account << " (should be ok if zero!!)" << endl;
@@ -44,14 +44,14 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
messagePos = -1;
telPos = -1;
- QString file = prefix + "/share/smssend/" + provider + ".sms";
- QFile f(file);
+ TQString file = prefix + "/share/smssend/" + provider + ".sms";
+ TQFile f(file);
if (f.open(IO_ReadOnly))
{
- QTextStream t(&f);
- QString group = QString("SMSSend-%1").arg(provider);
+ TQTextStream t(&f);
+ TQString group = TQString("SMSSend-%1").arg(provider);
bool exactNumberMatch = false;
- QStringList numberWords;
+ TQStringList numberWords;
numberWords.append("Tel");
numberWords.append("Number");
numberWords.append("number");
@@ -65,11 +65,11 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
while( !t.eof())
{
- QString s = t.readLine();
+ TQString s = t.readLine();
if( s[0] == '%')
{
- QStringList args = QStringList::split(':',s);
- QStringList options = QStringList::split(' ', args[0]);
+ TQStringList args = TQStringList::split(':',s);
+ TQStringList options = TQStringList::split(' ', args[0]);
names.append(options[0].replace(0,1,""));
@@ -87,8 +87,8 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
descriptions.append(args[1]);
if (m_account)
- values.append(m_account->configGroup()->readEntry(QString("%1:%2").arg(group).arg(names[names.count()-1]),
- QString::null));
+ values.append(m_account->configGroup()->readEntry(TQString("%1:%2").arg(group).arg(names[names.count()-1]),
+ TQString::null));
else
values.append("");
@@ -100,7 +100,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
{
if (options[i].contains("Size="))
{
- QString option = options[i];
+ TQString option = options[i];
option.replace(0,5,"");
m_maxSize = option.toInt();
}
@@ -109,7 +109,7 @@ SMSSendProvider::SMSSendProvider(const QString& providerName, const QString& pre
}
else if (!exactNumberMatch)
{
- for (QStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it)
+ for (TQStringList::Iterator it=numberWords.begin(); it != numberWords.end(); ++it)
{
if (args[0].contains(*it))
{
@@ -147,20 +147,20 @@ void SMSSendProvider::setAccount(Kopete::Account *account)
m_account = account;
}
-const QString& SMSSendProvider::name(int i)
+const TQString& SMSSendProvider::name(int i)
{
if ( telPos == i || messagePos == i)
- return QString::null;
+ return TQString::null;
else
return names[i];
}
-const QString& SMSSendProvider::value(int i)
+const TQString& SMSSendProvider::value(int i)
{
return values[i];
}
-const QString& SMSSendProvider::description(int i)
+const TQString& SMSSendProvider::description(int i)
{
return descriptions[i];
}
@@ -170,12 +170,12 @@ const bool SMSSendProvider::isHidden(int i)
return isHiddens[i];
}
-void SMSSendProvider::save(QPtrList<KLineEdit>& args)
+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
- QString group = QString("SMSSend-%1").arg(provider);
+ TQString group = TQString("SMSSend-%1").arg(provider);
int namesI=0;
for (unsigned i=0; i < args.count(); i++)
@@ -194,7 +194,7 @@ void SMSSendProvider::save(QPtrList<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(QString("%1:%2").arg(group).arg(names[namesI]), values[namesI]);
+ m_account->configGroup()->writeEntry(TQString("%1:%2").arg(group).arg(names[namesI]), values[namesI]);
}
namesI++;
}
@@ -228,8 +228,8 @@ void SMSSendProvider::send(const Kopete::Message& msg)
m_msg = msg;
- QString message = msg.plainBody();
- QString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber();
+ TQString message = msg.plainBody();
+ TQString nr = dynamic_cast<SMSContact *>(msg.to().first())->qualifiedNumber();
if (canSend = false)
return;
@@ -239,14 +239,14 @@ void SMSSendProvider::send(const Kopete::Message& msg)
KProcess* p = new KProcess;
- kdWarning( 14160 ) << "Executing " << QString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
+ kdWarning( 14160 ) << "Executing " << TQString("%1/bin/smssend").arg(prefix) << " \"" << provider << "\" " << values.join("\" \"") << "\"" << endl;
- *p << QString("%1/bin/smssend").arg(prefix) << provider << values;
+ *p << TQString("%1/bin/smssend").arg(prefix) << provider << values;
output = "";
- connect( p, SIGNAL(processExited(KProcess *)), this, SLOT(slotSendFinished(KProcess *)));
- connect( p, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int)));
-// connect( p, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(slotReceivedOutput(KProcess *, char *, int)));
+ connect( p, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotSendFinished(KProcess *)));
+ connect( p, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int)));
+// connect( p, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(slotReceivedOutput(KProcess *, char *, int)));
p->start(KProcess::NotifyOnExit, KProcess::AllOutput);
}
@@ -257,15 +257,15 @@ void SMSSendProvider::slotSendFinished(KProcess *p)
if (p->exitStatus() == 0)
emit messageSent(m_msg);
else
- emit messageNotSent(m_msg, QString().setLatin1(output));
+ emit messageNotSent(m_msg, TQString().setLatin1(output));
p->deleteLater();
}
void SMSSendProvider::slotReceivedOutput(KProcess *, char *buffer, int buflen)
{
-// QStringList lines = QStringList::split("\n", QString::fromLocal8Bit(buffer, buflen));
-// for (QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+// TQStringList lines = TQStringList::split("\n", TQString::fromLocal8Bit(buffer, buflen));
+// for (TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
for(int i = 0; i < buflen; i++)
output += buffer[i];
kdWarning( 14160 ) << k_funcinfo << " output now = " << output << endl;