From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: 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 --- kopete/protocols/msn/msnchallengehandler.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kopete/protocols/msn/msnchallengehandler.cpp') diff --git a/kopete/protocols/msn/msnchallengehandler.cpp b/kopete/protocols/msn/msnchallengehandler.cpp index 46d4b8a0..5492b9e7 100644 --- a/kopete/protocols/msn/msnchallengehandler.cpp +++ b/kopete/protocols/msn/msnchallengehandler.cpp @@ -46,8 +46,8 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString) kdDebug(14140) << k_funcinfo << "md5: " << digest << endl; - TQValueVector md5Integers(4); - for(Q_UINT32 i=0; i < md5Integers.count(); i++) + TQValueVector md5Integers(4); + for(TQ_UINT32 i=0; i < md5Integers.count(); i++) { md5Integers[i] = hexSwap(digest.mid(i*8, 8)).toUInt(0, 16) & 0x7FFFFFFF; kdDebug(14140) << k_funcinfo << ("0x" + hexSwap(digest.mid(i*8, 8))) << " " << md5Integers[i] << endl; @@ -61,8 +61,8 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString) kdDebug(14140) << k_funcinfo << "challenge key: " << challengeKey << endl; - TQValueVector challengeIntegers(challengeKey.length() / 4); - for(Q_UINT32 i=0; i < challengeIntegers.count(); i++) + TQValueVector challengeIntegers(challengeKey.length() / 4); + for(TQ_UINT32 i=0; i < challengeIntegers.count(); i++) { TQString sNum = challengeKey.mid(i*4, 4), sNumHex; @@ -82,7 +82,7 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString) // Step Three: Create the 64-bit hash key. // Get the hash key using the specified arrays. - Q_INT64 key = createHashKey(md5Integers, challengeIntegers); + TQ_INT64 key = createHashKey(md5Integers, challengeIntegers); kdDebug(14140) << k_funcinfo << "key: " << key << endl; // Step Four: Create the final hash key. @@ -98,16 +98,16 @@ TQString MSNChallengeHandler::computeHash(const TQString& challengeString) return (upper + lower); } -Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector& md5Integers, - const TQValueVector& challengeIntegers) +TQ_INT64 MSNChallengeHandler::createHashKey(const TQValueVector& md5Integers, + const TQValueVector& challengeIntegers) { kdDebug(14140) << k_funcinfo << "Creating 64-bit key." << endl; - Q_INT64 magicNumber = 0x0E79A9C1L, high = 0L, low = 0L; + TQ_INT64 magicNumber = 0x0E79A9C1L, high = 0L, low = 0L; for(uint i=0; i < challengeIntegers.count(); i += 2) { - Q_INT64 temp = ((challengeIntegers[i] * magicNumber) % 0x7FFFFFFF) + high; + TQ_INT64 temp = ((challengeIntegers[i] * magicNumber) % 0x7FFFFFFF) + high; temp = ((temp * md5Integers[0]) + md5Integers[1]) % 0x7FFFFFFF; high = (challengeIntegers[i + 1] + temp) % 0x7FFFFFFF; @@ -121,12 +121,12 @@ Q_INT64 MSNChallengeHandler::createHashKey(const TQValueVector& md5Inte TQDataStream buffer(TQByteArray(8), IO_ReadWrite); buffer.setByteOrder(TQDataStream::LittleEndian); - buffer << (Q_INT32)high; - buffer << (Q_INT32)low; + buffer << (TQ_INT32)high; + buffer << (TQ_INT32)low; buffer.device()->reset(); buffer.setByteOrder(TQDataStream::BigEndian); - Q_INT64 key; + TQ_INT64 key; buffer >> key; return key; -- cgit v1.2.1