From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- libkpgp/kpgpkey.h | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) (limited to 'libkpgp/kpgpkey.h') 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 -#include -#include -#include -#include +#include +#include +#include +#include namespace Kpgp { @@ -54,19 +54,19 @@ typedef enum } EncryptPref; -typedef QCString KeyID; +typedef TQCString KeyID; -class KeyIDList : public QValueList +class KeyIDList : public TQValueList { public: KeyIDList() { } - KeyIDList( const KeyIDList& l ) : QValueList(l) { } - KeyIDList( const QValueList& l ) : QValueList(l) { } + KeyIDList( const KeyIDList& l ) : TQValueList(l) { } + KeyIDList( const TQValueList& l ) : TQValueList(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 str. */ - void setText(const QString& str); + void setText(const TQString& str); /** Sets the flag if the user id has been revoked to revoked. */ 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 UserIDList; -typedef QPtrListIterator UserIDListIterator; +typedef TQPtrList UserIDList; +typedef TQPtrListIterator 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 fingerprint. */ - void setFingerprint(const QCString& fingerprint); + void setFingerprint(const TQCString& fingerprint); /** Sets the creation date of the subkey to creationDate 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 SubkeyList; -typedef QPtrListIterator SubkeyListIterator; +typedef TQPtrList SubkeyList; +typedef TQPtrListIterator SubkeyListIterator; /** This class is used to store information about a PGP key. @@ -435,7 +435,7 @@ class Key /** Constructs a new PGP key with keyid as key ID of the primary key and uid 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 uid 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 cs is true or case insensitive if cs 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 keyID isn't an empty string. */ @@ -581,7 +581,7 @@ class Key Subkey *getSubkey(const KeyID& keyID); /** Sets the fingerprint of the given subkey to fpr. */ - 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 KeyListBase; -typedef QPtrListIterator KeyListIterator; +typedef TQPtrList KeyListBase; +typedef TQPtrListIterator 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(s1))->primaryUserID().lower(), + return TQString::compare((static_cast(s1))->primaryUserID().lower(), (static_cast(s2))->primaryUserID().lower()); } }; -- cgit v1.2.1