diff options
Diffstat (limited to 'kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp')
-rw-r--r-- | kopete/plugins/smpppdcs/libsmpppdclient/smpppdunsettled.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
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]); |