summaryrefslogtreecommitdiffstats
path: root/kmail/objecttreeparser.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 /kmail/objecttreeparser.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 'kmail/objecttreeparser.cpp')
-rw-r--r--kmail/objecttreeparser.cpp374
1 files changed, 187 insertions, 187 deletions
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp
index 6f4bd4650..4c56a7bd4 100644
--- a/kmail/objecttreeparser.cpp
+++ b/kmail/objecttreeparser.cpp
@@ -96,15 +96,15 @@
#include <kmdcodec.h>
// other Qt headers
-#include <qtextcodec.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqtextcodec.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqapplication.h>
#include <kstyle.h>
-#include <qbuffer.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
// other headers
#include <memory>
@@ -214,7 +214,7 @@ namespace KMail {
if ( startNode.mimePartTreeItem() ) {
kdDebug(5006) << "\n -----> Inserting items into MimePartTree\n" << endl;
newNode->fillMimePartTree( startNode.mimePartTreeItem(), 0,
- QString::null, QString::null, QString::null, 0,
+ TQString::null, TQString::null, TQString::null, 0,
append );
kdDebug(5006) << "\n <----- Finished inserting items into MimePartTree\n" << endl;
} else {
@@ -261,7 +261,7 @@ namespace KMail {
ProcessResult processResult;
if ( mReader )
- htmlWriter()->queue( QString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) );
+ htmlWriter()->queue( TQString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) );
if ( const Interface::BodyPartFormatter * formatter
= BodyPartFormatterFactory::instance()->createFor( node->typeString(), node->subTypeString() ) ) {
PartNodeBodyPart part( *node, codecFor( node ) );
@@ -377,9 +377,9 @@ namespace KMail {
bool ObjectTreeParser::writeOpaqueOrMultipartSignedData( partNode* data,
partNode& sign,
- const QString& fromAddress,
+ const TQString& fromAddress,
bool doCheck,
- QCString* cleartextData,
+ TQCString* cleartextData,
std::vector<GpgME::Signature> paramSignatures,
bool hideErrors )
{
@@ -389,8 +389,8 @@ namespace KMail {
const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol();
- QString cryptPlugLibName;
- QString cryptPlugDisplayName;
+ TQString cryptPlugLibName;
+ TQString cryptPlugDisplayName;
if ( cryptProto ) {
cryptPlugLibName = cryptProto->name();
cryptPlugDisplayName = cryptProto->displayName();
@@ -411,8 +411,8 @@ namespace KMail {
<< cryptPlugLibName << endl;
}
- QCString cleartext;
- QByteArray signaturetext;
+ TQCString cleartext;
+ TQByteArray signaturetext;
if ( doCheck && cryptProto ) {
if ( data ) {
@@ -454,7 +454,7 @@ namespace KMail {
GpgME::VerificationResult result;
if ( data ) { // detached
if ( Kleo::VerifyDetachedJob * const job = cryptProto->verifyDetachedJob() ) {
- QByteArray plainData = cleartext;
+ TQByteArray plainData = cleartext;
plainData.resize( cleartext.size() - 1 );
result = job->exec( signaturetext, plainData );
messagePart.auditLog = job->auditLogAsHtml();
@@ -463,9 +463,9 @@ namespace KMail {
}
} else { // opaque
if ( Kleo::VerifyOpaqueJob * const job = cryptProto->verifyOpaqueJob() ) {
- QByteArray plainData;
+ TQByteArray plainData;
result = job->exec( signaturetext, plainData );
- cleartext = QCString( plainData.data(), plainData.size() + 1 );
+ cleartext = TQCString( plainData.data(), plainData.size() + 1 );
messagePart.auditLog = job->auditLogAsHtml();
} else {
cryptPlugError = CANT_VERIFY_SIGNATURES;
@@ -483,7 +483,7 @@ namespace KMail {
GpgME::Signature signature = signatures[0];
messagePart.status_code = signatureToStatus( signature );
- messagePart.status = QString::fromUtf8( signature.status().asString() );
+ messagePart.status = TQString::fromUtf8( signature.status().asString() );
for ( uint i = 1; i < signatures.size(); ++i ) {
if ( signatureToStatus( signatures[i] ) != messagePart.status_code ) {
messagePart.status_code = GPGME_SIG_STAT_DIFF;
@@ -496,7 +496,7 @@ namespace KMail {
// get key for this signature
Kleo::KeyListJob *job = cryptProto->keyListJob();
std::vector<GpgME::Key> keys;
- GpgME::KeyListResult keyListRes = job->exec( QString::fromLatin1( signature.fingerprint() ), false, keys );
+ GpgME::KeyListResult keyListRes = job->exec( TQString::fromLatin1( signature.fingerprint() ), false, keys );
GpgME::Key key;
if ( keys.size() == 1 )
key = keys[0];
@@ -518,7 +518,7 @@ namespace KMail {
// The following if /should/ always result in TRUE but we
// won't trust implicitely the plugin that gave us these data.
if ( key.userID( iMail ).email() ) {
- QString email = QString::fromUtf8( key.userID( iMail ).email() );
+ TQString email = TQString::fromUtf8( key.userID( iMail ).email() );
// ### work around gpgme 0.3.x / cryptplug bug where the
// ### email addresses are specified as angle-addr, not addr-spec:
if ( email.startsWith( "<" ) && email.endsWith( ">" ) )
@@ -531,7 +531,7 @@ namespace KMail {
if ( signature.creationTime() )
messagePart.creationTime.setTime_t( signature.creationTime() );
else
- messagePart.creationTime = QDateTime();
+ messagePart.creationTime = TQDateTime();
if ( messagePart.signer.isEmpty() ) {
if ( key.numUserIDs() > 0 && key.userID( 0 ).name() )
messagePart.signer = Kleo::DN( key.userID( 0 ).name() ).prettyDN();
@@ -548,7 +548,7 @@ namespace KMail {
<< "\n signer: " << messagePart.signer << endl;
} else {
- messagePart.creationTime = QDateTime();
+ messagePart.creationTime = TQDateTime();
}
if ( !doCheck || !data ){
@@ -568,7 +568,7 @@ namespace KMail {
}
else if ( !hideErrors ) {
- QString txt;
+ TQString txt;
txt = "<hr><b><h2>";
txt.append( i18n( "The crypto engine returned no cleartext data." ) );
txt.append( "</h2></b>" );
@@ -588,7 +588,7 @@ namespace KMail {
else {
if ( mReader ) {
if ( !cryptProto ) {
- QString errorMsg;
+ TQString errorMsg;
switch ( cryptPlugError ) {
case NOT_INITIALIZED:
errorMsg = i18n( "Crypto plug-in \"%1\" is not initialized." )
@@ -638,30 +638,30 @@ namespace KMail {
bool ObjectTreeParser::okDecryptMIME( partNode& data,
- QCString& decryptedData,
+ TQCString& decryptedData,
bool& signatureFound,
std::vector<GpgME::Signature> &signatures,
bool showWarning,
bool& passphraseError,
bool& actuallyEncrypted,
- QString& aErrorText,
- QString& auditLog )
+ TQString& aErrorText,
+ TQString& auditLog )
{
passphraseError = false;
- aErrorText = QString::null;
- auditLog = QString::null;
+ aErrorText = TQString::null;
+ auditLog = TQString::null;
bool bDecryptionOk = false;
enum { NO_PLUGIN, NOT_INITIALIZED, CANT_DECRYPT }
cryptPlugError = NO_PLUGIN;
const Kleo::CryptoBackend::Protocol* cryptProto = cryptoProtocol();
- QString cryptPlugLibName;
+ TQString cryptPlugLibName;
if ( cryptProto )
cryptPlugLibName = cryptProto->name();
if ( mReader && !mReader->decryptMessage() ) {
- QString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
+ TQString iconName = KGlobal::instance()->iconLoader()->iconPath( "decrypted", KIcon::Small );
decryptedData = "<div style=\"font-size:large; text-align:center;"
"padding-top:20pt;\">"
+ i18n("This message is encrypted.").utf8()
@@ -675,16 +675,16 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
if ( cryptProto && !kmkernel->contextMenuShown() ) {
- QByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
+ TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
#ifdef MARCS_DEBUG
- QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
+ TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
dumpToFile( "dat_04_reader.encrypted", ciphertext.data(), ciphertext.size() );
- QCString deb;
+ TQCString deb;
deb = "\n\nE N C R Y P T E D D A T A = ";
if ( cipherIsBinary )
deb += "[binary data]";
@@ -708,7 +708,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
cryptPlugError = CANT_DECRYPT;
cryptProto = 0;
} else {
- QByteArray plainText;
+ TQByteArray plainText;
const std::pair<GpgME::DecryptionResult,GpgME::VerificationResult> res = job->exec( ciphertext, plainText );
const GpgME::DecryptionResult & decryptResult = res.first;
const GpgME::VerificationResult & verifyResult = res.second;
@@ -718,13 +718,13 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
passphraseError = decryptResult.error().isCanceled()
|| decryptResult.error().code() == GPG_ERR_NO_SECKEY;
actuallyEncrypted = decryptResult.error().code() != GPG_ERR_NO_DATA;
- aErrorText = QString::fromLocal8Bit( decryptResult.error().asString() );
+ aErrorText = TQString::fromLocal8Bit( decryptResult.error().asString() );
auditLog = job->auditLogAsHtml();
kdDebug(5006) << "ObjectTreeParser::decryptMIME: returned from CRYPTPLUG"
<< endl;
if ( bDecryptionOk )
- decryptedData = QCString( plainText.data(), plainText.size() + 1 );
+ decryptedData = TQCString( plainText.data(), plainText.size() + 1 );
else if ( mReader && showWarning ) {
decryptedData = "<div style=\"font-size:x-large; text-align:center;"
"padding:20pt;\">"
@@ -759,8 +759,8 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
} else if ( kmkernel->contextMenuShown() ) {
// ### Workaround for bug 56693 (kmail freeze with the complete desktop
// ### while pinentry-qt appears)
- QByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
- QCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
+ TQByteArray ciphertext( data.msgPart().bodyDecodedBinary() );
+ TQCString cipherStr( ciphertext.data(), ciphertext.size() + 1 );
bool cipherIsBinary = (-1 == cipherStr.find("BEGIN ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP ENCRYPTED MESSAGE", 0, false) ) &&
(-1 == cipherStr.find("BEGIN PGP MESSAGE", 0, false) );
@@ -781,9 +781,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
//static
- bool ObjectTreeParser::containsExternalReferences( const QCString & str )
+ bool ObjectTreeParser::containsExternalReferences( const TQCString & str )
{
- QRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
+ TQRegExp httpRegExp("(\\\"|\\\'|url\\s*\\(\\s*)http[s]?:");
int httpPos = str.find( httpRegExp, 0 );
while ( httpPos >= 0 ) {
@@ -803,7 +803,7 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data,
}
bool ObjectTreeParser::processTextHtmlSubtype( partNode * curNode, ProcessResult & ) {
- QCString cstr( curNode->msgPart().bodyDecoded() );
+ TQCString cstr( curNode->msgPart().bodyDecoded() );
mRawReplyString = cstr;
if ( curNode->isFirstTextPart() ) {
@@ -874,7 +874,7 @@ static bool isMailmanMessage( partNode * curNode ) {
if ( headers.HasField("X-Mailman-Version") )
return true;
if ( headers.HasField("X-Mailer") &&
- 0 == QCString( headers.FieldBody("X-Mailer").AsString().c_str() )
+ 0 == TQCString( headers.FieldBody("X-Mailer").AsString().c_str() )
.find("MAILMAN", 0, false) )
return true;
return false;
@@ -883,14 +883,14 @@ static bool isMailmanMessage( partNode * curNode ) {
namespace KMail {
bool ObjectTreeParser::processMailmanMessage( partNode * curNode ) {
- const QCString cstr = curNode->msgPart().bodyDecoded();
+ const TQCString cstr = curNode->msgPart().bodyDecoded();
//###
- const QCString delim1( "--__--__--\n\nMessage:");
- const QCString delim2( "--__--__--\r\n\r\nMessage:");
- const QCString delimZ2("--__--__--\n\n_____________");
- const QCString delimZ1("--__--__--\r\n\r\n_____________");
- QCString partStr, digestHeaderStr;
+ const TQCString delim1( "--__--__--\n\nMessage:");
+ const TQCString delim2( "--__--__--\r\n\r\nMessage:");
+ const TQCString delimZ2("--__--__--\n\n_____________");
+ const TQCString delimZ1("--__--__--\r\n\r\n_____________");
+ TQCString partStr, digestHeaderStr;
int thisDelim = cstr.find(delim1, 0, false);
if ( thisDelim == -1 )
thisDelim = cstr.find(delim2, 0, false);
@@ -943,8 +943,8 @@ namespace KMail {
partStr = "Content-Type=message/rfc822\nContent-Description=embedded message\n";
partStr += cstr.mid( thisDelim, nextDelim-thisDelim );
- QCString subject("embedded message");
- QCString subSearch("\nSubject:");
+ TQCString subject("embedded message");
+ TQCString subSearch("\nSubject:");
int subPos = partStr.find(subSearch, 0, false);
if ( -1 < subPos ){
subject = partStr.mid(subPos+subSearch.length());
@@ -1007,7 +1007,7 @@ namespace KMail {
mTextualContentCharset = curNode->msgPart().charset();
}
- QString label = curNode->msgPart().fileName().stripWhiteSpace();
+ TQString label = curNode->msgPart().fileName().stripWhiteSpace();
if ( label.isEmpty() )
label = curNode->msgPart().name().stripWhiteSpace();
@@ -1017,19 +1017,19 @@ namespace KMail {
if ( bDrawFrame ) {
label = KMMessage::quoteHtmlChars( label, true );
- const QString comment =
+ const TQString comment =
KMMessage::quoteHtmlChars( curNode->msgPart().contentDescription(), true );
- const QString fileName =
+ const TQString fileName =
mReader->writeMessagePartToTempFile( &curNode->msgPart(),
curNode->nodeId() );
- const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
- QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
+ TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
"<tr class=\"textAtmH\"><td dir=\"" + dir + "\">";
if ( !fileName.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( fileName ) + "\">"
+ label + "</a>";
else
@@ -1138,7 +1138,7 @@ namespace KMail {
// mimetype of "signature" (not required by the RFC, but practised
// by all implementaions of security multiparts
- const QString contentType = node->contentTypeParameter( "protocol" ).lower();
+ const TQString contentType = node->contentTypeParameter( "protocol" ).lower();
const Kleo::CryptoBackend::Protocol *protocol = 0;
if ( contentType == "application/pkcs7-signature" || contentType == "application/x-pkcs7-signature" )
protocol = Kleo::CryptoBackendFactory::instance()->smime();
@@ -1166,7 +1166,7 @@ namespace KMail {
if ( keepEncryptions() ) {
node->setEncryptionState( KMMsgFullyEncrypted );
- const QCString cstr = node->msgPart().bodyDecoded();
+ const TQCString cstr = node->msgPart().bodyDecoded();
if ( mReader )
writeBodyString( cstr, node->trueFromAddress(),
codecFor( node ), result, false );
@@ -1212,7 +1212,7 @@ namespace KMail {
kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl;
PartMetaData messagePart;
node->setEncryptionState( KMMsgFullyEncrypted );
- QCString decryptedData;
+ TQCString decryptedData;
bool signatureFound;
std::vector<GpgME::Signature> signatures;
bool passphraseError;
@@ -1269,7 +1269,7 @@ namespace KMail {
if ( mReader ) {
// print the error message that was returned in decryptedData
// (utf8-encoded)
- htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) );
}
}
@@ -1304,7 +1304,7 @@ namespace KMail {
messagePart.isEncrypted = false;
messagePart.isSigned = false;
messagePart.isEncapsulatedRfc822Message = true;
- QString filename =
+ TQString filename =
mReader->writeMessagePartToTempFile( &node->msgPart(),
node->nodeId() );
htmlWriter()->queue( writeSigstatHeader( messagePart,
@@ -1312,7 +1312,7 @@ namespace KMail {
node->trueFromAddress(),
filename ) );
}
- QCString rfc822messageStr( node->msgPart().bodyDecoded() );
+ TQCString rfc822messageStr( node->msgPart().bodyDecoded() );
// display the headers of the encapsulated message
DwMessage* rfc822DwMessage = new DwMessage(); // will be deleted by c'tor of rfc822headers
rfc822DwMessage->FromString( rfc822messageStr );
@@ -1353,7 +1353,7 @@ namespace KMail {
kdDebug(5006) << "\n-----> Initially processing encrypted data\n" << endl;
node->setEncryptionState( KMMsgFullyEncrypted );
if ( keepEncryptions() ) {
- const QCString cstr = node->msgPart().bodyDecoded();
+ const TQCString cstr = node->msgPart().bodyDecoded();
if ( mReader )
writeBodyString( cstr, node->trueFromAddress(),
codecFor( node ), result, false );
@@ -1364,7 +1364,7 @@ namespace KMail {
*/
PartMetaData messagePart;
setCryptoProtocol( Kleo::CryptoBackendFactory::instance()->openpgp() );
- QCString decryptedData;
+ TQCString decryptedData;
bool signatureFound;
std::vector<GpgME::Signature> signatures;
bool passphraseError;
@@ -1400,7 +1400,7 @@ namespace KMail {
if ( mReader ) {
// print the error message that was returned in decryptedData
// (utf8-encoded)
- htmlWriter()->queue( QString::fromUtf8( decryptedData.data() ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData.data() ) );
}
}
@@ -1432,7 +1432,7 @@ namespace KMail {
const Kleo::CryptoBackend::Protocol * smimeCrypto = Kleo::CryptoBackendFactory::instance()->smime();
- const QString smimeType = node->contentTypeParameter("smime-type").lower();
+ const TQString smimeType = node->contentTypeParameter("smime-type").lower();
if ( smimeType == "certs-only" ) {
result.setNeverDisplayInline( true );
@@ -1443,13 +1443,13 @@ namespace KMail {
if ( !reader.readBoolEntry( "AutoImportKeys", false ) )
return false;
- const QByteArray certData = node->msgPart().bodyDecodedBinary();
+ const TQByteArray certData = node->msgPart().bodyDecodedBinary();
Kleo::ImportJob *import = smimeCrypto->importJob();
const GpgME::ImportResult res = import->exec( certData );
if ( res.error() ) {
htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>"
- "Reason: %1").arg( QString::fromLocal8Bit( res.error().asString() ) ) );
+ "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) );
return true;
}
@@ -1461,7 +1461,7 @@ namespace KMail {
htmlWriter()->queue( i18n( "Sorry, no certificates were found in this message." ) );
return true;
}
- QString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br>&nbsp;<br>";
+ TQString comment = "<b>" + i18n( "Certificate import status:" ) + "</b><br>&nbsp;<br>";
if ( nImp )
comment += i18n( "1 new certificate was imported.",
"%n new certificates were imported.", nImp ) + "<br>";
@@ -1490,7 +1490,7 @@ namespace KMail {
if ( (*it).error() )
htmlWriter()->queue( i18n( "Failed: %1 (%2)" )
.arg( (*it).fingerprint(),
- QString::fromLocal8Bit( (*it).error().asString() ) ) );
+ TQString::fromLocal8Bit( (*it).error().asString() ) ) );
else if ( (*it).status() & ~GpgME::Import::ContainedSecretKey )
if ( (*it).status() & GpgME::Import::ContainedSecretKey )
htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).arg( (*it).fingerprint() ) );
@@ -1524,7 +1524,7 @@ namespace KMail {
kdDebug(5006) << "pkcs7 mime == S/MIME TYPE: enveloped (encrypted) data" << endl;
else
kdDebug(5006) << "pkcs7 mime - type unknown - enveloped (encrypted) data ?" << endl;
- QCString decryptedData;
+ TQCString decryptedData;
PartMetaData messagePart;
messagePart.isEncrypted = true;
messagePart.isSigned = false;
@@ -1578,7 +1578,7 @@ namespace KMail {
if ( mReader->decryptMessage() )
writePartIcon( &node->msgPart(), node->nodeId() );
else
- htmlWriter()->queue( QString::fromUtf8( decryptedData ) );
+ htmlWriter()->queue( TQString::fromUtf8( decryptedData ) );
htmlWriter()->queue( writeSigstatFooter( messagePart ) );
}
} else {
@@ -1619,7 +1619,7 @@ namespace KMail {
return isSigned || isEncrypted;
}
-bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& bodyDecoded, QString& errorText )
+bool ObjectTreeParser::decryptChiasmus( const TQByteArray& data, TQByteArray& bodyDecoded, TQString& errorText )
{
const Kleo::CryptoBackend::Protocol * chiasmus =
Kleo::CryptoBackendFactory::instance()->protocol( "Chiasmus" );
@@ -1627,7 +1627,7 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
if ( !chiasmus )
return false;
- const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", QMap<QString,QVariant>() ) );
+ const STD_NAMESPACE_PREFIX auto_ptr<Kleo::SpecialJob> listjob( chiasmus->specialJob( "x-obtain-keys", TQMap<TQString,TQVariant>() ) );
if ( !listjob.get() ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-obtain-keys\" function. Please report this bug." );
@@ -1639,15 +1639,15 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
return false;
}
- const QVariant result = listjob->property( "result" );
- if ( result.type() != QVariant::StringList ) {
+ const TQVariant result = listjob->property( "result" );
+ if ( result.type() != TQVariant::StringList ) {
errorText = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-obtain-keys\" function did not return a "
"string list. Please report this bug." );
return false;
}
- const QStringList keys = result.toStringList();
+ const TQStringList keys = result.toStringList();
if ( keys.empty() ) {
errorText = i18n( "No keys have been found. Please check that a "
"valid key path has been set in the Chiasmus "
@@ -1659,14 +1659,14 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
ChiasmusKeySelector selectorDlg( mReader, i18n( "Chiasmus Decryption Key Selection" ),
keys, GlobalSettings::chiasmusDecryptionKey(),
GlobalSettings::chiasmusDecryptionOptions() );
- if ( selectorDlg.exec() != QDialog::Accepted )
+ if ( selectorDlg.exec() != TQDialog::Accepted )
return false;
GlobalSettings::setChiasmusDecryptionOptions( selectorDlg.options() );
GlobalSettings::setChiasmusDecryptionKey( selectorDlg.key() );
assert( !GlobalSettings::chiasmusDecryptionKey().isEmpty() );
- Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", QMap<QString,QVariant>() );
+ Kleo::SpecialJob * job = chiasmus->specialJob( "x-decrypt", TQMap<TQString,TQVariant>() );
if ( !job ) {
errorText = i18n( "Chiasmus backend does not offer the "
"\"x-decrypt\" function. Please report this bug." );
@@ -1686,8 +1686,8 @@ bool ObjectTreeParser::decryptChiasmus( const QByteArray& data, QByteArray& body
return false;
}
- const QVariant resultData = job->property( "result" );
- if ( resultData.type() != QVariant::ByteArray ) {
+ const TQVariant resultData = job->property( "result" );
+ if ( resultData.type() != TQVariant::ByteArray ) {
errorText = i18n( "Unexpected return value from Chiasmus backend: "
"The \"x-decrypt\" function did not return a "
"byte array. Please report this bug." );
@@ -1706,9 +1706,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode
return true;
}
- QByteArray decryptedBody;
- QString errorText;
- const QByteArray data = curNode->msgPart().bodyDecodedBinary();
+ TQByteArray decryptedBody;
+ TQString errorText;
+ const TQByteArray data = curNode->msgPart().bodyDecodedBinary();
bool bOkDecrypt = decryptChiasmus( data, decryptedBody, errorText );
PartMetaData messagePart;
messagePart.isDecryptable = bOkDecrypt;
@@ -1719,9 +1719,9 @@ bool ObjectTreeParser::processApplicationChiasmusTextSubtype( partNode * curNode
htmlWriter()->queue( writeSigstatHeader( messagePart,
0, //cryptPlugWrapper(),
curNode->trueFromAddress() ) );
- const QByteArray body = bOkDecrypt ? decryptedBody : data;
- const QString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset");
- const QTextCodec* aCodec = chiasmusCharset.isEmpty()
+ const TQByteArray body = bOkDecrypt ? decryptedBody : data;
+ const TQString chiasmusCharset = curNode->contentTypeParameter("chiasmus-charset");
+ const TQTextCodec* aCodec = chiasmusCharset.isEmpty()
? codecFor( curNode )
: KMMsgBase::codecForName( chiasmusCharset.ascii() );
htmlWriter()->queue( quotedHTML( aCodec->toUnicode( body ), false /*decorate*/ ) );
@@ -1737,31 +1737,31 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
if ( !mReader )
return false;
- const QString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
+ const TQString fileName = mReader->writeMessagePartToTempFile( &node->msgPart(), node->nodeId() );
KTNEFParser parser;
if ( !parser.openFile( fileName ) || !parser.message()) {
kdDebug() << k_funcinfo << "Could not parse " << fileName << endl;
return false;
}
- QPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList();
+ TQPtrList<KTNEFAttach> tnefatts = parser.message()->attachmentList();
if ( tnefatts.isEmpty() ) {
kdDebug() << k_funcinfo << "No attachments found in " << fileName << endl;
return false;
}
if ( !showOnlyOneMimePart() ) {
- QString label = node->msgPart().fileName().stripWhiteSpace();
+ TQString label = node->msgPart().fileName().stripWhiteSpace();
if ( label.isEmpty() )
label = node->msgPart().name().stripWhiteSpace();
label = KMMessage::quoteHtmlChars( label, true );
- const QString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true );
- const QString dir = QApplication::reverseLayout() ? "rtl" : "ltr" ;
+ const TQString comment = KMMessage::quoteHtmlChars( node->msgPart().contentDescription(), true );
+ const TQString dir = TQApplication::reverseLayout() ? "rtl" : "ltr" ;
- QString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
+ TQString htmlStr = "<table cellspacing=\"1\" class=\"textAtm\">"
"<tr class=\"textAtmH\"><td dir=\"" + dir + "\">";
if ( !fileName.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( fileName ) + "\">"
+ label + "</a>";
else
@@ -1774,18 +1774,18 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
for ( uint i = 0; i < tnefatts.count(); ++i ) {
KTNEFAttach *att = tnefatts.at( i );
- QString label = att->displayName();
+ TQString label = att->displayName();
if( label.isEmpty() )
label = att->name();
label = KMMessage::quoteHtmlChars( label, true );
- QString dir = mReader->createTempDir( "ktnef-" + QString::number( i ) );
+ TQString dir = mReader->createTempDir( "ktnef-" + TQString::number( i ) );
parser.extractFileTo( att->name(), dir );
- mReader->mTempFiles.append( dir + QDir::separator() + att->name() );
- QString href = "file:" + KURL::encode_string( dir + QDir::separator() + att->name() );
+ mReader->mTempFiles.append( dir + TQDir::separator() + att->name() );
+ TQString href = "file:" + KURL::encode_string( dir + TQDir::separator() + att->name() );
KMimeType::Ptr mimeType = KMimeType::mimeType( att->mimeTag() );
- QString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( QString(), false ), KIcon::Desktop );
+ TQString iconName = KGlobal::instance()->iconLoader()->iconPath( mimeType->icon( TQString(), false ), KIcon::Desktop );
htmlWriter()->queue( "<div><a href=\"" + href + "\"><img src=\"" +
iconName + "\" border=\"0\" style=\"max-width: 100%\">" + label +
@@ -1798,9 +1798,9 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
return true;
}
- void ObjectTreeParser::writeBodyString( const QCString & bodyString,
- const QString & fromAddress,
- const QTextCodec * codec,
+ void ObjectTreeParser::writeBodyString( const TQCString & bodyString,
+ const TQString & fromAddress,
+ const TQTextCodec * codec,
ProcessResult & result,
bool decorate ) {
assert( mReader ); assert( codec );
@@ -1818,24 +1818,24 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
kdDebug(5006) << "writePartIcon: PartNum: " << partNum << endl;
- QString label = msgPart->fileName();
+ TQString label = msgPart->fileName();
if( label.isEmpty() )
label = msgPart->name();
if( label.isEmpty() )
label = "unnamed";
label = KMMessage::quoteHtmlChars( label, true );
- QString comment = msgPart->contentDescription();
+ TQString comment = msgPart->contentDescription();
comment = KMMessage::quoteHtmlChars( comment, true );
- if ( label == comment ) comment = QString::null;
+ if ( label == comment ) comment = TQString::null;
- QString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
+ TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum );
- QString href = fileName.isEmpty() ?
- "part://" + QString::number( partNum + 1 ) :
+ TQString href = fileName.isEmpty() ?
+ "part://" + TQString::number( partNum + 1 ) :
"file:" + KURL::encode_string( fileName ) ;
- QString iconName;
+ TQString iconName;
if( inlineImage )
iconName = href;
else {
@@ -1846,7 +1846,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
}
}
- QCString contentId = msgPart->contentId();
+ TQCString contentId = msgPart->contentId();
if ( !contentId.isEmpty() ) {
htmlWriter()->embedPart( contentId, href );
}
@@ -1871,7 +1871,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR
#define SIG_FRAME_COL_RED -1
#define SIG_FRAME_COL_YELLOW 0
#define SIG_FRAME_COL_GREEN 1
-QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto,
+TQString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol* cryptProto,
int status_code,
GpgME::Signature::Summary summary,
int& frameColor,
@@ -1881,7 +1881,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
// used for CMS only but not for PGP signatures
// pending(khz): Implement usage of these for PGP sigs as well.
showKeyInfos = true;
- QString result;
+ TQString result;
if( cryptProto ) {
if( cryptProto == Kleo::CryptoBackendFactory::instance()->openpgp() ) {
// process enum according to it's definition to be read in
@@ -1951,7 +1951,7 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
// we assume green, test for yellow or red (in this order!)
frameColor = SIG_FRAME_COL_GREEN;
- QString result2;
+ TQString result2;
if( summary & GpgME::Signature::KeyExpired ){
// still is green!
result2 += i18n("One key has expired.");
@@ -2040,9 +2040,9 @@ QString ObjectTreeParser::sigStatusToString( const Kleo::CryptoBackend::Protocol
}
-static QString writeSimpleSigstatHeader( const PartMetaData &block )
+static TQString writeSimpleSigstatHeader( const PartMetaData &block )
{
- QString html;
+ TQString html;
html += "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td>";
if ( block.signClass == "signErr" ) {
@@ -2050,10 +2050,10 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block )
} else if ( block.signClass == "signOkKeyBad" || block.signClass == "signWarn" ) {
html += i18n( "Not enough information to check signature validity." );
} else if ( block.signClass == "signOkKeyOk" ) {
- QString addr;
+ TQString addr;
if ( !block.signerMailAddresses.isEmpty() )
addr = block.signerMailAddresses.first();
- QString name = addr;
+ TQString name = addr;
if ( name.isEmpty() )
name = block.signer;
if ( addr.isEmpty() ) {
@@ -2072,12 +2072,12 @@ static QString writeSimpleSigstatHeader( const PartMetaData &block )
return html;
}
-static QString beginVerboseSigstatHeader()
+static TQString beginVerboseSigstatHeader()
{
return "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\"><tr><td rowspan=\"2\">";
}
-static QString makeShowAuditLogLink( const QString & auditLog ) {
+static TQString makeShowAuditLogLink( const TQString & auditLog ) {
if ( auditLog.isEmpty() )
return i18n("No Audit Log available");
@@ -2089,9 +2089,9 @@ static QString makeShowAuditLogLink( const QString & auditLog ) {
return "<a href=\"" + url.htmlURL() + "\">" + i18n("The Audit Log is a detailed error log from the gnupg backend", "Show Audit Log") + "</a>";
}
-static QString endVerboseSigstatHeader( const PartMetaData & pmd )
+static TQString endVerboseSigstatHeader( const PartMetaData & pmd )
{
- QString html;
+ TQString html;
html += "</td><td align=\"right\" valign=\"top\" nowrap=\"nowrap\">";
html += "<a href=\"kmail:hideSignatureDetails\">";
html += i18n( "Hide Details" );
@@ -2102,24 +2102,24 @@ static QString endVerboseSigstatHeader( const PartMetaData & pmd )
return html;
}
-QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
+TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
const Kleo::CryptoBackend::Protocol * cryptProto,
- const QString & fromAddress,
- const QString & filename )
+ const TQString & fromAddress,
+ const TQString & filename )
{
const bool isSMIME = cryptProto && ( cryptProto == Kleo::CryptoBackendFactory::instance()->smime() );
- QString signer = block.signer;
+ TQString signer = block.signer;
- QString htmlStr, simpleHtmlStr;
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- QString cellPadding("cellpadding=\"1\"");
+ TQString htmlStr, simpleHtmlStr;
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString cellPadding("cellpadding=\"1\"");
if( block.isEncapsulatedRfc822Message )
{
htmlStr += "<table cellspacing=\"1\" "+cellPadding+" class=\"rfc822\">"
"<tr class=\"rfc822H\"><td dir=\"" + dir + "\">";
if( !filename.isEmpty() )
- htmlStr += "<a href=\"" + QString("file:")
+ htmlStr += "<a href=\"" + TQString("file:")
+ KURL::encode_string( filename ) + "\">"
+ i18n("Encapsulated message") + "</a>";
else
@@ -2143,7 +2143,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
simpleHtmlStr = htmlStr;
if( block.isSigned ) {
- QStringList& blockAddrs( block.signerMailAddresses );
+ TQStringList& blockAddrs( block.signerMailAddresses );
// note: At the moment frameColor and showKeyInfos are
// used for CMS only but not for PGP signatures
// pending(khz): Implement usage of these for PGP sigs as well.
@@ -2151,7 +2151,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
bool showKeyInfos;
bool onlyShowKeyURL = false;
bool cannotCheckSignature = true;
- QString statusStr = sigStatusToString( cryptProto,
+ TQString statusStr = sigStatusToString( cryptProto,
block.status_code,
block.sigSummary,
frameColor,
@@ -2180,26 +2180,26 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
// note: Once we can start PGP key manager programs
// from within KMail we could change this and
// always show the URL. (khz, 2002/06/27)
- QString startKeyHREF;
+ TQString startKeyHREF;
if( isSMIME )
startKeyHREF =
- QString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">")
+ TQString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">")
.arg( cryptProto->displayName(),
cryptProto->name(),
block.keyId );
- QString keyWithWithoutURL
+ TQString keyWithWithoutURL
= isSMIME
- ? QString("%1%2</a>")
+ ? TQString("%1%2</a>")
.arg( startKeyHREF,
cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) )
- : "0x" + QString::fromUtf8( block.keyId );
+ : "0x" + TQString::fromUtf8( block.keyId );
// temporary hack: always show key infos!
showKeyInfos = true;
// Sorry for using 'black' as null color but .isValid()
- // checking with QColor default c'tor did not work for
+ // checking with TQColor default c'tor did not work for
// some reason.
if( isSMIME && (SIG_FRAME_COL_UNDEF != frameColor) ) {
@@ -2226,9 +2226,9 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
block.signClass = "signOkKeyOk";//"signCMSGreen";
// extra hint for green case
// that email addresses in DN do not match fromAddress
- QString greenCaseWarning;
- QString msgFrom( KPIM::getEmailAddress(fromAddress) );
- QString certificate;
+ TQString greenCaseWarning;
+ TQString msgFrom( KPIM::getEmailAddress(fromAddress) );
+ TQString certificate;
if( block.keyId.isEmpty() )
certificate = i18n("certificate");
else
@@ -2253,7 +2253,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
// extract the mail addresses (without '<''>')
// before including it into our string:
bool bStart = true;
- for(QStringList::ConstIterator it = blockAddrs.begin();
+ for(TQStringList::ConstIterator it = blockAddrs.begin();
it != blockAddrs.end(); ++it ){
if( !bStart )
greenCaseWarning.append(", <br />&nbsp; &nbsp;");
@@ -2278,7 +2278,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
break;
}
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2299,7 +2299,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
signer = "";
else {
if( !blockAddrs.empty() ){
- QString address = KMMessage::encodeMailtoUrl( blockAddrs.first() );
+ TQString address = KMMessage::encodeMailtoUrl( blockAddrs.first() );
signer = "<a href=\"mailto:" + address + "\">" + signer + "</a>";
}
}
@@ -2311,7 +2311,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
htmlStr += i18n( "Message was signed by %1." )
.arg( signer );
} else {
- QDateTime created = block.creationTime;
+ TQDateTime created = block.creationTime;
if( created.isValid() ) {
if( signer.isEmpty() ) {
if( onlyShowKeyURL )
@@ -2363,7 +2363,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
if( block.signer.isEmpty() || block.technicalProblem ) {
block.signClass = "signWarn";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2374,7 +2374,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
}
else {
if( !block.keyId.isEmpty() ) {
- QDateTime created = block.creationTime;
+ TQDateTime created = block.creationTime;
if ( created.isValid() )
htmlStr += i18n( "Message was signed on %1 with unknown key %2." )
.arg( KGlobal::locale()->formatDateTime( created ),
@@ -2411,7 +2411,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
block.signClass = "signOkKeyBad";
else
block.signClass = "signOkKeyOk";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2455,7 +2455,7 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
else
{
block.signClass = "signErr";
- QString frame = "<table cellspacing=\"1\" "+cellPadding+" "
+ TQString frame = "<table cellspacing=\"1\" "+cellPadding+" "
"class=\"" + block.signClass + "\">"
"<tr class=\"" + block.signClass + "H\"><td dir=\"" + dir + "\">";
htmlStr += frame + beginVerboseSigstatHeader();
@@ -2483,11 +2483,11 @@ QString ObjectTreeParser::writeSigstatHeader( PartMetaData & block,
return simpleHtmlStr;
}
-QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
+TQString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
{
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
- QString htmlStr;
+ TQString htmlStr;
if (block.isSigned) {
htmlStr += "</td></tr><tr class=\"" + block.signClass + "H\">";
@@ -2513,8 +2513,8 @@ QString ObjectTreeParser::writeSigstatFooter( PartMetaData& block )
}
//-----------------------------------------------------------------------------
-void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec,
- const QString& fromAddress )
+void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec,
+ const TQString& fromAddress )
{
KMMsgSignatureState dummy1;
KMMsgEncryptionState dummy2;
@@ -2522,8 +2522,8 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
//-----------------------------------------------------------------------------
-void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCodec,
- const QString& fromAddress,
+void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *aCodec,
+ const TQString& fromAddress,
KMMsgSignatureState& inlineSignatureState,
KMMsgEncryptionState& inlineEncryptionState,
bool decorate )
@@ -2533,33 +2533,33 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
assert(pgp != 0);
bool isPgpMessage = false; // true if the message contains at least one
// PGP MESSAGE or one PGP SIGNED MESSAGE block
- QString dir = ( QApplication::reverseLayout() ? "rtl" : "ltr" );
- QString headerStr = QString("<div dir=\"%1\">").arg(dir);
+ TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" );
+ TQString headerStr = TQString("<div dir=\"%1\">").arg(dir);
inlineSignatureState = KMMsgNotSigned;
inlineEncryptionState = KMMsgNotEncrypted;
- QPtrList<Kpgp::Block> pgpBlocks;
- QStrList nonPgpBlocks;
+ TQPtrList<Kpgp::Block> pgpBlocks;
+ TQStrList nonPgpBlocks;
if( Kpgp::Module::prepareMessageForDecryption( aStr, pgpBlocks, nonPgpBlocks ) )
{
bool isEncrypted = false, isSigned = false;
bool fullySignedOrEncrypted = true;
bool firstNonPgpBlock = true;
bool couldDecrypt = false;
- QString signer;
- QCString keyId;
- QString decryptionError;
+ TQString signer;
+ TQCString keyId;
+ TQString decryptionError;
Kpgp::Validity keyTrust = Kpgp::KPGP_VALIDITY_FULL;
- QPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
+ TQPtrListIterator<Kpgp::Block> pbit( pgpBlocks );
- QStrListIterator npbit( nonPgpBlocks );
+ TQStrListIterator npbit( nonPgpBlocks );
- QString htmlStr;
+ TQString htmlStr;
for( ; *pbit != 0; ++pbit, ++npbit )
{
// insert the next Non-OpenPGP block
- QCString str( *npbit );
+ TQCString str( *npbit );
if( !str.isEmpty() ) {
htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate );
kdDebug( 5006 ) << "Non-empty Non-OpenPGP block found: '" << str
@@ -2568,7 +2568,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
// block as fully signed/encrypted
if( firstNonPgpBlock ) {
// check whether str only consists of \n
- for( QCString::ConstIterator c = str.begin(); *c; ++c ) {
+ for( TQCString::ConstIterator c = str.begin(); *c; ++c ) {
if( *c != '\n' ) {
fullySignedOrEncrypted = false;
break;
@@ -2660,7 +2660,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
// add the last Non-OpenPGP block
- QCString str( nonPgpBlocks.last() );
+ TQCString str( nonPgpBlocks.last() );
if( !str.isEmpty() ) {
htmlStr += quotedHTML( aCodec->toUnicode( str ), decorate );
// Even if the trailing Non-OpenPGP block isn't empty we still
@@ -2682,7 +2682,7 @@ void ObjectTreeParser::writeBodyStr( const QCString& aStr, const QTextCodec *aCo
}
-QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
+TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate )
{
assert( mReader );
assert( cssHelper() );
@@ -2691,16 +2691,16 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
if ( decorate && GlobalSettings::self()->showEmoticons() ) {
convertFlags |= LinkLocator::ReplaceSmileys;
}
- QString htmlStr;
- const QString normalStartTag = cssHelper()->nonQuotedFontTag();
- QString quoteFontTag[3];
- QString deepQuoteFontTag[3];
+ TQString htmlStr;
+ const TQString normalStartTag = cssHelper()->nonQuotedFontTag();
+ TQString quoteFontTag[3];
+ TQString deepQuoteFontTag[3];
for ( int i = 0 ; i < 3 ; ++i ) {
quoteFontTag[i] = cssHelper()->quoteFontTag( i );
deepQuoteFontTag[i] = cssHelper()->quoteFontTag( i+3 );
}
- const QString normalEndTag = "</div>";
- const QString quoteEnd = "</div>";
+ const TQString normalEndTag = "</div>";
+ const TQString quoteEnd = "</div>";
unsigned int pos, beg;
const unsigned int length = s.length();
@@ -2715,7 +2715,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
while (beg<length)
{
- QString line;
+ TQString line;
/* search next occurrence of '\n' */
pos = s.find('\n', beg, FALSE);
@@ -2757,7 +2757,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
} /* for() */
bool actHidden = false;
- QString textExpand;
+ TQString textExpand;
// This quoted line needs be hiden
if (GlobalSettings::self()->showExpandQuotesMark() && mReader->mLevelQuote >= 0
@@ -2785,7 +2785,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
{
//Expand all quotes
htmlStr += "<div class=\"quotelevelmark\" >" ;
- htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">"
+ htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
.arg(-1)
.arg( mExpandIcon );
@@ -2794,7 +2794,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
}
}else {
htmlStr += "<div class=\"quotelevelmark\" >" ;
- htmlStr += QString( "<a href=\"kmail:levelquote?%1 \">"
+ htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">"
"<img src=\"%2\" alt=\"\" title=\"\"/></a>" )
.arg(actQuoteLevel)
.arg( mCollapseIcon);
@@ -2821,9 +2821,9 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
// ignore ^M DOS linebreaks
if( !line.replace('\015', "").isEmpty() )
{
- htmlStr +=QString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" );
+ htmlStr +=TQString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" );
htmlStr += LinkLocator::convertToHtml( line, convertFlags );
- htmlStr += QString( "</div>" );
+ htmlStr += TQString( "</div>" );
}
else
htmlStr += "<br>";
@@ -2845,7 +2845,7 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
- const QTextCodec * ObjectTreeParser::codecFor( partNode * node ) const {
+ const TQTextCodec * ObjectTreeParser::codecFor( partNode * node ) const {
assert( node );
if ( mReader && mReader->overrideCodec() )
return mReader->overrideCodec();
@@ -2857,10 +2857,10 @@ QString ObjectTreeParser::quotedHTML( const QString& s, bool decorate )
size_t len ) {
assert( filename );
- QFile f( filename );
+ TQFile f( filename );
if ( f.open( IO_WriteOnly ) ) {
if ( start ) {
- QDataStream ds( &f );
+ TQDataStream ds( &f );
ds.writeRawBytes( start, len );
}
f.close(); // If data is 0 we just create a zero length file.