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/protocols/msn/msnsecureloginhandler.cpp | |
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/protocols/msn/msnsecureloginhandler.cpp')
-rw-r--r-- | kopete/protocols/msn/msnsecureloginhandler.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kopete/protocols/msn/msnsecureloginhandler.cpp b/kopete/protocols/msn/msnsecureloginhandler.cpp index 00f862fe..a795b43a 100644 --- a/kopete/protocols/msn/msnsecureloginhandler.cpp +++ b/kopete/protocols/msn/msnsecureloginhandler.cpp @@ -17,14 +17,14 @@ #include "msnsecureloginhandler.h" // Qt includes -#include <qregexp.h> +#include <tqregexp.h> // KDE includes #include <kio/job.h> #include <kurl.h> #include <kdebug.h> -MSNSecureLoginHandler::MSNSecureLoginHandler(const QString &accountId, const QString &password, const QString &authParameters) +MSNSecureLoginHandler::MSNSecureLoginHandler(const TQString &accountId, const TQString &password, const TQString &authParameters) : m_password(password), m_accountId(accountId), m_authentification(authParameters) { @@ -45,7 +45,7 @@ void MSNSecureLoginHandler::login() getLoginServer->addMetaData("cache", "reload"); getLoginServer->addMetaData("PropagateHttpHeader", "true"); - connect(getLoginServer, SIGNAL(result(KIO::Job *)), this, SLOT(slotLoginServerReceived(KIO::Job* ))); + connect(getLoginServer, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotLoginServerReceived(KIO::Job* ))); } void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) @@ -53,24 +53,24 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) if(!loginJob->error()) { // Retrive the HTTP header - QString httpHeaders = loginJob->queryMetaData("HTTP-Headers"); + TQString httpHeaders = loginJob->queryMetaData("HTTP-Headers"); // Get the login URL using QRegExp - QRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg="); + TQRegExp rx("PassportURLs: DARealm=(.*),DALogin=(.*),DAReg="); rx.search(httpHeaders); // Set the loginUrl and loginServer - QString loginUrl = rx.cap(2); - QString loginServer = loginUrl.section('/', 0, 0); + TQString loginUrl = rx.cap(2); + TQString loginServer = loginUrl.section('/', 0, 0); kdDebug(14140) << k_funcinfo << loginServer << endl; - QString authURL = "https://" + loginUrl; + TQString authURL = "https://" + loginUrl; KIO::Job *authJob = KIO::get(KURL(authURL), true, false); authJob->addMetaData("cookies", "manual"); - QString authRequest = "Authorization: Passport1.4 " + TQString authRequest = "Authorization: Passport1.4 " "OrgVerb=GET," "OrgURL=http%3A%2F%2Fmessenger%2Emsn%2Ecom," "sign-in=" + KURL::encode_string(m_accountId) + @@ -86,7 +86,7 @@ void MSNSecureLoginHandler::slotLoginServerReceived(KIO::Job *loginJob) authJob->addMetaData("cookies", "manual"); authJob->addMetaData("cache", "reload"); - connect(authJob, SIGNAL(result(KIO::Job *)), this, SLOT(slotTweenerReceived(KIO::Job* ))); + connect(authJob, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotTweenerReceived(KIO::Job* ))); } else { @@ -100,21 +100,21 @@ void MSNSecureLoginHandler::slotTweenerReceived(KIO::Job *authJob) { if(!authJob->error()) { - QString httpHeaders = authJob->queryMetaData("HTTP-Headers"); + TQString httpHeaders = authJob->queryMetaData("HTTP-Headers"); // kdDebug(14140) << k_funcinfo << "HTTP headers: " << httpHeaders << endl; // Check if we get "401 Unauthorized", thats means it's a bad password. - if(httpHeaders.contains(QString::fromUtf8("401 Unauthorized"))) + if(httpHeaders.contains(TQString::fromUtf8("401 Unauthorized"))) { // kdDebug(14140) << k_funcinfo << "MSN Login Bad password." << endl; emit loginBadPassword(); } else { - QRegExp rx("from-PP='(.*)'"); + TQRegExp rx("from-PP='(.*)'"); rx.search(httpHeaders); - QString ticket = rx.cap(1); + TQString ticket = rx.cap(1); // kdDebug(14140) << k_funcinfo << "Received ticket: " << ticket << endl; |