summaryrefslogtreecommitdiffstats
path: root/libkpgp/kpgp.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkpgp/kpgp.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkpgp/kpgp.cpp')
-rw-r--r--libkpgp/kpgp.cpp204
1 files changed, 102 insertions, 102 deletions
diff --git a/libkpgp/kpgp.cpp b/libkpgp/kpgp.cpp
index d478d1999..ec80e6887 100644
--- a/libkpgp/kpgp.cpp
+++ b/libkpgp/kpgp.cpp
@@ -30,9 +30,9 @@
#include <sys/wait.h>
#include <signal.h>
-#include <qlabel.h>
-#include <qcursor.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
@@ -200,14 +200,14 @@ Module::prepare( bool needPassPhrase, Block* block )
setPassPhrase( "dummy" );
}
else {
- QString ID;
+ TQString ID;
if( block )
ID = block->requiredUserId();
PassphraseDialog passdlg(0, i18n("OpenPGP Security Check"), true, ID);
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int passdlgResult = passdlg.exec();
- QApplication::restoreOverrideCursor();
- if (passdlgResult == QDialog::Accepted) {
+ TQApplication::restoreOverrideCursor();
+ if (passdlgResult == TQDialog::Accepted) {
if (!setPassPhrase(passdlg.passphrase())) {
if (strlen(passdlg.passphrase()) >= 1024)
errMsg = i18n("Passphrase is too long, it must contain fewer than 1024 characters.");
@@ -281,13 +281,13 @@ Module::decrypt( Block& block )
// loop on bad passphrase
if( retval & BADPHRASE ) {
wipePassPhrase();
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel(0,
i18n("You just entered an invalid passphrase.\n"
"Do you want to try again, or "
"cancel and view the message undecrypted?"),
i18n("PGP Warning"), i18n("&Retry"));
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if ( ret == KMessageBox::Cancel ) break;
} else
break;
@@ -306,15 +306,15 @@ Module::decrypt( Block& block )
Kpgp::Result
Module::clearsign( Block& block,
- const KeyID& keyId, const QCString& charset )
+ const KeyID& keyId, const TQCString& charset )
{
- return encrypt( block, QStringList(), keyId, true, charset );
+ return encrypt( block, TQStringList(), keyId, true, charset );
}
Kpgp::Result
Module::encrypt( Block& block,
- const QStringList& receivers, const KeyID& keyId,
- bool sign, const QCString& charset )
+ const TQStringList& receivers, const KeyID& keyId,
+ bool sign, const TQCString& charset )
{
KeyIDList encryptionKeyIds; // list of keys which are used for encryption
int status = 0;
@@ -340,15 +340,15 @@ Module::encrypt( Block& block,
// check for bad passphrase
while( status & BADPHRASE ) {
wipePassPhrase();
- QString str = i18n("You entered an invalid passphrase.\n"
+ TQString str = i18n("You entered an invalid passphrase.\n"
"Do you want to try again, continue and leave the "
"message unsigned, or cancel sending the message?");
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("&Retry"),
i18n("Send &Unsigned") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -368,15 +368,15 @@ Module::encrypt( Block& block,
// did signing fail?
if( status & ERR_SIGNING ) {
- QString str = i18n("%1 = 'signing failed' error message",
+ TQString str = i18n("%1 = 'signing failed' error message",
"%1\nDo you want to send the message unsigned, "
"or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Unsigned") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -386,17 +386,17 @@ Module::encrypt( Block& block,
// check for bad keys
if( status & BADKEYS ) {
- QString str = i18n("%1 = 'bad keys' error message",
+ TQString str = i18n("%1 = 'bad keys' error message",
"%1\nDo you want to encrypt anyway, leave the "
"message as-is, or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Encrypted"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -413,15 +413,15 @@ Module::encrypt( Block& block,
}
if( status & MISSINGKEY ) {
- QString str = i18n("%1 = 'missing keys' error message",
+ TQString str = i18n("%1 = 'missing keys' error message",
"%1\nDo you want to leave the message as-is, "
"or cancel sending the message?")
.arg( pgp->lastErrorMessage() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("&Send As-Is") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -433,23 +433,23 @@ Module::encrypt( Block& block,
// show error dialog
errMsg = i18n( "The following error occurred:\n%1" )
.arg( pgp->lastErrorMessage() );
- QString details = i18n( "This is the error message of %1:\n%2" )
+ TQString details = i18n( "This is the error message of %1:\n%2" )
.arg( ( pgpType == tGPG ) ? "GnuPG" : "PGP" )
.arg( block.error().data() );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
KMessageBox::detailedSorry( 0, errMsg, details );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
return Kpgp::Failure;
}
if( showCipherText() ) {
// show cipher text dialog
CipherTextDialog *cipherTextDlg = new CipherTextDialog( block.text(), charset );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool result = ( cipherTextDlg->exec() == QDialog::Accepted );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool result = ( cipherTextDlg->exec() == TQDialog::Accepted );
+ TQApplication::restoreOverrideCursor();
delete cipherTextDlg;
- return result == QDialog::Accepted ? Kpgp::Ok : Kpgp::Canceled;
+ return result == TQDialog::Accepted ? Kpgp::Ok : Kpgp::Canceled;
}
return Kpgp::Ok;
}
@@ -487,7 +487,7 @@ Module::doEncSign( Block& block,
Kpgp::Result
Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
- const QStringList& recipients,
+ const TQStringList& recipients,
const KeyID& keyId )
{
if( recipients.empty() ) {
@@ -497,7 +497,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// list of lists of encryption keys (one list per recipient + one list
// for the sender)
- QValueVector<KeyIDList> recipientKeyIds( recipients.count() + 1 );
+ TQValueVector<KeyIDList> recipientKeyIds( recipients.count() + 1 );
// add the sender's encryption key(s) to the list of recipient key IDs
if( encryptToSelf() ) {
recipientKeyIds[0] = KeyIDList( keyId );
@@ -507,7 +507,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
bool showKeysForApproval = false;
int i = 1;
- for( QStringList::ConstIterator it = recipients.begin();
+ for( TQStringList::ConstIterator it = recipients.begin();
it != recipients.end(); ++it, ++i ) {
EncryptPref encrPref = encryptionPreference( *it );
if( ( encrPref == UnknownEncryptPref ) || ( encrPref == NeverEncrypt ) )
@@ -521,7 +521,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
kdDebug(5100) << "recipientKeyIds = (\n";
- QValueVector<KeyIDList>::const_iterator kit;
+ TQValueVector<KeyIDList>::const_iterator kit;
for( kit = recipientKeyIds.begin(); kit != recipientKeyIds.end(); ++kit ) {
kdDebug(5100) << "( 0x" << (*kit).toStringList().join( ", 0x" )
<< " ),\n";
@@ -542,21 +542,21 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// show the recipients <-> key relation
KeyApprovalDialog dlg( recipients, recipientKeyIds, allowedKeys );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = dlg.exec();
- if( ret == QDialog::Rejected ) {
- QApplication::restoreOverrideCursor();
+ if( ret == TQDialog::Rejected ) {
+ TQApplication::restoreOverrideCursor();
return Kpgp::Canceled;
}
recipientKeyIds = dlg.keys();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
// flatten the list of lists of key IDs and count empty key ID lists
unsigned int emptyListCount = 0;
- for( QValueVector<KeyIDList>::const_iterator it = recipientKeyIds.begin();
+ for( TQValueVector<KeyIDList>::const_iterator it = recipientKeyIds.begin();
it != recipientKeyIds.end(); ++it ) {
if( (*it).isEmpty() ) {
// only count empty key ID lists for the recipients
@@ -577,18 +577,18 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
// show a warning if the user didn't select an encryption key for
// some of the recipients
if( recipientKeyIds.size() == emptyListCount + 1 ) { // (+1 because of the sender's key)
- QString str = ( recipients.count() == 1 )
+ TQString str = ( recipients.count() == 1 )
? i18n("You did not select an encryption key for the "
"recipient of this message; therefore, the message "
"will not be encrypted.")
: i18n("You did not select an encryption key for any of the "
"recipients of this message; therefore, the message "
"will not be encrypted.");
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningContinueCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -596,19 +596,19 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
encryptionKeyIds.clear();
}
else if( emptyListCount > 0 ) {
- QString str = ( emptyListCount == 1 )
+ TQString str = ( emptyListCount == 1 )
? i18n("You did not select an encryption key for one of "
"the recipients; this person will not be able to "
"decrypt the message if you encrypt it.")
: i18n("You did not select encryption keys for some of "
"the recipients; these persons will not be able to "
"decrypt the message if you encrypt it." );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
int ret = KMessageBox::warningYesNoCancel( 0, str,
i18n("PGP Warning"),
i18n("Send &Encrypted"),
i18n("Send &Unencrypted") );
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if( ret == KMessageBox::Cancel ) {
return Kpgp::Canceled;
}
@@ -622,7 +622,7 @@ Module::getEncryptionKeys( KeyIDList& encryptionKeyIds,
}
int
-Module::encryptionPossible( const QStringList& recipients )
+Module::encryptionPossible( const TQStringList& recipients )
{
if( 0 == pgp ) assignPGPBase();
@@ -634,7 +634,7 @@ Module::encryptionPossible( const QStringList& recipients )
int noKey = 0, never = 0, unknown = 0, always = 0, aip = 0, ask = 0,
askwp = 0;
- for( QStringList::ConstIterator it = recipients.begin();
+ for( TQStringList::ConstIterator it = recipients.begin();
it != recipients.end(); ++it) {
if( haveTrustedEncryptionKey( *it ) ) {
EncryptPref encrPref = encryptionPreference( *it );
@@ -739,7 +739,7 @@ Module::publicKey(const KeyID& keyID)
}
Key*
-Module::publicKey( const QString& userID )
+Module::publicKey( const TQString& userID )
{
readPublicKeys();
@@ -779,7 +779,7 @@ Module::keyTrust( const KeyID& keyID )
}
Validity
-Module::keyTrust( const QString& userID )
+Module::keyTrust( const TQString& userID )
{
Key *key = publicKey( userID );
@@ -910,8 +910,8 @@ Module::showCipherText(void) const
}
KeyID
-Module::selectSecretKey( const QString& title,
- const QString& text,
+Module::selectSecretKey( const TQString& title,
+ const TQString& text,
const KeyID& keyId )
{
if( 0 == pgp ) {
@@ -929,10 +929,10 @@ Module::selectSecretKey( const QString& title,
}
KeyID
-Module::selectPublicKey( const QString& title,
- const QString& text /* = QString::null */,
+Module::selectPublicKey( const TQString& title,
+ const TQString& text /* = TQString::null */,
const KeyID& oldKeyId /* = KeyID() */,
- const QString& address /* = QString::null */,
+ const TQString& address /* = TQString::null */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -965,10 +965,10 @@ Module::selectPublicKey( const QString& title,
KeyIDList
-Module::selectPublicKeys( const QString& title,
- const QString& text /* = QString::null */,
+Module::selectPublicKeys( const TQString& title,
+ const TQString& text /* = TQString::null */,
const KeyIDList& oldKeyIds /* = KeyIDList() */,
- const QString& address /* = QString::null */,
+ const TQString& address /* = TQString::null */,
const unsigned int allowedKeys /* = AllKeys */ )
{
if( 0 == pgp ) {
@@ -1021,9 +1021,9 @@ Module::getConfig()
bool
-Module::prepareMessageForDecryption( const QCString& msg,
- QPtrList<Block>& pgpBlocks,
- QStrList& nonPgpBlocks )
+Module::prepareMessageForDecryption( const TQCString& msg,
+ TQPtrList<Block>& pgpBlocks,
+ TQStrList& nonPgpBlocks )
{
BlockType pgpBlock = NoPgpBlock;
int start = -1; // start of the current PGP block
@@ -1104,7 +1104,7 @@ Module::prepareMessageForDecryption( const QCString& msg,
// --------------------- private functions -------------------
bool
-Module::haveTrustedEncryptionKey( const QString& person )
+Module::haveTrustedEncryptionKey( const TQString& person )
{
if( 0 == pgp ) assignPGPBase();
@@ -1112,7 +1112,7 @@ Module::haveTrustedEncryptionKey( const QString& person )
readPublicKeys();
- QString address = canonicalAddress( person ).lower();
+ TQString address = canonicalAddress( person ).lower();
// First look for this person's address in the address data dictionary
KeyIDList keyIds = keysForAddress( address );
@@ -1164,7 +1164,7 @@ Module::haveTrustedEncryptionKey( const QString& person )
}
KeyIDList
-Module::getEncryptionKeys( const QString& person )
+Module::getEncryptionKeys( const TQString& person )
{
if( 0 == pgp ) assignPGPBase();
@@ -1172,7 +1172,7 @@ Module::getEncryptionKeys( const QString& person )
readPublicKeys();
- QString address = canonicalAddress( person ).lower();
+ TQString address = canonicalAddress( person ).lower();
// #### FIXME: Until we support encryption with untrusted keys only
// #### trusted keys are allowed
@@ -1325,8 +1325,8 @@ bool
Module::checkForPGP(void)
{
// get path
- QCString path;
- QStrList pSearchPaths;
+ TQCString path;
+ TQStrList pSearchPaths;
int index = 0;
int lastindex = -1;
@@ -1341,7 +1341,7 @@ Module::checkForPGP(void)
if(lastindex != (int)path.length() - 1)
pSearchPaths.append( path.mid(lastindex+1,path.length()-lastindex) );
- QStrListIterator it(pSearchPaths);
+ TQStrListIterator it(pSearchPaths);
haveGpg=FALSE;
// lets try gpg
@@ -1479,11 +1479,11 @@ Module::assignPGPBase(void)
}
QString
-Module::canonicalAddress( const QString& _adress )
+Module::canonicalAddress( const TQString& _adress )
{
int index,index2;
- QString address = _adress.simplifyWhiteSpace();
+ TQString address = _adress.simplifyWhiteSpace();
address = address.stripWhiteSpace();
// just leave pure e-mail address.
@@ -1597,8 +1597,8 @@ Module::readSecretKeys( bool reread )
KeyID
Module::selectKey( const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1607,9 +1607,9 @@ Module::selectKey( const KeyList& keys,
KeySelectionDialog dlg( keys, title, text, KeyIDList( keyId ), false,
allowedKeys, false );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.key();
@@ -1620,8 +1620,8 @@ Module::selectKey( const KeyList& keys,
KeyIDList
Module::selectKeys( const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1630,9 +1630,9 @@ Module::selectKeys( const KeyList& keys,
KeySelectionDialog dlg( keys, title, text, keyIds, false, allowedKeys,
true );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.keys();
@@ -1645,8 +1645,8 @@ Module::selectKeys( const KeyList& keys,
KeyID
Module::selectKey( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyID& keyId /* = KeyID() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1655,9 +1655,9 @@ Module::selectKey( bool& rememberChoice,
KeySelectionDialog dlg( keys, title, text, KeyIDList( keyId ), false,
allowedKeys, false );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.key();
@@ -1673,8 +1673,8 @@ Module::selectKey( bool& rememberChoice,
KeyIDList
Module::selectKeys( bool& rememberChoice,
const KeyList& keys,
- const QString& title,
- const QString& text /* = QString::null */ ,
+ const TQString& title,
+ const TQString& text /* = TQString::null */ ,
const KeyIDList& keyIds /* = KeyIDList() */ ,
const unsigned int allowedKeys /* = AllKeys */ )
{
@@ -1683,9 +1683,9 @@ Module::selectKeys( bool& rememberChoice,
KeySelectionDialog dlg( keys, title, text, keyIds, true, allowedKeys,
true );
- QApplication::setOverrideCursor( QCursor(QCursor::ArrowCursor) );
- bool rej = ( dlg.exec() == QDialog::Rejected );
- QApplication::restoreOverrideCursor();
+ TQApplication::setOverrideCursor( TQCursor(TQCursor::ArrowCursor) );
+ bool rej = ( dlg.exec() == TQDialog::Rejected );
+ TQApplication::restoreOverrideCursor();
if( !rej ) {
retval = dlg.keys();
@@ -1699,12 +1699,12 @@ Module::selectKeys( bool& rememberChoice,
}
KeyIDList
-Module::keysForAddress( const QString& address )
+Module::keysForAddress( const TQString& address )
{
if( address.isEmpty() ) {
return KeyIDList();
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
return addressDataDict[addr].keyIds;
}
@@ -1714,12 +1714,12 @@ Module::keysForAddress( const QString& address )
}
void
-Module::setKeysForAddress( const QString& address, const KeyIDList& keyIds )
+Module::setKeysForAddress( const TQString& address, const KeyIDList& keyIds )
{
if( address.isEmpty() ) {
return;
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
addressDataDict[addr].keyIds = keyIds;
}
@@ -1736,7 +1736,7 @@ Module::setKeysForAddress( const QString& address, const KeyIDList& keyIds )
void
Module::readAddressData()
{
- QString address;
+ TQString address;
AddressData data;
KConfigGroup general( config, "General" );
@@ -1744,7 +1744,7 @@ Module::readAddressData()
addressDataDict.clear();
for( int i=1; i<=num; i++ ) {
- KConfigGroup addrGroup( config, QString("Address #%1").arg(i).local8Bit() );
+ KConfigGroup addrGroup( config, TQString("Address #%1").arg(i).local8Bit() );
address = addrGroup.readEntry( "Address" );
data.keyIds = KeyIDList::fromStringList( addrGroup.readListEntry( "Key IDs" ) );
data.encrPref = (EncryptPref) addrGroup.readNumEntry( "EncryptionPreference",
@@ -1769,7 +1769,7 @@ Module::writeAddressData()
for ( i=1, it = addressDataDict.begin();
it != addressDataDict.end();
++it, i++ ) {
- KConfigGroup addrGroup( config, QString("Address #%1").arg(i).local8Bit() );
+ KConfigGroup addrGroup( config, TQString("Address #%1").arg(i).local8Bit() );
addrGroup.writeEntry( "Address", it.key() );
addrGroup.writeEntry( "Key IDs", it.data().keyIds.toStringList() );
addrGroup.writeEntry( "EncryptionPreference", it.data().encrPref );
@@ -1779,9 +1779,9 @@ Module::writeAddressData()
}
EncryptPref
-Module::encryptionPreference( const QString& address )
+Module::encryptionPreference( const TQString& address )
{
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
return addressDataDict[addr].encrPref;
}
@@ -1791,13 +1791,13 @@ Module::encryptionPreference( const QString& address )
}
void
-Module::setEncryptionPreference( const QString& address,
+Module::setEncryptionPreference( const TQString& address,
const EncryptPref pref )
{
if( address.isEmpty() ) {
return;
}
- QString addr = canonicalAddress( address ).lower();
+ TQString addr = canonicalAddress( address ).lower();
if( addressDataDict.contains( addr ) ) {
addressDataDict[addr].encrPref = pref;
}