summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpbase6.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkpgp/kpgpbase6.cpp')
-rw-r--r--libkpgp/kpgpbase6.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/libkpgp/kpgpbase6.cpp b/libkpgp/kpgpbase6.cpp
index 75e47e1d..6ee6af22 100644
--- a/libkpgp/kpgpbase6.cpp
+++ b/libkpgp/kpgpbase6.cpp
@@ -25,7 +25,7 @@
#include <string.h> /* strncmp */
#include <assert.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <kdebug.h>
@@ -137,13 +137,13 @@ Base6::decrypt( Block& block, const char *passphrase )
kdDebug(5100) << "Message was signed on '" << block.signatureDate() << "'\n";
}
else
- block.setSignatureDate( QCString() );
+ block.setSignatureDate( TQCString() );
// determine signature status and signature key
if( error.find("signature not checked") != -1)
{
index = error.find("KeyID:",index);
block.setSignatureKeyId( error.mid(index+9,8) );
- block.setSignatureUserId( QString::null );
+ block.setSignatureUserId( TQString::null );
status |= UNKNOWN_SIG;
status |= GOODSIG;
}
@@ -158,7 +158,7 @@ Base6::decrypt( Block& block, const char *passphrase )
// get key ID of signer
index = error.find("KeyID:",index2);
if (index == -1)
- block.setSignatureKeyId( QCString() );
+ block.setSignatureKeyId( TQCString() );
else
block.setSignatureKeyId( error.mid(index+9,8) );
}
@@ -175,8 +175,8 @@ Base6::decrypt( Block& block, const char *passphrase )
else
{
status |= ERROR;
- block.setSignatureUserId( QString::null );
- block.setSignatureKeyId( QCString() );
+ block.setSignatureUserId( TQString::null );
+ block.setSignatureKeyId( TQCString() );
}
}
//kdDebug(5100) << "status = " << status << endl;
@@ -226,7 +226,7 @@ Base6::readPublicKey( const KeyID& keyID,
KeyList
-Base6::publicKeys( const QStringList & patterns )
+Base6::publicKeys( const TQStringList & patterns )
{
return doGetPublicKeys( PGP6 " +batchmode -compatible +verbose=0 "
"+language=C -kvvc", patterns );
@@ -252,7 +252,7 @@ Base6::pubKeys()
//truncate trailing "\n"
if (error.length() > 1) error.truncate(error.length()-1);
- QStrList publicKeys;
+ TQStrList publicKeys;
index = error.find("bits/keyID",1); // skip first to "\n"
if (index ==-1)
{
@@ -266,7 +266,7 @@ Base6::pubKeys()
while( (index = error.find("\n",index)) != -1)
{
//parse line
- QCString line;
+ TQCString line;
if( (index2 = error.find("\n",index+1)) != -1)
// skip last line
{
@@ -301,14 +301,14 @@ Base6::pubKeys()
line = line.stripWhiteSpace();
} else {
// line with new key
- int index4 = error.find(QRegExp("/\\d{2}/\\d{2} "), index);
+ int index4 = error.find(TQRegExp("/\\d{2}/\\d{2} "), index);
line = error.mid(index4+7,index2-index4-7);
}
//kdDebug(5100) << "Base: found key for " << (const char *)line << endl;
// don't add PGP's comments to the key list
if (strncmp(line.data(),"*** KEY EXPIRED ***",19) &&
- line.find(QRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 &&
+ line.find(TQRegExp("^expires \\d{4}/\\d{2}/\\d{2}")) < 0 &&
strncmp(line.data(),"*** DEFAULT SIGNING KEY ***",27)) {
publicKeys.append(line);
}
@@ -328,7 +328,7 @@ Base6::pubKeys()
index = 0;
while ( (index = error.find("\n >", index)) != -1 ) {
- QCString line;
+ TQCString line;
index += 4;
index2 = error.find(" \"", index);
line = error.mid(index, index2-index+1).stripWhiteSpace();
@@ -343,7 +343,7 @@ Base6::pubKeys()
KeyList
-Base6::secretKeys( const QStringList & patterns )
+Base6::secretKeys( const TQStringList & patterns )
{
return publicKeys( patterns );
}
@@ -374,7 +374,7 @@ Base6::isVersion6()
Key*
-Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
+Base6::parseKeyData( const TQCString& output, int& offset, Key* key /* = 0 */ )
// This function parses the data for a single key which is output by PGP 6
// with the following command line arguments:
// +batchmode -compatible +verbose=0 +language=C -kvvc
@@ -486,8 +486,8 @@ Base6::parseKeyData( const QCString& output, int& offset, 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 6 anyway doesn't print
@@ -524,7 +524,7 @@ Base6::parseKeyData( const QCString& output, int& offset, 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 ) );
+ TQDateTime dt( TQDate( year, month, day ), TQTime( 00, 00 ) );
// Here the same comments as for the creation date are valid.
subkey->setExpirationDate( epoch.secsTo( dt ) );
pos += 10;
@@ -537,7 +537,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
}
else
{
- QCString uid = output.mid( pos, eol-pos );
+ TQCString uid = output.mid( pos, eol-pos );
key->addUserID( uid );
pos = eol;
//kdDebug(5100) << "User ID:"<<uid<<endl;
@@ -628,7 +628,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
}
else
{
- QCString uid = output.mid( pos, eol-pos );
+ TQCString uid = output.mid( pos, eol-pos );
key->addUserID( uid );
pos = eol;
//kdDebug(5100) << "User ID:"<<uid<<endl;
@@ -660,7 +660,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
fpr = true; // we found a fingerprint
pos += 18;
- QCString fingerprint = output.mid( pos, eol-pos );
+ 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, "" );
@@ -703,7 +703,7 @@ Base6::parseKeyData( const QCString& output, int& offset, Key* key /* = 0 */ )
Key*
-Base6::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
+Base6::parseSingleKey( const TQCString& output, Key* key /* = 0 */ )
{
int offset;
@@ -733,7 +733,7 @@ Base6::parseSingleKey( const QCString& output, Key* key /* = 0 */ )
KeyList
-Base6::parseKeyList( const QCString& output, bool secretKeys )
+Base6::parseKeyList( const TQCString& output, bool secretKeys )
{
kdDebug(5100) << "Kpgp::Base6::parseKeyList()" << endl;
KeyList keys;
@@ -773,12 +773,12 @@ Base6::parseKeyList( const QCString& output, bool secretKeys )
void
-Base6::parseTrustDataForKey( Key* key, const QCString& str )
+Base6::parseTrustDataForKey( Key* key, const TQCString& str )
{
if( ( key == 0 ) || str.isEmpty() )
return;
- QCString keyID = "0x" + key->primaryKeyID();
+ TQCString keyID = "0x" + key->primaryKeyID();
UserIDList userIDs = key->userIDs();
// search the start of the trust data
@@ -820,7 +820,7 @@ Base6::parseTrustDataForKey( Key* key, const QCString& str )
// determine the user ID
int pos = offset + 33;
- QString uid = str.mid( pos, eol-pos );
+ TQString uid = str.mid( pos, eol-pos );
// set the validity of the corresponding user ID
for( UserIDListIterator it( userIDs ); it.current(); ++it )