diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kmail/kmcommands.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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/kmcommands.cpp')
-rw-r--r-- | kmail/kmcommands.cpp | 596 |
1 files changed, 298 insertions, 298 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp index 3119bb4ba..e0b911df7 100644 --- a/kmail/kmcommands.cpp +++ b/kmail/kmcommands.cpp @@ -54,9 +54,9 @@ #include <kapplication.h> #include <dcopclient.h> -#include <qtextcodec.h> -#include <qpopupmenu.h> -#include <qeventloop.h> +#include <tqtextcodec.h> +#include <tqpopupmenu.h> +#include <tqeventloop.h> #include <libemailfunctions/email.h> #include <kdcopservicestarter.h> @@ -132,7 +132,7 @@ using namespace KMime; #include <kleo/cryptobackend.h> #include <kleo/cryptobackendfactory.h> -#include <qclipboard.h> +#include <tqclipboard.h> #include <memory> @@ -155,26 +155,26 @@ private: }; -KMCommand::KMCommand( QWidget *parent ) +KMCommand::KMCommand( TQWidget *parent ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { } -KMCommand::KMCommand( QWidget *parent, const QPtrList<KMMsgBase> &msgList ) +KMCommand::KMCommand( TQWidget *parent, const TQPtrList<KMMsgBase> &msgList ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ), mMsgList( msgList ) { } -KMCommand::KMCommand( QWidget *parent, KMMsgBase *msgBase ) +KMCommand::KMCommand( TQWidget *parent, KMMsgBase *msgBase ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { mMsgList.append( msgBase ); } -KMCommand::KMCommand( QWidget *parent, KMMessage *msg ) +KMCommand::KMCommand( TQWidget *parent, KMMessage *msg ) : mProgressDialog( 0 ), mResult( Undefined ), mDeletesItself( false ), mEmitsCompletedItself( false ), mParent( parent ) { @@ -184,7 +184,7 @@ KMCommand::KMCommand( QWidget *parent, KMMessage *msg ) KMCommand::~KMCommand() { - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -201,11 +201,11 @@ KMCommand::Result KMCommand::result() void KMCommand::start() { - QTimer::singleShot( 0, this, SLOT( slotStart() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) ); } -const QPtrList<KMMessage> KMCommand::retrievedMsgs() const +const TQPtrList<KMMessage> KMCommand::retrievedMsgs() const { return mRetrievedMsgs; } @@ -215,7 +215,7 @@ KMMessage *KMCommand::retrievedMessage() const return mRetrievedMsgs.getFirst(); } -QWidget *KMCommand::parentWidget() const +TQWidget *KMCommand::parentWidget() const { return mParent; } @@ -224,8 +224,8 @@ int KMCommand::mCountJobs = 0; void KMCommand::slotStart() { - connect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ), - this, SLOT( slotPostTransfer( KMCommand::Result ) ) ); + connect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ), + this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); kmkernel->filterMgr()->ref(); if (mMsgList.find(0) != -1) { @@ -257,12 +257,12 @@ void KMCommand::slotStart() void KMCommand::slotPostTransfer( KMCommand::Result result ) { - disconnect( this, SIGNAL( messagesTransfered( KMCommand::Result ) ), - this, SLOT( slotPostTransfer( KMCommand::Result ) ) ); + disconnect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ), + this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) ); if ( result == OK ) result = execute(); mResult = result; - QPtrListIterator<KMMessage> it( mRetrievedMsgs ); + TQPtrListIterator<KMMessage> it( mRetrievedMsgs ); KMMessage* msg; while ( (msg = it.current()) != 0 ) { @@ -335,13 +335,13 @@ void KMCommand::transferSelectedMsgs() job->setCancellable( false ); totalSize += thisMsg->msgSizeServer(); // emitted when the message was transferred successfully - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - this, SLOT(slotMsgTransfered(KMMessage*))); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + this, TQT_SLOT(slotMsgTransfered(KMMessage*))); // emitted when the job is destroyed - connect(job, SIGNAL(finished()), - this, SLOT(slotJobFinished())); - connect(job, SIGNAL(progress(unsigned long, unsigned long)), - this, SLOT(slotProgress(unsigned long, unsigned long))); + connect(job, TQT_SIGNAL(finished()), + this, TQT_SLOT(slotJobFinished())); + connect(job, TQT_SIGNAL(progress(unsigned long, unsigned long)), + this, TQT_SLOT(slotProgress(unsigned long, unsigned long))); // msg musn't be deleted thisMsg->setTransferInProgress(true); job->start(); @@ -359,8 +359,8 @@ void KMCommand::transferSelectedMsgs() } else { // wait for the transfer and tell the progressBar the necessary steps if ( mProgressDialog ) { - connect(mProgressDialog, SIGNAL(cancelClicked()), - this, SLOT(slotTransferCancelled())); + connect(mProgressDialog, TQT_SIGNAL(cancelClicked()), + this, TQT_SLOT(slotTransferCancelled())); mProgressDialog->progressBar()->setTotalSteps(totalSize); } } @@ -414,7 +414,7 @@ void KMCommand::slotJobFinished() void KMCommand::slotTransferCancelled() { // kill the pending jobs - QValueListIterator<QGuardedPtr<KMFolder> > fit; + TQValueListIterator<TQGuardedPtr<KMFolder> > fit; for ( fit = mFolders.begin(); fit != mFolders.end(); ++fit ) { if (!(*fit)) continue; @@ -428,7 +428,7 @@ void KMCommand::slotTransferCancelled() KMCommand::mCountJobs = 0; mCountMsgs = 0; // unget the transfered messages - QPtrListIterator<KMMessage> it( mRetrievedMsgs ); + TQPtrListIterator<KMMessage> it( mRetrievedMsgs ); KMMessage* msg; while ( (msg = it.current()) != 0 ) { @@ -477,8 +477,8 @@ KMCommand::Result KMMailtoComposeCommand::execute() } -KMMailtoReplyCommand::KMMailtoReplyCommand( QWidget *parent, - const KURL &url, KMMessage *msg, const QString &selection ) +KMMailtoReplyCommand::KMMailtoReplyCommand( TQWidget *parent, + const KURL &url, KMMessage *msg, const TQString &selection ) :KMCommand( parent, msg ), mUrl( url ), mSelection( selection ) { } @@ -502,7 +502,7 @@ KMCommand::Result KMMailtoReplyCommand::execute() } -KMMailtoForwardCommand::KMMailtoForwardCommand( QWidget *parent, +KMMailtoForwardCommand::KMMailtoForwardCommand( TQWidget *parent, const KURL &url, KMMessage *msg ) :KMCommand( parent, msg ), mUrl( url ) { @@ -526,14 +526,14 @@ KMCommand::Result KMMailtoForwardCommand::execute() } -KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, QWidget *parent ) +KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } KMCommand::Result KMAddBookmarksCommand::execute() { - QString filename = locateLocal( "data", QString::fromLatin1("konqueror/bookmarks.xml") ); + TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename, false ); KBookmarkGroup group = bookManager->root(); @@ -546,7 +546,7 @@ KMCommand::Result KMAddBookmarksCommand::execute() } KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url, - QWidget *parent ) + TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -561,7 +561,7 @@ KMCommand::Result KMMailtoAddAddrBookCommand::execute() KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url, - QWidget *parent ) + TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -582,11 +582,11 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KURL &url, KMMainWidget *mainWidget ) KMCommand::Result KMUrlCopyCommand::execute() { - QClipboard* clip = QApplication::clipboard(); + QClipboard* clip = TQApplication::clipboard(); if (mUrl.protocol() == "mailto") { // put the url into the mouse selection and the clipboard - QString address = KMMessage::decodeMailtoUrl( mUrl.path() ); + TQString address = KMMessage::decodeMailtoUrl( mUrl.path() ); clip->setSelectionMode( true ); clip->setText( address ); clip->setSelectionMode( false ); @@ -619,7 +619,7 @@ KMCommand::Result KMUrlOpenCommand::execute() } -KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, QWidget *parent ) +KMUrlSaveCommand::KMUrlSaveCommand( const KURL &url, TQWidget *parent ) : KMCommand( parent ), mUrl( url ) { } @@ -628,7 +628,7 @@ KMCommand::Result KMUrlSaveCommand::execute() { if ( mUrl.isEmpty() ) return OK; - KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), QString::null, + KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), TQString::null, parentWidget() ); if ( saveUrl.isEmpty() ) return Canceled; @@ -641,7 +641,7 @@ KMCommand::Result KMUrlSaveCommand::execute() return Canceled; } KIO::Job *job = KIO::file_copy(mUrl, saveUrl, -1, true); - connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotUrlSaveResult(KIO::Job*))); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotUrlSaveResult(KIO::Job*))); setEmitsCompletedItself( true ); return OK; } @@ -660,7 +660,7 @@ void KMUrlSaveCommand::slotUrlSaveResult( KIO::Job *job ) } -KMEditMsgCommand::KMEditMsgCommand( QWidget *parent, KMMessage *msg ) +KMEditMsgCommand::KMEditMsgCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { } @@ -689,7 +689,7 @@ KMCommand::Result KMEditMsgCommand::execute() return OK; } -KMUseTemplateCommand::KMUseTemplateCommand( QWidget *parent, KMMessage *msg ) +KMUseTemplateCommand::KMUseTemplateCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { } @@ -717,7 +717,7 @@ KMCommand::Result KMUseTemplateCommand::execute() return OK; } -KMShowMsgSrcCommand::KMShowMsgSrcCommand( QWidget *parent, +KMShowMsgSrcCommand::KMShowMsgSrcCommand( TQWidget *parent, KMMessage *msg, bool fixedFont ) :KMCommand( parent, msg ), mFixedFont( fixedFont ) { @@ -733,7 +733,7 @@ KMCommand::Result KMShowMsgSrcCommand::execute() } if ( msg->isComplete() && !mMsgWasComplete ) msg->notify(); // notify observers as msg was transfered - QString str = msg->codec()->toUnicode( msg->asString() ); + TQString str = msg->codec()->toUnicode( msg->asString() ); MailSourceViewer *viewer = new MailSourceViewer(); // deletes itself upon close viewer->setCaption( i18n("Message as Plain Text") ); @@ -741,29 +741,29 @@ KMCommand::Result KMShowMsgSrcCommand::execute() if( mFixedFont ) viewer->setFont(KGlobalSettings::fixedFont()); - // Well, there is no widget to be seen here, so we have to use QCursor::pos() + // Well, there is no widget to be seen here, so we have to use TQCursor::pos() // Update: (GS) I'm not going to make this code behave according to Xinerama // configuration because this is quite the hack. - if (QApplication::desktop()->isVirtualDesktop()) { - int scnum = QApplication::desktop()->screenNumber(QCursor::pos()); - viewer->resize(QApplication::desktop()->screenGeometry(scnum).width()/2, - 2*QApplication::desktop()->screenGeometry(scnum).height()/3); + if (TQApplication::desktop()->isVirtualDesktop()) { + int scnum = TQApplication::desktop()->screenNumber(TQCursor::pos()); + viewer->resize(TQApplication::desktop()->screenGeometry(scnum).width()/2, + 2*TQApplication::desktop()->screenGeometry(scnum).height()/3); } else { - viewer->resize(QApplication::desktop()->geometry().width()/2, - 2*QApplication::desktop()->geometry().height()/3); + viewer->resize(TQApplication::desktop()->geometry().width()/2, + 2*TQApplication::desktop()->geometry().height()/3); } viewer->show(); return OK; } -static KURL subjectToUrl( const QString & subject ) { +static KURL subjectToUrl( const TQString & subject ) { return KFileDialog::getSaveURL( subject.stripWhiteSpace() - .replace( QDir::separator(), '_' ), + .replace( TQDir::separator(), '_' ), "*.mbox" ); } -KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg ) +KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent, KMMessage * msg ) : KMCommand( parent ), mMsgListIndex( 0 ), mStandAloneMessage( 0 ), @@ -787,8 +787,8 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, KMMessage * msg ) mUrl = subjectToUrl( msg->cleanSubject() ); } -KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList ) +KMSaveMsgCommand::KMSaveMsgCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList ) : KMCommand( parent ), mMsgListIndex( 0 ), mStandAloneMessage( 0 ), @@ -803,7 +803,7 @@ KMSaveMsgCommand::KMSaveMsgCommand( QWidget *parent, // We operate on serNums and not the KMMsgBase pointers, as those can // change, or become invalid when changing the current message, switching // folders, etc. - QPtrListIterator<KMMsgBase> it(msgList); + TQPtrListIterator<KMMsgBase> it(msgList); while ( it.current() ) { mMsgList.append( (*it)->getMsgSerNum() ); mTotalSize += (*it)->msgSize(); @@ -826,10 +826,10 @@ KMCommand::Result KMSaveMsgCommand::execute() mJob->slotTotalSize( mTotalSize ); mJob->setAsyncDataEnabled( true ); mJob->setReportDataSent( true ); - connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)), - SLOT(slotSaveDataReq())); - connect(mJob, SIGNAL(result(KIO::Job*)), - SLOT(slotSaveResult(KIO::Job*))); + connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)), + TQT_SLOT(slotSaveDataReq())); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotSaveResult(KIO::Job*))); setEmitsCompletedItself( true ); return OK; } @@ -842,7 +842,7 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( remainingBytes > MAX_CHUNK_SIZE ) remainingBytes = MAX_CHUNK_SIZE; - QByteArray data; + TQByteArray data; data.duplicate( mData.data() + mOffset, remainingBytes ); mJob->sendAsyncData( data ); mOffset += remainingBytes; @@ -861,7 +861,7 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( msg ) { if ( msg->transferInProgress() ) { - QByteArray data = QByteArray(); + TQByteArray data = TQByteArray(); mJob->sendAsyncData( data ); } msg->setTransferInProgress( true ); @@ -872,8 +872,8 @@ void KMSaveMsgCommand::slotSaveDataReq() if ( msg->parent() && !msg->isComplete() ) { FolderJob *job = msg->parent()->createJob( msg ); job->setCancellable( false ); - connect(job, SIGNAL( messageRetrieved( KMMessage* ) ), - this, SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) ); + connect(job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ), + this, TQT_SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) ); job->start(); } } @@ -889,7 +889,7 @@ void KMSaveMsgCommand::slotSaveDataReq() mStandAloneMessage = 0; } else { // No more messages. Tell the putjob we are done. - QByteArray data = QByteArray(); + TQByteArray data = TQByteArray(); mJob->sendAsyncData( data ); } } @@ -904,7 +904,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg) msg->setTransferInProgress(false); mOffset = 0; - QByteArray data; + TQByteArray data; int size; // Unless it is great than 64 k send the whole message. kio buffers for us. if( mData.size() > (unsigned int) MAX_CHUNK_SIZE ) @@ -944,10 +944,10 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job) mJob->slotTotalSize( mTotalSize ); mJob->setAsyncDataEnabled( true ); mJob->setReportDataSent( true ); - connect(mJob, SIGNAL(dataReq(KIO::Job*, QByteArray &)), - SLOT(slotSaveDataReq())); - connect(mJob, SIGNAL(result(KIO::Job*)), - SLOT(slotSaveResult(KIO::Job*))); + connect(mJob, TQT_SIGNAL(dataReq(KIO::Job*, TQByteArray &)), + TQT_SLOT(slotSaveDataReq())); + connect(mJob, TQT_SIGNAL(result(KIO::Job*)), + TQT_SLOT(slotSaveResult(KIO::Job*))); } } else @@ -966,8 +966,8 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job) //----------------------------------------------------------------------------- -KMOpenMsgCommand::KMOpenMsgCommand( QWidget *parent, const KURL & url, - const QString & encoding ) +KMOpenMsgCommand::KMOpenMsgCommand( TQWidget *parent, const KURL & url, + const TQString & encoding ) : KMCommand( parent ), mUrl( url ), mEncoding( encoding ) @@ -987,15 +987,15 @@ KMCommand::Result KMOpenMsgCommand::execute() } mJob = KIO::get( mUrl, false, false ); mJob->setReportDataSent( true ); - connect( mJob, SIGNAL( data( KIO::Job *, const QByteArray & ) ), - this, SLOT( slotDataArrived( KIO::Job*, const QByteArray & ) ) ); - connect( mJob, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); + connect( mJob, TQT_SIGNAL( data( KIO::Job *, const TQByteArray & ) ), + this, TQT_SLOT( slotDataArrived( KIO::Job*, const TQByteArray & ) ) ); + connect( mJob, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); setEmitsCompletedItself( true ); return OK; } -void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const QByteArray & data ) +void KMOpenMsgCommand::slotDataArrived( KIO::Job *, const TQByteArray & data ) { if ( data.isEmpty() ) return; @@ -1075,8 +1075,8 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job ) //TODO: ReplyTo, NoQuoteReplyTo, ReplyList, ReplyToAll, ReplyAuthor // are all similar and should be factored -KMReplyToCommand::KMReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection ) +KMReplyToCommand::KMReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1098,7 +1098,7 @@ KMCommand::Result KMReplyToCommand::execute() } -KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( QWidget *parent, +KMNoQuoteReplyToCommand::KMNoQuoteReplyToCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1121,8 +1121,8 @@ KMCommand::Result KMNoQuoteReplyToCommand::execute() } -KMReplyListCommand::KMReplyListCommand( QWidget *parent, - KMMessage *msg, const QString &selection ) +KMReplyListCommand::KMReplyListCommand( TQWidget *parent, + KMMessage *msg, const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1144,8 +1144,8 @@ KMCommand::Result KMReplyListCommand::execute() } -KMReplyToAllCommand::KMReplyToAllCommand( QWidget *parent, - KMMessage *msg, const QString &selection ) +KMReplyToAllCommand::KMReplyToAllCommand( TQWidget *parent, + KMMessage *msg, const TQString &selection ) :KMCommand( parent, msg ), mSelection( selection ) { } @@ -1167,8 +1167,8 @@ KMCommand::Result KMReplyToAllCommand::execute() } -KMReplyAuthorCommand::KMReplyAuthorCommand( QWidget *parent, KMMessage *msg, - const QString &selection ) +KMReplyAuthorCommand::KMReplyAuthorCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection ) : KMCommand( parent, msg ), mSelection( selection ) { } @@ -1190,14 +1190,14 @@ KMCommand::Result KMReplyAuthorCommand::execute() } -KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity ) +KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity ) : KMCommand( parent, msgList ), mIdentity( identity ) { } -KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, +KMForwardInlineCommand::KMForwardInlineCommand( TQWidget *parent, KMMessage *msg, uint identity ) : KMCommand( parent, msg ), mIdentity( identity ) @@ -1206,12 +1206,12 @@ KMForwardInlineCommand::KMForwardInlineCommand( QWidget *parent, KMCommand::Result KMForwardInlineCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if (msgList.count() >= 2) { // Multiple forward uint id = 0; - QPtrList<KMMessage> linklist; + TQPtrList<KMMessage> linklist; for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) { // set the identity if (id == 0) @@ -1264,23 +1264,23 @@ KMCommand::Result KMForwardInlineCommand::execute() } -KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) +KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) : KMCommand( parent, msgList ), mIdentity( identity ), - mWin( QGuardedPtr<KMail::Composer>( win )) + mWin( TQGuardedPtr<KMail::Composer>( win )) { } -KMForwardAttachedCommand::KMForwardAttachedCommand( QWidget *parent, +KMForwardAttachedCommand::KMForwardAttachedCommand( TQWidget *parent, KMMessage * msg, uint identity, KMail::Composer *win ) : KMCommand( parent, msg ), mIdentity( identity ), - mWin( QGuardedPtr< KMail::Composer >( win )) + mWin( TQGuardedPtr< KMail::Composer >( win )) { } KMCommand::Result KMForwardAttachedCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); KMMessage *fwdMsg = new KMMessage; if (msgList.count() >= 2) { @@ -1327,23 +1327,23 @@ KMCommand::Result KMForwardAttachedCommand::execute() } -KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) +KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, KMail::Composer *win ) : KMCommand( parent, msgList ), mIdentity( identity ), - mWin( QGuardedPtr<KMail::Composer>( win )) + mWin( TQGuardedPtr<KMail::Composer>( win )) { } -KMForwardDigestCommand::KMForwardDigestCommand( QWidget *parent, +KMForwardDigestCommand::KMForwardDigestCommand( TQWidget *parent, KMMessage * msg, uint identity, KMail::Composer *win ) : KMCommand( parent, msg ), mIdentity( identity ), - mWin( QGuardedPtr< KMail::Composer >( win )) + mWin( TQGuardedPtr< KMail::Composer >( win )) { } KMCommand::Result KMForwardDigestCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if ( msgList.count() < 2 ) return Undefined; // must have more than 1 for a digest @@ -1351,7 +1351,7 @@ KMCommand::Result KMForwardDigestCommand::execute() uint id = 0; KMMessage *fwdMsg = new KMMessage; KMMessagePart *msgPart = new KMMessagePart; - QString msgPartText; + TQString msgPartText; int msgCnt = 0; // incase there are some we can't forward for some reason // dummy header initialization; initialization with the correct identity @@ -1359,7 +1359,7 @@ KMCommand::Result KMForwardDigestCommand::execute() fwdMsg->initHeader( id ); fwdMsg->setAutomaticFields( true ); fwdMsg->mMsg->Headers().ContentType().CreateBoundary( 1 ); - QCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() ); + TQCString boundary( fwdMsg->mMsg->Headers().ContentType().Boundary().c_str() ); msgPartText = i18n("\nThis is a MIME digest forward. The content of the" " message is contained in the attachment(s).\n\n\n"); // iterate through all the messages to be forwarded @@ -1369,14 +1369,14 @@ KMCommand::Result KMForwardDigestCommand::execute() id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt(); // set the part header msgPartText += "--"; - msgPartText += QString::fromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "\nContent-Type: MESSAGE/RFC822"; - msgPartText += QString( "; CHARSET=%1" ).arg( msg->charset() ); + msgPartText += TQString( "; CHARSET=%1" ).arg( msg->charset() ); msgPartText += '\n'; DwHeaders dwh; dwh.MessageId().CreateDefault(); - msgPartText += QString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() ); - msgPartText += QString( "Content-Description: %1" ).arg( 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"; @@ -1396,17 +1396,17 @@ KMCommand::Result KMForwardDigestCommand::execute() id = mIdentity; // use folder identity if no message had an id set fwdMsg->initHeader( id ); msgPartText += "--"; - msgPartText += QString::fromLatin1( boundary ); + msgPartText += TQString::fromLatin1( boundary ); msgPartText += "--\n"; - QCString tmp; + TQCString tmp; msgPart->setTypeStr( "MULTIPART" ); tmp.sprintf( "Digest; boundary=\"%s\"", boundary.data() ); msgPart->setSubtypeStr( tmp ); msgPart->setName( "unnamed" ); msgPart->setCte( DwMime::kCte7bit ); // does it have to be 7bit? - msgPart->setContentDescription( QString( "Digest of %1 messages." ).arg( msgCnt ) ); + msgPart->setContentDescription( TQString( "Digest of %1 messages." ).arg( msgCnt ) ); // THIS HAS TO BE AFTER setCte()!!!! - msgPart->setBodyEncoded( QCString( msgPartText.ascii() ) ); + msgPart->setBodyEncoded( TQCString( msgPartText.ascii() ) ); KCursorSaver busy( KBusyPtr::busy() ); KMail::Composer * win = KMail::makeComposer( fwdMsg, id ); win->addAttach( msgPart ); @@ -1414,7 +1414,7 @@ KMCommand::Result KMForwardDigestCommand::execute() return OK; } -KMRedirectCommand::KMRedirectCommand( QWidget *parent, +KMRedirectCommand::KMRedirectCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1428,7 +1428,7 @@ KMCommand::Result KMRedirectCommand::execute() RedirectDialog dlg( parentWidget(), "redirect", true, kmkernel->msgSender()->sendImmediate() ); - if (dlg.exec()==QDialog::Rejected) return Failed; + if (dlg.exec()==TQDialog::Rejected) return Failed; KMMessage *newMsg = msg->createRedirect( dlg.to() ); KMFilterAction::sendMDN( msg, KMime::MDN::Dispatched ); @@ -1444,9 +1444,9 @@ KMCommand::Result KMRedirectCommand::execute() } -KMCustomReplyToCommand::KMCustomReplyToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ) +KMCustomReplyToCommand::KMCustomReplyToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ) : KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl ) { } @@ -1469,9 +1469,9 @@ KMCommand::Result KMCustomReplyToCommand::execute() } -KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( QWidget *parent, KMMessage *msg, - const QString &selection, - const QString &tmpl ) +KMCustomReplyAllToCommand::KMCustomReplyAllToCommand( TQWidget *parent, KMMessage *msg, + const TQString &selection, + const TQString &tmpl ) : KMCommand( parent, msg ), mSelection( selection ), mTemplate( tmpl ) { } @@ -1494,15 +1494,15 @@ KMCommand::Result KMCustomReplyAllToCommand::execute() } -KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, uint identity, const QString &tmpl ) +KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, uint identity, const TQString &tmpl ) : KMCommand( parent, msgList ), mIdentity( identity ), mTemplate( tmpl ) { } -KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, - KMMessage *msg, uint identity, const QString &tmpl ) +KMCustomForwardCommand::KMCustomForwardCommand( TQWidget *parent, + KMMessage *msg, uint identity, const TQString &tmpl ) : KMCommand( parent, msg ), mIdentity( identity ), mTemplate( tmpl ) { @@ -1510,12 +1510,12 @@ KMCustomForwardCommand::KMCustomForwardCommand( QWidget *parent, KMCommand::Result KMCustomForwardCommand::execute() { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); if (msgList.count() >= 2) { // Multiple forward uint id = 0; - QPtrList<KMMessage> linklist; + TQPtrList<KMMessage> linklist; for ( KMMessage *msg = msgList.first(); msg; msg = msgList.next() ) { // set the identity if (id == 0) @@ -1567,9 +1567,9 @@ KMCommand::Result KMCustomForwardCommand::execute() } -KMPrintCommand::KMPrintCommand( QWidget *parent, +KMPrintCommand::KMPrintCommand( TQWidget *parent, KMMessage *msg, bool htmlOverride, bool htmlLoadExtOverride, - bool useFixedFont, const QString & encoding ) + bool useFixedFont, const TQString & encoding ) : KMCommand( parent, msg ), mHtmlOverride( htmlOverride ), mHtmlLoadExtOverride( htmlLoadExtOverride ), mUseFixedFont( useFixedFont ), mEncoding( encoding ) @@ -1578,7 +1578,7 @@ KMPrintCommand::KMPrintCommand( QWidget *parent, } -void KMPrintCommand::setOverrideFont( const QFont& font ) +void KMPrintCommand::setOverrideFont( const TQFont& font ) { mOverrideFont = font; } @@ -1602,14 +1602,14 @@ KMCommand::Result KMPrintCommand::execute() KMSetStatusCommand::KMSetStatusCommand( KMMsgStatus status, - const QValueList<Q_UINT32> &serNums, bool toggle ) + const TQValueList<Q_UINT32> &serNums, bool toggle ) : mStatus( status ), mSerNums( serNums ), mToggle( toggle ) { } KMCommand::Result KMSetStatusCommand::execute() { - QValueListIterator<Q_UINT32> it; + TQValueListIterator<Q_UINT32> it; int idx = -1; KMFolder *folder = 0; bool parentStatus = false; @@ -1627,7 +1627,7 @@ KMCommand::Result KMSetStatusCommand::execute() parentStatus = false; } } - QMap< KMFolder*, QValueList<int> > folderMap; + TQMap< KMFolder*, TQValueList<int> > folderMap; for ( it = mSerNums.begin(); it != mSerNums.end(); ++it ) { KMMsgDict::instance()->getLocation( *it, &folder, &idx ); if (folder) { @@ -1649,19 +1649,19 @@ KMCommand::Result KMSetStatusCommand::execute() folderMap[folder].append(idx); } } - QMapIterator< KMFolder*, QValueList<int> > it2 = folderMap.begin(); + TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin(); while ( it2 != folderMap.end() ) { KMFolder *f = it2.key(); f->setStatus( (*it2), mStatus, mToggle ); ++it2; } - //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", QByteArray() ); + //kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() ); return OK; } -KMFilterCommand::KMFilterCommand( const QCString &field, const QString &value ) +KMFilterCommand::KMFilterCommand( const TQCString &field, const TQString &value ) : mField( field ), mValue( value ) { } @@ -1674,12 +1674,12 @@ KMCommand::Result KMFilterCommand::execute() } -KMFilterActionCommand::KMFilterActionCommand( QWidget *parent, - const QPtrList<KMMsgBase> &msgList, +KMFilterActionCommand::KMFilterActionCommand( TQWidget *parent, + const TQPtrList<KMMsgBase> &msgList, KMFilter *filter ) : KMCommand( parent, msgList ), mFilter( filter ) { - QPtrListIterator<KMMsgBase> it(msgList); + TQPtrListIterator<KMMsgBase> it(msgList); while ( it.current() ) { serNumList.append( (*it)->getMsgSerNum() ); ++it; @@ -1696,16 +1696,16 @@ KMCommand::Result KMFilterActionCommand::execute() ProgressManager::createProgressItem ( "filter"+ProgressManager::getUniqueID(), i18n( "Filtering messages" ) ); progressItem->setTotalItems( msgCountToFilter ); - QValueList<Q_UINT32>::const_iterator it; + TQValueList<Q_UINT32>::const_iterator it; for ( it = serNumList.begin(); it != serNumList.end(); it++ ) { Q_UINT32 serNum = *it; int diff = msgCountToFilter - ++msgCount; if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) { progressItem->updateProgress(); - QString statusMsg = i18n("Filtering message %1 of %2"); + TQString statusMsg = i18n("Filtering message %1 of %2"); statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter ); KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg ); - KApplication::kApplication()->eventLoop()->processEvents( QEventLoop::ExcludeUserInput, 50 ); + KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 ); } int filterResult = kmkernel->filterMgr()->process( serNum, mFilter ); @@ -1726,7 +1726,7 @@ KMCommand::Result KMFilterActionCommand::execute() KMMetaFilterActionCommand::KMMetaFilterActionCommand( KMFilter *filter, KMHeaders *headers, KMMainWidget *main ) - : QObject( main ), + : TQObject( main ), mFilter( filter ), mHeaders( headers ), mMainWidget( main ) { } @@ -1736,7 +1736,7 @@ void KMMetaFilterActionCommand::start() if (ActionScheduler::isEnabled() ) { // use action scheduler KMFilterMgr::FilterSet set = KMFilterMgr::All; - QValueList<KMFilter*> filters; + TQValueList<KMFilter*> filters; filters.append( mFilter ); ActionScheduler *scheduler = new ActionScheduler( set, filters, mHeaders ); scheduler->setAlwaysMatch( true ); @@ -1744,7 +1744,7 @@ void KMMetaFilterActionCommand::start() int contentX, contentY; HeaderItem *nextItem = mHeaders->prepareMove( &contentX, &contentY ); - QPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true); + TQPtrList<KMMsgBase> msgList = *mHeaders->selectedMsgs(true); mHeaders->finalizeMove( nextItem, contentX, contentY ); for (KMMsgBase *msg = msgList.first(); msg; msg = msgList.next()) @@ -1783,7 +1783,7 @@ void FolderShortcutCommand::setAction( KAction* action ) mAction = action; } -KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent, +KMMailingListFilterCommand::KMMailingListFilterCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ) { @@ -1791,8 +1791,8 @@ KMMailingListFilterCommand::KMMailingListFilterCommand( QWidget *parent, KMCommand::Result KMMailingListFilterCommand::execute() { - QCString name; - QString value; + TQCString name; + TQString value; KMMessage *msg = retrievedMessage(); if (!msg) return Failed; @@ -1807,11 +1807,11 @@ KMCommand::Result KMMailingListFilterCommand::execute() void KMMenuCommand::folderToPopupMenu(bool move, - QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ) + TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ) { while ( menu->count() ) { - QPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); + TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup(); if (popup) delete popup; else @@ -1825,7 +1825,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, receiver, aMenuToFolder, menu ); } else { // operate on top-level items - QPopupMenu* subMenu = new QPopupMenu(menu); + TQPopupMenu* subMenu = new TQPopupMenu(menu); makeFolderMenu( &kmkernel->folderMgr()->dir(), move, receiver, aMenuToFolder, subMenu ); menu->insertItem( i18n( "Local Folders" ), subMenu ); @@ -1833,7 +1833,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) { if (node->isDir()) continue; - subMenu = new QPopupMenu(menu); + subMenu = new TQPopupMenu(menu); makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( node->label(), subMenu ); } @@ -1841,7 +1841,7 @@ void KMMenuCommand::folderToPopupMenu(bool move, for (KMFolderNode *node = fdir->first(); node; node = fdir->next()) { if (node->isDir()) continue; - subMenu = new QPopupMenu(menu); + subMenu = new TQPopupMenu(menu); makeFolderMenu( node, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( node->label(), subMenu ); } @@ -1849,20 +1849,20 @@ void KMMenuCommand::folderToPopupMenu(bool move, } void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, - QObject *receiver, KMMenuToFolder *aMenuToFolder, QPopupMenu *menu ) + TQObject *receiver, KMMenuToFolder *aMenuToFolder, TQPopupMenu *menu ) { // connect the signals if (move) { - disconnect(menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int))); - connect(menu, SIGNAL(activated(int)), receiver, - SLOT(moveSelectedToFolder(int))); + disconnect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int))); + connect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(moveSelectedToFolder(int))); } else { - disconnect(menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int))); - connect(menu, SIGNAL(activated(int)), receiver, - SLOT(copySelectedToFolder(int))); + disconnect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int))); + connect(menu, TQT_SIGNAL(activated(int)), receiver, + TQT_SLOT(copySelectedToFolder(int))); } KMFolder *folder = 0; @@ -1893,11 +1893,11 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, if (it->isDir()) continue; KMFolder *child = static_cast<KMFolder*>(it); - QString label = child->label(); + TQString label = child->label(); label.replace("&","&&"); if (child->child() && child->child()->first()) { // descend - QPopupMenu *subMenu = new QPopupMenu(menu, "subMenu"); + TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu"); makeFolderMenu( child, move, receiver, aMenuToFolder, subMenu ); menu->insertItem( label, subMenu ); @@ -1913,7 +1913,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move, KMCopyCommand::KMCopyCommand( KMFolder* destFolder, - const QPtrList<KMMsgBase> &msgList ) + const TQPtrList<KMMsgBase> &msgList ) :mDestFolder( destFolder ), mMsgList( msgList ) { setDeletesItself( true ); @@ -1932,8 +1932,8 @@ KMCommand::Result KMCopyCommand::execute() KMMessage *msg, *newMsg; int idx = -1; bool isMessage; - QPtrList<KMMessage> list; - QPtrList<KMMessage> localList; + TQPtrList<KMMessage> list; + TQPtrList<KMMessage> localList; if (mDestFolder && mDestFolder->open("kmcommand") != 0) { @@ -1986,10 +1986,10 @@ KMCommand::Result KMCopyCommand::execute() FolderJob *job = srcFolder->createJob(newMsg); job->setCancellable( false ); mPendingJobs << job; - connect(job, SIGNAL(messageRetrieved(KMMessage*)), - mDestFolder, SLOT(reallyAddCopyOfMsg(KMMessage*))); - connect( job, SIGNAL(result(KMail::FolderJob*)), - this, SLOT(slotJobFinished(KMail::FolderJob*)) ); + connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)), + mDestFolder, TQT_SLOT(reallyAddCopyOfMsg(KMMessage*))); + connect( job, TQT_SIGNAL(result(KMail::FolderJob*)), + this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) ); job->start(); } else { // local => others @@ -2008,17 +2008,17 @@ KMCommand::Result KMCopyCommand::execute() bool deleteNow = false; if (!localList.isEmpty()) { - QValueList<int> index; + TQValueList<int> index; mDestFolder->addMsg( localList, index ); - for ( QValueListIterator<int> it = index.begin(); it != index.end(); ++it ) { + for ( TQValueListIterator<int> it = index.begin(); it != index.end(); ++it ) { mDestFolder->unGetMsg( *it ); } if ( mDestFolder->folderType() == KMFolderTypeImap ) { if ( mPendingJobs.isEmpty() ) { // wait for the end of the copy before closing the folder KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); - connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); + connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); } } else { deleteNow = list.isEmpty() && mPendingJobs.isEmpty(); // we're done if there are no other mails we need to fetch @@ -2031,8 +2031,8 @@ KMCommand::Result KMCopyCommand::execute() { // copy the message(s); note: the list is empty afterwards! KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); - connect( imapDestFolder, SIGNAL( folderComplete( KMFolderImap*, bool ) ), - this, SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); + connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ), + this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) ); imapDestFolder->copyMsg(list); imapDestFolder->getFolder(); } @@ -2056,9 +2056,9 @@ void KMCopyCommand::slotJobFinished(KMail::FolderJob * job) if ( job->error() ) { kdDebug(5006) << k_funcinfo << "folder job failed: " << job->error() << endl; // kill all pending jobs - for ( QValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) { - disconnect( (*it), SIGNAL(result(KMail::FolderJob*)), - this, SLOT(slotJobFinished(KMail::FolderJob*)) ); + for ( TQValueList<KMail::FolderJob*>::Iterator it = mPendingJobs.begin(); it != mPendingJobs.end(); ++it ) { + disconnect( (*it), TQT_SIGNAL(result(KMail::FolderJob*)), + this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) ); (*it)->kill(); } mPendingJobs.clear(); @@ -2085,10 +2085,10 @@ void KMCopyCommand::slotFolderComplete( KMFolderImap*, bool success ) KMMoveCommand::KMMoveCommand( KMFolder* destFolder, - const QPtrList<KMMsgBase> &msgList) + const TQPtrList<KMMsgBase> &msgList) : mDestFolder( destFolder ), mProgressItem( 0 ) { - QPtrList<KMMsgBase> tmp = msgList; + TQPtrList<KMMsgBase> tmp = msgList; for ( KMMsgBase *msgBase = tmp.first(); msgBase; msgBase = tmp.next() ) mSerNumList.append( msgBase->getMsgSerNum() ); } @@ -2116,7 +2116,7 @@ KMCommand::Result KMMoveCommand::execute() { setEmitsCompletedItself( true ); setDeletesItself( true ); - typedef QMap< KMFolder*, QPtrList<KMMessage>* > FolderToMessageListMap; + typedef TQMap< KMFolder*, TQPtrList<KMMessage>* > FolderToMessageListMap; FolderToMessageListMap folderDeleteList; if (mDestFolder && mDestFolder->open("kmcommand") != 0) { @@ -2131,24 +2131,24 @@ KMCommand::Result KMMoveCommand::execute() ProgressManager::createProgressItem ( "move"+ProgressManager::getUniqueID(), mDestFolder ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) ); - connect( mProgressItem, SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), - this, SLOT( slotMoveCanceled() ) ); + connect( mProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ), + this, TQT_SLOT( slotMoveCanceled() ) ); KMMessage *msg; int rc = 0; int index; - QPtrList<KMMessage> list; + TQPtrList<KMMessage> list; int undoId = -1; mCompleteWithAddedMsg = false; if (mDestFolder) { - connect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); + connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); mLostBoys = mSerNumList; } mProgressItem->setTotalItems( mSerNumList.count() ); - for ( QValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) { + for ( TQValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) { KMFolder *srcFolder; int idx = -1; KMMsgDict::instance()->getLocation( *it, &srcFolder, &idx ); @@ -2178,11 +2178,11 @@ KMCommand::Result KMMoveCommand::execute() * signal so we notice when all the mails should have showed up in it * but haven't for some reason. */ KMFolderImap *imapFolder = static_cast<KMFolderImap*> ( mDestFolder->storage() ); - disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); - connect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + connect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); list.append(msg); } else { // We are moving to a local folder. @@ -2212,7 +2212,7 @@ KMCommand::Result KMMoveCommand::execute() // we are really, really deleting, not just moving to trash if (srcFolder->folderType() == KMFolderTypeImap) { if (!folderDeleteList[srcFolder]) - folderDeleteList[srcFolder] = new QPtrList<KMMessage>; + folderDeleteList[srcFolder] = new TQPtrList<KMMessage>; folderDeleteList[srcFolder]->append( msg ); } else { srcFolder->removeMsg(idx); @@ -2240,8 +2240,8 @@ KMCommand::Result KMMoveCommand::execute() void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool success) { - disconnect (imapFolder, SIGNAL(folderComplete( KMFolderImap*, bool )), - this, SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); + disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )), + this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool ))); if ( success ) { // the folder was checked successfully but we were still called, so check // if we are still waiting for messages to show up. If so, uidValidity @@ -2270,8 +2270,8 @@ void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, Q_UINT32 serNum) mLostBoys.remove(serNum); if ( mLostBoys.isEmpty() ) { // we are done. All messages transferred to the host succesfully - disconnect (mDestFolder, SIGNAL(msgAdded(KMFolder*, Q_UINT32)), - this, SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); + disconnect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)), + this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32))); if (mDestFolder && mDestFolder->folderType() != KMFolderTypeImap) { mDestFolder->sync(); } @@ -2311,7 +2311,7 @@ void KMMoveCommand::slotMoveCanceled() // srcFolder doesn't make much sense for searchFolders KMDeleteMsgCommand::KMDeleteMsgCommand( KMFolder* srcFolder, - const QPtrList<KMMsgBase> &msgList ) + const TQPtrList<KMMsgBase> &msgList ) :KMMoveCommand( findTrashFolder( srcFolder ), msgList) { srcFolder->open("kmcommand"); @@ -2368,9 +2368,9 @@ KMCommand::Result KMUrlClickedCommand::execute() msg->initHeader(mIdentity); msg->setCharset("utf-8"); msg->setTo( KMMessage::decodeMailtoUrl( mUrl.path() ) ); - QString query=mUrl.query(); + TQString query=mUrl.query(); while (!query.isEmpty()) { - QString queryPart; + TQString queryPart; int secondQuery = query.find('?',1); if (secondQuery != -1) queryPart = query.left(secondQuery); @@ -2411,7 +2411,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>" ) - .arg( mUrl.prettyURL() ), QString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) + .arg( mUrl.prettyURL() ), TQString::null, i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes) return Canceled; } KRun * runner = new KRun( mUrl ); @@ -2423,21 +2423,21 @@ KMCommand::Result KMUrlClickedCommand::execute() return OK; } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, KMMessage *msg ) +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, KMMessage *msg ) : KMCommand( parent, msg ), mImplicitAttachments( true ), mEncoded( false ) { } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, const QPtrList<KMMsgBase>& msgs ) +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, const TQPtrList<KMMsgBase>& msgs ) : KMCommand( parent, msgs ), mImplicitAttachments( true ), mEncoded( false ) { } -KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( QWidget *parent, QPtrList<partNode>& attachments, +KMSaveAttachmentsCommand::KMSaveAttachmentsCommand( TQWidget *parent, TQPtrList<partNode>& attachments, KMMessage *msg, bool encoded ) : KMCommand( parent ), mImplicitAttachments( false ), mEncoded( encoded ) { - for ( QPtrListIterator<partNode> it( attachments ); it.current(); ++it ) { + for ( TQPtrListIterator<partNode> it( attachments ); it.current(); ++it ) { mAttachmentMap.insert( it.current(), msg ); } } @@ -2446,9 +2446,9 @@ KMCommand::Result KMSaveAttachmentsCommand::execute() { setEmitsCompletedItself( true ); if ( mImplicitAttachments ) { - QPtrList<KMMessage> msgList = retrievedMsgs(); + TQPtrList<KMMessage> msgList = retrievedMsgs(); KMMessage *msg; - for ( QPtrListIterator<KMMessage> itr( msgList ); + for ( TQPtrListIterator<KMMessage> itr( msgList ); ( msg = itr.current() ); ++itr ) { partNode *rootNode = partNode::fromMessage( msg ); @@ -2464,8 +2464,8 @@ KMCommand::Result KMSaveAttachmentsCommand::execute() setDeletesItself( true ); // load all parts KMLoadPartsCommand *command = new KMLoadPartsCommand( mAttachmentMap ); - connect( command, SIGNAL( partsRetrieved() ), - this, SLOT( slotSaveAll() ) ); + connect( command, TQT_SIGNAL( partsRetrieved() ), + this, TQT_SLOT( slotSaveAll() ) ); command->start(); return OK; @@ -2504,7 +2504,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() KURL url, dirUrl; if ( mAttachmentMap.count() > 1 ) { // get the dir - dirUrl = KDirSelectDialog::selectDirectory( QString::null, false, + dirUrl = KDirSelectDialog::selectDirectory( TQString::null, false, parentWidget(), i18n("Save Attachments To") ); if ( !dirUrl.isValid() ) { @@ -2521,14 +2521,14 @@ void KMSaveAttachmentsCommand::slotSaveAll() // only one item, get the desired filename partNode *node = mAttachmentMap.begin().key(); // replace all ':' with '_' because ':' isn't allowed on FAT volumes - QString s = + TQString s = node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = i18n("filename for an unnamed attachment", "attachment.1"); - url = KFileDialog::getSaveURL( s, QString::null, parentWidget(), - QString::null ); + url = KFileDialog::getSaveURL( s, TQString::null, parentWidget(), + TQString::null ); if ( url.isEmpty() ) { setResult( Canceled ); emit completed( this ); @@ -2537,7 +2537,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() } } - QMap< QString, int > renameNumbering; + TQMap< TQString, int > renameNumbering; Result globalResult = OK; int unnamedAtmCount = 0; @@ -2547,7 +2547,7 @@ void KMSaveAttachmentsCommand::slotSaveAll() KURL curUrl; if ( !dirUrl.isEmpty() ) { curUrl = dirUrl; - QString s = + TQString s = it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' ); if ( s.isEmpty() ) s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' ); @@ -2566,14 +2566,14 @@ void KMSaveAttachmentsCommand::slotSaveAll() // Rename the file if we have already saved one with the same name: // try appending a number before extension (e.g. "pic.jpg" => "pic_2.jpg") - QString origFile = curUrl.fileName(); - QString file = origFile; + TQString origFile = curUrl.fileName(); + TQString file = origFile; while ( renameNumbering.contains(file) ) { file = origFile; int num = renameNumbering[file] + 1; int dotIdx = file.findRev('.'); - file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), QString("_") + QString::number(num) ); + file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) ); } curUrl.setFileName(file); @@ -2632,7 +2632,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, KMessageBox::Yes ) bSaveWithSig = false; - QByteArray data; + TQByteArray data; if ( mEncoded ) { // This does not decode the Message Content-Transfer-Encoding @@ -2643,7 +2643,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, { if( bSaveEncrypted || !bEncryptedParts) { partNode *dataNode = node; - QCString rawReplyString; + TQCString rawReplyString; bool gotRawReplyString = false; if( !bSaveWithSig ) { if( DwMime::kTypeMultipart == node->type() && @@ -2677,7 +2677,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, gotRawReplyString = true; } } - QByteArray cstr = gotRawReplyString + TQByteArray cstr = gotRawReplyString ? rawReplyString : dataNode->msgPart().bodyDecodedBinary(); data = cstr; @@ -2689,8 +2689,8 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, data.resize( size ); } } - QDataStream ds; - QFile file; + TQDataStream ds; + TQFile file; KTempFile tf; tf.setAutoDelete( true ); if ( url.isLocalFile() ) @@ -2703,7 +2703,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, i18n( "%2 is detailed error description", "Could not write the file %1:\n%2" ) .arg( file.name() ) - .arg( QString::fromLocal8Bit( strerror( errno ) ) ), + .arg( TQString::fromLocal8Bit( strerror( errno ) ) ), i18n( "KMail Error" ) ); return Failed; } @@ -2736,10 +2736,10 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node, return OK; } -KMLoadPartsCommand::KMLoadPartsCommand( QPtrList<partNode>& parts, KMMessage *msg ) +KMLoadPartsCommand::KMLoadPartsCommand( TQPtrList<partNode>& parts, KMMessage *msg ) : mNeedsRetrieval( 0 ) { - for ( QPtrListIterator<partNode> it( parts ); it.current(); ++it ) { + for ( TQPtrListIterator<partNode> it( parts ); it.current(); ++it ) { mPartMap.insert( it.current(), msg ); } } @@ -2770,8 +2770,8 @@ void KMLoadPartsCommand::slotStart() curFolder->createJob( it.data(), FolderJob::tGetMessage, 0, it.key()->msgPart().partSpecifier() ); job->setCancellable( false ); - connect( job, SIGNAL(messageUpdated(KMMessage*, QString)), - this, SLOT(slotPartRetrieved(KMMessage*, QString)) ); + connect( job, TQT_SIGNAL(messageUpdated(KMMessage*, TQString)), + this, TQT_SLOT(slotPartRetrieved(KMMessage*, TQString)) ); job->start(); } else kdWarning(5006) << "KMLoadPartsCommand - msg has no parent" << endl; @@ -2782,7 +2782,7 @@ void KMLoadPartsCommand::slotStart() } void KMLoadPartsCommand::slotPartRetrieved( KMMessage *msg, - QString partSpecifier ) + TQString partSpecifier ) { DwBodyPart *part = msg->findDwBodyPart( msg->getFirstDwBodyPart(), partSpecifier ); @@ -2810,7 +2810,7 @@ KMCommand::Result KMLoadPartsCommand::execute() return OK; } -KMResendMessageCommand::KMResendMessageCommand( QWidget *parent, +KMResendMessageCommand::KMResendMessageCommand( TQWidget *parent, KMMessage *msg ) :KMCommand( parent, msg ) { @@ -2824,7 +2824,7 @@ KMCommand::Result KMResendMessageCommand::execute() } KMMessage *newMsg = new KMMessage(*msg); - QStringList whiteList; + TQStringList whiteList; whiteList << "To" << "Cc" << "Bcc" << "Subject"; newMsg->sanitizeHeaders( whiteList ); @@ -2832,7 +2832,7 @@ KMCommand::Result KMResendMessageCommand::execute() newMsg->setParent( 0 ); // make sure we have an identity set, default, if necessary - newMsg->setHeaderField("X-KMail-Identity", QString::number( newMsg->identityUoid() )); + newMsg->setHeaderField("X-KMail-Identity", TQString::number( newMsg->identityUoid() )); newMsg->applyIdentity( newMsg->identityUoid() ); KMail::Composer * win = KMail::makeComposer(); @@ -2842,7 +2842,7 @@ KMCommand::Result KMResendMessageCommand::execute() return OK; } -KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder ) +KMMailingListCommand::KMMailingListCommand( TQWidget *parent, KMFolder *folder ) : KMCommand( parent ), mFolder( folder ) { } @@ -2850,7 +2850,7 @@ KMMailingListCommand::KMMailingListCommand( QWidget *parent, KMFolder *folder ) KMCommand::Result KMMailingListCommand::execute() { KURL::List lst = urls(); - QString handler = ( mFolder->mailingList().handler() == MailingList::KMail ) + TQString handler = ( mFolder->mailingList().handler() == MailingList::KMail ) ? "mailto" : "https"; KMCommand *command = 0; @@ -2864,8 +2864,8 @@ KMCommand::Result KMMailingListCommand::execute() new KMUrlClickedCommand( lst.first(), mFolder->identity(), 0, false ); } if ( command ) { - connect( command, SIGNAL( completed( KMCommand * ) ), - this, SLOT( commandCompleted( KMCommand * ) ) ); + connect( command, TQT_SIGNAL( completed( KMCommand * ) ), + this, TQT_SLOT( commandCompleted( KMCommand * ) ) ); setDeletesItself( true ); setEmitsCompletedItself( true ); command->start(); @@ -2881,7 +2881,7 @@ void KMMailingListCommand::commandCompleted( KMCommand *command ) deleteLater(); } -KMMailingListPostCommand::KMMailingListPostCommand( QWidget *parent, KMFolder *folder ) +KMMailingListPostCommand::KMMailingListPostCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2890,7 +2890,7 @@ KURL::List KMMailingListPostCommand::urls() const return mFolder->mailingList().postURLS(); } -KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( QWidget *parent, KMFolder *folder ) +KMMailingListSubscribeCommand::KMMailingListSubscribeCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2899,7 +2899,7 @@ KURL::List KMMailingListSubscribeCommand::urls() const return mFolder->mailingList().subscribeURLS(); } -KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( QWidget *parent, KMFolder *folder ) +KMMailingListUnsubscribeCommand::KMMailingListUnsubscribeCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2908,7 +2908,7 @@ KURL::List KMMailingListUnsubscribeCommand::urls() const return mFolder->mailingList().unsubscribeURLS(); } -KMMailingListArchivesCommand::KMMailingListArchivesCommand( QWidget *parent, KMFolder *folder ) +KMMailingListArchivesCommand::KMMailingListArchivesCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2917,7 +2917,7 @@ KURL::List KMMailingListArchivesCommand::urls() const return mFolder->mailingList().archiveURLS(); } -KMMailingListHelpCommand::KMMailingListHelpCommand( QWidget *parent, KMFolder *folder ) +KMMailingListHelpCommand::KMMailingListHelpCommand( TQWidget *parent, KMFolder *folder ) : KMMailingListCommand( parent, folder ) { } @@ -2934,7 +2934,7 @@ KMIMChatCommand::KMIMChatCommand( const KURL &url, KMMessage *msg ) KMCommand::Result KMIMChatCommand::execute() { kdDebug( 5006 ) << k_funcinfo << " URL is: " << mUrl << endl; - QString addr = KMMessage::decodeMailtoUrl( mUrl.path() ); + TQString addr = KMMessage::decodeMailtoUrl( mUrl.path() ); // find UID for mail address KABC::AddressBook *addressBook = KABC::StdAddressBook::self( true ); KABC::AddresseeList addressees = addressBook->findByEmail( KPIM::getEmailAddress( addr ) ) ; @@ -2948,20 +2948,20 @@ KMCommand::Result KMIMChatCommand::execute() { kdDebug( 5006 ) << "Didn't find exactly one addressee, couldn't tell who to chat to for that email address. Count = " << addressees.count() << endl; - QString apology; + TQString apology; if ( addressees.isEmpty() ) apology = i18n( "There is no Address Book entry for this email address. Add them to the Address Book and then add instant messaging addresses using your preferred messaging client." ); else { apology = i18n( "More than one Address Book entry uses this email address:\n %1\n it is not possible to determine who to chat with." ); - QStringList nameList; + TQStringList nameList; KABC::AddresseeList::const_iterator it = addressees.begin(); KABC::AddresseeList::const_iterator end = addressees.end(); for ( ; it != end; ++it ) { nameList.append( (*it).realName() ); } - QString names = nameList.join( QString::fromLatin1( ",\n" ) ); + TQString names = nameList.join( TQString::fromLatin1( ",\n" ) ); apology = apology.arg( names ); } @@ -2971,8 +2971,8 @@ KMCommand::Result KMIMChatCommand::execute() } KMHandleAttachmentCommand::KMHandleAttachmentCommand( partNode* node, - KMMessage* msg, int atmId, const QString& atmName, - AttachmentAction action, KService::Ptr offer, QWidget* parent ) + KMMessage* msg, int atmId, const TQString& atmName, + AttachmentAction action, KService::Ptr offer, TQWidget* parent ) : KMCommand( parent ), mNode( node ), mMsg( msg ), mAtmId( atmId ), mAtmName( atmName ), mAction( action ), mOffer( offer ), mJob( 0 ) { @@ -2985,8 +2985,8 @@ void KMHandleAttachmentCommand::slotStart() // load the part kdDebug(5006) << "load part" << endl; KMLoadPartsCommand *command = new KMLoadPartsCommand( mNode, mMsg ); - connect( command, SIGNAL( partsRetrieved() ), - this, SLOT( slotPartComplete() ) ); + connect( command, TQT_SIGNAL( partsRetrieved() ), + this, TQT_SLOT( slotPartComplete() ) ); command->start(); } else { @@ -3032,15 +3032,15 @@ KMCommand::Result KMHandleAttachmentCommand::execute() return OK; } -QString KMHandleAttachmentCommand::createAtmFileLink() const +TQString KMHandleAttachmentCommand::createAtmFileLink() const { - QFileInfo atmFileInfo( mAtmName ); + TQFileInfo atmFileInfo( mAtmName ); if ( atmFileInfo.size() == 0 ) { kdDebug(5006) << k_funcinfo << "rewriting attachment" << endl; // there is something wrong so write the file again - QByteArray data = mNode->msgPart().bodyDecodedBinary(); + TQByteArray data = mNode->msgPart().bodyDecodedBinary(); size_t size = data.size(); if ( mNode->msgPart().type() == DwMime::kTypeText && size) { // convert CRLF to LF before writing text attachments to disk @@ -3053,19 +3053,19 @@ QString KMHandleAttachmentCommand::createAtmFileLink() const "]."+ atmFileInfo.extension() ); linkFile->setAutoDelete(true); - QString linkName = linkFile->name(); + TQString linkName = linkFile->name(); delete linkFile; - if ( ::link(QFile::encodeName( mAtmName ), QFile::encodeName( linkName )) == 0 ) { + if ( ::link(TQFile::encodeName( mAtmName ), TQFile::encodeName( linkName )) == 0 ) { return linkName; // success } - return QString::null; + return TQString::null; } KService::Ptr KMHandleAttachmentCommand::getServiceOffer() { KMMessagePart& msgPart = mNode->msgPart(); - const QString contentTypeStr = + const TQString contentTypeStr = ( msgPart.typeStr() + '/' + msgPart.subtypeStr() ).lower(); if ( contentTypeStr == "text/x-vcard" ) { @@ -3101,7 +3101,7 @@ void KMHandleAttachmentCommand::atmOpen() KURL::List lst; KURL url; bool autoDelete = true; - QString fname = createAtmFileLink(); + TQString fname = createAtmFileLink(); if ( fname.isNull() ) { autoDelete = false; @@ -3111,7 +3111,7 @@ void KMHandleAttachmentCommand::atmOpen() url.setPath( fname ); lst.append( url ); if ( (KRun::run( *mOffer, lst, autoDelete ) <= 0) && autoDelete ) { - QFile::remove(url.path()); + TQFile::remove(url.path()); } } @@ -3120,7 +3120,7 @@ void KMHandleAttachmentCommand::atmOpenWith() KURL::List lst; KURL url; bool autoDelete = true; - QString fname = createAtmFileLink(); + TQString fname = createAtmFileLink(); if ( fname.isNull() ) { autoDelete = false; @@ -3130,7 +3130,7 @@ void KMHandleAttachmentCommand::atmOpenWith() url.setPath( fname ); lst.append( url ); if ( (! KRun::displayOpenWithDialog(lst, autoDelete)) && autoDelete ) { - QFile::remove( url.path() ); + TQFile::remove( url.path() ); } } @@ -3142,7 +3142,7 @@ void KMHandleAttachmentCommand::atmView() void KMHandleAttachmentCommand::atmSave() { - QPtrList<partNode> parts; + TQPtrList<partNode> parts; parts.append( mNode ); // save, do not leave encoded KMSaveAttachmentsCommand *command = @@ -3175,9 +3175,9 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() if ( !chiasmus ) return; - 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() ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-obtain-keys\" function. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; @@ -3188,18 +3188,18 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() return; } - const QVariant result = listjob->property( "result" ); - if ( result.type() != QVariant::StringList ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + const TQVariant result = listjob->property( "result" ); + if ( result.type() != TQVariant::StringList ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-obtain-keys\" function did not return a " "string list. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const QStringList keys = result.toStringList(); + const TQStringList keys = result.toStringList(); if ( keys.empty() ) { - const QString msg = i18n( "No keys have been found. Please check that a " + const TQString msg = i18n( "No keys have been found. Please check that a " "valid key path has been set in the Chiasmus " "configuration." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); @@ -3209,27 +3209,27 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() ChiasmusKeySelector selectorDlg( parentWidget(), i18n( "Chiasmus Decryption Key Selection" ), keys, GlobalSettings::chiasmusDecryptionKey(), GlobalSettings::chiasmusDecryptionOptions() ); - if ( selectorDlg.exec() != QDialog::Accepted ) + if ( selectorDlg.exec() != TQDialog::Accepted ) return; 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 ) { - const QString msg = i18n( "Chiasmus backend does not offer the " + const TQString msg = i18n( "Chiasmus backend does not offer the " "\"x-decrypt\" function. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const QByteArray input = node->msgPart().bodyDecodedBinary(); + const TQByteArray input = node->msgPart().bodyDecodedBinary(); if ( !job->setProperty( "key", GlobalSettings::chiasmusDecryptionKey() ) || !job->setProperty( "options", GlobalSettings::chiasmusDecryptionOptions() ) || !job->setProperty( "input", input ) ) { - const QString msg = i18n( "The \"x-decrypt\" function does not accept " + const TQString msg = i18n( "The \"x-decrypt\" function does not accept " "the expected parameters. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; @@ -3242,15 +3242,15 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus() } mJob = job; - connect( job, SIGNAL(result(const GpgME::Error&,const QVariant&)), - this, SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const QVariant&)) ); + connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQVariant&)), + this, TQT_SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const TQVariant&)) ); } -static const QString chomp( const QString & base, const QString & suffix, bool cs ) { +static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) { return base.endsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ; } -void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const QVariant & result ) +void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const TQVariant & result ) { LaterDeleterWithCommandCompletion d( this ); if ( !mJob ) @@ -3267,15 +3267,15 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E return; } - if ( result.type() != QVariant::ByteArray ) { - const QString msg = i18n( "Unexpected return value from Chiasmus backend: " + if ( result.type() != TQVariant::ByteArray ) { + const TQString msg = i18n( "Unexpected return value from Chiasmus backend: " "The \"x-decrypt\" function did not return a " "byte array. Please report this bug." ); KMessageBox::error( parentWidget(), msg, i18n( "Chiasmus Backend Error" ) ); return; } - const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), QString::null, parentWidget() ); + const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString::null, parentWidget() ); if ( url.isEmpty() ) return; @@ -3286,8 +3286,8 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E d.setDisabled( true ); // we got this far, don't delete yet KIO::Job * uploadJob = KIO::storedPut( result.toByteArray(), url, -1, overwrite, false /*resume*/ ); uploadJob->setWindow( parentWidget() ); - connect( uploadJob, SIGNAL(result(KIO::Job*)), - this, SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) ); + connect( uploadJob, TQT_SIGNAL(result(KIO::Job*)), + this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) ); } void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job * job ) @@ -3299,7 +3299,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( KIO::Job } -AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, QWidget * parent) : +AttachmentModifyCommand::AttachmentModifyCommand(partNode * node, KMMessage * msg, TQWidget * parent) : KMCommand( parent, msg ), mPartIndex( node->nodeId() ), mSernum( 0 ) @@ -3341,8 +3341,8 @@ void AttachmentModifyCommand::storeChangedMessage(KMMessage * msg) int res = mFolder->addMsg( msg ) != 0; if ( mFolder->folderType() == KMFolderTypeImap ) { KMFolderImap *f = static_cast<KMFolderImap*>( mFolder->storage() ); - connect( f, SIGNAL(folderComplete(KMFolderImap*,bool)), - SLOT(messageStoreResult(KMFolderImap*,bool)) ); + connect( f, TQT_SIGNAL(folderComplete(KMFolderImap*,bool)), + TQT_SLOT(messageStoreResult(KMFolderImap*,bool)) ); } else { messageStoreResult( 0, res == 0 ); } @@ -3353,7 +3353,7 @@ void AttachmentModifyCommand::messageStoreResult(KMFolderImap* folder, bool succ Q_UNUSED( folder ); if ( success ) { KMCommand *delCmd = new KMDeleteMsgCommand( mSernum ); - connect( delCmd, SIGNAL(completed(KMCommand*)), SLOT(messageDeleteResult(KMCommand*)) ); + connect( delCmd, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(messageDeleteResult(KMCommand*)) ); delCmd->start(); return; } @@ -3393,7 +3393,7 @@ DwBodyPart * AttachmentModifyCommand::findPartInternal(DwEntity * root, int inde } -KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) : +KMDeleteAttachmentCommand::KMDeleteAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) : AttachmentModifyCommand( node, msg, parent ) { kdDebug(5006) << k_funcinfo << endl; @@ -3423,12 +3423,12 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify() // add dummy part to show that a attachment has been deleted KMMessagePart dummyPart; dummyPart.duplicate( part ); - QString comment = i18n("This attachment has been deleted."); + TQString comment = i18n("This attachment has been deleted."); if ( !part.fileName().isEmpty() ) comment = i18n( "The attachment '%1' has been deleted." ).arg( part.fileName() ); dummyPart.setContentDescription( comment ); - dummyPart.setBodyEncodedBinary( QByteArray() ); - QCString cd = dummyPart.contentDisposition(); + dummyPart.setBodyEncodedBinary( TQByteArray() ); + TQCString cd = dummyPart.contentDisposition(); if ( cd.find( "inline", 0, false ) == 0 ) { cd.replace( 0, 10, "attachment" ); dummyPart.setContentDisposition( cd ); @@ -3448,7 +3448,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify() } -KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, QWidget * parent) : +KMEditAttachmentCommand::KMEditAttachmentCommand(partNode * node, KMMessage * msg, TQWidget * parent) : AttachmentModifyCommand( node, msg, parent ) { kdDebug(5006) << k_funcinfo << endl; @@ -3477,7 +3477,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify() mTempFile.file()->flush(); KMail::EditorWatcher *watcher = new KMail::EditorWatcher( KURL(mTempFile.file()->name()), part.typeStr() + "/" + part.subtypeStr(), false, this ); - connect( watcher, SIGNAL(editDone(KMail::EditorWatcher*)), SLOT(editDone(KMail::EditorWatcher*)) ); + connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) ); if ( !watcher->start() ) return Failed; setEmitsCompletedItself( true ); @@ -3497,7 +3497,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher) } mTempFile.file()->reset(); - QByteArray data = mTempFile.file()->readAll(); + TQByteArray data = mTempFile.file()->readAll(); // build the new message KMMessage *msg = retrievedMessage(); @@ -3525,7 +3525,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher) } -CreateTodoCommand::CreateTodoCommand(QWidget * parent, KMMessage * msg) +CreateTodoCommand::CreateTodoCommand(TQWidget * parent, KMMessage * msg) : KMCommand( parent, msg ) { } @@ -3539,18 +3539,18 @@ KMCommand::Result CreateTodoCommand::execute() KMail::KorgHelper::ensureRunning(); - QString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() ) + TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() ) .arg( msg->to() ).arg( msg->subject() ); KTempFile tf; tf.setAutoDelete( true ); - QString uri = "kmail:" + QString::number( msg->getMsgSerNum() ) + "/" + msg->msgId(); + TQString uri = "kmail:" + TQString::number( msg->getMsgSerNum() ) + "/" + msg->msgId(); tf.file()->writeBlock( msg->asDwString().c_str(), msg->asDwString().length() ); tf.close(); KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" ); iface->openTodoEditor( i18n("Mail: %1").arg( msg->subject() ), txt, - uri, tf.name(), QStringList(), "message/rfc822" ); + uri, tf.name(), TQStringList(), "message/rfc822" ); delete iface; return OK; |