summaryrefslogtreecommitdiffstats
path: root/kmail/kmcommands.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-01-14 12:33:20 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-01-14 12:43:48 +0900
commit3b3f9ec8f31978030c17309fae48335bea5c1587 (patch)
tree0b493383a1501860371aacd792ec6fc08d595824 /kmail/kmcommands.cpp
parent99e6e1d1f43610c3573e9824a2a8a38f69930cd0 (diff)
downloadtdepim-3b3f9ec8f31978030c17309fae48335bea5c1587.tar.gz
tdepim-3b3f9ec8f31978030c17309fae48335bea5c1587.zip
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r--kmail/kmcommands.cpp148
1 files changed, 74 insertions, 74 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 5239ceda..26e62f7e 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -202,7 +202,7 @@ KMCommand::Result KMCommand::result()
void KMCommand::start()
{
- TQTimer::singleShot( 0, this, TQT_SLOT( slotStart() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( slotStart() ) );
}
@@ -225,8 +225,8 @@ int KMCommand::mCountJobs = 0;
void KMCommand::slotStart()
{
- connect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ),
- this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) );
+ connect( this, TQ_SIGNAL( messagesTransfered( KMCommand::Result ) ),
+ this, TQ_SLOT( slotPostTransfer( KMCommand::Result ) ) );
kmkernel->filterMgr()->ref();
if (mMsgList.find(0) != -1) {
@@ -261,8 +261,8 @@ void KMCommand::slotStart()
void KMCommand::slotPostTransfer( KMCommand::Result result )
{
- disconnect( this, TQT_SIGNAL( messagesTransfered( KMCommand::Result ) ),
- this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) );
+ disconnect( this, TQ_SIGNAL( messagesTransfered( KMCommand::Result ) ),
+ this, TQ_SLOT( slotPostTransfer( KMCommand::Result ) ) );
if ( result == OK )
result = execute();
mResult = result;
@@ -339,13 +339,13 @@ void KMCommand::transferSelectedMsgs()
job->setCancellable( false );
totalSize += thisMsg->msgSizeServer();
// emitted when the message was transferred successfully
- connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
- this, TQT_SLOT(slotMsgTransfered(KMMessage*)));
+ connect(job, TQ_SIGNAL(messageRetrieved(KMMessage*)),
+ this, TQ_SLOT(slotMsgTransfered(KMMessage*)));
// emitted when the job is destroyed
- 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)));
+ connect(job, TQ_SIGNAL(finished()),
+ this, TQ_SLOT(slotJobFinished()));
+ connect(job, TQ_SIGNAL(progress(unsigned long, unsigned long)),
+ this, TQ_SLOT(slotProgress(unsigned long, unsigned long)));
// msg musn't be deleted
thisMsg->setTransferInProgress(true);
job->start();
@@ -363,8 +363,8 @@ void KMCommand::transferSelectedMsgs()
} else {
// wait for the transfer and tell the progressBar the necessary steps
if ( mProgressDialog ) {
- connect(mProgressDialog, TQT_SIGNAL(cancelClicked()),
- this, TQT_SLOT(slotTransferCancelled()));
+ connect(mProgressDialog, TQ_SIGNAL(cancelClicked()),
+ this, TQ_SLOT(slotTransferCancelled()));
mProgressDialog->progressBar()->setTotalSteps(totalSize);
}
}
@@ -645,7 +645,7 @@ KMCommand::Result KMUrlSaveCommand::execute()
return Canceled;
}
TDEIO::Job *job = TDEIO::file_copy(mUrl, saveUrl, -1, true);
- connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotUrlSaveResult(TDEIO::Job*)));
+ connect(job, TQ_SIGNAL(result(TDEIO::Job*)), TQ_SLOT(slotUrlSaveResult(TDEIO::Job*)));
setEmitsCompletedItself( true );
return OK;
}
@@ -845,10 +845,10 @@ KMCommand::Result KMSaveMsgCommand::execute()
mJob->slotTotalSize( mTotalSize );
mJob->setAsyncDataEnabled( true );
mJob->setReportDataSent( true );
- connect(mJob, TQT_SIGNAL(dataReq(TDEIO::Job*, TQByteArray &)),
- TQT_SLOT(slotSaveDataReq()));
- connect(mJob, TQT_SIGNAL(result(TDEIO::Job*)),
- TQT_SLOT(slotSaveResult(TDEIO::Job*)));
+ connect(mJob, TQ_SIGNAL(dataReq(TDEIO::Job*, TQByteArray &)),
+ TQ_SLOT(slotSaveDataReq()));
+ connect(mJob, TQ_SIGNAL(result(TDEIO::Job*)),
+ TQ_SLOT(slotSaveResult(TDEIO::Job*)));
setEmitsCompletedItself( true );
return OK;
}
@@ -898,8 +898,8 @@ void KMSaveMsgCommand::slotSaveDataReq()
if ( msg->parent() && !msg->isComplete() ) {
FolderJob *job = msg->parent()->createJob( msg );
job->setCancellable( false );
- connect(job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ),
- this, TQT_SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) );
+ connect(job, TQ_SIGNAL( messageRetrieved( KMMessage* ) ),
+ this, TQ_SLOT( slotMessageRetrievedForSaving( KMMessage* ) ) );
job->start();
}
}
@@ -971,10 +971,10 @@ void KMSaveMsgCommand::slotSaveResult(TDEIO::Job *job)
mJob->slotTotalSize( mTotalSize );
mJob->setAsyncDataEnabled( true );
mJob->setReportDataSent( true );
- connect(mJob, TQT_SIGNAL(dataReq(TDEIO::Job*, TQByteArray &)),
- TQT_SLOT(slotSaveDataReq()));
- connect(mJob, TQT_SIGNAL(result(TDEIO::Job*)),
- TQT_SLOT(slotSaveResult(TDEIO::Job*)));
+ connect(mJob, TQ_SIGNAL(dataReq(TDEIO::Job*, TQByteArray &)),
+ TQ_SLOT(slotSaveDataReq()));
+ connect(mJob, TQ_SIGNAL(result(TDEIO::Job*)),
+ TQ_SLOT(slotSaveResult(TDEIO::Job*)));
}
}
else
@@ -1014,10 +1014,10 @@ KMCommand::Result KMOpenMsgCommand::execute()
}
mJob = TDEIO::get( mUrl, false, false );
mJob->setReportDataSent( true );
- connect( mJob, TQT_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
- this, TQT_SLOT( slotDataArrived( TDEIO::Job*, const TQByteArray & ) ) );
- connect( mJob, TQT_SIGNAL( result( TDEIO::Job * ) ),
- TQT_SLOT( slotResult( TDEIO::Job * ) ) );
+ connect( mJob, TQ_SIGNAL( data( TDEIO::Job *, const TQByteArray & ) ),
+ this, TQ_SLOT( slotDataArrived( TDEIO::Job*, const TQByteArray & ) ) );
+ connect( mJob, TQ_SIGNAL( result( TDEIO::Job * ) ),
+ TQ_SLOT( slotResult( TDEIO::Job * ) ) );
setEmitsCompletedItself( true );
return OK;
}
@@ -1904,15 +1904,15 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
// connect the signals
if (move)
{
- disconnect(menu, TQT_SIGNAL(activated(int)), receiver,
- TQT_SLOT(moveSelectedToFolder(int)));
- connect(menu, TQT_SIGNAL(activated(int)), receiver,
- TQT_SLOT(moveSelectedToFolder(int)));
+ disconnect(menu, TQ_SIGNAL(activated(int)), receiver,
+ TQ_SLOT(moveSelectedToFolder(int)));
+ connect(menu, TQ_SIGNAL(activated(int)), receiver,
+ TQ_SLOT(moveSelectedToFolder(int)));
} else {
- disconnect(menu, TQT_SIGNAL(activated(int)), receiver,
- TQT_SLOT(copySelectedToFolder(int)));
- connect(menu, TQT_SIGNAL(activated(int)), receiver,
- TQT_SLOT(copySelectedToFolder(int)));
+ disconnect(menu, TQ_SIGNAL(activated(int)), receiver,
+ TQ_SLOT(copySelectedToFolder(int)));
+ connect(menu, TQ_SIGNAL(activated(int)), receiver,
+ TQ_SLOT(copySelectedToFolder(int)));
}
KMFolder *folder = 0;
@@ -2036,10 +2036,10 @@ KMCommand::Result KMCopyCommand::execute()
FolderJob *job = srcFolder->createJob(newMsg);
job->setCancellable( false );
mPendingJobs << job;
- connect(job, TQT_SIGNAL(messageRetrieved(KMMessage*)),
- mDestFolder, TQT_SLOT(reallyAddCopyOfMsg(KMMessage*)));
- connect( job, TQT_SIGNAL(result(KMail::FolderJob*)),
- this, TQT_SLOT(slotJobFinished(KMail::FolderJob*)) );
+ connect(job, TQ_SIGNAL(messageRetrieved(KMMessage*)),
+ mDestFolder, TQ_SLOT(reallyAddCopyOfMsg(KMMessage*)));
+ connect( job, TQ_SIGNAL(result(KMail::FolderJob*)),
+ this, TQ_SLOT(slotJobFinished(KMail::FolderJob*)) );
job->start();
} else {
// local => others
@@ -2067,8 +2067,8 @@ KMCommand::Result KMCopyCommand::execute()
if ( mPendingJobs.isEmpty() ) {
// wait for the end of the copy before closing the folder
KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
- connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
+ connect( imapDestFolder, TQ_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQ_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
}
} else {
deleteNow = list.isEmpty() && mPendingJobs.isEmpty(); // we're done if there are no other mails we need to fetch
@@ -2081,8 +2081,8 @@ KMCommand::Result KMCopyCommand::execute()
{
// copy the message(s); note: the list is empty afterwards!
KMFolderImap *imapDestFolder = static_cast<KMFolderImap*>(mDestFolder->storage());
- connect( imapDestFolder, TQT_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
- this, TQT_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
+ connect( imapDestFolder, TQ_SIGNAL( folderComplete( KMFolderImap*, bool ) ),
+ this, TQ_SLOT( slotFolderComplete( KMFolderImap*, bool ) ) );
imapDestFolder->copyMsg(list);
imapDestFolder->getFolder();
}
@@ -2107,8 +2107,8 @@ void KMCopyCommand::slotJobFinished(KMail::FolderJob * job)
kdDebug(5006) << k_funcinfo << "folder job failed: " << job->error() << endl;
// kill all pending jobs
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*)) );
+ disconnect( (*it), TQ_SIGNAL(result(KMail::FolderJob*)),
+ this, TQ_SLOT(slotJobFinished(KMail::FolderJob*)) );
(*it)->kill();
}
mPendingJobs.clear();
@@ -2181,8 +2181,8 @@ KMCommand::Result KMMoveCommand::execute()
ProgressManager::createProgressItem (
"move"+ProgressManager::getUniqueID(),
mDestFolder ? i18n( "Moving messages" ) : i18n( "Deleting messages" ) );
- connect( mProgressItem, TQT_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
- this, TQT_SLOT( slotMoveCanceled() ) );
+ connect( mProgressItem, TQ_SIGNAL( progressItemCanceled( KPIM::ProgressItem* ) ),
+ this, TQ_SLOT( slotMoveCanceled() ) );
KMMessage *msg;
int rc = 0;
@@ -2192,8 +2192,8 @@ KMCommand::Result KMMoveCommand::execute()
mCompleteWithAddedMsg = false;
if (mDestFolder) {
- connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
- this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
+ connect (mDestFolder, TQ_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
+ this, TQ_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
mLostBoys = mSerNumList;
}
mProgressItem->setTotalItems( mSerNumList.count() );
@@ -2235,11 +2235,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, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ disconnect (imapFolder, TQ_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQ_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
- connect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ connect (imapFolder, TQ_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQ_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
list.append(msg);
} else {
// We are moving to a local folder.
@@ -2297,8 +2297,8 @@ KMCommand::Result KMMoveCommand::execute()
void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool success)
{
- disconnect (imapFolder, TQT_SIGNAL(folderComplete( KMFolderImap*, bool )),
- this, TQT_SLOT(slotImapFolderCompleted( KMFolderImap*, bool )));
+ disconnect (imapFolder, TQ_SIGNAL(folderComplete( KMFolderImap*, bool )),
+ this, TQ_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
@@ -2327,8 +2327,8 @@ void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum)
mLostBoys.remove(serNum);
if ( mLostBoys.isEmpty() ) {
// we are done. All messages transferred to the host succesfully
- disconnect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
- this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
+ disconnect (mDestFolder, TQ_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
+ this, TQ_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
if (mDestFolder && mDestFolder->folderType() != KMFolderTypeImap) {
mDestFolder->sync();
}
@@ -2526,8 +2526,8 @@ KMCommand::Result KMSaveAttachmentsCommand::execute()
setDeletesItself( true );
// load all parts
KMLoadPartsCommand *command = new KMLoadPartsCommand( mAttachmentMap );
- connect( command, TQT_SIGNAL( partsRetrieved() ),
- this, TQT_SLOT( slotSaveAll() ) );
+ connect( command, TQ_SIGNAL( partsRetrieved() ),
+ this, TQ_SLOT( slotSaveAll() ) );
command->start();
return OK;
@@ -2832,8 +2832,8 @@ void KMLoadPartsCommand::slotStart()
curFolder->createJob( it.data(), FolderJob::tGetMessage,
0, it.key()->msgPart().partSpecifier() );
job->setCancellable( false );
- connect( job, TQT_SIGNAL(messageUpdated(KMMessage*, TQString)),
- this, TQT_SLOT(slotPartRetrieved(KMMessage*, TQString)) );
+ connect( job, TQ_SIGNAL(messageUpdated(KMMessage*, TQString)),
+ this, TQ_SLOT(slotPartRetrieved(KMMessage*, TQString)) );
job->start();
} else
kdWarning(5006) << "KMLoadPartsCommand - msg has no parent" << endl;
@@ -2928,8 +2928,8 @@ KMCommand::Result KMMailingListCommand::execute()
new KMUrlClickedCommand( lst.first(), mFolder->identity(), 0, false );
}
if ( command ) {
- connect( command, TQT_SIGNAL( completed( KMCommand * ) ),
- this, TQT_SLOT( commandCompleted( KMCommand * ) ) );
+ connect( command, TQ_SIGNAL( completed( KMCommand * ) ),
+ this, TQ_SLOT( commandCompleted( KMCommand * ) ) );
setDeletesItself( true );
setEmitsCompletedItself( true );
command->start();
@@ -3049,8 +3049,8 @@ void KMHandleAttachmentCommand::slotStart()
// load the part
kdDebug(5006) << "load part" << endl;
KMLoadPartsCommand *command = new KMLoadPartsCommand( mNode, mMsg );
- connect( command, TQT_SIGNAL( partsRetrieved() ),
- this, TQT_SLOT( slotPartComplete() ) );
+ connect( command, TQ_SIGNAL( partsRetrieved() ),
+ this, TQ_SLOT( slotPartComplete() ) );
command->start();
} else
{
@@ -3306,8 +3306,8 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
}
mJob = job;
- connect( job, TQT_SIGNAL(result(const GpgME::Error&,const TQVariant&)),
- this, TQT_SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const TQVariant&)) );
+ connect( job, TQ_SIGNAL(result(const GpgME::Error&,const TQVariant&)),
+ this, TQ_SLOT(slotAtmDecryptWithChiasmusResult(const GpgME::Error&,const TQVariant&)) );
}
static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) {
@@ -3350,8 +3350,8 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
d.setDisabled( true ); // we got this far, don't delete yet
TDEIO::Job * uploadJob = TDEIO::storedPut( result.toByteArray(), url, -1, overwrite, false /*resume*/ );
uploadJob->setWindow( parentWidget() );
- connect( uploadJob, TQT_SIGNAL(result(TDEIO::Job*)),
- this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(TDEIO::Job*)) );
+ connect( uploadJob, TQ_SIGNAL(result(TDEIO::Job*)),
+ this, TQ_SLOT(slotAtmDecryptWithChiasmusUploadResult(TDEIO::Job*)) );
}
void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusUploadResult( TDEIO::Job * job )
@@ -3412,8 +3412,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, TQT_SIGNAL(folderComplete(KMFolderImap*,bool)),
- TQT_SLOT(messageStoreResult(KMFolderImap*,bool)) );
+ connect( f, TQ_SIGNAL(folderComplete(KMFolderImap*,bool)),
+ TQ_SLOT(messageStoreResult(KMFolderImap*,bool)) );
} else {
messageStoreResult( 0, res == 0 );
}
@@ -3424,7 +3424,7 @@ void AttachmentModifyCommand::messageStoreResult(KMFolderImap* folder, bool succ
Q_UNUSED( folder );
if ( success ) {
KMCommand *delCmd = new KMDeleteMsgCommand( mSernum );
- connect( delCmd, TQT_SIGNAL(completed(KMCommand*)), TQT_SLOT(messageDeleteResult(KMCommand*)) );
+ connect( delCmd, TQ_SIGNAL(completed(KMCommand*)), TQ_SLOT(messageDeleteResult(KMCommand*)) );
delCmd->start();
return;
}
@@ -3515,7 +3515,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify()
new KMail::EditorWatcher( KURL( mTempFile.file()->name() ),
part.typeStr() + "/" + part.subtypeStr(),
false, this, parentWidget() );
- connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) );
+ connect( watcher, TQ_SIGNAL(editDone(KMail::EditorWatcher*)), TQ_SLOT(editDone(KMail::EditorWatcher*)) );
if ( !watcher->start() )
return Failed;
setEmitsCompletedItself( true );