From 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:50:21 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kmail/objecttreeparser.cpp | 94 +++++++++++++++++++++++----------------------- 1 file changed, 47 insertions(+), 47 deletions(-) (limited to 'kmail/objecttreeparser.cpp') diff --git a/kmail/objecttreeparser.cpp b/kmail/objecttreeparser.cpp index 0e5103e2..0b827cc7 100644 --- a/kmail/objecttreeparser.cpp +++ b/kmail/objecttreeparser.cpp @@ -98,7 +98,7 @@ #include // other TQt headers -#include +#include #include #include #include @@ -272,7 +272,7 @@ namespace KMail { ProcessResult processResult; if ( mReader ) { - htmlWriter()->queue( TQString::tqfromLatin1("").tqarg( node->nodeId() ) ); + htmlWriter()->queue( TQString::fromLatin1("").arg( node->nodeId() ) ); } if ( const Interface::BodyPartFormatter * formatter @@ -391,7 +391,7 @@ namespace KMail { ////////////////// ////////////////// - static int signatureTotqStatus( const GpgME::Signature &sig ) + static int signatureToStatus( 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 = signatureTotqStatus( signature ); + messagePart.status_code = signatureToStatus( signature ); messagePart.status = TQString::fromUtf8( signature.status().asString() ); for ( uint i = 1; i < signatures.size(); ++i ) { - if ( signatureTotqStatus( signatures[i] ) != messagePart.status_code ) { + if ( signatureToStatus( 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." ) - .tqarg( cryptPlugLibName ); + .arg( cryptPlugLibName ); break; case CANT_VERIFY_SIGNATURES: errorMsg = i18n( "Crypto plug-in \"%1\" cannot verify signatures." ) - .tqarg( cryptPlugLibName ); + .arg( 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." ) - .tqarg( cryptPlugDisplayName ); + .arg( cryptPlugDisplayName ); break; } messagePart.errorText = i18n( "The message is signed, but the " "validity of the signature cannot be " "verified.
" "Reason: %1" ) - .tqarg( errorMsg ); + .arg( errorMsg ); } if ( mReader ) @@ -887,9 +887,9 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, + ""; if ( !passphraseError ) aErrorText = i18n("Crypto plug-in \"%1\" could not decrypt the data.") - .tqarg( cryptPlugLibName ) + .arg( cryptPlugLibName ) + "
" - + i18n("Error: %1").tqarg( aErrorText ); + + i18n("Error: %1").arg( aErrorText ); } } } @@ -901,11 +901,11 @@ bool ObjectTreeParser::okDecryptMIME( partNode& data, switch ( cryptPlugError ) { case NOT_INITIALIZED: aErrorText = i18n( "Crypto plug-in \"%1\" is not initialized." ) - .tqarg( cryptPlugLibName ); + .arg( cryptPlugLibName ); break; case CANT_DECRYPT: aErrorText = i18n( "Crypto plug-in \"%1\" cannot decrypt messages." ) - .tqarg( cryptPlugLibName ); + .arg( 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.
" - "Reason: %1").tqarg( TQString::fromLocal8Bit( res.error().asString() ) ) ); + "Reason: %1").arg( TQString::fromLocal8Bit( res.error().asString() ) ) ); return true; } @@ -1696,14 +1696,14 @@ namespace KMail { for ( std::vector::const_iterator it = imports.begin() ; it != imports.end() ; ++it ) { if ( (*it).error() ) htmlWriter()->queue( i18n( "Failed: %1 (%2)" ) - .tqarg( (*it).fingerprint(), + .arg( (*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)" ).tqarg( (*it).fingerprint() ) ); + htmlWriter()->queue( i18n( "New or changed: %1 (secret key available)" ).arg( (*it).fingerprint() ) ); } else { - htmlWriter()->queue( i18n( "New or changed: %1" ).tqarg( (*it).fingerprint() ) ); + htmlWriter()->queue( i18n( "New or changed: %1" ).arg( (*it).fingerprint() ) ); } } htmlWriter()->queue( "
" ); @@ -2054,7 +2054,7 @@ bool ObjectTreeParser::processApplicationMsTnefSubtype( partNode *node, ProcessR TQString fileName = mReader->writeMessagePartToTempFile( msgPart, partNum ); - TQString href = TQString( "attachment:%1?place=body" ).tqarg( partNum ); + TQString href = TQString( "attachment:%1?place=body" ).arg( 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
%2." ).tqarg( addr, name ); + html += i18n( "Signed by %2." ).arg( 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").tqarg( TQString::fromLocal8Bit( err.asString() ) ); + return i18n("Error Retrieving Audit Log: %1").arg( 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 += "
" + i18n("Reason: %1").tqarg( block.errorText ); + htmlStr += "
" + i18n("Reason: %1").arg( block.errorText ); } htmlStr += ""; } @@ -2428,13 +2428,13 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, if( isSMIME ) startKeyHREF = TQString("") - .tqarg( cryptProto->displayName(), + .arg( cryptProto->displayName(), cryptProto->name(), block.keyId ); TQString keyWithWithoutURL = isSMIME ? TQString("%1%2") - .tqarg( startKeyHREF, + .arg( startKeyHREF, cannotCheckSignature ? i18n("[Details]") : ("0x" + block.keyId) ) : "0x" + TQString::fromUtf8( block.keyId ); @@ -2486,7 +2486,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, i18n("Warning:") + " " + i18n("Sender's mail address is not stored " - "in the %1 used for signing.").tqarg(certificate) + + "in the %1 used for signing.").arg(certificate) + "
" + i18n("sender: ") + msgFrom + @@ -2512,7 +2512,7 @@ TQString ObjectTreeParser::writeSigstatHeader( PartMetaData & block, " " + i18n("No mail address is stored in the %1 used for signing, " "so we cannot compare it to the sender's address %2.") - .tqarg(certificate,msgFrom); + .arg(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" ) - .tqarg( keyWithWithoutURL ); + .arg( 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." ) - .tqarg( signer ); + .arg( signer ); } else { TQDateTime created = block.creationTime; if( created.isValid() ) { if( signer.isEmpty() ) { if( onlyShowKeyURL ) htmlStr += i18n( "Message was signed with key %1." ) - .tqarg( keyWithWithoutURL ); + .arg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed on %1 with key %2." ) - .tqarg( KGlobal::locale()->formatDateTime( created ), + .arg( KGlobal::locale()->formatDateTime( created ), keyWithWithoutURL ); } else { if( onlyShowKeyURL ) htmlStr += i18n( "Message was signed with key %1." ) - .tqarg( keyWithWithoutURL ); + .arg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed by %3 on %1 with key %2" ) - .tqarg( KGlobal::locale()->formatDateTime( created ), + .arg( 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." ) - .tqarg( keyWithWithoutURL ); + .arg( keyWithWithoutURL ); else htmlStr += i18n( "Message was signed by %2 with key %1." ) - .tqarg( keyWithWithoutURL, + .arg( 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." ) - .tqarg( KGlobal::locale()->formatDateTime( created ), + .arg( KGlobal::locale()->formatDateTime( created ), keyWithWithoutURL ); else htmlStr += i18n( "Message was signed with unknown key %1." ) - .tqarg( keyWithWithoutURL ); + .arg( 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)." ) - .tqarg( keyWithWithoutURL, + .arg( keyWithWithoutURL, signer ); else - htmlStr += i18n( "Message was signed by %1." ).tqarg( signer ); + htmlStr += i18n( "Message was signed by %1." ).arg( signer ); htmlStr += "
"; 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)." ) - .tqarg( keyWithWithoutURL, + .arg( keyWithWithoutURL, signer ); else - htmlStr += i18n( "Message was signed by %1." ).tqarg( signer ); + htmlStr += i18n( "Message was signed by %1." ).arg( signer ); htmlStr += "
"; htmlStr += i18n("Warning: The signature is bad."); frame = "" @@ -2763,7 +2763,7 @@ void ObjectTreeParser::writeAttachmentMarkHeader( partNode *node ) if ( !mReader ) return; - htmlWriter()->queue( TQString( "
\n" ).tqarg( node->nodeId() ) ); + htmlWriter()->queue( TQString( "
\n" ).arg( 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("
").tqarg(dir); + TQString headerStr = TQString("
").arg(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.tqat(pos) <= TQChar(' '); pos++ ) { ; } + for ( pos = 0; pos < length && s.at(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 += "
" ; htmlStr += TQString( "" "\"\"" ) - .tqarg(-1) - .tqarg( mExpandIcon ); + .arg(-1) + .arg( mExpandIcon ); htmlStr += "

"; htmlStr += quoteEnd; } @@ -3060,8 +3060,8 @@ TQString ObjectTreeParser::quotedHTML( const TQString& s, bool decorate ) htmlStr += "
" ; htmlStr += TQString( "" "\"\"" ) - .tqarg(actQuoteLevel) - .tqarg( mCollapseIcon); + .arg(actQuoteLevel) + .arg( mCollapseIcon); htmlStr += "
"; 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( "
" ).tqarg( line.isRightToLeft() ? "rtl":"ltr" ); + htmlStr +=TQString( "
" ).arg( line.isRightToLeft() ? "rtl":"ltr" ); htmlStr += LinkLocator::convertToHtml( line, convertFlags ); htmlStr += TQString( "
" ); } -- cgit v1.2.3