diff options
Diffstat (limited to 'libkpgp/kpgpbase2.cpp')
-rw-r--r-- | libkpgp/kpgpbase2.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/libkpgp/kpgpbase2.cpp b/libkpgp/kpgpbase2.cpp index c4fd0358f..301470b76 100644 --- a/libkpgp/kpgpbase2.cpp +++ b/libkpgp/kpgpbase2.cpp @@ -26,7 +26,7 @@ #include <string.h> /* strncmp */ #include <assert.h> -#include <qdatetime.h> +#include <tqdatetime.h> #include <klocale.h> #include <kprocess.h> @@ -65,7 +65,7 @@ int Base2::encsign( Block& block, const KeyIDList& recipients, const char *passphrase ) { - QCString cmd; + TQCString cmd; int exitStatus = 0; if(!recipients.isEmpty() && passphrase != 0) @@ -117,7 +117,7 @@ Base2::encsign( Block& block, const KeyIDList& recipients, int index = 0; bool bad = FALSE; unsigned int num = 0; - QCString badkeys = ""; + TQCString badkeys = ""; if (error.find("Cannot find the public key") != -1) { index = 0; @@ -323,7 +323,7 @@ Base2::decrypt( Block& block, const char *passphrase ) mRecipients.clear(); while( (index2 = error.find('\n',index+1)) <= end ) { - QCString item = error.mid(index+1,index2-index-1); + TQCString item = error.mid(index+1,index2-index-1); item.stripWhiteSpace(); mRecipients.append(item); index = index2; @@ -421,7 +421,7 @@ Base2::decrypt( Block& block, const char *passphrase ) status |= GOODSIG; int index3 = error.find("Key ID ", index2) + 7; block.setSignatureKeyId( error.mid(index3,8) ); - block.setSignatureUserId( QString::null ); + block.setSignatureUserId( TQString::null ); } else if( (index2 = error.find("Good signature from", index)) != -1 ) { @@ -503,14 +503,14 @@ Base2::readPublicKey( const KeyID& keyID, KeyList -Base2::publicKeys( const QStringList & patterns ) +Base2::publicKeys( const TQStringList & patterns ) { return doGetPublicKeys( PGP2 " +batchmode +language=en +verbose=0 -kvc -f", patterns ); } KeyList -Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns ) +Base2::doGetPublicKeys( const TQCString & cmd, const TQStringList & patterns ) { int exitStatus = 0; KeyList publicKeys; @@ -528,10 +528,10 @@ Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns ) publicKeys = parseKeyList( output, false ); } else { - typedef QMap<QCString, Key*> KeyMap; + typedef TQMap<TQCString, Key*> KeyMap; KeyMap map; - for ( QStringList::ConstIterator it = patterns.begin(); + for ( TQStringList::ConstIterator it = patterns.begin(); it != patterns.end(); ++it ) { exitStatus = run( cmd + " " + KProcess::quote( *it ).local8Bit(), 0, true ); @@ -566,7 +566,7 @@ Base2::doGetPublicKeys( const QCString & cmd, const QStringList & patterns ) } KeyList -Base2::secretKeys( const QStringList & patterns ) +Base2::secretKeys( const TQStringList & patterns ) { return publicKeys( patterns ); } @@ -575,7 +575,7 @@ Base2::secretKeys( const QStringList & patterns ) int Base2::signKey(const KeyID& keyID, const char *passphrase) { - QCString cmd; + TQCString cmd; int exitStatus = 0; cmd = PGP2 " +batchmode +language=en -ks -f "; @@ -592,12 +592,12 @@ Base2::signKey(const KeyID& keyID, const char *passphrase) } -QCString Base2::getAsciiPublicKey(const KeyID& keyID) +TQCString Base2::getAsciiPublicKey(const KeyID& keyID) { int exitStatus = 0; if (keyID.isEmpty()) - return QCString(); + return TQCString(); status = 0; exitStatus = run( PGP2 " +batchmode +force +language=en -kxaf 0x" + keyID, @@ -605,7 +605,7 @@ QCString Base2::getAsciiPublicKey(const KeyID& keyID) if(exitStatus != 0) { status = ERROR; - return QCString(); + return TQCString(); } return output; @@ -613,7 +613,7 @@ QCString Base2::getAsciiPublicKey(const KeyID& keyID) Key* -Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) +Base2::parsePublicKeyData( const TQCString& output, Key* key /* = 0 */ ) { Subkey *subkey = 0; int index; @@ -715,8 +715,8 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); - QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) ); - QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) ); + TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) ); + TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) ); // The calculated creation date isn't exactly correct because QDateTime // doesn't know anything about timezones and always assumes local time // although epoch is of course UTC. But as PGP 2 anyway doesn't print @@ -727,7 +727,7 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) pos = pos2 + 1; while( output[pos] == ' ' ) pos++; - QCString uid = output.mid( pos, index2-pos ); + TQCString uid = output.mid( pos, index2-pos ); if( uid != "*** KEY REVOKED ***" ) key->addUserID( uid ); else @@ -752,7 +752,7 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) // Example: // Key fingerprint = 47 30 7C 76 05 BF 5E FB 72 41 00 F2 7D 0B D0 49 - QCString fingerprint = output.mid( pos, index2-pos ); + 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, "" ); @@ -774,8 +774,8 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); - QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) ); - QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) ); + TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) ); + TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) ); // Here the same comments as for the creation date are valid. subkey->setExpirationDate( epoch.secsTo( dt ) ); pos += 11; // note that there is always a blank after the expire date @@ -818,12 +818,12 @@ Base2::parsePublicKeyData( const QCString& output, Key* key /* = 0 */ ) void -Base2::parseTrustDataForKey( Key* key, const QCString& str ) +Base2::parseTrustDataForKey( Key* key, const TQCString& str ) { if( ( key == 0 ) || str.isEmpty() ) return; - QCString keyID = key->primaryKeyID(); + TQCString keyID = key->primaryKeyID(); UserIDList userIDs = key->userIDs(); // search the trust data belonging to this key @@ -874,7 +874,7 @@ Base2::parseTrustDataForKey( Key* key, const QCString& str ) int pos = index + 31; if( str[index+2] == ' ' ) pos++; // additional user IDs start one column later - QString uid = str.mid( pos, index2-pos ); + TQString uid = str.mid( pos, index2-pos ); // set the validity of the corresponding user ID for( UserIDListIterator it( userIDs ); it.current(); ++it ) @@ -893,7 +893,7 @@ Base2::parseTrustDataForKey( Key* key, const QCString& str ) KeyList -Base2::parseKeyList( const QCString& output, bool secretKeys ) +Base2::parseKeyList( const TQCString& output, bool secretKeys ) { kdDebug(5100) << "Kpgp::Base2::parseKeyList()" << endl; KeyList keys; @@ -995,8 +995,8 @@ Base2::parseKeyList( const QCString& output, bool secretKeys ) int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); - QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) ); - QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) ); + TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) ); + TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) ); // The calculated creation date isn't exactly correct because QDateTime // doesn't know anything about timezones and always assumes local time // although epoch is of course UTC. But as PGP 2 anyway doesn't print @@ -1007,7 +1007,7 @@ Base2::parseKeyList( const QCString& output, bool secretKeys ) pos = pos2 + 1; while( output[pos] == ' ' ) pos++; - QCString uid = output.mid( pos, index2-pos ); + TQCString uid = output.mid( pos, index2-pos ); if( uid != "*** KEY REVOKED ***" ) key->addUserID( uid ); else @@ -1033,7 +1033,7 @@ Base2::parseKeyList( const QCString& output, bool secretKeys ) int pos2; pos2 = pos + 18; - QCString fingerprint = output.mid( pos, index2-pos ); + 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, "" ); @@ -1055,8 +1055,8 @@ Base2::parseKeyList( const QCString& output, bool secretKeys ) int year = output.mid( pos, 4 ).toInt(); int month = output.mid( pos+5, 2 ).toInt(); int day = output.mid( pos+8, 2 ).toInt(); - QDateTime dt( QDate( year, month, day ), QTime( 00, 00 ) ); - QDateTime epoch( QDate( 1970, 01, 01 ), QTime( 00, 00 ) ); + TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) ); + TQDateTime epoch( TQDate( 1970, 01, 01 ), TQTime( 00, 00 ) ); // Here the same comments as for the creation date are valid. subkey->setExpirationDate( epoch.secsTo( dt ) ); pos += 11; // note that there is always a blank after the expire date |