diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:59:50 -0600 |
commit | 9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch) | |
tree | ab537a329b9613e11dce8195761f93ffe82aed24 /kmail/objecttreeparser.cpp | |
parent | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff) | |
download | tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kmail/objecttreeparser.cpp')
-rw-r--r-- | kmail/objecttreeparser.cpp | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 0b827cc79..0e5103e29 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -98,7 +98,7 @@ #include <kmdcodec.h> // other TQt headers -#include <textcodec.h> +#include <tqtextcodec.h> #include <tqdir.h> #include <tqfile.h> #include <tqapplication.h> @@ -272,7 +272,7 @@ namespace KMail { ProcessResult processResult; if ( mReader ) { - htmlWriter()->queue( TQString::fromLatin1("<a name=\"att%1\"/>").arg( node->nodeId() ) ); + htmlWriter()->queue( TQString::tqfromLatin1("<a name=\"att%1\"/>").tqarg( node->nodeId() ) ); } if ( const Interface::BodyPartFormatter * formatter @@ -391,7 +391,7 @@ namespace KMail { ////////////////// ////////////////// - static int signatureToStatus( const GpgME::Signature &sig ) + static int signatureTotqStatus( const GpgME::Signature &sig ) { switch ( sig.status().code() ) { case GPG_ERR_NO_ERROR: @@ -586,10 +586,10 @@ namespace KMail { //kdDebug(5006) << "\nObjectTreeParser::writeOpaqueOrMultipartSignedData: found signature" << endl; GpgME::Signature signature = signatures[0]; - messagePart.status_code = signatureToStatus( signature ); + messagePart.status_code = signatureTotqStatus( signature ); messagePart.status = TQString::fromUtf8( signature.status().asString() ); for ( uint i = 1; i < signatures.size(); ++i ) { - if ( signatureToStatus( signatures[i] ) != messagePart.status_code ) { + if ( signatureTotqStatus( signatures[i] ) != messagePart.status_code ) { messagePart.status_code = GPGME_SIG_STAT_DIFF; messagePart.status = i18n("Different results for signatures"); } @@ -686,11 +686,11 @@ namespace KMail { switch ( cryptPlugError ) { case NOT_INITIALIZED: errorMsg = i18n( "Crypto plug-in \"%1\" is not initialized." ) - .arg( cryptPlugLibName ); + .tqarg( cryptPlugLibName ); break; case CANT_VERIFY_SIGNATURES: errorMsg = i18n( "Crypto plug-in \"%1\" cannot verify signatures." ) - .arg( cryptPlugLibName ); + .tqarg( cryptPlugLibName ); break; case NO_PLUGIN: if ( cryptPlugDisplayName.isEmpty() ) @@ -698,14 +698,14 @@ namespace KMail { else errorMsg = i18n( "%1 is either 'OpenPGP' or 'S/MIME'", "No %1 plug-in was found." ) - .arg( cryptPlugDisplayName ); + .tqarg( cryptPlugDisplayName ); break; } messagePart.errorText = i18n( "The message is signed, but the " "validity of the signature cannot be " "verified.<br />" "Reason: %1" ) - .arg( errorMsg ); + .tqarg( errorMsg ); } if ( mReader ) @@ -887,9 +887,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, + "</div>"; if ( !passphraseError ) aErrorText = i18n("Crypto plug-in \"%1\" could not decrypt the data.") - .arg( cryptPlugLibName ) + .tqarg( cryptPlugLibName ) + "<br />" - + i18n("Error: %1").arg( aErrorText ); + + i18n("Error: %1").tqarg( aErrorText ); } } } @@ -901,11 +901,11 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, switch ( cryptPlugError ) { case NOT_INITIALIZED: aErrorText = i18n( "Crypto plug-in \"%1\" is not initialized." ) - .arg( cryptPlugLibName ); + .tqarg( cryptPlugLibName ); break; case CANT_DECRYPT: aErrorText = i18n( "Crypto plug-in \"%1\" cannot decrypt messages." ) - .arg( cryptPlugLibName ); + .tqarg( cryptPlugLibName ); break; case NO_PLUGIN: aErrorText = i18n( "No appropriate crypto plug-in was found." ); @@ -1656,7 +1656,7 @@ namespace KMail { const GpgME::ImportResult res = import->exec( certData ); if ( res.error() ) { htmlWriter()->queue( i18n( "Sorry, certificate could not be imported.<br>" - "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) ); + "Reason: %1").tqarg( TQString::fromLocal8Bit( res.error().asString() ) ) ); return true; } @@ -1696,14 +1696,14 @@ namespace KMail { for ( std::vector<GpgME::Import>::const_iterator it = imports.begin() ; it != imports.end() ; ++it ) { if ( (*it).error() ) htmlWriter()->queue( i18n( "Failed: %1 (%2)" ) - .arg( (*it).fingerprint(), + .tqarg( (*it).fingerprint(), 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() ) ); + htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).tqarg( (*it).fingerprint() ) ); } else { - htmlWriter()->queue( i18n( "New or changed: %1" ).arg( (*it).fingerprint() ) ); + htmlWriter()->queue( i18n( "New or changed: %1" ).tqarg( (*it).fingerprint() ) ); } } htmlWriter()->queue( "<br>" ); @@ -2054,7 +2054,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum ); - TQString href = TQString( "attachment:%1?place=body" ).arg( partNum ); + TQString href = TQString( "attachment:%1?place=body" ).tqarg( partNum ); TQString iconName; if( inlineImage ) @@ -2280,7 +2280,7 @@ static TQString writeSimpleSigstatHeader( const PartMetaData &block ) if ( addr.isEmpty() ) { html += i18n( "Signature is valid." ); } else { - html += i18n( "Signed by <a href=\"mailto:%1\">%2</a>." ).arg( addr, name ); + html += i18n( "Signed by <a href=\"mailto:%1\">%2</a>." ).tqarg( addr, name ); } } else { // should not happen @@ -2307,7 +2307,7 @@ static TQString makeShowAuditLogLink( const GpgME::Error & err, const TQString & //kdDebug(5006) << "makeShowAuditLogLink: not showing link (not available)" << endl; return i18n("No Audit Log available"); } else { - return i18n("Error Retrieving Audit Log: %1").arg( TQString::fromLocal8Bit( err.asString() ) ); + return i18n("Error Retrieving Audit Log: %1").tqarg( TQString::fromLocal8Bit( err.asString() ) ); } } @@ -2371,7 +2371,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, else { htmlStr += i18n("Encrypted message (decryption not possible)"); if( !block.errorText.isEmpty() ) - htmlStr += "<br />" + i18n("Reason: %1").arg( block.errorText ); + htmlStr += "<br />" + i18n("Reason: %1").tqarg( block.errorText ); } htmlStr += "</td></tr><tr class=\"encrB\"><td>"; } @@ -2428,13 +2428,13 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, if( isSMIME ) startKeyHREF = TQString("<a href=\"kmail:showCertificate#%1 ### %2 ### %3\">") - .arg( cryptProto->displayName(), + .tqarg( cryptProto->displayName(), cryptProto->name(), block.keyId ); TQString keyWithWithoutURL = isSMIME ? TQString("%1%2</a>") - .arg( startKeyHREF, + .tqarg( startKeyHREF, cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) ) : "0x" + TQString::fromUtf8( block.keyId ); @@ -2486,7 +2486,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, i18n("Warning:") + "</u> " + i18n("Sender's mail address is not stored " - "in the %1 used for signing.").arg(certificate) + + "in the %1 used for signing.").tqarg(certificate) + "<br />" + i18n("sender: ") + msgFrom + @@ -2512,7 +2512,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, "</u> " + i18n("No mail address is stored in the %1 used for signing, " "so we cannot compare it to the sender's address %2.") - .arg(certificate,msgFrom); + .tqarg(certificate,msgFrom); } if( !greenCaseWarning.isEmpty() ) { if( !statusStr.isEmpty() ) @@ -2535,7 +2535,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, if( cannotCheckSignature ) { htmlStr += i18n( "Not enough information to check " "signature. %1" ) - .arg( keyWithWithoutURL ); + .tqarg( keyWithWithoutURL ); } else { @@ -2553,26 +2553,26 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, htmlStr += i18n( "Message was signed with unknown key." ); else htmlStr += i18n( "Message was signed by %1." ) - .arg( signer ); + .tqarg( signer ); } else { TQDateTime created = block.creationTime; if( created.isValid() ) { if( signer.isEmpty() ) { if( onlyShowKeyURL ) htmlStr += i18n( "Message was signed with key %1." ) - .arg( keyWithWithoutURL ); + .tqarg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed on %1 with key %2." ) - .arg( KGlobal::locale()->formatDateTime( created ), + .tqarg( KGlobal::locale()->formatDateTime( created ), keyWithWithoutURL ); } else { if( onlyShowKeyURL ) htmlStr += i18n( "Message was signed with key %1." ) - .arg( keyWithWithoutURL ); + .tqarg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed by %3 on %1 with key %2" ) - .arg( KGlobal::locale()->formatDateTime( created ), + .tqarg( KGlobal::locale()->formatDateTime( created ), keyWithWithoutURL, signer ); } @@ -2580,10 +2580,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, else { if( signer.isEmpty() || onlyShowKeyURL ) htmlStr += i18n( "Message was signed with key %1." ) - .arg( keyWithWithoutURL ); + .tqarg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed by %2 with key %1." ) - .arg( keyWithWithoutURL, + .tqarg( keyWithWithoutURL, signer ); } } @@ -2621,11 +2621,11 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, TQDateTime created = block.creationTime; if ( created.isValid() ) htmlStr += i18n( "Message was signed on %1 with unknown key %2." ) - .arg( KGlobal::locale()->formatDateTime( created ), + .tqarg( KGlobal::locale()->formatDateTime( created ), keyWithWithoutURL ); else htmlStr += i18n( "Message was signed with unknown key %1." ) - .arg( keyWithWithoutURL ); + .tqarg( keyWithWithoutURL ); } else htmlStr += i18n( "Message was signed with unknown key." ); @@ -2663,10 +2663,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, simpleHtmlStr += writeSimpleSigstatHeader( block ); if( !block.keyId.isEmpty() ) htmlStr += i18n( "Message was signed by %2 (Key ID: %1)." ) - .arg( keyWithWithoutURL, + .tqarg( keyWithWithoutURL, signer ); else - htmlStr += i18n( "Message was signed by %1." ).arg( signer ); + htmlStr += i18n( "Message was signed by %1." ).tqarg( signer ); htmlStr += "<br />"; switch( block.keyTrust ) @@ -2707,10 +2707,10 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, simpleHtmlStr += writeSimpleSigstatHeader( block ); if( !block.keyId.isEmpty() ) htmlStr += i18n( "Message was signed by %2 (Key ID: %1)." ) - .arg( keyWithWithoutURL, + .tqarg( keyWithWithoutURL, signer ); else - htmlStr += i18n( "Message was signed by %1." ).arg( signer ); + htmlStr += i18n( "Message was signed by %1." ).tqarg( signer ); htmlStr += "<br />"; htmlStr += i18n("Warning: The signature is bad."); frame = "</td></tr>" @@ -2763,7 +2763,7 @@ void ObjectTreeParser::writeAttachmentMarkHeader( partNode *node ) if ( !mReader ) return; - htmlWriter()->queue( TQString( "<div id=\"attachmentDiv%1\">\n" ).arg( node->nodeId() ) ); + htmlWriter()->queue( TQString( "<div id=\"attachmentDiv%1\">\n" ).tqarg( node->nodeId() ) ); } //----------------------------------------------------------------------------- @@ -2798,7 +2798,7 @@ void ObjectTreeParser::writeBodyStr( const TQCString& aStr, const TQTextCodec *a bool isPgpMessage = false; // true if the message contains at least one // PGP MESSAGE or one PGP SIGNED MESSAGE block TQString dir = ( TQApplication::reverseLayout() ? "rtl" : "ltr" ); - TQString headerStr = TQString("<div dir=\"%1\">").arg(dir); + TQString headerStr = TQString("<div dir=\"%1\">").tqarg(dir); inlineSignatureState = KMMsgNotSigned; inlineEncryptionState = KMMsgNotEncrypted; @@ -2970,7 +2970,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) const unsigned int length = s.length(); // skip leading empty lines - for ( pos = 0; pos < length && s.at(pos) <= TQChar(' '); pos++ ) { ; } + for ( pos = 0; pos < length && s.tqat(pos) <= TQChar(' '); pos++ ) { ; } while (pos > 0 && (s[pos-1] == ' ' || s[pos-1] == '\t')) pos--; beg = pos; @@ -3051,8 +3051,8 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) htmlStr += "<div class=\"quotelevelmark\" >" ; htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">" "<img src=\"%2\" alt=\"\" title=\"\"/></a>" ) - .arg(-1) - .arg( mExpandIcon ); + .tqarg(-1) + .tqarg( mExpandIcon ); htmlStr += "</div><br/>"; htmlStr += quoteEnd; } @@ -3060,8 +3060,8 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) htmlStr += "<div class=\"quotelevelmark\" >" ; htmlStr += TQString( "<a href=\"kmail:levelquote?%1 \">" "<img src=\"%2\" alt=\"\" title=\"\"/></a>" ) - .arg(actQuoteLevel) - .arg( mCollapseIcon); + .tqarg(actQuoteLevel) + .tqarg( mCollapseIcon); htmlStr += "</div>"; if ( actQuoteLevel < 3 ) htmlStr += quoteFontTag[actQuoteLevel]; @@ -3085,7 +3085,7 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) // ignore ^M DOS linebreaks if( !line.replace('\015', "").isEmpty() ) { - htmlStr +=TQString( "<div dir=\"%1\">" ).arg( line.isRightToLeft() ? "rtl":"ltr" ); + htmlStr +=TQString( "<div dir=\"%1\">" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); htmlStr += TQString( "</div>" ); } |