diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-21 14:22:15 -0600 |
commit | 1180237ab336226ad932d767a6cb56208314988f (patch) | |
tree | 0a29b4d5d237f445dc87cb65b00d604ad4aa686d /kio/misc | |
parent | a51cd9949c4e6c726a84a61de3cfadd30cefb5c7 (diff) | |
download | tdelibs-1180237ab336226ad932d767a6cb56208314988f.tar.gz tdelibs-1180237ab336226ad932d767a6cb56208314988f.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'kio/misc')
-rw-r--r-- | kio/misc/kntlm/kntlm.cpp | 34 | ||||
-rw-r--r-- | kio/misc/kntlm/kntlm.h | 4 | ||||
-rw-r--r-- | kio/misc/kpac/script.cpp | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/kio/misc/kntlm/kntlm.cpp b/kio/misc/kntlm/kntlm.cpp index 834d2e30d..9af382483 100644 --- a/kio/misc/kntlm/kntlm.cpp +++ b/kio/misc/kntlm/kntlm.cpp @@ -32,7 +32,7 @@ #include "des.h" #include "kntlm.h" -TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ) +TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ) { //watch for buffer overflows TQ_UINT32 offset; @@ -45,7 +45,7 @@ TQString KNTLM::getString( const TQByteArray &buf, const SecBuf &secbuf, bool tq TQString str; const char *c = buf.data() + offset; - if ( tqunicode ) { + if ( unicode ) { str = UnicodeLE2TQString( (TQChar*) c, len >> 1 ); } else { str = TQString::fromLatin1( c, len ); @@ -67,11 +67,11 @@ TQByteArray KNTLM::getBuf( const TQByteArray &buf, const SecBuf &secbuf ) return ret; } -void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode ) +void KNTLM::addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode ) { TQByteArray tmp; - if ( tqunicode ) { + if ( unicode ) { tmp = QString2UnicodeLE( str ); addBuf( buf, secbuf, tmp ); } else { @@ -126,15 +126,15 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt Challenge *ch = (Challenge *) challenge.data(); TQByteArray response; uint chsize = challenge.size(); - bool tqunicode = false; + bool unicode = false; TQString dom; //challenge structure too small if ( chsize < 32 ) return false; - tqunicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; + unicode = KFromToLittleEndian(ch->flags) & Negotiate_Unicode; if ( domain.isEmpty() ) - dom = getString( challenge, ch->targetName, tqunicode ); + dom = getString( challenge, ch->targetName, unicode ); else dom = domain; @@ -164,10 +164,10 @@ bool KNTLM::getAuth( TQByteArray &auth, const TQByteArray &challenge, const TQSt addBuf( rbuf, ((Auth*) rbuf.data())->lmResponse, response ); // } if ( !dom.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->domain, dom, tqunicode ); - addString( rbuf, ((Auth*) rbuf.data())->user, user, tqunicode ); + addString( rbuf, ((Auth*) rbuf.data())->domain, dom, unicode ); + addString( rbuf, ((Auth*) rbuf.data())->user, user, unicode ); if ( !workstation.isEmpty() ) - addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, tqunicode ); + addString( rbuf, ((Auth*) rbuf.data())->workstation, workstation, unicode ); auth = rbuf; @@ -241,10 +241,10 @@ TQByteArray KNTLM::getNTLMResponse( const TQString &password, const unsigned cha TQByteArray KNTLM::ntlmHash( const TQString &password ) { KMD4::Digest digest; - TQByteArray ret, tqunicode; - tqunicode = QString2UnicodeLE( password ); + TQByteArray ret, unicode; + unicode = QString2UnicodeLE( password ); - KMD4 md4( tqunicode ); + KMD4 md4( unicode ); md4.rawDigest( digest ); ret.duplicate( (const char*) digest, sizeof( digest ) ); return ret; @@ -372,18 +372,18 @@ void KNTLM::convertKey( unsigned char *key_56, void* ks ) TQByteArray KNTLM::QString2UnicodeLE( const TQString &target ) { - TQByteArray tqunicode( target.length() * 2 ); + TQByteArray unicode( target.length() * 2 ); for ( uint i = 0; i < target.length(); i++ ) { - ((TQ_UINT16*)tqunicode.data())[ i ] = KFromToLittleEndian( target[i].tqunicode() ); + ((TQ_UINT16*)unicode.data())[ i ] = KFromToLittleEndian( target[i].unicode() ); } - return tqunicode; + return unicode; } TQString KNTLM::UnicodeLE2TQString( const TQChar* data, uint len ) { TQString ret; for ( uint i = 0; i < len; i++ ) { - ret += KFromToLittleEndian( data[ i ].tqunicode() ); + ret += KFromToLittleEndian( data[ i ].unicode() ); } return ret; } diff --git a/kio/misc/kntlm/kntlm.h b/kio/misc/kntlm/kntlm.h index 2be0a00af..462624fcd 100644 --- a/kio/misc/kntlm/kntlm.h +++ b/kio/misc/kntlm/kntlm.h @@ -212,7 +212,7 @@ public: /** * Extracts a string field from an NTLM structure. */ - static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool tqunicode ); + static TQString getString( const TQByteArray &buf, const SecBuf &secbuf, bool unicode ); /** * Extracts a byte array from an NTLM structure. */ @@ -226,7 +226,7 @@ private: static TQString UnicodeLE2TQString( const TQChar* data, uint len ); static void addBuf( TQByteArray &buf, SecBuf &secbuf, TQByteArray &data ); - static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool tqunicode = false ); + static void addString( TQByteArray &buf, SecBuf &secbuf, const TQString &str, bool unicode = false ); static void convertKey( unsigned char *key_56, void* ks ); }; diff --git a/kio/misc/kpac/script.cpp b/kio/misc/kpac/script.cpp index 243f5f9c2..55faef8a1 100644 --- a/kio/misc/kpac/script.cpp +++ b/kio/misc/kpac/script.cpp @@ -49,7 +49,7 @@ TQString UString::qstring() const UString::UString( const TQString &s ) { UChar* data = new UChar[ s.length() ]; - std::memcpy( data, s.tqunicode(), s.length() * sizeof( UChar ) ); + std::memcpy( data, s.unicode(), s.length() * sizeof( UChar ) ); rep = Rep::create( data, s.length() ); } |