diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kopete/plugins/smpppdcs | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/smpppdcs')
29 files changed, 197 insertions, 197 deletions
diff --git a/kopete/plugins/smpppdcs/detectordcop.cpp b/kopete/plugins/smpppdcs/detectordcop.cpp index 2536674d..f5f5f992 100644 --- a/kopete/plugins/smpppdcs/detectordcop.cpp +++ b/kopete/plugins/smpppdcs/detectordcop.cpp @@ -23,7 +23,7 @@ #include "detectordcop.h" #include "iconnector.h" -QCString DetectorDCOP::m_kinternetApp = ""; +TQCString DetectorDCOP::m_kinternetApp = ""; DetectorDCOP::DetectorDCOP(IConnector * connector) : Detector(connector) {} @@ -33,7 +33,7 @@ DetectorDCOP::~DetectorDCOP() {} /*! \fn DetectorDCOP::getKInternetDCOP() */ -QCString DetectorDCOP::getKInternetDCOP() const { +TQCString DetectorDCOP::getKInternetDCOP() const { DCOPClient * client = kapp->dcopClient(); if(m_kinternetApp.isEmpty() && client && client->isAttached()) { // get all registered dcop apps and search for kinternet diff --git a/kopete/plugins/smpppdcs/detectordcop.h b/kopete/plugins/smpppdcs/detectordcop.h index 5306998b..6a9602d3 100644 --- a/kopete/plugins/smpppdcs/detectordcop.h +++ b/kopete/plugins/smpppdcs/detectordcop.h @@ -41,11 +41,11 @@ protected: ERROR }; - QCString getKInternetDCOP() const; + TQCString getKInternetDCOP() const; KInternetDCOPState getConnectionStatusDCOP() const; protected: - static QCString m_kinternetApp; + static TQCString m_kinternetApp; }; #endif diff --git a/kopete/plugins/smpppdcs/detectornetstat.cpp b/kopete/plugins/smpppdcs/detectornetstat.cpp index 60dff658..cb9a393a 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.cpp +++ b/kopete/plugins/smpppdcs/detectornetstat.cpp @@ -21,7 +21,7 @@ #include "detectornetstat.h" DetectorNetstat::DetectorNetstat(IConnector* connector) - : Detector(connector), m_buffer(QString::null), m_process(NULL) {} + : Detector(connector), m_buffer(TQString::null), m_process(NULL) {} DetectorNetstat::~DetectorNetstat() { delete m_process; @@ -37,7 +37,7 @@ void DetectorNetstat::checkStatus() const { return; } - m_buffer = QString::null; + m_buffer = TQString::null; // Use KProcess to run netstat -r. We'll then parse the output of // netstat -r in slotProcessStdout() to see if it mentions the @@ -45,8 +45,8 @@ void DetectorNetstat::checkStatus() const { m_process = new KProcess; *m_process << "netstat" << "-r"; - connect(m_process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(slotProcessStdout( KProcess *, char *, int))); - connect(m_process, SIGNAL(processExited(KProcess *)), this, SLOT(slotProcessExited(KProcess *))); + connect(m_process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(slotProcessStdout( KProcess *, char *, int))); + connect(m_process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(slotProcessExited(KProcess *))); if(!m_process->start(KProcess::NotifyOnExit, KProcess::Stdout)) { kdWarning(14312) << k_funcinfo << "Unable to start netstat process!" << endl; @@ -59,7 +59,7 @@ void DetectorNetstat::checkStatus() const { void DetectorNetstat::slotProcessStdout(KProcess *, char *buffer, int buflen) { // Look for a default gateway kdDebug(14312) << k_funcinfo << endl; - m_buffer += QString::fromLatin1(buffer, buflen); + m_buffer += TQString::fromLatin1(buffer, buflen); kdDebug(14312) << m_buffer << endl; } @@ -67,7 +67,7 @@ void DetectorNetstat::slotProcessExited(KProcess *process) { kdDebug(14312) << k_funcinfo << m_buffer << endl; if(process == m_process) { m_connector->setConnectedStatus(m_buffer.contains("default")); - m_buffer = QString::null; + m_buffer = TQString::null; delete m_process; m_process = 0L; } diff --git a/kopete/plugins/smpppdcs/detectornetstat.h b/kopete/plugins/smpppdcs/detectornetstat.h index d51a6d97..bd41ae58 100644 --- a/kopete/plugins/smpppdcs/detectornetstat.h +++ b/kopete/plugins/smpppdcs/detectornetstat.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETSTAT_H #define DETECTORNETSTAT_H -#include <qobject.h> +#include <tqobject.h> #include "detector.h" @@ -27,7 +27,7 @@ class IConnector; /** @author Heiko Schäfer <[email protected]> */ -class DetectorNetstat : protected QObject, public Detector { +class DetectorNetstat : protected TQObject, public Detector { Q_OBJECT DetectorNetstat(const DetectorNetstat&); @@ -49,7 +49,7 @@ private slots: void slotProcessExited(KProcess *process); private: - mutable QString m_buffer; + mutable TQString m_buffer; mutable KProcess * m_process; }; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp index 921718b7..e2b1ae19 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.cpp +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.cpp @@ -26,8 +26,8 @@ DetectorNetworkStatus::DetectorNetworkStatus(IConnector* connector) : Detector(connector), m_connManager(NULL) { m_connManager = ConnectionManager::self(); - connect(m_connManager, SIGNAL(statusChanged(const QString&, NetworkStatus::EnumStatus)), - this, SLOT(statusChanged(const QString&, NetworkStatus::EnumStatus))); + connect(m_connManager, TQT_SIGNAL(statusChanged(const TQString&, NetworkStatus::EnumStatus)), + this, TQT_SLOT(statusChanged(const TQString&, NetworkStatus::EnumStatus))); } DetectorNetworkStatus::~DetectorNetworkStatus() {} @@ -36,7 +36,7 @@ void DetectorNetworkStatus::checkStatus() const { // needs to do nothing } -void DetectorNetworkStatus::statusChanged(const QString& host, NetworkStatus::EnumStatus status) { +void DetectorNetworkStatus::statusChanged(const TQString& host, NetworkStatus::EnumStatus status) { switch(status) { case NetworkStatus::Offline: kdDebug(14312) << k_funcinfo << host << ": NetworkStatus::Offline" << endl; diff --git a/kopete/plugins/smpppdcs/detectornetworkstatus.h b/kopete/plugins/smpppdcs/detectornetworkstatus.h index 20315902..dd3a7394 100644 --- a/kopete/plugins/smpppdcs/detectornetworkstatus.h +++ b/kopete/plugins/smpppdcs/detectornetworkstatus.h @@ -17,7 +17,7 @@ #ifndef DETECTORNETWORKSTATUS_H #define DETECTORNETWORKSTATUS_H -#include <qobject.h> +#include <tqobject.h> #include "detector.h" @@ -27,7 +27,7 @@ class ConnectionManager; /** @author Heiko Schäfer <[email protected]> */ -class DetectorNetworkStatus : protected QObject, public Detector +class DetectorNetworkStatus : protected TQObject, public Detector { Q_OBJECT @@ -41,7 +41,7 @@ public: virtual void checkStatus() const; protected slots: - void statusChanged(const QString& host, NetworkStatus::EnumStatus status); + void statusChanged(const TQString& host, NetworkStatus::EnumStatus status); private: ConnectionManager * m_connManager; diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.cpp b/kopete/plugins/smpppdcs/detectorsmpppd.cpp index 35ed1e05..772090d9 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.cpp +++ b/kopete/plugins/smpppdcs/detectorsmpppd.cpp @@ -58,7 +58,7 @@ void DetectorSMPPPD::checkStatus() const { SMPPPD::Client c; unsigned int port = SMPPPDCSConfig::self()->port(); - QString server = SMPPPDCSConfig::self()->server(); + TQString server = SMPPPDCSConfig::self()->server(); c.setPassword(SMPPPDCSConfig::self()->password().utf8()); diff --git a/kopete/plugins/smpppdcs/detectorsmpppd.h b/kopete/plugins/smpppdcs/detectorsmpppd.h index 0f72d46d..197fe65b 100644 --- a/kopete/plugins/smpppdcs/detectorsmpppd.h +++ b/kopete/plugins/smpppdcs/detectorsmpppd.h @@ -17,7 +17,7 @@ #ifndef DETECTORSMPPPD_H #define DETECTORSMPPPD_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "detectordcop.h" diff --git a/kopete/plugins/smpppdcs/kinternetiface.h b/kopete/plugins/smpppdcs/kinternetiface.h index b0ac8aa7..6e5f0203 100644 --- a/kopete/plugins/smpppdcs/kinternetiface.h +++ b/kopete/plugins/smpppdcs/kinternetiface.h @@ -29,7 +29,7 @@ class KInternetIface : public DCOPObject public: - KInternetIface (const QCString& name) : DCOPObject (name) { } + KInternetIface (const TQCString& name) : DCOPObject (name) { } k_dcop: diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp index d386b669..5ff1654b 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.cpp @@ -22,7 +22,7 @@ using namespace SMPPPD; Client::Client() - : m_state(NULL), m_sock(NULL), m_serverID(QString::null), m_serverVer(QString::null), m_password(QString::null) { + : m_state(NULL), m_sock(NULL), m_serverID(TQString::null), m_serverVer(TQString::null), m_password(TQString::null) { changeState(Unsettled::instance()); } @@ -30,7 +30,7 @@ Client::~Client() { disconnect(); } -bool Client::connect(const QString& server, uint port) { +bool Client::connect(const TQString& server, uint port) { return m_state->connect(this, server, port); } @@ -38,27 +38,27 @@ void Client::disconnect() { m_state->disconnect(this); } -QStringList Client::getInterfaceConfigurations() { +TQStringList Client::getInterfaceConfigurations() { return m_state->getInterfaceConfigurations(this); } -bool Client::statusInterface(const QString& ifcfg) { +bool Client::statusInterface(const TQString& ifcfg) { return m_state->statusInterface(this, ifcfg); } -QString Client::serverID() const { +TQString Client::serverID() const { return m_serverID; } -QString Client::serverVersion() const { +TQString Client::serverVersion() const { return m_serverVer; } -QStringList Client::read() const { - QStringList qsl; +TQStringList Client::read() const { + TQStringList qsl; if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); char s[1024]; stream.readRawBytes(s, 1023); @@ -78,7 +78,7 @@ QStringList Client::read() const { void Client::write(const char * cmd) { if(isReady()) { - QDataStream stream(m_sock); + TQDataStream stream(m_sock); stream.writeRawBytes(cmd, strlen(cmd)); stream.writeRawBytes("\n", strlen("\n")); m_sock->flush(); @@ -92,7 +92,7 @@ bool Client::isReady() const { bool Client::isOnline() { if(isReady()) { - QStringList ifcfgs = getInterfaceConfigurations(); + TQStringList ifcfgs = getInterfaceConfigurations(); for(uint i = 0; i < ifcfgs.count(); i++) { if(statusInterface(ifcfgs[i])) { return true; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h index a123cd4c..badda45c 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdclient.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCLIENT_H #define SMPPPDCLIENT_H -#include <qstringlist.h> +#include <tqstringlist.h> namespace KNetwork { class KStreamSocket; @@ -40,38 +40,38 @@ public: bool isReady() const; - bool connect(const QString& server, uint port = 3185); + bool connect(const TQString& server, uint port = 3185); void disconnect(); - QStringList getInterfaceConfigurations(); - bool statusInterface(const QString& ifcfg); + TQStringList getInterfaceConfigurations(); + bool statusInterface(const TQString& ifcfg); bool isOnline(); - QString serverID() const; - QString serverVersion() const; + TQString serverID() const; + TQString serverVersion() const; - void setPassword(const QString& password); + void setPassword(const TQString& password); private: friend class State; void changeState(State * newState); - QStringList read() const; + TQStringList read() const; void write(const char * cmd); private: State * m_state; KNetwork::KStreamSocket * m_sock; - QString m_serverID; - QString m_serverVer; - QString m_password; + TQString m_serverID; + TQString m_serverVer; + TQString m_password; }; inline void Client::changeState(State * newState) { m_state = newState; } -inline void Client::setPassword(const QString& password) { +inline void Client::setPassword(const TQString& password) { m_password = password; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp index 421914bb..f51aa301 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.cpp @@ -14,7 +14,7 @@ ************************************************************************* */ -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> #include <kstreamsocket.h> @@ -48,33 +48,33 @@ void Ready::disconnect(Client * client) { delete socket(client); setSocket(client, NULL); - setServerID(client, QString::null); - setServerVersion(client, QString::null); + setServerID(client, TQString::null); + setServerVersion(client, TQString::null); } changeState(client, Unsettled::instance()); } -QStringList Ready::getInterfaceConfigurations(Client * client) { +TQStringList Ready::getInterfaceConfigurations(Client * client) { - QStringList ifcfgs; + TQStringList ifcfgs; // we want all ifcfgs kdDebug(14312) << k_funcinfo << "smpppd req: list-ifcfgs" << endl; write(client, "list-ifcfgs"); - QStringList stream = read(client); + TQStringList stream = read(client); kdDebug(14312) << k_funcinfo << "smpppd ack: " << stream[0] << endl; if(stream[0].startsWith("ok")) { - // we have now a QStringList with all ifcfgs + // we have now a TQStringList with all ifcfgs // we extract them and put them in the global ifcfgs-list // stream[1] tells us how many ifcfgs are coming next - QRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); + TQRegExp numIfcfgsRex("^BEGIN IFCFGS ([0-9]+).*"); if(numIfcfgsRex.exactMatch(stream[1])) { int count_ifcfgs = numIfcfgsRex.cap(1).toInt(); kdDebug(14312) << k_funcinfo << "ifcfgs: " << count_ifcfgs << endl; for(int i = 0; i < count_ifcfgs; i++) { - QRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); + TQRegExp ifcfgRex("^i \"(ifcfg-[a-zA-Z]+[0-9]+)\".*"); if(ifcfgRex.exactMatch(stream[i+2])) { ifcfgs.push_back(ifcfgRex.cap(1)); } @@ -85,14 +85,14 @@ QStringList Ready::getInterfaceConfigurations(Client * client) { return ifcfgs; } -bool Ready::statusInterface(Client * client, const QString& ifcfg) { +bool Ready::statusInterface(Client * client, const TQString& ifcfg) { - QString cmd = "list-status " + ifcfg; + TQString cmd = "list-status " + ifcfg; write(client, cmd.latin1()); socket(client)->waitForMore(0); - QStringList stream = read(client); + TQStringList stream = read(client); if(stream[0].startsWith("ok")) { if(stream[2].startsWith("status connected")) { diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h index 9ec3ab93..f3be8667 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdready.h @@ -37,8 +37,8 @@ public: static Ready * instance(); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); private: static Ready * m_instance; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp index 9e4bd508..8ae0f1d4 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.cpp @@ -25,7 +25,7 @@ State::State() {} State::~State() {} -QStringList State::read(Client * client) const { +TQStringList State::read(Client * client) const { return client->read(); } @@ -41,19 +41,19 @@ KNetwork::KStreamSocket * State::socket(Client * client) const { return client->m_sock; } -QString State::password(Client * client) const { +TQString State::password(Client * client) const { return client->m_password; } -void State::setPassword(Client * client, const QString& pass) { +void State::setPassword(Client * client, const TQString& pass) { client->m_password = pass; } -void State::setServerID(Client * client, const QString& id) { +void State::setServerID(Client * client, const TQString& id) { client->m_serverID = id; } -void State::setServerVersion(Client * client, const QString& ver) { +void State::setServerVersion(Client * client, const TQString& ver) { client->m_serverVer = ver; } @@ -61,16 +61,16 @@ void State::setSocket(Client * client, KNetwork::KStreamSocket * sock) { client->m_sock = sock; } -bool State::connect(Client * /* client */, const QString& /* server */, uint /* port */) { +bool State::connect(Client * /* client */, const TQString& /* server */, uint /* port */) { return false; } void State::disconnect(Client * /* client */) {} -QStringList State::getInterfaceConfigurations(Client * /* client */) { - return QStringList(); +TQStringList State::getInterfaceConfigurations(Client * /* client */) { + return TQStringList(); } -bool State::statusInterface(Client * /* client */, const QString& /* ifcfg */) { +bool State::statusInterface(Client * /* client */, const TQString& /* ifcfg */) { return false; } diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h index 0e7d393b..8f1ac32e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdstate.h @@ -17,7 +17,7 @@ #ifndef SMPPPDSTATE_H #define SMPPPDSTATE_H -#include <qstringlist.h> +#include <tqstringlist.h> namespace SMPPPD { @@ -34,22 +34,22 @@ public: State(); virtual ~State(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); virtual void disconnect(Client * client); - virtual QStringList getInterfaceConfigurations(Client * client); - virtual bool statusInterface(Client * client, const QString& ifcfg); + virtual TQStringList getInterfaceConfigurations(Client * client); + virtual bool statusInterface(Client * client, const TQString& ifcfg); protected: - QStringList read(Client * client) const; + TQStringList read(Client * client) const; void write(Client * client, const char * cmd); void changeState(Client * client, State * state); KNetwork::KStreamSocket * socket(Client * client) const; void setSocket(Client * client, KNetwork::KStreamSocket * sock); - QString password(Client * client) const; - void setPassword(Client * client, const QString& pass); - void setServerID(Client * client, const QString& id); - void setServerVersion(Client * client, const QString& ver); + TQString password(Client * client) const; + void setPassword(Client * client, const TQString& pass); + void setServerID(Client * client, const TQString& id); + void setServerVersion(Client * client, const TQString& ver); }; diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp index 7ed5f516..3d1f8a79 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp @@ -17,7 +17,7 @@ #include <cstdlib> #include <openssl/md5.h> -#include <qregexp.h> +#include <tqregexp.h> #include <kdebug.h> #include <kstreamsocket.h> @@ -41,12 +41,12 @@ Unsettled * Unsettled::instance() { return m_instance; } -bool Unsettled::connect(Client * client, const QString& server, uint port) { +bool Unsettled::connect(Client * client, const TQString& server, uint port) { if(!socket(client) || socket(client)->state() != KNetwork::KStreamSocket::Connected || socket(client)->state() != KNetwork::KStreamSocket::Connecting) { - QString resolvedServer = server; + TQString resolvedServer = server; changeState(client, Ready::instance()); disconnect(client); @@ -58,7 +58,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { if(resolver.wait(500)) { KNetwork::KResolverResults results = resolver.results(); if(!results.empty()) { - QString ip = results[0].address().asInet().ipAddress().toString(); + TQString ip = results[0].address().asInet().ipAddress().toString(); kdDebug(14312) << k_funcinfo << "Found IP-Address for " << server << ": " << ip << endl; resolvedServer = ip; } else { @@ -70,7 +70,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } - setSocket(client, new KNetwork::KStreamSocket(resolvedServer, QString::number(port))); + setSocket(client, new KNetwork::KStreamSocket(resolvedServer, TQString::number(port))); socket(client)->setBlocking(TRUE); if(!socket(client)->connect()) { @@ -78,25 +78,25 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { } else { kdDebug(14312) << k_funcinfo << "Successfully connected to smpppd \"" << server << ":" << port << "\"" << endl; - static QString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; - static QString clgRex = "^challenge = (.*)$"; + static TQString verRex = "^SuSE Meta pppd \\(smpppd\\), Version (.*)$"; + static TQString clgRex = "^challenge = (.*)$"; - QRegExp ver(verRex); - QRegExp clg(clgRex); + TQRegExp ver(verRex); + TQRegExp clg(clgRex); - QString response = read(client)[0]; + TQString response = read(client)[0]; - if(response != QString::null && + if(response != TQString::null && ver.exactMatch(response)) { setServerID(client, response); setServerVersion(client, ver.cap(1)); changeState(client, Ready::instance()); return true; - } else if(response != QString::null && + } else if(response != TQString::null && clg.exactMatch(response)) { - if(password(client) != QString::null) { + if(password(client) != TQString::null) { // we are challenged, ok, respond - write(client, QString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); + write(client, TQString("response = %1\n").arg(make_response(clg.cap(1).stripWhiteSpace(), password(client))).latin1()); response = read(client)[0]; if(ver.exactMatch(response)) { setServerID(client, response); @@ -119,7 +119,7 @@ bool Unsettled::connect(Client * client, const QString& server, uint port) { return false; } -QString Unsettled::make_response(const QString& chex, const QString& password) const { +TQString Unsettled::make_response(const TQString& chex, const TQString& password) const { int size = chex.length (); if (size & 1) @@ -127,9 +127,9 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c size >>= 1; // convert challenge from hex to bin - QString cbin; + TQString cbin; for (int i = 0; i < size; i++) { - QString tmp = chex.mid (2 * i, 2); + TQString tmp = chex.mid (2 * i, 2); cbin.append ((char) strtol (tmp.ascii (), 0, 16)); } @@ -142,7 +142,7 @@ QString Unsettled::make_response(const QString& chex, const QString& password) c MD5_Final (rbin, &md5); // convert response from bin to hex - QString rhex; + TQString rhex; for (int i = 0; i < MD5_DIGEST_LENGTH; i++) { char buffer[3]; snprintf (buffer, 3, "%02x", rbin[i]); diff --git a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h index 57a83752..bf19035e 100644 --- a/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h +++ b/kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.h @@ -35,10 +35,10 @@ public: static Unsettled * instance(); - virtual bool connect(Client * client, const QString& server, uint port = 3185); + virtual bool connect(Client * client, const TQString& server, uint port = 3185); private: - QString make_response(const QString& chex, const QString& password) const; + TQString make_response(const TQString& chex, const TQString& password) const; private: static Unsettled * m_instance; diff --git a/kopete/plugins/smpppdcs/smpppdcsiface.h b/kopete/plugins/smpppdcs/smpppdcsiface.h index face60ad..7bd8febe 100644 --- a/kopete/plugins/smpppdcs/smpppdcsiface.h +++ b/kopete/plugins/smpppdcs/smpppdcsiface.h @@ -29,7 +29,7 @@ class SMPPPDCSIFace : virtual public DCOPObject k_dcop: - virtual QString detectionMethod() const = 0; + virtual TQString detectionMethod() const = 0; virtual bool isOnline() const = 0; }; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp index 2ed8455c..f17f2ca9 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.cpp @@ -19,7 +19,7 @@ #include "onlineinquiry.h" #include "smpppdcsplugin.h" -#include <qtimer.h> +#include <tqtimer.h> #include <kdebug.h> #include <kgenericfactory.h> @@ -37,7 +37,7 @@ typedef KGenericFactory<SMPPPDCSPlugin> SMPPPDCSPluginFactory; K_EXPORT_COMPONENT_FACTORY(kopete_smpppdcs, SMPPPDCSPluginFactory("kopete_smpppdcs")) -SMPPPDCSPlugin::SMPPPDCSPlugin(QObject *parent, const char * name, const QStringList& /* args */) +SMPPPDCSPlugin::SMPPPDCSPlugin(TQObject *parent, const char * name, const TQStringList& /* args */) : DCOPObject("SMPPPDCSIface"), Kopete::Plugin(SMPPPDCSPluginFactory::instance(), parent, name), m_detectorSMPPPD(NULL), m_detectorNetstat(NULL), m_detectorNetworkStatus(NULL), m_timer(NULL), m_onlineInquiry(NULL) { @@ -56,13 +56,13 @@ m_onlineInquiry(NULL) { // we wait for the allPluginsLoaded signal, to connect // as early as possible after startup, but not before // all accounts are ready - connect(Kopete::PluginManager::self(), SIGNAL(allPluginsLoaded()), - this, SLOT(allPluginsLoaded())); + connect(Kopete::PluginManager::self(), TQT_SIGNAL(allPluginsLoaded()), + this, TQT_SLOT(allPluginsLoaded())); // if kopete was already running and the plugin // was loaded later, we check once after 15 secs // if all other plugins have been loaded - QTimer::singleShot(15000, this, SLOT(allPluginsLoaded())); + TQTimer::singleShot(15000, this, TQT_SLOT(allPluginsLoaded())); } SMPPPDCSPlugin::~SMPPPDCSPlugin() { @@ -79,8 +79,8 @@ SMPPPDCSPlugin::~SMPPPDCSPlugin() { void SMPPPDCSPlugin::allPluginsLoaded() { if(Kopete::PluginManager::self()->isAllPluginsLoaded()) { - m_timer = new QTimer(); - connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCheckStatus())); + m_timer = new TQTimer(); + connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCheckStatus())); if(SMPPPDCSConfig::self()->useSmpppd()) { m_timer->start(30000); @@ -137,10 +137,10 @@ void SMPPPDCSPlugin::setConnectedStatus( bool connected ) { void SMPPPDCSPlugin::connectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator<Kopete::Account> it(m->accounts()) + for(TQPtrListIterator<Kopete::Account> it(m->accounts()) ; it.current(); ++it) { @@ -162,10 +162,10 @@ void SMPPPDCSPlugin::connectAllowed() { void SMPPPDCSPlugin::disconnectAllowed() { - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); Kopete::AccountManager * m = Kopete::AccountManager::self(); - for(QPtrListIterator<Kopete::Account> it(m->accounts()) + for(TQPtrListIterator<Kopete::Account> it(m->accounts()) ; it.current(); ++it) { @@ -184,7 +184,7 @@ void SMPPPDCSPlugin::disconnectAllowed() { } } -QString SMPPPDCSPlugin::detectionMethod() const { +TQString SMPPPDCSPlugin::detectionMethod() const { if(SMPPPDCSConfig::self()->useSmpppd()) { return "smpppd"; } else { @@ -193,11 +193,11 @@ QString SMPPPDCSPlugin::detectionMethod() const { } /*! - \fn SMPPPDCSPlugin::smpppdServerChanged(const QString& server) + \fn SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) */ -void SMPPPDCSPlugin::smpppdServerChanged(const QString& server) { +void SMPPPDCSPlugin::smpppdServerChanged(const TQString& server) { - QString oldServer = SMPPPDCSConfig::self()->server().utf8(); + TQString oldServer = SMPPPDCSConfig::self()->server().utf8(); if(oldServer != server) { kdDebug(14312) << k_funcinfo << "Detected a server change" << endl; diff --git a/kopete/plugins/smpppdcs/smpppdcsplugin.h b/kopete/plugins/smpppdcs/smpppdcsplugin.h index 789d9c41..5c4ba2e6 100644 --- a/kopete/plugins/smpppdcs/smpppdcsplugin.h +++ b/kopete/plugins/smpppdcs/smpppdcsplugin.h @@ -55,7 +55,7 @@ public: /** * @brief Creates an <code>SMPPPDCSPlugin</code> instance */ - SMPPPDCSPlugin( QObject *parent, const char *name, const QStringList &args ); + SMPPPDCSPlugin( TQObject *parent, const char *name, const TQStringList &args ); /** * @brief Destroys an <code>SMPPPDCSPlugin</code> instance @@ -78,12 +78,12 @@ public: */ virtual void setConnectedStatus( bool newStatus ); - virtual QString detectionMethod() const; + virtual TQString detectionMethod() const; virtual void aboutToUnload(); public slots: - void smpppdServerChanged(const QString& server); + void smpppdServerChanged(const TQString& server); private slots: void slotCheckStatus(); @@ -100,7 +100,7 @@ private: Detector * m_detectorNetstat; Detector * m_detectorNetworkStatus; bool m_pluginConnected; - QTimer * m_timer; + TQTimer * m_timer; OnlineInquiry * m_onlineInquiry; }; diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp index ddce3572..671008bc 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.cpp +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.cpp @@ -14,9 +14,9 @@ ************************************************************************* */ -#include <qlayout.h> -#include <qregexp.h> -#include <qradiobutton.h> +#include <tqlayout.h> +#include <tqregexp.h> +#include <tqradiobutton.h> #include <klistview.h> #include <klineedit.h> @@ -35,17 +35,17 @@ typedef KGenericFactory<SMPPPDCSPreferences> SMPPPDCSPreferencesFactory; K_EXPORT_COMPONENT_FACTORY(kcm_kopete_smpppdcs, SMPPPDCSPreferencesFactory("kcm_kopete_smpppdcs")) -SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name */, const QStringList& args) +SMPPPDCSPreferences::SMPPPDCSPreferences(TQWidget * parent, const char * /* name */, const TQStringList& args) : KCModule(SMPPPDCSPreferencesFactory::instance(), parent, args), m_ui(NULL) { Kopete::AccountManager * manager = Kopete::AccountManager::self(); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); m_ui = new SMPPPDCSPrefs(this); - for(QPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it) + for(TQPtrListIterator<Kopete::Account> it(manager->accounts()); it.current(); ++it) { - QString protoName; - QRegExp rex("(.*)Protocol"); + TQString protoName; + TQRegExp rex("(.*)Protocol"); if(rex.search((*it)->protocol()->pluginId()) > -1) { protoName = rex.cap(1); @@ -54,11 +54,11 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name } if(it.current()->inherits("Kopete::ManagedConnectionAccount")) { - protoName += QString(", %1").arg(i18n("connection status is managed by Kopete")); + protoName += TQString(", %1").arg(i18n("connection status is managed by Kopete")); } - QCheckListItem * cli = new QCheckListItem(m_ui->accountList, - (*it)->accountId() + " (" + protoName + ")", QCheckListItem::CheckBox); + TQCheckListItem * cli = new TQCheckListItem(m_ui->accountList, + (*it)->accountId() + " (" + protoName + ")", TQCheckListItem::CheckBox); cli->setPixmap(0, (*it)->accountIcon()); m_accountMapOld[cli->text(0)] = AccountPrivMap(FALSE, (*it)->protocol()->pluginId() + "_" + (*it)->accountId()); @@ -66,15 +66,15 @@ SMPPPDCSPreferences::SMPPPDCSPreferences(QWidget * parent, const char * /* name m_ui->accountList->insertItem(cli); } - connect(m_ui->accountList, SIGNAL(clicked(QListViewItem *)), this, SLOT(listClicked(QListViewItem *))); + connect(m_ui->accountList, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(listClicked(TQListViewItem *))); // connect for modified - connect(m_ui->useNetstat, SIGNAL(clicked()), this, SLOT(slotModified())); - connect(m_ui->useSmpppd, SIGNAL(clicked()), this, SLOT(slotModified())); + connect(m_ui->useNetstat, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); + connect(m_ui->useSmpppd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->port, SIGNAL(valueChanged(int)), this, SLOT(slotModified())); - connect(m_ui->SMPPPDLocation->Password, SIGNAL(textChanged(const QString&)), this, SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->port, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotModified())); + connect(m_ui->SMPPPDLocation->Password, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotModified())); load(); } @@ -83,9 +83,9 @@ SMPPPDCSPreferences::~SMPPPDCSPreferences() { delete m_ui; } -void SMPPPDCSPreferences::listClicked(QListViewItem * item) +void SMPPPDCSPreferences::listClicked(TQListViewItem * item) { - QCheckListItem * cli = dynamic_cast<QCheckListItem *>(item); + TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(item); if(cli->isOn() != m_accountMapCur[cli->text(0)].m_on) { AccountMap::iterator itOld = m_accountMapOld.begin(); @@ -105,9 +105,9 @@ void SMPPPDCSPreferences::listClicked(QListViewItem * item) void SMPPPDCSPreferences::defaults() { - QListViewItemIterator it(m_ui->accountList); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current()); + TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current()); cli->setOn(FALSE); ++it; } @@ -127,12 +127,12 @@ void SMPPPDCSPreferences::load() SMPPPDCSConfig::self()->readConfig(); - static QString rexStr = "^(.*) \\((.*)\\)"; - QRegExp rex(rexStr); - QStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); - QListViewItemIterator it(m_ui->accountList); + static TQString rexStr = "^(.*) \\((.*)\\)"; + TQRegExp rex(rexStr); + TQStringList list = SMPPPDCSConfig::self()->ignoredAccounts(); + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current()); + TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current()); if(rex.search(cli->text(0)) > -1) { bool isOn = list.contains(rex.cap(2) + "Protocol_" + rex.cap(1)); // m_accountMapOld[cli->text(0)].m_on = isOn; @@ -154,11 +154,11 @@ void SMPPPDCSPreferences::load() void SMPPPDCSPreferences::save() { - QStringList list; - QListViewItemIterator it(m_ui->accountList); + TQStringList list; + TQListViewItemIterator it(m_ui->accountList); while(it.current()) { - QCheckListItem * cli = dynamic_cast<QCheckListItem *>(it.current()); + TQCheckListItem * cli = dynamic_cast<TQCheckListItem *>(it.current()); if(cli->isOn()) { list.append(m_accountMapCur[cli->text(0)].m_id); } diff --git a/kopete/plugins/smpppdcs/smpppdcspreferences.h b/kopete/plugins/smpppdcs/smpppdcspreferences.h index 8bbeff69..dba3470b 100644 --- a/kopete/plugins/smpppdcs/smpppdcspreferences.h +++ b/kopete/plugins/smpppdcs/smpppdcspreferences.h @@ -25,10 +25,10 @@ class SMPPPDCSPrefs; class AccountPrivMap { public: - AccountPrivMap(bool isOn = FALSE, const QString& id = QString::null) + AccountPrivMap(bool isOn = FALSE, const TQString& id = TQString::null) : m_on(isOn), m_id(id) {} bool m_on; - QString m_id; + TQString m_id; }; /** @@ -43,12 +43,12 @@ class SMPPPDCSPreferences : public KCModule { SMPPPDCSPreferences& operator=(const SMPPPDCSPreferences&); public: - typedef QMap<QString, AccountPrivMap> AccountMap; + typedef TQMap<TQString, AccountPrivMap> AccountMap; /** * @brief Creates an <code>SMPPPDCSPreferences</code> instance */ - SMPPPDCSPreferences(QWidget * parent = 0, const char * name = 0, const QStringList &args = QStringList()); + SMPPPDCSPreferences(TQWidget * parent = 0, const char * name = 0, const TQStringList &args = TQStringList()); /** * @brief Destroys an <code>SMPPPDCSPreferences</code> instance @@ -60,7 +60,7 @@ public: virtual void defaults(); protected slots: - void listClicked(QListViewItem * item); + void listClicked(TQListViewItem * item); private slots: void slotModified(); diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp index 5a834c97..4dbedc54 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.cpp @@ -17,7 +17,7 @@ #include <arpa/inet.h> #include <netdb.h> -#include <qradiobutton.h> +#include <tqradiobutton.h> #include <kstandarddirs.h> #include <kapplication.h> @@ -35,7 +35,7 @@ #include "smpppdcsprefsimpl.h" #include "smpppdsearcher.h" -SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) +SMPPPDCSPrefs::SMPPPDCSPrefs(TQWidget* parent, const char* name, WFlags fl) : SMPPPDCSPrefsBase(parent, name, fl), m_plugin(NULL), m_scanProgressDlg(NULL), m_curSearcher(NULL) { // search for our main-plugin instance @@ -45,17 +45,17 @@ SMPPPDCSPrefs::SMPPPDCSPrefs(QWidget* parent, const char* name, WFlags fl) } // signals and slots connections - connect(useNetstat, SIGNAL(toggled(bool)), this, SLOT(disableSMPPPDSettings())); - connect(useSmpppd, SIGNAL(toggled(bool)), this, SLOT(enableSMPPPDSettings())); - connect(autoCSTest, SIGNAL(clicked()), this, SLOT(determineCSType())); + connect(useNetstat, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(disableSMPPPDSettings())); + connect(useSmpppd, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(enableSMPPPDSettings())); + connect(autoCSTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(determineCSType())); if(m_plugin) { - connect((QObject *)SMPPPDLocation->server, SIGNAL(textChanged(const QString&)), - m_plugin, SLOT(smpppdServerChanged(const QString&))); + connect((TQObject *)SMPPPDLocation->server, TQT_SIGNAL(textChanged(const TQString&)), + m_plugin, TQT_SLOT(smpppdServerChanged(const TQString&))); } // if netstat is NOT available, disable the option and set to SMPPPD - if(KStandardDirs::findExe("netstat") == QString::null) { + if(KStandardDirs::findExe("netstat") == TQString::null) { autoCSTest->setEnabled(FALSE); useNetstat->setEnabled(FALSE); useNetstat->setChecked(FALSE); @@ -79,11 +79,11 @@ void SMPPPDCSPrefs::determineCSType() { SMPPPDSearcher searcher; m_curSearcher = &searcher; - connect(&searcher, SIGNAL(smpppdFound(const QString&)), this, SLOT(smpppdFound(const QString&))); - connect(&searcher, SIGNAL(smpppdNotFound()), this, SLOT(smpppdNotFound())); - connect(&searcher, SIGNAL(scanStarted(uint)), this, SLOT(scanStarted(uint))); - connect(&searcher, SIGNAL(scanProgress(uint)), this, SLOT(scanProgress(uint))); - connect(&searcher, SIGNAL(scanFinished()), this, SLOT(scanFinished())); + connect(&searcher, TQT_SIGNAL(smpppdFound(const TQString&)), this, TQT_SLOT(smpppdFound(const TQString&))); + connect(&searcher, TQT_SIGNAL(smpppdNotFound()), this, TQT_SLOT(smpppdNotFound())); + connect(&searcher, TQT_SIGNAL(scanStarted(uint)), this, TQT_SLOT(scanStarted(uint))); + connect(&searcher, TQT_SIGNAL(scanProgress(uint)), this, TQT_SLOT(scanProgress(uint))); + connect(&searcher, TQT_SIGNAL(scanFinished()), this, TQT_SLOT(scanFinished())); searcher.searchNetwork(); m_curSearcher = NULL; @@ -99,7 +99,7 @@ void SMPPPDCSPrefs::scanStarted(uint total) { m_scanProgressDlg->setAllowCancel(TRUE); m_scanProgressDlg->setMinimumDuration(2000); - connect(m_scanProgressDlg, SIGNAL(cancelClicked()), this, SLOT(cancelScanning())); + connect(m_scanProgressDlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelScanning())); } m_scanProgressDlg->progressBar()->setTotalSteps(total); m_scanProgressDlg->progressBar()->setProgress(0); @@ -117,10 +117,10 @@ void SMPPPDCSPrefs::cancelScanning() { m_curSearcher->cancelSearch(); } -void SMPPPDCSPrefs::smpppdFound(const QString& host) { +void SMPPPDCSPrefs::smpppdFound(const TQString& host) { kdDebug(14312) << k_funcinfo << endl; - QString myHost = host; + TQString myHost = host; // try to get the domain name struct in_addr addr; diff --git a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h index 181ba9fa..4dcbe46b 100644 --- a/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h +++ b/kopete/plugins/smpppdcs/smpppdcsprefsimpl.h @@ -17,7 +17,7 @@ #ifndef SMPPPDCSPREFSIMPL_H #define SMPPPDCSPREFSIMPL_H -#include <qgroupbox.h> +#include <tqgroupbox.h> #include <kprogress.h> @@ -38,7 +38,7 @@ class SMPPPDCSPrefs : public SMPPPDCSPrefsBase public: - SMPPPDCSPrefs(QWidget* parent, const char* name = 0, WFlags fl = 0); + SMPPPDCSPrefs(TQWidget* parent, const char* name = 0, WFlags fl = 0); ~SMPPPDCSPrefs(); signals: @@ -48,7 +48,7 @@ protected slots: void enableSMPPPDSettings(); void disableSMPPPDSettings(); void determineCSType(); - void smpppdFound(const QString & host); + void smpppdFound(const TQString & host); void smpppdNotFound(); void scanStarted(uint total); void scanProgress(uint cur); diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp index b20509d9..44de2552 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.cpp @@ -18,12 +18,12 @@ #include "smpppdlocationwidget.h" -SMPPPDLocationWidget::SMPPPDLocationWidget(QWidget* parent, const char* name, WFlags fl) +SMPPPDLocationWidget::SMPPPDLocationWidget(TQWidget* parent, const char* name, WFlags fl) : SMPPPDLocationWidgetBase(parent, name, fl) {} SMPPPDLocationWidget::~SMPPPDLocationWidget() {} -void SMPPPDLocationWidget::setServer(const QString& serv) { +void SMPPPDLocationWidget::setServer(const TQString& serv) { server->setText(serv); } diff --git a/kopete/plugins/smpppdcs/smpppdlocationwidget.h b/kopete/plugins/smpppdcs/smpppdlocationwidget.h index 00fa9157..16d1edfb 100644 --- a/kopete/plugins/smpppdcs/smpppdlocationwidget.h +++ b/kopete/plugins/smpppdcs/smpppdlocationwidget.h @@ -30,10 +30,10 @@ class SMPPPDLocationWidget : public SMPPPDLocationWidgetBase SMPPPDLocationWidget& operator=(const SMPPPDLocationWidget&); public: - SMPPPDLocationWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0); + SMPPPDLocationWidget(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0); ~SMPPPDLocationWidget(); - void setServer(const QString& serv); + void setServer(const TQString& serv); }; #endif diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.cpp b/kopete/plugins/smpppdcs/smpppdsearcher.cpp index 6ee9c878..a06e30a9 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.cpp +++ b/kopete/plugins/smpppdcs/smpppdsearcher.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include <qregexp.h> -#include <qfile.h> +#include <tqregexp.h> +#include <tqfile.h> #include <kprocess.h> #include <kdebug.h> @@ -46,7 +46,7 @@ void SMPPPDSearcher::searchNetwork() { m_procNetstat->setEnvironment("LANG", "C"); // we want to force english output *m_procNetstat << "/bin/netstat" << "-rn"; - connect(m_procNetstat, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); + connect(m_procNetstat, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedNetstat(KProcess *,char *,int))); if(!m_procNetstat->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/netstat -rn" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -64,11 +64,11 @@ void SMPPPDSearcher::searchNetwork() { void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QString myBuf = QString::fromLatin1(buf,len); - QRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); + TQString myBuf = TQString::fromLatin1(buf,len); + TQRegExp rex("^[ ]{10}.*inet addr:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*Mask:([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3})"); // tokenize the string into lines - QStringList toks = QStringList::split("\n", myBuf); - for(QStringList::size_type i = 0; i < toks.count(); i++) { + TQStringList toks = TQStringList::split("\n", myBuf); + for(TQStringList::size_type i = 0; i < toks.count(); i++) { if(rex.exactMatch(toks[i])) { if(scan(rex.cap(1), rex.cap(2))) { return; @@ -81,8 +81,8 @@ void SMPPPDSearcher::slotStdoutReceivedIfconfig(KProcess * /* proc */, char * bu void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf, int len) { kdDebug(14312) << k_funcinfo << endl; - QRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); - QString myBuf = QString::fromLatin1(buf,len); + TQRegExp rexGW(".*\\n0.0.0.0[ ]*([0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}).*"); + TQString myBuf = TQString::fromLatin1(buf,len); if(!(rexGW.exactMatch(myBuf) && scan(rexGW.cap(1), "255.255.255.255"))) { // if netstat -r found no gateway we search the network @@ -90,7 +90,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf m_procIfconfig->setEnvironment("LANG", "C"); // we want to force english output *m_procIfconfig << "/sbin/ifconfig"; - connect(m_procIfconfig, SIGNAL(receivedStdout(KProcess *,char *,int)), this, SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); + connect(m_procIfconfig, TQT_SIGNAL(receivedStdout(KProcess *,char *,int)), this, TQT_SLOT(slotStdoutReceivedIfconfig(KProcess *,char *,int))); if(!m_procIfconfig->start(KProcess::Block, KProcess::Stdout)) { kdDebug(14312) << k_funcinfo << "Couldn't execute /sbin/ifconfig" << endl << "Perhaps the package net-tools isn't installed." << endl; @@ -105,7 +105,7 @@ void SMPPPDSearcher::slotStdoutReceivedNetstat(KProcess * /* proc */, char * buf /*! \fn SMPPPDSearcher::scan() const */ -bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { +bool SMPPPDSearcher::scan(const TQString& ip, const TQString& mask) { kdDebug(14312) << k_funcinfo << "Scanning " << ip << "/" << mask << "..." << endl; SMPPPD::Client client; @@ -124,12 +124,12 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { uint max_range = 255; // calculate ip range (only last mask entry) - QRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); + TQRegExp lastRex("([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})"); if(lastRex.exactMatch(ip)) { uint lastWordIP = lastRex.cap(4).toUInt(); - QStringList ipToks; + TQStringList ipToks; for(int i = 1; i < 5; i++) { ipToks.push_back(lastRex.cap(i)); } @@ -164,7 +164,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { emit scanProgress(i); } - if(client.connect(QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)), 3185)) { + if(client.connect(TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)), 3185)) { client.disconnect(); emit smpppdFound(ip); if(range > 1) { @@ -174,7 +174,7 @@ bool SMPPPDSearcher::scan(const QString& ip, const QString& mask) { } #ifndef NDEBUG else { - kdDebug(14312) << k_funcinfo << "No smpppd found at " << QString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + QString::number(i)) << endl; + kdDebug(14312) << k_funcinfo << "No smpppd found at " << TQString(ipToks[0] + "." + ipToks[1] + "." + ipToks[2] + "." + TQString::number(i)) << endl; } #endif } diff --git a/kopete/plugins/smpppdcs/smpppdsearcher.h b/kopete/plugins/smpppdcs/smpppdsearcher.h index af36637d..81c9cb03 100644 --- a/kopete/plugins/smpppdcs/smpppdsearcher.h +++ b/kopete/plugins/smpppdcs/smpppdsearcher.h @@ -28,7 +28,7 @@ class KProcess; * @todo Use of the SLP to find the smpppd * @author Heiko Schäfer <[email protected]> */ -class SMPPPDSearcher : public QObject { +class SMPPPDSearcher : public TQObject { Q_OBJECT SMPPPDSearcher(const SMPPPDSearcher&); @@ -65,7 +65,7 @@ protected: * @param mask the network mask * @return <code>TRUE</code> if an smpppd was found */ - bool scan(const QString& ip, const QString& mask); + bool scan(const TQString& ip, const TQString& mask); signals: /** @@ -73,7 +73,7 @@ signals: * * @param host the host there the smpppd was found */ - void smpppdFound(const QString& host); + void smpppdFound(const TQString& host); /** * @brief No smpppd was found diff --git a/kopete/plugins/smpppdcs/unittest/clienttest.cpp b/kopete/plugins/smpppdcs/unittest/clienttest.cpp index 5affd83c..f668135f 100644 --- a/kopete/plugins/smpppdcs/unittest/clienttest.cpp +++ b/kopete/plugins/smpppdcs/unittest/clienttest.cpp @@ -45,7 +45,7 @@ void ClientTest::testConnect() { void ClientTest::testCommunicationBeforeConnect() { SMPPPD::Client c; - QStringList l = c.getInterfaceConfigurations(); + TQStringList l = c.getInterfaceConfigurations(); CHECK(l.count() == 0, true); CHECK(c.statusInterface("ifcfg0"), false); @@ -53,12 +53,12 @@ void ClientTest::testCommunicationBeforeConnect() { void ClientTest::testServerIDBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } void ClientTest::testServerVersionBeforeConnect() { SMPPPD::Client c; - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } void ClientTest::testCommunicationAfterConnect() { @@ -102,7 +102,7 @@ void ClientTest::testServerIDAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverID(), QString::null); + CHECK(c.serverID(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } @@ -112,7 +112,7 @@ void ClientTest::testServerVersionAfterDisconnect() { SMPPPD::Client c; if(c.connect("warwar", 3185)) { c.disconnect(); - CHECK(c.serverVersion(), QString::null); + CHECK(c.serverVersion(), TQString::null); } else { SKIP("Test skipped because no smpppd at warwar:3185"); } |