@ -216,7 +216,7 @@ KMMessage *KMCommand::retrievedMessage() const
return mRetrievedMsgs . getFirst ( ) ;
return mRetrievedMsgs . getFirst ( ) ;
}
}
TQWidget * KMCommand : : tq parentWidget( ) const
TQWidget * KMCommand : : parentWidget( ) const
{
{
return mParent ;
return mParent ;
}
}
@ -558,7 +558,7 @@ KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url,
KMCommand : : Result KMMailtoAddAddrBookCommand : : execute ( )
KMCommand : : Result KMMailtoAddAddrBookCommand : : execute ( )
{
{
KAddrBookExternal : : addEmail ( KMMessage : : decodeMailtoUrl ( mUrl . path ( ) ) ,
KAddrBookExternal : : addEmail ( KMMessage : : decodeMailtoUrl ( mUrl . path ( ) ) ,
tq parentWidget( ) ) ;
parentWidget( ) ) ;
return OK ;
return OK ;
}
}
@ -573,7 +573,7 @@ KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url,
KMCommand : : Result KMMailtoOpenAddrBookCommand : : execute ( )
KMCommand : : Result KMMailtoOpenAddrBookCommand : : execute ( )
{
{
KAddrBookExternal : : openEmail ( KMMessage : : decodeMailtoUrl ( mUrl . path ( ) ) ,
KAddrBookExternal : : openEmail ( KMMessage : : decodeMailtoUrl ( mUrl . path ( ) ) ,
tq parentWidget( ) ) ;
parentWidget( ) ) ;
return OK ;
return OK ;
}
}
@ -633,10 +633,10 @@ KMCommand::Result KMUrlSaveCommand::execute()
if ( mUrl . isEmpty ( ) )
if ( mUrl . isEmpty ( ) )
return OK ;
return OK ;
KURL saveUrl = KFileDialog : : getSaveURL ( mUrl . fileName ( ) , TQString ( ) ,
KURL saveUrl = KFileDialog : : getSaveURL ( mUrl . fileName ( ) , TQString ( ) ,
tq parentWidget( ) ) ;
parentWidget( ) ) ;
if ( saveUrl . isEmpty ( ) )
if ( saveUrl . isEmpty ( ) )
return Canceled ;
return Canceled ;
if ( KIO : : NetAccess : : exists ( saveUrl , false , tq parentWidget( ) ) )
if ( KIO : : NetAccess : : exists ( saveUrl , false , parentWidget( ) ) )
{
{
if ( KMessageBox : : warningContinueCancel ( 0 ,
if ( KMessageBox : : warningContinueCancel ( 0 ,
i18n ( " <qt>File <b>%1</b> exists.<br>Do you want to replace it?</qt> " )
i18n ( " <qt>File <b>%1</b> exists.<br>Do you want to replace it?</qt> " )
@ -1006,7 +1006,7 @@ KMCommand::Result KMOpenMsgCommand::execute()
{
{
if ( mUrl . isEmpty ( ) ) {
if ( mUrl . isEmpty ( ) ) {
mUrl = KFileDialog : : getOpenURL ( " :OpenMessage " , " message/rfc822 application/mbox " ,
mUrl = KFileDialog : : getOpenURL ( " :OpenMessage " , " message/rfc822 application/mbox " ,
tq parentWidget( ) , i18n ( " Open Message " ) ) ;
parentWidget( ) , i18n ( " Open Message " ) ) ;
}
}
if ( mUrl . isEmpty ( ) ) {
if ( mUrl . isEmpty ( ) ) {
setDeletesItself ( false ) ;
setDeletesItself ( false ) ;
@ -1043,7 +1043,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
if ( mMsgString . compare ( 0 , 5 , " From " , 5 ) = = 0 ) {
if ( mMsgString . compare ( 0 , 5 , " From " , 5 ) = = 0 ) {
startOfMessage = mMsgString . tqfind ( ' \n ' ) ;
startOfMessage = mMsgString . tqfind ( ' \n ' ) ;
if ( startOfMessage = = - 1 ) {
if ( startOfMessage = = - 1 ) {
KMessageBox : : sorry ( tq parentWidget( ) ,
KMessageBox : : sorry ( parentWidget( ) ,
i18n ( " The file does not contain a message. " ) ) ;
i18n ( " The file does not contain a message. " ) ) ;
setResult ( Failed ) ;
setResult ( Failed ) ;
emit completed ( this ) ;
emit completed ( this ) ;
@ -1071,7 +1071,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
dwMsg - > Parse ( ) ;
dwMsg - > Parse ( ) ;
// check whether we have a message ( no headers => this isn't a message )
// check whether we have a message ( no headers => this isn't a message )
if ( dwMsg - > Headers ( ) . NumFields ( ) = = 0 ) {
if ( dwMsg - > Headers ( ) . NumFields ( ) = = 0 ) {
KMessageBox : : sorry ( tq parentWidget( ) ,
KMessageBox : : sorry ( parentWidget( ) ,
i18n ( " The file does not contain a message. " ) ) ;
i18n ( " The file does not contain a message. " ) ) ;
delete dwMsg ; dwMsg = 0 ;
delete dwMsg ; dwMsg = 0 ;
setResult ( Failed ) ;
setResult ( Failed ) ;
@ -1452,7 +1452,7 @@ KMCommand::Result KMRedirectCommand::execute()
if ( ! msg | | ! msg - > codec ( ) )
if ( ! msg | | ! msg - > codec ( ) )
return Failed ;
return Failed ;
RedirectDialog dlg ( tq parentWidget( ) , " redirect " , true ,
RedirectDialog dlg ( parentWidget( ) , " redirect " , true ,
kmkernel - > msgSender ( ) - > sendImmediate ( ) ) ;
kmkernel - > msgSender ( ) - > sendImmediate ( ) ) ;
if ( dlg . exec ( ) = = TQDialog : : Rejected ) return Failed ;
if ( dlg . exec ( ) = = TQDialog : : Rejected ) return Failed ;
@ -1650,7 +1650,7 @@ KMCommand::Result KMSeStatusCommand::execute()
TQValueListIterator < TQ_UINT32 > it ;
TQValueListIterator < TQ_UINT32 > it ;
int idx = - 1 ;
int idx = - 1 ;
KMFolder * folder = 0 ;
KMFolder * folder = 0 ;
bool tq parentqStatus = false ;
bool parentqStatus = false ;
// Toggle actions on threads toggle the whole thread
// Toggle actions on threads toggle the whole thread
// depending on the state of the tqparent.
// depending on the state of the tqparent.
@ -1660,9 +1660,9 @@ KMCommand::Result KMSeStatusCommand::execute()
if ( folder ) {
if ( folder ) {
msg = folder - > getMsgBase ( idx ) ;
msg = folder - > getMsgBase ( idx ) ;
if ( msg & & ( msg - > status ( ) & mtqStatus ) )
if ( msg & & ( msg - > status ( ) & mtqStatus ) )
tq parentqStatus = true ;
parentqStatus = true ;
else
else
tq parentqStatus = false ;
parentqStatus = false ;
}
}
}
}
TQMap < KMFolder * , TQValueList < int > > folderMap ;
TQMap < KMFolder * , TQValueList < int > > folderMap ;
@ -1678,7 +1678,7 @@ KMCommand::Result KMSeStatusCommand::execute()
mytqStatus = true ;
mytqStatus = true ;
else
else
mytqStatus = false ;
mytqStatus = false ;
if ( mytqStatus ! = tq parentqStatus)
if ( mytqStatus ! = parentqStatus)
continue ;
continue ;
}
}
}
}
@ -1994,7 +1994,7 @@ KMCommand::Result KMCopyCommand::execute()
msg = srcFolder - > getMsg ( idx ) ;
msg = srcFolder - > getMsg ( idx ) ;
// corrupt IMAP cache, see FolderStorage::getMsg()
// corrupt IMAP cache, see FolderStorage::getMsg()
if ( msg = = 0 ) {
if ( msg = = 0 ) {
KMessageBox : : error ( tq parentWidget( ) , i18n ( " Corrupt IMAP cache detected in folder %1. "
KMessageBox : : error ( parentWidget( ) , i18n ( " Corrupt IMAP cache detected in folder %1. "
" Copying of messages aborted. " ) . tqarg ( srcFolder - > prettyURL ( ) ) ) ;
" Copying of messages aborted. " ) . tqarg ( srcFolder - > prettyURL ( ) ) ) ;
deleteLater ( ) ;
deleteLater ( ) ;
return Failed ;
return Failed ;
@ -2534,7 +2534,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
// considered attachments
// considered attachments
if ( it . key ( ) - > msgPart ( ) . fileName ( ) . stripWhiteSpace ( ) . isEmpty ( ) & &
if ( it . key ( ) - > msgPart ( ) . fileName ( ) . stripWhiteSpace ( ) . isEmpty ( ) & &
( it . key ( ) - > msgPart ( ) . name ( ) . stripWhiteSpace ( ) . isEmpty ( ) | |
( it . key ( ) - > msgPart ( ) . name ( ) . stripWhiteSpace ( ) . isEmpty ( ) | |
! it . key ( ) - > tq parentNode( ) ) ) {
! it . key ( ) - > parentNode( ) ) ) {
PartNodeMessageMap : : iterator delIt = it ;
PartNodeMessageMap : : iterator delIt = it ;
+ + it ;
+ + it ;
mAttachmentMap . remove ( delIt ) ;
mAttachmentMap . remove ( delIt ) ;
@ -2555,7 +2555,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( mAttachmentMap . count ( ) > 1 ) {
if ( mAttachmentMap . count ( ) > 1 ) {
// get the dir
// get the dir
dirUrl = KDirSelectDialog : : selectDirectory ( TQString ( ) , false ,
dirUrl = KDirSelectDialog : : selectDirectory ( TQString ( ) , false ,
tq parentWidget( ) ,
parentWidget( ) ,
i18n ( " Save Attachments To " ) ) ;
i18n ( " Save Attachments To " ) ) ;
if ( ! dirUrl . isValid ( ) ) {
if ( ! dirUrl . isValid ( ) ) {
setResult ( Canceled ) ;
setResult ( Canceled ) ;
@ -2577,7 +2577,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
s = node - > msgPart ( ) . name ( ) . stripWhiteSpace ( ) . tqreplace ( ' : ' , ' _ ' ) ;
s = node - > msgPart ( ) . name ( ) . stripWhiteSpace ( ) . tqreplace ( ' : ' , ' _ ' ) ;
if ( s . isEmpty ( ) )
if ( s . isEmpty ( ) )
s = i18n ( " filename for an unnamed attachment " , " attachment.1 " ) ;
s = i18n ( " filename for an unnamed attachment " , " attachment.1 " ) ;
url = KFileDialog : : getSaveURL ( s , TQString ( ) , tq parentWidget( ) ,
url = KFileDialog : : getSaveURL ( s , TQString ( ) , parentWidget( ) ,
TQString ( ) ) ;
TQString ( ) ) ;
if ( url . isEmpty ( ) ) {
if ( url . isEmpty ( ) ) {
setResult ( Canceled ) ;
setResult ( Canceled ) ;
@ -2641,8 +2641,8 @@ void KMSaveAttachmentsCommand::slotSaveAll()
}
}
if ( KIO : : NetAccess : : exists ( curUrl , false , tq parentWidget( ) ) ) {
if ( KIO : : NetAccess : : exists ( curUrl , false , parentWidget( ) ) ) {
if ( KMessageBox : : warningContinueCancel ( tq parentWidget( ) ,
if ( KMessageBox : : warningContinueCancel ( parentWidget( ) ,
i18n ( " A file named %1 already exists. Do you want to overwrite it? " )
i18n ( " A file named %1 already exists. Do you want to overwrite it? " )
. tqarg ( curUrl . fileName ( ) ) ,
. tqarg ( curUrl . fileName ( ) ) ,
i18n ( " File Already Exists " ) , i18n ( " &Overwrite " ) ) = = KMessageBox : : Cancel ) {
i18n ( " File Already Exists " ) , i18n ( " &Overwrite " ) ) = = KMessageBox : : Cancel ) {
@ -2666,7 +2666,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveEncrypted = false ;
bool bSaveEncrypted = false ;
bool bEncryptedParts = node - > encryptionState ( ) ! = KMMsgNotEncrypted ;
bool bEncryptedParts = node - > encryptionState ( ) ! = KMMsgNotEncrypted ;
if ( bEncryptedParts )
if ( bEncryptedParts )
if ( KMessageBox : : questionYesNo ( tq parentWidget( ) ,
if ( KMessageBox : : questionYesNo ( parentWidget( ) ,
i18n ( " The part %1 of the message is encrypted. Do you want to keep the encryption when saving? " ) .
i18n ( " The part %1 of the message is encrypted. Do you want to keep the encryption when saving? " ) .
arg ( url . fileName ( ) ) ,
arg ( url . fileName ( ) ) ,
i18n ( " KMail Question " ) , i18n ( " Keep Encryption " ) , i18n ( " Do Not Keep " ) ) = =
i18n ( " KMail Question " ) , i18n ( " Keep Encryption " ) , i18n ( " Do Not Keep " ) ) = =
@ -2675,7 +2675,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveWithSig = true ;
bool bSaveWithSig = true ;
if ( node - > signatureState ( ) ! = KMMsgNotSigned )
if ( node - > signatureState ( ) ! = KMMsgNotSigned )
if ( KMessageBox : : questionYesNo ( tq parentWidget( ) ,
if ( KMessageBox : : questionYesNo ( parentWidget( ) ,
i18n ( " The part %1 of the message is signed. Do you want to keep the signature when saving? " ) .
i18n ( " The part %1 of the message is signed. Do you want to keep the signature when saving? " ) .
arg ( url . fileName ( ) ) ,
arg ( url . fileName ( ) ) ,
i18n ( " KMail Question " ) , i18n ( " Keep Signature " ) , i18n ( " Do Not Keep " ) ) ! =
i18n ( " KMail Question " ) , i18n ( " Keep Signature " ) , i18n ( " Do Not Keep " ) ) ! =
@ -2749,7 +2749,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
file . setName ( url . path ( ) ) ;
file . setName ( url . path ( ) ) ;
if ( ! file . open ( IO_WriteOnly ) )
if ( ! file . open ( IO_WriteOnly ) )
{
{
KMessageBox : : error ( tq parentWidget( ) ,
KMessageBox : : error ( parentWidget( ) ,
i18n ( " %2 is detailed error description " ,
i18n ( " %2 is detailed error description " ,
" Could not write the file %1: \n %2 " )
" Could not write the file %1: \n %2 " )
. tqarg ( file . name ( ) )
. tqarg ( file . name ( ) )
@ -2773,9 +2773,9 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
if ( ! url . isLocalFile ( ) )
if ( ! url . isLocalFile ( ) )
{
{
tf . close ( ) ;
tf . close ( ) ;
if ( ! KIO : : NetAccess : : upload ( tf . name ( ) , url , tq parentWidget( ) ) )
if ( ! KIO : : NetAccess : : upload ( tf . name ( ) , url , parentWidget( ) ) )
{
{
KMessageBox : : error ( tq parentWidget( ) ,
KMessageBox : : error ( parentWidget( ) ,
i18n ( " Could not write the file %1. " )
i18n ( " Could not write the file %1. " )
. tqarg ( url . path ( ) ) ,
. tqarg ( url . path ( ) ) ,
i18n ( " KMail Error " ) ) ;
i18n ( " KMail Error " ) ) ;
@ -3015,7 +3015,7 @@ KMCommand::Result KMIMChatCommand::execute()
apology = apology . tqarg ( names ) ;
apology = apology . tqarg ( names ) ;
}
}
KMessageBox : : sorry ( tq parentWidget( ) , apology ) ;
KMessageBox : : sorry ( parentWidget( ) , apology ) ;
return Failed ;
return Failed ;
}
}
}
}
@ -3196,13 +3196,13 @@ void KMHandleAttachmentCommand::atmSave()
parts . append ( mNode ) ;
parts . append ( mNode ) ;
// save, do not leave encoded
// save, do not leave encoded
KMSaveAttachmentsCommand * command =
KMSaveAttachmentsCommand * command =
new KMSaveAttachmentsCommand ( tq parentWidget( ) , parts , mMsg , false ) ;
new KMSaveAttachmentsCommand ( parentWidget( ) , parts , mMsg , false ) ;
command - > start ( ) ;
command - > start ( ) ;
}
}
void KMHandleAttachmentCommand : : atmProperties ( )
void KMHandleAttachmentCommand : : atmProperties ( )
{
{
KMMsgPartDialogCompat dlg ( tq parentWidget( ) , 0 , true ) ;
KMMsgPartDialogCompat dlg ( parentWidget( ) , 0 , true ) ;
KMMessagePart & msgPart = mNode - > msgPart ( ) ;
KMMessagePart & msgPart = mNode - > msgPart ( ) ;
dlg . setMsgPart ( & msgPart ) ;
dlg . setMsgPart ( & msgPart ) ;
dlg . exec ( ) ;
dlg . exec ( ) ;
@ -3229,12 +3229,12 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( ! listjob . get ( ) ) {
if ( ! listjob . get ( ) ) {
const TQString 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. " ) ;
" \" x-obtain-keys \" function. Please report this bug. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
if ( listjob - > exec ( ) ) {
if ( listjob - > exec ( ) ) {
listjob - > showErrorDialog ( tq parentWidget( ) , i18n ( " Chiasmus Backend Error " ) ) ;
listjob - > showErrorDialog ( parentWidget( ) , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
@ -3243,7 +3243,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
const TQString msg = i18n ( " Unexpected return value from Chiasmus backend: "
const TQString msg = i18n ( " Unexpected return value from Chiasmus backend: "
" The \" x-obtain-keys \" function did not return a "
" The \" x-obtain-keys \" function did not return a "
" string list. Please report this bug. " ) ;
" string list. Please report this bug. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
@ -3252,11 +3252,11 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
const TQString 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 "
" valid key path has been set in the Chiasmus "
" configuration. " ) ;
" configuration. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
ChiasmusKeySelector selectorDlg ( tq parentWidget( ) , i18n ( " Chiasmus Decryption Key Selection " ) ,
ChiasmusKeySelector selectorDlg ( parentWidget( ) , i18n ( " Chiasmus Decryption Key Selection " ) ,
keys , GlobalSettings : : chiasmusDecryptionKey ( ) ,
keys , GlobalSettings : : chiasmusDecryptionKey ( ) ,
GlobalSettings : : chiasmusDecryptionOptions ( ) ) ;
GlobalSettings : : chiasmusDecryptionOptions ( ) ) ;
if ( selectorDlg . exec ( ) ! = TQDialog : : Accepted )
if ( selectorDlg . exec ( ) ! = TQDialog : : Accepted )
@ -3270,7 +3270,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( ! job ) {
if ( ! job ) {
const TQString 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. " ) ;
" \" x-decrypt \" function. Please report this bug. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
@ -3281,13 +3281,13 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
! job - > setProperty ( " input " , input ) ) {
! job - > setProperty ( " input " , input ) ) {
const TQString 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. " ) ;
" the expected parameters. Please report this bug. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
setDeletesItself ( true ) ; // the job below is async, we have to cleanup ourselves
setDeletesItself ( true ) ; // the job below is async, we have to cleanup ourselves
if ( job - > start ( ) ) {
if ( job - > start ( ) ) {
job - > showErrorDialog ( tq parentWidget( ) , i18n ( " Chiasmus Decryption Error " ) ) ;
job - > showErrorDialog ( parentWidget( ) , i18n ( " Chiasmus Decryption Error " ) ) ;
return ;
return ;
}
}
@ -3313,7 +3313,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
if ( err . isCanceled ( ) )
if ( err . isCanceled ( ) )
return ;
return ;
if ( err ) {
if ( err ) {
job - > showErrorDialog ( tq parentWidget( ) , i18n ( " Chiasmus Decryption Error " ) ) ;
job - > showErrorDialog ( parentWidget( ) , i18n ( " Chiasmus Decryption Error " ) ) ;
return ;
return ;
}
}
@ -3321,21 +3321,21 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
const TQString msg = i18n ( " Unexpected return value from Chiasmus backend: "
const TQString msg = i18n ( " Unexpected return value from Chiasmus backend: "
" The \" x-decrypt \" function did not return a "
" The \" x-decrypt \" function did not return a "
" byte array. Please report this bug. " ) ;
" byte array. Please report this bug. " ) ;
KMessageBox : : error ( tq parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
KMessageBox : : error ( parentWidget( ) , msg , i18n ( " Chiasmus Backend Error " ) ) ;
return ;
return ;
}
}
const KURL url = KFileDialog : : getSaveURL ( chomp ( mAtmName , " .xia " , false ) , TQString ( ) , tq parentWidget( ) ) ;
const KURL url = KFileDialog : : getSaveURL ( chomp ( mAtmName , " .xia " , false ) , TQString ( ) , parentWidget( ) ) ;
if ( url . isEmpty ( ) )
if ( url . isEmpty ( ) )
return ;
return ;
bool overwrite = KMail : : Util : : checkOverwrite ( url , tq parentWidget( ) ) ;
bool overwrite = KMail : : Util : : checkOverwrite ( url , parentWidget( ) ) ;
if ( ! overwrite )
if ( ! overwrite )
return ;
return ;
d . setDisabled ( true ) ; // we got this far, don't delete yet
d . setDisabled ( true ) ; // we got this far, don't delete yet
KIO : : Job * uploadJob = KIO : : storedPut ( result . toByteArray ( ) , url , - 1 , overwrite , false /*resume*/ ) ;
KIO : : Job * uploadJob = KIO : : storedPut ( result . toByteArray ( ) , url , - 1 , overwrite , false /*resume*/ ) ;
uploadJob - > setWindow ( tq parentWidget( ) ) ;
uploadJob - > setWindow ( parentWidget( ) ) ;
connect ( uploadJob , TQT_SIGNAL ( result ( KIO : : Job * ) ) ,
connect ( uploadJob , TQT_SIGNAL ( result ( KIO : : Job * ) ) ,
this , TQT_SLOT ( slotAtmDecryptWithChiasmusUploadResult ( KIO : : Job * ) ) ) ;
this , TQT_SLOT ( slotAtmDecryptWithChiasmusUploadResult ( KIO : : Job * ) ) ) ;
}
}
@ -3500,7 +3500,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify()
KMail : : EditorWatcher * watcher =
KMail : : EditorWatcher * watcher =
new KMail : : EditorWatcher ( KURL ( mTempFile . file ( ) - > name ( ) ) ,
new KMail : : EditorWatcher ( KURL ( mTempFile . file ( ) - > name ( ) ) ,
part . typeStr ( ) + " / " + part . subtypeStr ( ) ,
part . typeStr ( ) + " / " + part . subtypeStr ( ) ,
false , this , tq parentWidget( ) ) ;
false , this , parentWidget( ) ) ;
connect ( watcher , TQT_SIGNAL ( editDone ( KMail : : EditorWatcher * ) ) , TQT_SLOT ( editDone ( KMail : : EditorWatcher * ) ) ) ;
connect ( watcher , TQT_SIGNAL ( editDone ( KMail : : EditorWatcher * ) ) , TQT_SLOT ( editDone ( KMail : : EditorWatcher * ) ) ) ;
if ( ! watcher - > start ( ) )
if ( ! watcher - > start ( ) )
return Failed ;
return Failed ;
@ -3529,16 +3529,16 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
DwBodyPart * dwpart = msg - > findPart ( mPartIndex ) ;
DwBodyPart * dwpart = msg - > findPart ( mPartIndex ) ;
KMMessage : : bodyPart ( dwpart , & part , true ) ;
KMMessage : : bodyPart ( dwpart , & part , true ) ;
DwBody * tq parentNode = dynamic_cast < DwBody * > ( dwpart - > Parent ( ) ) ;
DwBody * parentNode = dynamic_cast < DwBody * > ( dwpart - > Parent ( ) ) ;
assert ( tq parentNode ) ;
assert ( parentNode ) ;
tq parentNode- > RemoveBodyPart ( dwpart ) ;
parentNode- > RemoveBodyPart ( dwpart ) ;
KMMessagePart att ;
KMMessagePart att ;
att . duplicate ( part ) ;
att . duplicate ( part ) ;
att . setBodyEncodedBinary ( data ) ;
att . setBodyEncodedBinary ( data ) ;
DwBodyPart * newDwPart = msg - > createDWBodyPart ( & att ) ;
DwBodyPart * newDwPart = msg - > createDWBodyPart ( & att ) ;
tq parentNode- > AddBodyPart ( newDwPart ) ;
parentNode- > AddBodyPart ( newDwPart ) ;
msg - > getTopLevelPart ( ) - > Assemble ( ) ;
msg - > getTopLevelPart ( ) - > Assemble ( ) ;
KMMessage * newMsg = new KMMessage ( ) ;
KMMessage * newMsg = new KMMessage ( ) ;