summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgpkey.h
diff options
context:
space:
mode:
Diffstat (limited to 'libkpgp/kpgpkey.h')
-rw-r--r--libkpgp/kpgpkey.h80
1 files changed, 40 insertions, 40 deletions
diff --git a/libkpgp/kpgpkey.h b/libkpgp/kpgpkey.h
index fd92f5a1e..a0cf9b624 100644
--- a/libkpgp/kpgpkey.h
+++ b/libkpgp/kpgpkey.h
@@ -21,10 +21,10 @@
#include <time.h>
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
namespace Kpgp {
@@ -54,19 +54,19 @@ typedef enum
} EncryptPref;
-typedef QCString KeyID;
+typedef TQCString KeyID;
-class KeyIDList : public QValueList<KeyID>
+class KeyIDList : public TQValueList<KeyID>
{
public:
KeyIDList() { }
- KeyIDList( const KeyIDList& l ) : QValueList<KeyID>(l) { }
- KeyIDList( const QValueList<KeyID>& l ) : QValueList<KeyID>(l) { }
+ KeyIDList( const KeyIDList& l ) : TQValueList<KeyID>(l) { }
+ KeyIDList( const TQValueList<KeyID>& l ) : TQValueList<KeyID>(l) { }
KeyIDList( const KeyID& i ) { append(i); }
- QStringList toStringList() const;
+ TQStringList toStringList() const;
- static KeyIDList fromStringList( const QStringList& );
+ static KeyIDList fromStringList( const TQStringList& );
};
/** This class is used to store information about a user id of a PGP key.
@@ -75,14 +75,14 @@ class UserID
{
public:
/** Constructs a new user id with the given values. */
- UserID(const QString& str,
+ UserID(const TQString& str,
const Validity validity = KPGP_VALIDITY_UNKNOWN,
const bool revoked = false,
const bool invalid = false);
~UserID() {};
/** Returns the text of the user id. */
- QString text() const;
+ TQString text() const;
/** Returns true if the user id has been revoked. */
bool revoked() const;
@@ -94,7 +94,7 @@ class UserID
Validity validity() const;
/** Sets the text of the user id to <em>str</em>. */
- void setText(const QString& str);
+ void setText(const TQString& str);
/** Sets the flag if the user id has been revoked to <em>revoked</em>. */
void setRevoked(const bool revoked);
@@ -110,13 +110,13 @@ class UserID
bool mRevoked : 1;
bool mInvalid : 1;
Validity mValidity;
- QString mText;
+ TQString mText;
};
-typedef QPtrList<UserID> UserIDList;
-typedef QPtrListIterator<UserID> UserIDListIterator;
+typedef TQPtrList<UserID> UserIDList;
+typedef TQPtrListIterator<UserID> UserIDListIterator;
-inline QString UserID::text() const
+inline TQString UserID::text() const
{
return mText;
}
@@ -136,7 +136,7 @@ inline Validity UserID::validity() const
return mValidity;
}
-inline void UserID::setText(const QString& str)
+inline void UserID::setText(const TQString& str)
{
mText = str;
}
@@ -204,7 +204,7 @@ class Subkey
KeyID keyID() const;
/** Returns the fingerprint of the subkey. */
- QCString fingerprint() const;
+ TQCString fingerprint() const;
/** Returns the creation date of the subkey. */
time_t creationDate() const;
@@ -249,7 +249,7 @@ class Subkey
void setKeyID(const KeyID& keyID);
/** Sets the fingerprint of the subkey to <em>fingerprint</em>. */
- void setFingerprint(const QCString& fingerprint);
+ void setFingerprint(const TQCString& fingerprint);
/** Sets the creation date of the subkey to <em>creationDate</em> seconds
since Epoch. */
@@ -273,7 +273,7 @@ class Subkey
unsigned int mKeyAlgo;
unsigned int mKeyLen;
KeyID mKeyID;
- QCString mFingerprint;
+ TQCString mFingerprint;
time_t mTimestamp; /* -1 for invalid, 0 for not available */
time_t mExpiration; /* -1 for never, 0 for not available */
};
@@ -338,7 +338,7 @@ inline KeyID Subkey::keyID() const
return mKeyID.right(8);
}
-inline QCString Subkey::fingerprint() const
+inline TQCString Subkey::fingerprint() const
{
return mFingerprint;
}
@@ -408,7 +408,7 @@ inline void Subkey::setKeyID(const KeyID& keyID)
mKeyID = keyID;
}
-inline void Subkey::setFingerprint(const QCString& fingerprint)
+inline void Subkey::setFingerprint(const TQCString& fingerprint)
{
mFingerprint = fingerprint;
}
@@ -423,8 +423,8 @@ inline void Subkey::setExpirationDate(const time_t expirationDate)
mExpiration = expirationDate;
}
-typedef QPtrList<Subkey> SubkeyList;
-typedef QPtrListIterator<Subkey> SubkeyListIterator;
+typedef TQPtrList<Subkey> SubkeyList;
+typedef TQPtrListIterator<Subkey> SubkeyListIterator;
/** This class is used to store information about a PGP key.
@@ -435,7 +435,7 @@ class Key
/** Constructs a new PGP key with <em>keyid</em> as key ID of the
primary key and <em>uid</em> as primary user ID. */
Key( const KeyID& keyid = KeyID(),
- const QString& uid = QString::null,
+ const TQString& uid = TQString::null,
const bool secret = false);
~Key();
@@ -503,7 +503,7 @@ class Key
/** Returns the primary user ID or a null string if there are no
user IDs. */
- QString primaryUserID() const;
+ TQString primaryUserID() const;
/** Returns the key ID of the primary key or a null string if there
are no subkeys. */
@@ -511,7 +511,7 @@ class Key
/** Returns the fingerprint of the primary key or a null string if there
are no subkeys. */
- QCString primaryFingerprint() const;
+ TQCString primaryFingerprint() const;
/** Returns true if there are no user IDs or no subkeys.*/
bool isNull() const;
@@ -527,7 +527,7 @@ class Key
/** Returns the trust value for the given user id of this key.
*/
- Validity keyTrust( const QString& uid ) const;
+ Validity keyTrust( const TQString& uid ) const;
/** Set the validity values for the user ids to the validity values of
the given key. This is useful after rereading a key without expensive
@@ -557,7 +557,7 @@ class Key
/** Adds a user ID with the given values to the key if <em>uid</em> isn't
an empty string. */
- void addUserID(const QString& uid,
+ void addUserID(const TQString& uid,
const Validity validity = KPGP_VALIDITY_UNKNOWN,
const bool revoked = false,
const bool invalid = false);
@@ -568,7 +568,7 @@ class Key
/** Returns true if the given string matches one of the user IDs.
The match is case sensitive if <em>cs</em> is true or case insensitive
if <em>cs</em> is false. */
- bool matchesUserID(const QString& str, bool cs = true);
+ bool matchesUserID(const TQString& str, bool cs = true);
/** Adds a subkey with the given values to the key if <em>keyID</em> isn't
an empty string. */
@@ -581,7 +581,7 @@ class Key
Subkey *getSubkey(const KeyID& keyID);
/** Sets the fingerprint of the given subkey to <em>fpr</em>. */
- void setFingerprint(const KeyID& keyID, const QCString& fpr);
+ void setFingerprint(const KeyID& keyID, const TQCString& fpr);
protected:
bool mSecret : 1;
@@ -690,14 +690,14 @@ inline void Key::setEncryptionPreference( const EncryptPref encrPref )
mEncryptPref = encrPref;
}
-inline QString Key::primaryUserID() const
+inline TQString Key::primaryUserID() const
{
UserID *uid = mUserIDs.getFirst();
if (uid)
return uid->text();
else
- return QString::null;
+ return TQString::null;
}
inline KeyID Key::primaryKeyID() const
@@ -710,14 +710,14 @@ inline KeyID Key::primaryKeyID() const
return KeyID();
}
-inline QCString Key::primaryFingerprint() const
+inline TQCString Key::primaryFingerprint() const
{
Subkey *key = mSubkeys.getFirst();
if (key)
return key->fingerprint();
else
- return QCString();
+ return TQCString();
}
inline const UserIDList Key::userIDs() const
@@ -757,8 +757,8 @@ inline void Key::addSubkey(const Subkey *subkey)
-typedef QPtrList<Key> KeyListBase;
-typedef QPtrListIterator<Key> KeyListIterator;
+typedef TQPtrList<Key> KeyListBase;
+typedef TQPtrListIterator<Key> KeyListIterator;
class KeyList : public KeyListBase
{
@@ -767,10 +767,10 @@ class KeyList : public KeyListBase
{ clear(); }
private:
- int compareItems( QPtrCollection::Item s1, QPtrCollection::Item s2 )
+ int compareItems( TQPtrCollection::Item s1, TQPtrCollection::Item s2 )
{
// sort case insensitively by the primary User IDs
- return QString::compare((static_cast<Key*>(s1))->primaryUserID().lower(),
+ return TQString::compare((static_cast<Key*>(s1))->primaryUserID().lower(),
(static_cast<Key*>(s2))->primaryUserID().lower());
}
};