diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /libkpgp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkpgp')
-rw-r--r-- | libkpgp/kpgp.cpp | 14 | ||||
-rw-r--r-- | libkpgp/kpgp.h | 4 | ||||
-rw-r--r-- | libkpgp/kpgpbase.cpp | 32 | ||||
-rw-r--r-- | libkpgp/kpgpbase2.cpp | 80 | ||||
-rw-r--r-- | libkpgp/kpgpbase5.cpp | 70 | ||||
-rw-r--r-- | libkpgp/kpgpbase6.cpp | 54 | ||||
-rw-r--r-- | libkpgp/kpgpbaseG.cpp | 64 | ||||
-rw-r--r-- | libkpgp/kpgpblock.cpp | 4 | ||||
-rw-r--r-- | libkpgp/kpgpblock.h | 6 | ||||
-rw-r--r-- | libkpgp/kpgpui.cpp | 44 |
10 files changed, 186 insertions, 186 deletions
diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp index 8a9c68989..53b77913f 100644 --- a/libkpgp/kpgp.cpp +++ b/libkpgp/kpgp.cpp @@ -313,7 +313,7 @@ Module::clearsign( Block& block, Kpgp::Result Module::encrypt( Block& block, - const TQStringList& receivers, const KeyID& keyId, + const TQStringList& tqreceivers, const KeyID& keyId, bool sign, const TQCString& charset ) { KeyIDList encryptionKeyIds; // list of keys which are used for encryption @@ -324,8 +324,8 @@ Module::encrypt( Block& block, setUser( keyId ); - if( !receivers.empty() ) { - Kpgp::Result result = getEncryptionKeys( encryptionKeyIds, receivers, + if( !tqreceivers.empty() ) { + Kpgp::Result result = getEncryptionKeys( encryptionKeyIds, tqreceivers, keyId ); if( Kpgp::Ok != result ) { return result; @@ -1705,7 +1705,7 @@ Module::keysForAddress( const TQString& address ) return KeyIDList(); } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.contains( addr ) ) { + if( addressDataDict.tqcontains( addr ) ) { return addressDataDict[addr].keyIds; } else { @@ -1720,7 +1720,7 @@ Module::setKeysForAddress( const TQString& address, const KeyIDList& keyIds ) return; } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.contains( addr ) ) { + if( addressDataDict.tqcontains( addr ) ) { addressDataDict[addr].keyIds = keyIds; } else { @@ -1782,7 +1782,7 @@ EncryptPref Module::encryptionPreference( const TQString& address ) { TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.contains( addr ) ) { + if( addressDataDict.tqcontains( addr ) ) { return addressDataDict[addr].encrPref; } else { @@ -1798,7 +1798,7 @@ Module::setEncryptionPreference( const TQString& address, return; } TQString addr = canonicalAddress( address ).lower(); - if( addressDataDict.contains( addr ) ) { + if( addressDataDict.tqcontains( addr ) ) { addressDataDict[addr].encrPref = pref; } else { diff --git a/libkpgp/kpgp.h b/libkpgp/kpgp.h index e36f07fdf..ec937015b 100644 --- a/libkpgp/kpgp.h +++ b/libkpgp/kpgp.h @@ -123,7 +123,7 @@ public: Ok if everything is o.k. */ Kpgp::Result encrypt( Block& block, - const TQStringList& receivers, const KeyID& keyId, + const TQStringList& tqreceivers, const KeyID& keyId, bool sign, const TQCString& charset = 0 ); /** Determines the keys which should be used for encrypting the message @@ -308,7 +308,7 @@ public: /** Parses the given message and splits it into OpenPGP blocks and Non-OpenPGP blocks. - Returns TRUE if the message contains at least one OpenPGP block and + Returns TRUE if the message tqcontains at least one OpenPGP block and FALSE otherwise. The format is then: <pre> diff --git a/libkpgp/kpgpbase.cpp b/libkpgp/kpgpbase.cpp index 157c73e3b..ec2ffd126 100644 --- a/libkpgp/kpgpbase.cpp +++ b/libkpgp/kpgpbase.cpp @@ -70,7 +70,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP ) int len, len2; FILE *pass; pid_t child_pid; - int childExitStatus; + int childExiStatus; struct pollfd pollin, pollout, pollerr; int pollstatus; @@ -251,8 +251,8 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP ) do { //kdDebug(5100) << "Checking if PGP is still running..." << endl; - childExitStatus = 0; - waitpidRetVal = waitpid(child_pid, &childExitStatus, WNOHANG); + childExiStatus = 0; + waitpidRetVal = waitpid(child_pid, &childExiStatus, WNOHANG); //kdDebug(5100) << "waitpid returned " << waitpidRetVal << endl; if (pout[0] >= 0) { do { @@ -351,14 +351,14 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP ) close(ppass[0]); // Did the child exit normally? - if (WIFEXITED(childExitStatus) != 0) { + if (WIFEXITED(childExiStatus) != 0) { // Get the return code of the child - childExitStatus = WEXITSTATUS(childExitStatus); - kdDebug(5100) << "PGP exited with exit status " << childExitStatus + childExiStatus = WEXITSTATUS(childExiStatus); + kdDebug(5100) << "PGP exited with exit status " << childExiStatus << endl; } else { - childExitStatus = -1; + childExiStatus = -1; kdDebug(5100) << "PGP exited abnormally!" << endl; } @@ -371,7 +371,7 @@ Base::run( const char *cmd, const char *passphrase, bool onlyReadFromPGP ) */ kdDebug(5100) << error << endl; - return childExitStatus; + return childExiStatus; } @@ -387,7 +387,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG ) int len, len2; FILE *pass; pid_t child_pid; - int childExitStatus; + int childExiStatus; char gpgcmd[1024] = "\0"; struct pollfd poller[3]; int num_pollers = 0; @@ -529,8 +529,8 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG ) do { //kdDebug(5100) << "Checking if GnuPG is still running..." << endl; - childExitStatus = 0; - waitpidRetVal = waitpid(child_pid, &childExitStatus, WNOHANG); + childExiStatus = 0; + waitpidRetVal = waitpid(child_pid, &childExiStatus, WNOHANG); //kdDebug(5100) << "waitpid returned " << waitpidRetVal << endl; do { // poll the pipes @@ -645,14 +645,14 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG ) close(ppass[0]); // Did the child exit normally? - if (WIFEXITED(childExitStatus) != 0) { + if (WIFEXITED(childExiStatus) != 0) { // Get the return code of the child - childExitStatus = WEXITSTATUS(childExitStatus); - kdDebug(5100) << "GnuPG exited with exit status " << childExitStatus + childExiStatus = WEXITSTATUS(childExiStatus); + kdDebug(5100) << "GnuPG exited with exit status " << childExiStatus << endl; } else { - childExitStatus = -1; + childExiStatus = -1; kdDebug(5100) << "GnuPG exited abnormally!" << endl; } @@ -663,7 +663,7 @@ Base::runGpg( const char *cmd, const char *passphrase, bool onlyReadFromGnuPG ) // get to know what's going on during the gpg calls. kdDebug(5100) << "gpg stderr:\n" << error << endl; - return childExitStatus; + return childExiStatus; } diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp index 301470b76..06c0d1e60 100644 --- a/libkpgp/kpgpbase2.cpp +++ b/libkpgp/kpgpbase2.cpp @@ -66,7 +66,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; if(!recipients.isEmpty() && passphrase != 0) cmd = PGP2 " +batchmode +language=en +verbose=1 -seat"; @@ -100,12 +100,12 @@ Base2::encsign( Block& block, const KeyIDList& recipients, clear(); input = block.text(); - exitStatus = run(cmd.data(), passphrase); + exiStatus = run(cmd.data(), passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if(exitStatus != 0) + if(exiStatus != 0) status = ERROR; #if 0 @@ -218,7 +218,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -227,11 +227,11 @@ int Base2::decrypt( Block& block, const char *passphrase ) { int index, index2; - int exitStatus = 0; + int exiStatus = 0; clear(); input = block.text(); - exitStatus = run(PGP2 " +batchmode +language=en -f", passphrase); + exiStatus = run(PGP2 " +batchmode +language=en -f", passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); @@ -249,16 +249,16 @@ Base2::decrypt( Block& block, const char *passphrase ) index1 = input.find('\n', index1); index2 = input.find("\n\n", index1); input.remove(index1, index2 - index1); - exitStatus = run(PGP2 " +batchmode +language=en -f", passphrase); + exiStatus = run(PGP2 " +batchmode +language=en -f", passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); } - if(exitStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("error running PGP"); status = RUN_ERR; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -457,7 +457,7 @@ Base2::decrypt( Block& block, const char *passphrase ) } } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -467,13 +467,13 @@ Base2::readPublicKey( const KeyID& keyID, const bool readTrust /* = false */, Key* key /* = 0 */ ) { - int exitStatus = 0; + int exiStatus = 0; status = 0; - exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kvc -f 0x" + + exiStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kvc -f 0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -487,10 +487,10 @@ Base2::readPublicKey( const KeyID& keyID, if( readTrust ) { - exitStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kc -f", + exiStatus = run( PGP2 " +batchmode +language=en +verbose=0 -kc -f", 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -512,14 +512,14 @@ Base2::publicKeys( const TQStringList & patterns ) KeyList Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns ) { - int exitStatus = 0; + int exiStatus = 0; KeyList publicKeys; status = 0; if ( patterns.isEmpty() ) { - exitStatus = run( cmd, 0, true ); + exiStatus = run( cmd, 0, true ); - if ( exitStatus != 0 ) { + if ( exiStatus != 0 ) { status = ERROR; return KeyList(); } @@ -533,10 +533,10 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns ) for ( TQStringList::ConstIterator it = patterns.begin(); it != patterns.end(); ++it ) { - exitStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(), + exiStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(), 0, true ); - if ( exitStatus != 0 ) { + if ( exiStatus != 0 ) { status = ERROR; return KeyList(); } @@ -547,7 +547,7 @@ Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns ) // put all new keys into a map, remove duplicates while ( !publicKeys.isEmpty() ) { Key * key = publicKeys.take( 0 ); - if ( !map.contains( key->primaryFingerprint() ) ) + if ( !map.tqcontains( key->primaryFingerprint() ) ) map.insert( key->primaryFingerprint(), key ); else delete key; @@ -576,16 +576,16 @@ int Base2::signKey(const KeyID& keyID, const char *passphrase) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; cmd = PGP2 " +batchmode +language=en -ks -f "; cmd += addUserId(); cmd += " 0x" + keyID; status = 0; - exitStatus = run(cmd.data(),passphrase); + exiStatus = run(cmd.data(),passphrase); - if (exitStatus != 0) + if (exiStatus != 0) status = ERROR; return status; @@ -594,16 +594,16 @@ Base2::signKey(const KeyID& keyID, const char *passphrase) TQCString Base2::getAsciiPublicKey(const KeyID& keyID) { - int exitStatus = 0; + int exiStatus = 0; if (keyID.isEmpty()) return TQCString(); status = 0; - exitStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID, + exiStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return TQCString(); } @@ -646,7 +646,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) if( !strncmp( output.data() + index, "pub", 3 ) || !strncmp( output.data() + index, "sec", 3 ) ) - { // line contains primary key data + { // line tqcontains primary key data // Example 1 (nothing special): // pub 1024/E2D074D3 2001/09/09 Test Key <testkey@xyz> // Example 2 (disabled key): @@ -737,7 +737,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) } } else if( output[index] == ' ' ) - { // line contains additional key data + { // line tqcontains additional key data if( key == 0 ) break; @@ -748,20 +748,20 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) pos++; if( !strncmp( output.data() + pos, "Key fingerprint = ", 18 ) ) - { // line contains a fingerprint + { // line tqcontains a fingerprint // Example: // Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49 TQCString fingerprint = output.mid( pos, index2-pos ); // remove white space from the fingerprint for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) - fingerprint.replace( idx, 1, "" ); + fingerprint.tqreplace( idx, 1, "" ); subkey->setFingerprint( fingerprint ); } else if( !strncmp( output.data() + pos, "Expire: ", 8 ) || !strncmp( output.data() + pos, "no expire ", 10 ) ) - { // line contains additional key properties + { // line tqcontains additional key properties // Examples: // Expire: 2001/09/10 // no expire ENCRyption only @@ -801,7 +801,7 @@ Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) } } else - { // line contains an additional user id + { // line tqcontains an additional user id // Example: // Test key (2nd user ID) <abc@xyz> @@ -854,7 +854,7 @@ Base2::parseTrustDataForKey( Key* key, const TQCString& str ) break; if( str[index+21] != ' ' ) - { // line contains a validity value for a user ID + { // line tqcontains a validity value for a user ID // determine the validity Validity validity = KPGP_VALIDITY_UNKNOWN; @@ -927,7 +927,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) if( !strncmp( output.data() + index, "pub", 3 ) || !strncmp( output.data() + index, "sec", 3 ) ) - { // line contains primary key data + { // line tqcontains primary key data // Example 1: // pub 1024/E2D074D3 2001/09/09 Test Key <testkey@xyz> // Example 2 (disabled key): @@ -1017,7 +1017,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) } } else if( output[index] == ' ' ) - { // line contains additional key data + { // line tqcontains additional key data if( key == 0 ) break; @@ -1027,7 +1027,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) pos++; if( !strncmp( output.data() + pos, "Key fingerprint = ", 18 ) ) - { // line contains a fingerprint + { // line tqcontains a fingerprint // Example: // Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49 @@ -1036,13 +1036,13 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) TQCString fingerprint = output.mid( pos, index2-pos ); // remove white space from the fingerprint for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) - fingerprint.replace( idx, 1, "" ); + fingerprint.tqreplace( idx, 1, "" ); subkey->setFingerprint( fingerprint ); } else if( !strncmp( output.data() + pos, "Expire: ", 8 ) || !strncmp( output.data() + pos, "no expire ", 10 ) ) - { // line contains additional key properties + { // line tqcontains additional key properties // Examples: // Expire: 2001/09/10 // no expire ENCRyption only @@ -1082,7 +1082,7 @@ Base2::parseKeyList( const TQCString& output, bool secretKeys ) } } else - { // line contains an additional user id + { // line tqcontains an additional user id // Example: // Test key (2nd user ID) <abc@xyz> diff --git a/libkpgp/kpgpbase5.cpp b/libkpgp/kpgpbase5.cpp index 21ca1dc47..a5988a9cb 100644 --- a/libkpgp/kpgpbase5.cpp +++ b/libkpgp/kpgpbase5.cpp @@ -66,7 +66,7 @@ Base5::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; int index; // used to work around a bug in pgp5. pgp5 treats files // with non ascii chars (umlauts, etc...) as binary files, but @@ -112,14 +112,14 @@ Base5::encsign( Block& block, const KeyIDList& recipients, if (signonly) { input.append("\n"); - input.replace(TQRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace + input.tqreplace(TQRegExp("[ \t]+\n"), "\n"); //strip trailing whitespace } //We have to do this otherwise it's all in vain - exitStatus = run(cmd.data(), passphrase); + exiStatus = run(cmd.data(), passphrase); block.setError( error ); - if(exitStatus != 0) + if(exiStatus != 0) status = ERROR; // now parse the returned info @@ -179,13 +179,13 @@ Base5::encsign( Block& block, const KeyIDList& recipients, if (input[0] == '-') input = "- " + input; for ( int idx = 0 ; (idx = input.find("\n-", idx)) >= 0 ; idx += 4 ) - input.replace(idx, 2, "\n- -"); + input.tqreplace(idx, 2, "\n- -"); output = "-----BEGIN PGP SIGNED MESSAGE-----\n\n" + input + "\n" + output; } block.setProcessedText( output ); - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -193,19 +193,19 @@ Base5::encsign( Block& block, const KeyIDList& recipients, int Base5::decrypt( Block& block, const char *passphrase ) { - int exitStatus = 0; + int exiStatus = 0; clear(); input = block.text(); - exitStatus = run("pgpv -f +batchmode=1", passphrase); + exiStatus = run("pgpv -f +batchmode=1", passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if(exitStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("Error running PGP"); status = RUN_ERR; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -313,7 +313,7 @@ Base5::decrypt( Block& block, const char *passphrase ) } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -321,12 +321,12 @@ Base5::decrypt( Block& block, const char *passphrase ) Key* Base5::readPublicKey( const KeyID& keyId, const bool readTrust, Key* key ) { - int exitStatus = 0; + int exiStatus = 0; status = 0; - exitStatus = run( "pgpk -ll 0x" + keyId, 0, true ); + exiStatus = run( "pgpk -ll 0x" + keyId, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -340,9 +340,9 @@ Base5::readPublicKey( const KeyID& keyId, const bool readTrust, Key* key ) if( readTrust ) { - exitStatus = run( "pgpk -c 0x" + keyId, 0, true ); + exiStatus = run( "pgpk -c 0x" + keyId, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -357,7 +357,7 @@ Base5::readPublicKey( const KeyID& keyId, const bool readTrust, Key* key ) KeyList Base5::publicKeys( const TQStringList & patterns ) { - int exitStatus = 0; + int exiStatus = 0; TQCString cmd = "pgpk -ll"; for ( TQStringList::ConstIterator it = patterns.begin(); @@ -366,9 +366,9 @@ Base5::publicKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exitStatus = run( cmd, 0, true ); + exiStatus = run( cmd, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -386,7 +386,7 @@ Base5::publicKeys( const TQStringList & patterns ) KeyList Base5::secretKeys( const TQStringList & patterns ) { - int exitStatus = 0; + int exiStatus = 0; status = 0; TQCString cmd = "pgpk -ll"; @@ -396,9 +396,9 @@ Base5::secretKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exitStatus = run( cmd, 0, true ); + exiStatus = run( cmd, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -415,15 +415,15 @@ Base5::secretKeys( const TQStringList & patterns ) TQCString Base5::getAsciiPublicKey(const KeyID& keyID) { - int exitStatus = 0; + int exiStatus = 0; if (keyID.isEmpty()) return TQCString(); status = 0; - exitStatus = run( "pgpk -xa 0x" + keyID, 0, true ); + exiStatus = run( "pgpk -xa 0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return TQCString(); } @@ -436,7 +436,7 @@ int Base5::signKey(const KeyID& keyID, const char *passphrase) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; if(passphrase == 0) return false; @@ -445,9 +445,9 @@ Base5::signKey(const KeyID& keyID, const char *passphrase) cmd += addUserId(); status = 0; - exitStatus = run(cmd.data(), passphrase); + exiStatus = run(cmd.data(), passphrase); - if (exitStatus != 0) + if (exiStatus != 0) status = ERROR; return status; @@ -492,7 +492,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) if( !strncmp( output.data() + offset, "pub", 3 ) || !strncmp( output.data() + offset, "sec", 3 ) || !strncmp( output.data() + offset, "sub", 3 ) ) - { // line contains key data + { // line tqcontains key data //kdDebug(5100)<<"Key data:\n"; int pos, pos2; @@ -579,7 +579,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) ); subkey->setCreationDate( epoch.secsTo( dt ) ); // has the key already expired? - if( TQDateTime::currentDateTime() >= dt ) + if( TQDateTime::tqcurrentDateTime() >= dt ) { subkey->setExpired( true ); key->setExpired( true ); @@ -647,7 +647,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) } else if( !strncmp( output.data() + offset, "f16", 3 ) || !strncmp( output.data() + offset, "f20", 3 ) ) - { // line contains a fingerprint + { // line tqcontains a fingerprint /* Examples: f16 Fingerprint16 = DE 2A 77 08 78 64 7C 42 72 75 B1 A7 3E 42 3F 79 f20 Fingerprint20 = 226F 4B63 6DA2 7389 91D1 2A49 D58A 3EC1 5214 181E @@ -657,13 +657,13 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) TQCString fingerprint = output.mid( pos, eol-pos ); // remove white space from the fingerprint for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) - fingerprint.replace( idx, 1, "" ); + fingerprint.tqreplace( idx, 1, "" ); assert( subkey != 0 ); subkey->setFingerprint( fingerprint ); //kdDebug(5100)<<"Fingerprint: "<<fingerprint<<endl; } else if( !strncmp( output.data() + offset, "uid", 3 ) ) - { // line contains a uid + { // line tqcontains a uid int pos = offset+5; TQCString uid = output.mid( pos, eol-pos ); key->addUserID( uid ); @@ -678,7 +678,7 @@ Base5::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) else if ( !strncmp( output.data() + offset, "sig", 3 ) || !strncmp( output.data() + offset, "SIG", 3 ) || !strncmp( output.data() + offset, "ret", 3 ) ) - { // line contains a signature + { // line tqcontains a signature // SIG = sig with own key; ret = sig with revoked key // we ignore it for now } @@ -792,7 +792,7 @@ Base5::parseTrustDataForKey( Key* key, const TQCString& str ) break; if( str[offset+23] != ' ' ) - { // line contains a validity value for a user ID + { // line tqcontains a validity value for a user ID // determine the validity Validity validity = KPGP_VALIDITY_UNKNOWN; diff --git a/libkpgp/kpgpbase6.cpp b/libkpgp/kpgpbase6.cpp index 6ee6af221..fba6d4ec7 100644 --- a/libkpgp/kpgpbase6.cpp +++ b/libkpgp/kpgpbase6.cpp @@ -49,19 +49,19 @@ int Base6::decrypt( Block& block, const char *passphrase ) { int index, index2; - int exitStatus = 0; + int exiStatus = 0; clear(); input = block.text(); - exitStatus = run( PGP6 " +batchmode +language=C -f", passphrase); + exiStatus = run( PGP6 " +batchmode +language=C -f", passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if(exitStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("error running PGP"); status = RUN_ERR; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -180,7 +180,7 @@ Base6::decrypt( Block& block, const char *passphrase ) } } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -190,13 +190,13 @@ Base6::readPublicKey( const KeyID& keyID, const bool readTrust /* = false */, Key* key /* = 0 */ ) { - int exitStatus = 0; + int exiStatus = 0; status = 0; - exitStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kvvc " + exiStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kvvc " "0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -210,10 +210,10 @@ Base6::readPublicKey( const KeyID& keyID, if( readTrust ) { - exitStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kc " + exiStatus = run( PGP6 " +batchmode -compatible +verbose=0 +language=C -kc " "0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -238,13 +238,13 @@ QStrList Base6::pubKeys() { int index, index2; - int exitStatus = 0; + int exiStatus = 0; int compatibleMode = 1; status = 0; - exitStatus = run("pgp +batchmode +language=C -kv -f"); + exiStatus = run("pgp +batchmode +language=C -kv -f"); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -319,9 +319,9 @@ Base6::pubKeys() } // Also look for pgp key groups - exitStatus = run("pgp +batchmode +language=C -gv -f"); + exiStatus = run("pgp +batchmode +language=C -gv -f"); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -352,11 +352,11 @@ Base6::secretKeys( const TQStringList & patterns ) int Base6::isVersion6() { - int exitStatus = 0; + int exiStatus = 0; - exitStatus = run( PGP6, 0, true ); + exiStatus = run( PGP6, 0, true ); - if(exitStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("error running PGP"); status = RUN_ERR; return 0; @@ -406,7 +406,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) if( firstLine && ( !strncmp( output.data() + offset, "DSS", 3 ) || !strncmp( output.data() + offset, "RSA", 3 ) ) ) - { // line contains primary key data + { // line tqcontains primary key data // Example 1: // RSA 1024 0xE2D074D3 2001/09/09 Test Key <testkey@xyz> // Example 2 (disabled key): @@ -554,7 +554,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) else if( !strncmp( output.data() + offset, "DSS", 3 ) || !strncmp( output.data() + offset, " DH", 3 ) || !strncmp( output.data() + offset, "RSA", 3 ) ) - { // line contains secondary key data (or data for the next key) + { // line tqcontains secondary key data (or data for the next key) if( fpr ) break; // here begins the next key's data //kdDebug(5100)<<"Secondary key data:\n"; @@ -639,11 +639,11 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) canEncr = canEncr || encr; } else if( !strncmp( output.data() + offset, "Unknown type", 12 ) ) - { // line contains key data of unknown type (ignored) + { // line tqcontains key data of unknown type (ignored) kdDebug(5100)<<"Unknown key type.\n"; } else if( output[offset] == ' ' ) - { // line contains additional key data + { // line tqcontains additional key data if( key == 0 ) break; //kdDebug(5100)<<"Additional key data:\n"; @@ -653,7 +653,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) pos++; if( !strncmp( output.data() + pos, "Key fingerprint = ", 18 ) ) - { // line contains a fingerprint + { // line tqcontains a fingerprint // Example: // Key fingerprint = D0 6C BB 3A F5 16 82 C4 F3 A0 8A B3 7B 16 99 70 @@ -663,14 +663,14 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) TQCString fingerprint = output.mid( pos, eol-pos ); // remove white space from the fingerprint for ( int idx = 0 ; (idx = fingerprint.find(' ', idx)) >= 0 ; ) - fingerprint.replace( idx, 1, "" ); + fingerprint.tqreplace( idx, 1, "" ); //kdDebug(5100)<<"Fingerprint: "<<fingerprint<<endl; assert( subkey != 0 ); subkey->setFingerprint( fingerprint ); } else - { // line contains an additional user id + { // line tqcontains an additional user id // Example: // Test key (2nd user ID) <abc@xyz> @@ -679,7 +679,7 @@ Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) } } else if( !strncmp( output.data() + offset, "sig", 3 ) ) - { // line contains signature data (ignored) + { // line tqcontains signature data (ignored) //kdDebug(5100)<<"Signature.\n"; } else // end of key data @@ -804,7 +804,7 @@ Base6::parseTrustDataForKey( Key* key, const TQCString& str ) break; if( str[offset+23] != ' ' ) - { // line contains a validity value for a user ID + { // line tqcontains a validity value for a user ID // determine the validity Validity validity = KPGP_VALIDITY_UNKNOWN; diff --git a/libkpgp/kpgpbaseG.cpp b/libkpgp/kpgpbaseG.cpp index 768d5c023..5aa619ec6 100644 --- a/libkpgp/kpgpbaseG.cpp +++ b/libkpgp/kpgpbaseG.cpp @@ -73,7 +73,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; if(!recipients.isEmpty() && passphrase != 0) cmd = "--batch --armor --sign --encrypt --textmode"; @@ -109,12 +109,12 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, clear(); input = block.text(); - exitStatus = runGpg(cmd.data(), passphrase); + exiStatus = runGpg(cmd.data(), passphrase); if( !output.isEmpty() ) block.setProcessedText( output ); block.setError( error ); - if( exitStatus != 0 ) + if( exiStatus != 0 ) { // this error message is later hopefully overwritten errMsg = i18n( "Unknown error." ); @@ -199,7 +199,7 @@ BaseG::encsign( Block& block, const KeyIDList& recipients, } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -208,19 +208,19 @@ int BaseG::decrypt( Block& block, const char *passphrase ) { int index, index2; - int exitStatus = 0; + int exiStatus = 0; clear(); input = block.text(); - exitStatus = runGpg("--batch --decrypt", passphrase); + exiStatus = runGpg("--batch --decrypt", passphrase); if( !output.isEmpty() && ( error.find( "gpg: quoted printable" ) == -1 ) ) block.setProcessedText( output ); block.setError( error ); - if(exitStatus == -1) { + if(exiStatus == -1) { errMsg = i18n("Error running gpg"); status = RUN_ERR; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -361,7 +361,7 @@ BaseG::decrypt( Block& block, const char *passphrase ) } } //kdDebug(5100) << "status = " << status << endl; - block.setStatus( status ); + block.seStatus( status ); return status; } @@ -371,15 +371,15 @@ BaseG::readPublicKey( const KeyID& keyID, const bool readTrust /* = false */, Key* key /* = 0 */ ) { - int exitStatus = 0; + int exiStatus = 0; status = 0; if( readTrust ) - exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); + exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode 0x" + keyID, 0, true ); else - exitStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); + exiStatus = runGpg( "--batch --list-public-keys --with-fingerprint --with-colons --fixed-list-mode --no-expensive-trust-checks 0x" + keyID, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return 0; } @@ -405,7 +405,7 @@ BaseG::readPublicKey( const KeyID& keyID, KeyList BaseG::publicKeys( const TQStringList & patterns ) { - int exitStatus = 0; + int exiStatus = 0; // the option --with-colons should be used for interprocess communication // with gpg (according to Werner Koch) @@ -417,9 +417,9 @@ BaseG::publicKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exitStatus = runGpg( cmd, 0, true ); + exiStatus = runGpg( cmd, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -437,7 +437,7 @@ BaseG::publicKeys( const TQStringList & patterns ) KeyList BaseG::secretKeys( const TQStringList & patterns ) { - int exitStatus = 0; + int exiStatus = 0; // the option --with-colons should be used for interprocess communication // with gpg (according to Werner Koch) @@ -449,9 +449,9 @@ BaseG::secretKeys( const TQStringList & patterns ) cmd += KProcess::quote( *it ).local8Bit(); } status = 0; - exitStatus = runGpg( cmd, 0, true ); + exiStatus = runGpg( cmd, 0, true ); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return KeyList(); } @@ -470,7 +470,7 @@ int BaseG::signKey(const KeyID& keyID, const char *passphrase) { TQCString cmd; - int exitStatus = 0; + int exiStatus = 0; cmd = "--batch"; cmd += addUserId(); @@ -478,9 +478,9 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) cmd += keyID; status = 0; - exitStatus = runGpg(cmd.data(), passphrase); + exiStatus = runGpg(cmd.data(), passphrase); - if (exitStatus != 0) + if (exiStatus != 0) status = ERROR; return status; @@ -490,15 +490,15 @@ BaseG::signKey(const KeyID& keyID, const char *passphrase) QCString BaseG::getAsciiPublicKey(const KeyID& keyID) { - int exitStatus = 0; + int exiStatus = 0; if (keyID.isEmpty()) return TQCString(); status = 0; - exitStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); + exiStatus = runGpg("--batch --armor --export 0x" + keyID, 0, true); - if(exitStatus != 0) { + if(exiStatus != 0) { status = ERROR; return TQCString(); } @@ -542,7 +542,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) bool bIsPublicKey = false; if( ( bIsPublicKey = !strncmp( output.data() + index, "pub:", 4 ) ) || !strncmp( output.data() + index, "sec:", 4 ) ) - { // line contains primary key data + { // line tqcontains primary key data // Example: pub:f:1024:17:63CB691DFAEBD5FC:860451781::379:-:::scESC: // abort parsing if we found the start of the next key @@ -657,7 +657,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) key->addSubkey( subkey ); } else if( !strncmp( output.data() + index, "uid:", 4 ) ) - { // line contains a user id + { // line tqcontains a user id // Example: uid:f::::::::Philip R. Zimmermann <prz@pgp.com>: UserID *userID = new UserID( "" ); @@ -710,19 +710,19 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) break; case 10: // User-ID TQCString uid = output.mid( pos, pos2-pos ); - // replace "\xXX" with the corresponding character; + // tqreplace "\xXX" with the corresponding character; // other escaped characters, i.e. \n, \r etc., are ignored // because they shouldn't appear in user IDs for ( int idx = 0 ; (idx = uid.find( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; str[0] = (char) TQString( uid.mid( idx + 2, 2 ) ).toShort( 0, 16 ); - uid.replace( idx, 4, str ); + uid.tqreplace( idx, 4, str ); } TQString uidString = TQString::fromUtf8( uid.data() ); // check whether uid was utf-8 encoded bool isUtf8 = true; for ( unsigned int i = 0; i + 1 < uidString.length(); ++i ) { - if ( uidString[i].unicode() == 0xdbff && + if ( uidString[i].tqunicode() == 0xdbff && uidString[i+1].row() == 0xde ) { // we found a non-Unicode character (see TQString::fromUtf8()) isUtf8 = false; @@ -778,7 +778,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) else { // assume latin1 encoding kdDebug(5100) << "Assume latin1 encoding." << endl; - uidString = TQString::fromLatin1( uid.data() ); + uidString = TQString::tqfromLatin1( uid.data() ); } } userID->setText( uidString ); @@ -792,7 +792,7 @@ BaseG::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ ) key->addUserID( userID ); } else if( !strncmp( output.data() + index, "fpr:", 4 ) ) - { // line contains a fingerprint + { // line tqcontains a fingerprint // Example: fpr:::::::::17AFBAAF21064E513F037E6E63CB691DFAEBD5FC: if (key == 0) // invalid key data diff --git a/libkpgp/kpgpblock.cpp b/libkpgp/kpgpblock.cpp index 015929c26..9d0a68055 100644 --- a/libkpgp/kpgpblock.cpp +++ b/libkpgp/kpgpblock.cpp @@ -122,7 +122,7 @@ Block::clearsign( const TQCString& keyId, const TQCString& charset ) } Kpgp::Result -Block::encrypt( const TQStringList& receivers, const TQCString& keyId, +Block::encrypt( const TQStringList& tqreceivers, const TQCString& keyId, const bool sign, const TQCString& charset ) { Kpgp::Module *pgp = Kpgp::Module::getKpgp(); @@ -130,7 +130,7 @@ Block::encrypt( const TQStringList& receivers, const TQCString& keyId, if( pgp == 0 ) return Kpgp::Failure; - return pgp->encrypt( *this, receivers, keyId, sign, charset ); + return pgp->encrypt( *this, tqreceivers, keyId, sign, charset ); } } // namespace Kpgp diff --git a/libkpgp/kpgpblock.h b/libkpgp/kpgpblock.h index a85dcea65..c741062a8 100644 --- a/libkpgp/kpgpblock.h +++ b/libkpgp/kpgpblock.h @@ -103,7 +103,7 @@ class KDE_EXPORT Block void setProcessedText( const TQCString& str ); int status() const; - void setStatus( const int status ); + void seStatus( const int status ); BlockType type(); @@ -169,7 +169,7 @@ class KDE_EXPORT Block false if there was an unresolvable error or if encryption was canceled true if everything is o.k. */ - Kpgp::Result encrypt( const TQStringList& receivers, const TQCString& keyId, + Kpgp::Result encrypt( const TQStringList& tqreceivers, const TQCString& keyId, const bool sign, const TQCString& charset = TQCString() ); private: @@ -235,7 +235,7 @@ Block::status() const } inline void -Block::setStatus( const int status ) +Block::seStatus( const int status ) { mStatus = status; } diff --git a/libkpgp/kpgpui.cpp b/libkpgp/kpgpui.cpp index e0d5bee27..294560465 100644 --- a/libkpgp/kpgpui.cpp +++ b/libkpgp/kpgpui.cpp @@ -115,7 +115,7 @@ Config::Config( TQWidget *parent, const char *name, bool encrypt ) TQVBoxLayout *topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint() ); group = new TQVGroupBox( i18n("Warning"), this ); - group->layout()->setSpacing( KDialog::spacingHint() ); + group->tqlayout()->setSpacing( KDialog::spacingHint() ); // (mmutz) work around Qt label bug in 3.0.0 (and possibly later): // 1. Don't use rich text: No <qt><b>...</b></qt> label = new TQLabel( i18n("Please check if encryption really " @@ -126,13 +126,13 @@ Config::Config( TQWidget *parent, const char *name, bool encrypt ) labelFont.setBold( true ); label->setFont( labelFont ); // 3. and activate wordwarp: - label->setAlignment( AlignLeft|WordBreak ); + label->tqsetAlignment( AlignLeft|WordBreak ); // end; to remove the workaround, add <qt><b>..</b></qt> around the - // text and remove lines TQFont... -> label->setAlignment(...). + // text and remove lines TQFont... -> label->tqsetAlignment(...). topLayout->addWidget( group ); group = new TQVGroupBox( i18n("Encryption Tool"), this ); - group->layout()->setSpacing( KDialog::spacingHint() ); + group->tqlayout()->setSpacing( KDialog::spacingHint() ); TQHBox * hbox = new TQHBox( group ); label = new TQLabel( i18n("Select encryption tool to &use:"), hbox ); @@ -153,7 +153,7 @@ Config::Config( TQWidget *parent, const char *name, bool encrypt ) topLayout->addWidget( group ); mpOptionsGroupBox = new TQVGroupBox( i18n("Options"), this ); - mpOptionsGroupBox->layout()->setSpacing( KDialog::spacingHint() ); + mpOptionsGroupBox->tqlayout()->setSpacing( KDialog::spacingHint() ); storePass = new TQCheckBox( i18n("&Keep passphrase in memory"), mpOptionsGroupBox ); connect( storePass, TQT_SIGNAL( toggled( bool ) ), @@ -1176,7 +1176,7 @@ KeyRequester::KeyRequester( TQWidget * parent, bool multipleKeys, // the button to unset any key: mEraseButton = new TQPushButton( this ); mEraseButton->setAutoDefault( false ); - mEraseButton->setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, + mEraseButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) ); mEraseButton->setPixmap( SmallIcon( "clear_left" ) ); TQToolTip::add( mEraseButton, i18n("Clear") ); @@ -1192,7 +1192,7 @@ KeyRequester::KeyRequester( TQWidget * parent, bool multipleKeys, connect( mEraseButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotEraseButtonClicked()) ); connect( mDialogButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotDialogButtonClicked()) ); - setSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Fixed ) ); } @@ -1480,21 +1480,21 @@ KeyApprovalDialog::KeyApprovalDialog( const TQStringList& addresses, // calculate the optimal width for the dialog int dialogWidth = marginHint() + sv->frameWidth() - + bigvbox->sizeHint().width() - + sv->verticalScrollBar()->sizeHint().width() + + bigvbox->tqsizeHint().width() + + sv->verticalScrollBar()->tqsizeHint().width() + sv->frameWidth() + marginHint() + 2; // calculate the optimal height for the dialog int dialogHeight = marginHint() - + label->sizeHint().height() + + label->tqsizeHint().height() + topLayout->spacing() + sv->frameWidth() - + bigvbox->sizeHint().height() - + sv->horizontalScrollBar()->sizeHint().height() + + bigvbox->tqsizeHint().height() + + sv->horizontalScrollBar()->tqsizeHint().height() + sv->frameWidth() + topLayout->spacing() - + actionButton( KDialogBase::Cancel )->sizeHint().height() + + actionButton( KDialogBase::Cancel )->tqsizeHint().height() + marginHint() + 2; // don't make the dialog too large @@ -1630,26 +1630,26 @@ CipherTextDialog::CipherTextDialog( const TQCString & text, mEditBox->setReadOnly(true); topLayout->addWidget( mEditBox, 10 ); - TQString unicodeText; + TQString tqunicodeText; if (charset.isEmpty()) - unicodeText = TQString::fromLocal8Bit(text.data()); + tqunicodeText = TQString::fromLocal8Bit(text.data()); else { bool ok=true; TQTextCodec *codec = KGlobal::charsets()->codecForName(charset, ok); if(!ok) - unicodeText = TQString::fromLocal8Bit(text.data()); + tqunicodeText = TQString::fromLocal8Bit(text.data()); else - unicodeText = codec->toUnicode(text.data(), text.length()); + tqunicodeText = codec->toUnicode(text.data(), text.length()); } - mEditBox->setText(unicodeText); + mEditBox->setText(tqunicodeText); setMinimumSize(); } void CipherTextDialog::setMinimumSize() { - // this seems to force a layout of the entire document, so we get a + // this seems to force a tqlayout of the entire document, so we get a // a proper contentsWidth(). Is there a better way? for ( int i = 0; i < mEditBox->paragraphs(); i++ ) (void) mEditBox->paragraphRect( i ); @@ -1660,7 +1660,7 @@ void CipherTextDialog::setMinimumSize() #if KDE_IS_VERSION( 3, 1, 90 ) - int maxWidth = KGlobalSettings::desktopGeometry(parentWidget()).width()-100; + int maxWidth = KGlobalSettings::desktopGeometry(tqparentWidget()).width()-100; #else KConfig gc("kdeglobals", false, false); gc.setGroup("Windows"); @@ -1668,9 +1668,9 @@ void CipherTextDialog::setMinimumSize() if (TQApplication::desktop()->isVirtualDesktop() && gc.readBoolEntry("XineramaEnabled", true) && gc.readBoolEntry("XineramaPlacementEnabled", true)) { - maxWidth = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(parentWidget())).width()-100; + maxWidth = TQApplication::desktop()->screenGeometry(TQApplication::desktop()->screenNumber(tqparentWidget())).width()-100; } else { - maxWidth = TQApplication::desktop()->geometry().width()-100; + maxWidth = TQApplication::desktop()->tqgeometry().width()-100; } #endif |