diff options
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r-- | kmail/kmcommands.cpp | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 19661be97..2a0713c77 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -54,7 +54,7 @@ #include <kapplication.h> #include <dcopclient.h> -#include <tqtextcodec.h> +#include <textcodec.h> #include <tqpopupmenu.h> #include <tqeventloop.h> @@ -133,7 +133,7 @@ using namespace KMime; #include <kleo/cryptobackend.h> #include <kleo/cryptobackendfactory.h> -#include <tqclipboard.h> +#include <clipboard.h> #include <memory> @@ -537,7 +537,7 @@ KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, TQWidget *parent KMCommand::Result KMAddBookmarksCommand::execute() { - TQString filename = locateLocal( "data", TQString::tqfromLatin1("konqueror/bookmarks.xml") ); + TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, false ); KBookmarkGroup group = bookManager->root(); @@ -586,7 +586,7 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KURL &url, KMMainWidget *mainWidget ) KMCommand::Result KMUrlCopyCommand::execute() { - TQClipboard* clip = TQApplication::tqclipboard(); + TQClipboard* clip = TQApplication::clipboard(); if (mUrl.protocol() == "mailto") { // put the url into the mouse selection and the clipboard @@ -640,7 +640,7 @@ KMCommand::Result KMUrlSaveCommand::execute() { if (KMessageBox::warningContinueCancel(0, i18n("<qt>File <b>%1</b> exists.<br>Do you want to replace it?</qt>") - .tqarg(saveUrl.prettyURL()), i18n("Save to File"), i18n("&Replace")) + .arg(saveUrl.prettyURL()), i18n("Save to File"), i18n("&Replace")) != KMessageBox::Continue) return Canceled; } @@ -753,8 +753,8 @@ KMCommand::Result KMShowMsgSrcCommand::execute() viewer->resize(TQApplication::desktop()->screenGeometry(scnum).width()/2, 2*TQApplication::desktop()->screenGeometry(scnum).height()/3); } else { - viewer->resize(TQApplication::desktop()->tqgeometry().width()/2, - 2*TQApplication::desktop()->tqgeometry().height()/3); + viewer->resize(TQApplication::desktop()->geometry().width()/2, + 2*TQApplication::desktop()->geometry().height()/3); } viewer->show(); @@ -963,7 +963,7 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job) { if (KMessageBox::warningContinueCancel(0, i18n("File %1 exists.\nDo you want to replace it?") - .tqarg(mUrl.prettyURL()), i18n("Save to File"), i18n("&Replace")) + .arg(mUrl.prettyURL()), i18n("Save to File"), i18n("&Replace")) == KMessageBox::Continue) { mOffset = 0; @@ -1395,14 +1395,14 @@ KMCommand::Result KMForwardDigestCommand::execute() id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt(); // set the part header msgPartText += "--"; - msgPartText += TQString::tqfromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "\nContent-Type: MESSAGE/RFC822"; - msgPartText += TQString( "; CHARSET=%1" ).tqarg( TQString(msg->charset()) ); + msgPartText += TQString( "; CHARSET=%1" ).arg( TQString(msg->charset()) ); msgPartText += '\n'; DwHeaders dwh; dwh.MessageId().CreateDefault(); - msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() ); - msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() ); + msgPartText += TQString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() ); + msgPartText += TQString( "Content-Description: %1" ).arg( msg->subject() ); if ( !msg->subject().contains( "(fwd)" ) ) msgPartText += " (fwd)"; msgPartText += "\n\n"; @@ -1422,7 +1422,7 @@ KMCommand::Result KMForwardDigestCommand::execute() id = mIdentity; // use folder identity if no message had an id set fwdMsg->initHeader( id ); msgPartText += "--"; - msgPartText += TQString::tqfromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "--\n"; TQCString tmp; msgPart->setTypeStr( "MULTIPART" ); @@ -1430,7 +1430,7 @@ KMCommand::Result KMForwardDigestCommand::execute() msgPart->setSubtypeStr( tmp ); msgPart->setName( "unnamed" ); msgPart->setCte( DwMime::kCte7bit ); // does it have to be 7bit? - msgPart->setContentDescription( TQString( "Digest of %1 messages." ).tqarg( msgCnt ) ); + msgPart->setContentDescription( TQString( "Digest of %1 messages." ).arg( msgCnt ) ); // THIS HAS TO BE AFTER setCte()!!!! msgPart->setBodyEncoded( TQCString( msgPartText.ascii() ) ); KCursorSaver busy( KBusyPtr::busy() ); @@ -1639,9 +1639,9 @@ KMCommand::Result KMPrintCommand::execute() } -KMSeStatusCommand::KMSeStatusCommand( KMMsgtqStatus status, +KMSeStatusCommand::KMSeStatusCommand( KMMsgStatus status, const TQValueList<TQ_UINT32> &serNums, bool toggle ) - : mtqStatus( status ), mSerNums( serNums ), mToggle( toggle ) + : mStatus( status ), mSerNums( serNums ), mToggle( toggle ) { } @@ -1650,7 +1650,7 @@ KMCommand::Result KMSeStatusCommand::execute() TQValueListIterator<TQ_UINT32> it; int idx = -1; KMFolder *folder = 0; - bool parentqStatus = false; + bool parenStatus = false; // Toggle actions on threads toggle the whole thread // depending on the state of the parent. @@ -1659,10 +1659,10 @@ KMCommand::Result KMSeStatusCommand::execute() KMMsgDict::instance()->getLocation( *mSerNums.begin(), &folder, &idx ); if (folder) { msg = folder->getMsgBase(idx); - if (msg && (msg->status()&mtqStatus)) - parentqStatus = true; + if (msg && (msg->status()&mStatus)) + parenStatus = true; else - parentqStatus = false; + parenStatus = false; } } TQMap< KMFolder*, TQValueList<int> > folderMap; @@ -1673,12 +1673,12 @@ KMCommand::Result KMSeStatusCommand::execute() KMMsgBase *msg = folder->getMsgBase(idx); // check if we are already at the target toggle state if (msg) { - bool mytqStatus; - if (msg->status()&mtqStatus) - mytqStatus = true; + bool myStatus; + if (msg->status()&mStatus) + myStatus = true; else - mytqStatus = false; - if (mytqStatus != parentqStatus) + myStatus = false; + if (myStatus != parenStatus) continue; } } @@ -1690,7 +1690,7 @@ KMCommand::Result KMSeStatusCommand::execute() TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin(); while ( it2 != folderMap.end() ) { KMFolder *f = it2.key(); - f->setqStatus( (*it2), mtqStatus, mToggle ); + f->seStatus( (*it2), mStatus, mToggle ); ++it2; } //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() ); @@ -1741,7 +1741,7 @@ KMCommand::Result KMFilterActionCommand::execute() if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) { progressItem->updateProgress(); TQString statusMsg = i18n("Filtering message %1 of %2"); - statusMsg = statusMsg.tqarg( msgCount ).tqarg( msgCountToFilter ); + statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter ); KPIM::BroadcastStatus::instance()->seStatusMsg( statusMsg ); KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 ); } @@ -1995,7 +1995,7 @@ KMCommand::Result KMCopyCommand::execute() // corrupt IMAP cache, see FolderStorage::getMsg() if ( msg == 0 ) { KMessageBox::error( parentWidget(), i18n("Corrupt IMAP cache detected in folder %1. " - "Copying of messages aborted.").tqarg( srcFolder->prettyURL() ) ); + "Copying of messages aborted.").arg( srcFolder->prettyURL() ) ); deleteLater(); return Failed; } @@ -2015,7 +2015,7 @@ KMCommand::Result KMCopyCommand::execute() // make sure the attachment state is only calculated when it's complete if (!newMsg->isComplete()) newMsg->setReadyToShow(false); - newMsg->setqStatus(msg->status()); + newMsg->seStatus(msg->status()); if (srcFolder && !newMsg->isComplete()) { @@ -2461,7 +2461,7 @@ KMCommand::Result KMUrlClickedCommand::execute() mime->name() == "application/x-shellscript" ) { if (KMessageBox::warningYesNo( 0, i18n( "<qt>Do you really want to execute <b>%1</b>?</qt>" ) - .tqarg( mUrl.prettyURL() ), TQString(), i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) + .arg( mUrl.prettyURL() ), TQString(), i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) return Canceled; } KRun * runner = new KRun( mUrl ); @@ -2605,7 +2605,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() ++unnamedAtmCount; s = i18n("filename for the %1-th unnamed attachment", "attachment.%1") - .tqarg( unnamedAtmCount ); + .arg( unnamedAtmCount ); } curUrl.setFileName( s ); } else { @@ -2644,7 +2644,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() if ( KIO::NetAccess::exists( curUrl, false, parentWidget() ) ) { if ( KMessageBox::warningContinueCancel( parentWidget(), i18n( "A file named %1 already exists. Do you want to overwrite it?" ) - .tqarg( curUrl.fileName() ), + .arg( curUrl.fileName() ), i18n( "File Already Exists" ), i18n("&Overwrite") ) == KMessageBox::Cancel) { continue; } @@ -2752,8 +2752,8 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, KMessageBox::error( parentWidget(), i18n( "%2 is detailed error description", "Could not write the file %1:\n%2" ) - .tqarg( file.name() ) - .tqarg( TQString::fromLocal8Bit( strerror( errno ) ) ), + .arg( file.name() ) + .arg( TQString::fromLocal8Bit( strerror( errno ) ) ), i18n( "KMail Error" ) ); return Failed; } @@ -2777,7 +2777,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, { KMessageBox::error( parentWidget(), i18n( "Could not write the file %1." ) - .tqarg( url.path() ), + .arg( url.path() ), i18n( "KMail Error" ) ); return Failed; } @@ -3011,8 +3011,8 @@ KMCommand::Result KMIMChatCommand::execute() { nameList.append( (*it).realName() ); } - TQString names = nameList.join( TQString::tqfromLatin1( ",\n" ) ); - apology = apology.tqarg( names ); + TQString names = nameList.join( TQString::fromLatin1( ",\n" ) ); + apology = apology.arg( names ); } KMessageBox::sorry( parentWidget(), apology ); @@ -3216,7 +3216,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() return; // FIXME: better detection of mimetype?? - if ( !mAtmName.tqendsWith( ".xia", false ) ) + if ( !mAtmName.endsWith( ".xia", false ) ) return; const Kleo::CryptoBackend::Protocol * chiasmus = @@ -3297,7 +3297,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() } static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) { - return base.tqendsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ; + return base.endsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ; } void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const TQVariant & result ) @@ -3452,7 +3452,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify() KMMessage *newMsg = new KMMessage(); newMsg->fromDwString( msg->asDwString() ); - newMsg->setqStatus( msg->status() ); + newMsg->seStatus( msg->status() ); storeChangedMessage( newMsg ); return OK; @@ -3543,7 +3543,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher) KMMessage *newMsg = new KMMessage(); newMsg->fromDwString( msg->asDwString() ); - newMsg->setqStatus( msg->status() ); + newMsg->seStatus( msg->status() ); storeChangedMessage( newMsg ); } @@ -3563,8 +3563,8 @@ KMCommand::Result CreateTodoCommand::execute() KMail::KorgHelper::ensureRunning(); - TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").tqarg( msg->from() ) - .tqarg( msg->to() ).tqarg( msg->subject() ); + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() ) + .arg( msg->to() ).arg( msg->subject() ); KTempFile tf; tf.setAutoDelete( true ); @@ -3573,7 +3573,7 @@ KMCommand::Result CreateTodoCommand::execute() tf.close(); KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" ); - iface->openTodoEditor( i18n("Mail: %1").tqarg( msg->subject() ), txt, uri, + iface->openTodoEditor( i18n("Mail: %1").arg( msg->subject() ), txt, uri, tf.name(), TQStringList(), "message/rfc822", true ); delete iface; |