summaryrefslogtreecommitdiffstats
path: root/kmail/kmcommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r--kmail/kmcommands.cpp184
1 files changed, 92 insertions, 92 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 7bf978b07..907d21100 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -216,7 +216,7 @@ KMMessage *KMCommand::retrievedMessage() const
return mRetrievedMsgs.getFirst();
}
-TQWidget *KMCommand::parentWidget() const
+TQWidget *KMCommand::tqparentWidget() const
{
return mParent;
}
@@ -296,7 +296,7 @@ void KMCommand::transferSelectedMsgs()
mCountMsgs = mMsgList.count();
uint totalSize = 0;
// the KProgressDialog for the user-feedback. Only enable it if it's needed.
- // For some commands like KMSetStatusCommand it's not needed. Note, that
+ // For some commands like KMSeStatusCommand it's not needed. Note, that
// for some reason the KProgressDialog eats the MouseReleaseEvent (if a
// command is executed after the MousePressEvent), cf. bug #71761.
if ( mCountMsgs > 0 ) {
@@ -537,7 +537,7 @@ KMAddBookmarksCommand::KMAddBookmarksCommand( const KURL &url, TQWidget *parent
KMCommand::Result KMAddBookmarksCommand::execute()
{
- TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") );
+ TQString filename = locateLocal( "data", TQString::tqfromLatin1("konqueror/bookmarks.xml") );
KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename,
false );
KBookmarkGroup group = bookManager->root();
@@ -558,7 +558,7 @@ KMMailtoAddAddrBookCommand::KMMailtoAddAddrBookCommand( const KURL &url,
KMCommand::Result KMMailtoAddAddrBookCommand::execute()
{
KAddrBookExternal::addEmail( KMMessage::decodeMailtoUrl( mUrl.path() ),
- parentWidget() );
+ tqparentWidget() );
return OK;
}
@@ -573,7 +573,7 @@ KMMailtoOpenAddrBookCommand::KMMailtoOpenAddrBookCommand( const KURL &url,
KMCommand::Result KMMailtoOpenAddrBookCommand::execute()
{
KAddrBookExternal::openEmail( KMMessage::decodeMailtoUrl( mUrl.path() ),
- parentWidget() );
+ tqparentWidget() );
return OK;
}
@@ -595,14 +595,14 @@ KMCommand::Result KMUrlCopyCommand::execute()
clip->setText( address );
clip->setSelectionMode( false );
clip->setText( address );
- KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "Address copied to clipboard." ));
+ KPIM::BroadcasStatus::instance()->seStatusMsg( i18n( "Address copied to clipboard." ));
} else {
// put the url into the mouse selection and the clipboard
clip->setSelectionMode( true );
clip->setText( mUrl.url() );
clip->setSelectionMode( false );
clip->setText( mUrl.url() );
- KPIM::BroadcastStatus::instance()->setStatusMsg( i18n( "URL copied to clipboard." ));
+ KPIM::BroadcasStatus::instance()->seStatusMsg( i18n( "URL copied to clipboard." ));
}
return OK;
@@ -633,13 +633,13 @@ KMCommand::Result KMUrlSaveCommand::execute()
if ( mUrl.isEmpty() )
return OK;
KURL saveUrl = KFileDialog::getSaveURL(mUrl.fileName(), TQString::null,
- parentWidget() );
+ tqparentWidget() );
if ( saveUrl.isEmpty() )
return Canceled;
- if ( KIO::NetAccess::exists( saveUrl, false, parentWidget() ) )
+ if ( KIO::NetAccess::exists( saveUrl, false, tqparentWidget() ) )
{
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 tqreplace it?</qt>")
.arg(saveUrl.prettyURL()), i18n("Save to File"), i18n("&Replace"))
!= KMessageBox::Continue)
return Canceled;
@@ -753,8 +753,8 @@ KMCommand::Result KMShowMsgSrcCommand::execute()
viewer->resize(TQApplication::desktop()->screenGeometry(scnum).width()/2,
2*TQApplication::desktop()->screenGeometry(scnum).height()/3);
} else {
- viewer->resize(TQApplication::desktop()->geometry().width()/2,
- 2*TQApplication::desktop()->geometry().height()/3);
+ viewer->resize(TQApplication::desktop()->tqgeometry().width()/2,
+ 2*TQApplication::desktop()->tqgeometry().height()/3);
}
viewer->show();
@@ -763,7 +763,7 @@ KMCommand::Result KMShowMsgSrcCommand::execute()
static KURL subjectToUrl( const TQString & subject )
{
- // We need to replace colons with underscores since those cause problems with KFileDialog (bug
+ // We need to tqreplace colons with underscores since those cause problems with KFileDialog (bug
// in KFileDialog though) and also on Windows filesystems.
// We also look at the special case of ": ", since converting that to "_ " would look strange,
// simply "_" looks better.
@@ -774,11 +774,11 @@ static KURL subjectToUrl( const TQString & subject )
// https://issues.kolab.org/issue3805
const TQString filter = i18n( "*.mbox|email messages (*.mbox)\n*|all files (*)" );
TQString cleanSubject = subject.stripWhiteSpace()
- .replace( TQDir::separator(), '_' )
- .replace( ": ", "_" )
- .replace( ':', '_' )
- .replace( '.', '_' )
- .replace( '~', '_' );
+ .tqreplace( TQDir::separator(), '_' )
+ .tqreplace( ": ", "_" )
+ .tqreplace( ':', '_' )
+ .tqreplace( '.', '_' )
+ .tqreplace( '~', '_' );
return KFileDialog::getSaveURL( cleanSubject, filter );
}
@@ -945,7 +945,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg)
++mMsgListIndex;
// Get rid of the message.
if ( msg && msg->parent() && msg->getMsgSerNum() &&
- mUngetMsgs.contains( msg ) ) {
+ mUngetMsgs.tqcontains( msg ) ) {
int idx = -1;
KMFolder * p = 0;
KMMsgDict::instance()->getLocation( msg, &p, &idx );
@@ -962,7 +962,7 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job)
if (job->error() == KIO::ERR_FILE_ALREADY_EXIST)
{
if (KMessageBox::warningContinueCancel(0,
- i18n("File %1 exists.\nDo you want to replace it?")
+ i18n("File %1 exists.\nDo you want to tqreplace it?")
.arg(mUrl.prettyURL()), i18n("Save to File"), i18n("&Replace"))
== KMessageBox::Continue) {
mOffset = 0;
@@ -1006,7 +1006,7 @@ KMCommand::Result KMOpenMsgCommand::execute()
{
if ( mUrl.isEmpty() ) {
mUrl = KFileDialog::getOpenURL( ":OpenMessage", "message/rfc822 application/mbox",
- parentWidget(), i18n("Open Message") );
+ tqparentWidget(), i18n("Open Message") );
}
if ( mUrl.isEmpty() ) {
setDeletesItself( false );
@@ -1043,7 +1043,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) {
startOfMessage = mMsgString.find( '\n' );
if ( startOfMessage == -1 ) {
- KMessageBox::sorry( parentWidget(),
+ KMessageBox::sorry( tqparentWidget(),
i18n( "The file does not contain a message." ) );
setResult( Failed );
emit completed( this );
@@ -1071,7 +1071,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
dwMsg->Parse();
// check whether we have a message ( no headers => this isn't a message )
if ( dwMsg->Headers().NumFields() == 0 ) {
- KMessageBox::sorry( parentWidget(),
+ KMessageBox::sorry( tqparentWidget(),
i18n( "The file does not contain a message." ) );
delete dwMsg; dwMsg = 0;
setResult( Failed );
@@ -1090,7 +1090,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
win->show();
if ( multipleMessages )
KMessageBox::information( win,
- i18n( "The file contains multiple messages. "
+ i18n( "The file tqcontains multiple messages. "
"Only the first message is shown." ) );
setResult( OK );
emit completed( this );
@@ -1395,7 +1395,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
id = msg->headerField( "X-KMail-Identity" ).stripWhiteSpace().toUInt();
// set the part header
msgPartText += "--";
- msgPartText += TQString::fromLatin1( boundary );
+ msgPartText += TQString::tqfromLatin1( boundary );
msgPartText += "\nContent-Type: MESSAGE/RFC822";
msgPartText += TQString( "; CHARSET=%1" ).arg( msg->charset() );
msgPartText += '\n';
@@ -1403,7 +1403,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
dwh.MessageId().CreateDefault();
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)" ) )
+ if ( !msg->subject().tqcontains( "(fwd)" ) )
msgPartText += " (fwd)";
msgPartText += "\n\n";
// remove headers that shouldn't be forwarded
@@ -1422,7 +1422,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
id = mIdentity; // use folder identity if no message had an id set
fwdMsg->initHeader( id );
msgPartText += "--";
- msgPartText += TQString::fromLatin1( boundary );
+ msgPartText += TQString::tqfromLatin1( boundary );
msgPartText += "--\n";
TQCString tmp;
msgPart->setTypeStr( "MULTIPART" );
@@ -1452,7 +1452,7 @@ KMCommand::Result KMRedirectCommand::execute()
if ( !msg || !msg->codec() )
return Failed;
- RedirectDialog dlg( parentWidget(), "redirect", true,
+ RedirectDialog dlg( tqparentWidget(), "redirect", true,
kmkernel->msgSender()->sendImmediate() );
if (dlg.exec()==TQDialog::Rejected) return Failed;
@@ -1639,18 +1639,18 @@ KMCommand::Result KMPrintCommand::execute()
}
-KMSetStatusCommand::KMSetStatusCommand( KMMsgStatus status,
- const TQValueList<Q_UINT32> &serNums, bool toggle )
+KMSeStatusCommand::KMSeStatusCommand( KMMsgStatus status,
+ const TQValueList<TQ_UINT32> &serNums, bool toggle )
: mStatus( status ), mSerNums( serNums ), mToggle( toggle )
{
}
-KMCommand::Result KMSetStatusCommand::execute()
+KMCommand::Result KMSeStatusCommand::execute()
{
- TQValueListIterator<Q_UINT32> it;
+ TQValueListIterator<TQ_UINT32> it;
int idx = -1;
KMFolder *folder = 0;
- bool parentStatus = false;
+ bool parenStatus = false;
// Toggle actions on threads toggle the whole thread
// depending on the state of the parent.
@@ -1660,9 +1660,9 @@ KMCommand::Result KMSetStatusCommand::execute()
if (folder) {
msg = folder->getMsgBase(idx);
if (msg && (msg->status()&mStatus))
- parentStatus = true;
+ parenStatus = true;
else
- parentStatus = false;
+ parenStatus = false;
}
}
TQMap< KMFolder*, TQValueList<int> > folderMap;
@@ -1678,7 +1678,7 @@ KMCommand::Result KMSetStatusCommand::execute()
myStatus = true;
else
myStatus = false;
- if (myStatus != parentStatus)
+ if (myStatus != parenStatus)
continue;
}
}
@@ -1690,7 +1690,7 @@ KMCommand::Result KMSetStatusCommand::execute()
TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin();
while ( it2 != folderMap.end() ) {
KMFolder *f = it2.key();
- f->setStatus( (*it2), mStatus, mToggle );
+ f->seStatus( (*it2), mStatus, mToggle );
++it2;
}
//kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() );
@@ -1734,15 +1734,15 @@ KMCommand::Result KMFilterActionCommand::execute()
ProgressManager::createProgressItem ( "filter"+ProgressManager::getUniqueID(),
i18n( "Filtering messages" ) );
progressItem->setTotalItems( msgCountToFilter );
- TQValueList<Q_UINT32>::const_iterator it;
+ TQValueList<TQ_UINT32>::const_iterator it;
for ( it = serNumList.begin(); it != serNumList.end(); it++ ) {
- Q_UINT32 serNum = *it;
+ TQ_UINT32 serNum = *it;
int diff = msgCountToFilter - ++msgCount;
if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) {
progressItem->updateProgress();
TQString statusMsg = i18n("Filtering message %1 of %2");
statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
- KPIM::BroadcastStatus::instance()->setStatusMsg( statusMsg );
+ KPIM::BroadcasStatus::instance()->seStatusMsg( statusMsg );
KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
@@ -1932,7 +1932,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
continue;
KMFolder *child = static_cast<KMFolder*>(it);
TQString label = child->label();
- label.replace("&","&&");
+ label.tqreplace("&","&&");
if (child->child() && child->child()->first()) {
// descend
TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu");
@@ -1994,7 +1994,7 @@ KMCommand::Result KMCopyCommand::execute()
msg = srcFolder->getMsg(idx);
// corrupt IMAP cache, see FolderStorage::getMsg()
if ( msg == 0 ) {
- KMessageBox::error( parentWidget(), i18n("Corrupt IMAP cache detected in folder %1. "
+ KMessageBox::error( tqparentWidget(), i18n("Corrupt IMAP cache detected in folder %1. "
"Copying of messages aborted.").arg( srcFolder->prettyURL() ) );
deleteLater();
return Failed;
@@ -2015,7 +2015,7 @@ KMCommand::Result KMCopyCommand::execute()
// make sure the attachment state is only calculated when it's complete
if (!newMsg->isComplete())
newMsg->setReadyToShow(false);
- newMsg->setStatus(msg->status());
+ newMsg->seStatus(msg->status());
if (srcFolder && !newMsg->isComplete())
{
@@ -2145,7 +2145,7 @@ KMMoveCommand::KMMoveCommand( KMFolder* destFolder,
mSerNumList.append( msgBase->getMsgSerNum() );
}
-KMMoveCommand::KMMoveCommand( Q_UINT32 )
+KMMoveCommand::KMMoveCommand( TQ_UINT32 )
: mProgressItem( 0 )
{
}
@@ -2180,13 +2180,13 @@ KMCommand::Result KMMoveCommand::execute()
mCompleteWithAddedMsg = false;
if (mDestFolder) {
- connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
+ connect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
+ this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
mLostBoys = mSerNumList;
}
mProgressItem->setTotalItems( mSerNumList.count() );
- for ( TQValueList<Q_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) {
+ for ( TQValueList<TQ_UINT32>::ConstIterator it = mSerNumList.constBegin(); it != mSerNumList.constEnd(); ++it ) {
if ( *it == 0 ) {
kdDebug(5006) << k_funcinfo << "serial number == 0!" << endl;
continue; // invalid message
@@ -2305,7 +2305,7 @@ void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool succe
}
}
-void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, Q_UINT32 serNum)
+void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum)
{
if ( folder != mDestFolder || mLostBoys.find( serNum ) == mLostBoys.end() ) {
//kdDebug(5006) << "KMMoveCommand::msgAddedToDestFolder different "
@@ -2315,8 +2315,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, TQT_SIGNAL(msgAdded(KMFolder*, Q_UINT32)),
- this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, Q_UINT32)));
+ disconnect (mDestFolder, TQT_SIGNAL(msgAdded(KMFolder*, TQ_UINT32)),
+ this, TQT_SLOT(slotMsgAddedToDestFolder(KMFolder*, TQ_UINT32)));
if (mDestFolder && mDestFolder->folderType() != KMFolderTypeImap) {
mDestFolder->sync();
}
@@ -2370,7 +2370,7 @@ KMDeleteMsgCommand::KMDeleteMsgCommand( KMFolder* srcFolder, KMMessage * msg )
mOpenedFolders.push_back( srcFolder );
}
-KMDeleteMsgCommand::KMDeleteMsgCommand( Q_UINT32 sernum )
+KMDeleteMsgCommand::KMDeleteMsgCommand( TQ_UINT32 sernum )
:KMMoveCommand( sernum )
{
if ( !sernum ) {
@@ -2453,7 +2453,7 @@ KMCommand::Result KMUrlClickedCommand::execute()
(mUrl.protocol() == "smb") || (mUrl.protocol() == "fish") ||
(mUrl.protocol() == "news"))
{
- KPIM::BroadcastStatus::instance()->setStatusMsg( i18n("Opening URL..."));
+ KPIM::BroadcasStatus::instance()->seStatusMsg( i18n("Opening URL..."));
KMimeType::Ptr mime = KMimeType::findByURL( mUrl );
if (mime->name() == "application/x-desktop" ||
mime->name() == "application/x-executable" ||
@@ -2555,7 +2555,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( mAttachmentMap.count() > 1 ) {
// get the dir
dirUrl = KDirSelectDialog::selectDirectory( TQString::null, false,
- parentWidget(),
+ tqparentWidget(),
i18n("Save Attachments To") );
if ( !dirUrl.isValid() ) {
setResult( Canceled );
@@ -2570,14 +2570,14 @@ void KMSaveAttachmentsCommand::slotSaveAll()
else {
// only one item, get the desired filename
partNode *node = mAttachmentMap.begin().key();
- // replace all ':' with '_' because ':' isn't allowed on FAT volumes
+ // tqreplace all ':' with '_' because ':' isn't allowed on FAT volumes
TQString s =
- node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
+ node->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' );
if ( s.isEmpty() )
- s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' );
+ s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' );
if ( s.isEmpty() )
s = i18n("filename for an unnamed attachment", "attachment.1");
- url = KFileDialog::getSaveURL( s, TQString::null, parentWidget(),
+ url = KFileDialog::getSaveURL( s, TQString::null, tqparentWidget(),
TQString::null );
if ( url.isEmpty() ) {
setResult( Canceled );
@@ -2598,9 +2598,9 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( !dirUrl.isEmpty() ) {
curUrl = dirUrl;
TQString s =
- it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
+ it.key()->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' );
if ( s.isEmpty() )
- s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' );
+ s = it.key()->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' );
if ( s.isEmpty() ) {
++unnamedAtmCount;
s = i18n("filename for the %1-th unnamed attachment",
@@ -2619,7 +2619,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
TQString origFile = curUrl.fileName();
TQString file = origFile;
- while ( renameNumbering.contains(file) ) {
+ while ( renameNumbering.tqcontains(file) ) {
file = origFile;
int num = renameNumbering[file] + 1;
int dotIdx = file.findRev('.');
@@ -2628,21 +2628,21 @@ void KMSaveAttachmentsCommand::slotSaveAll()
curUrl.setFileName(file);
// Increment the counter for both the old and the new filename
- if ( !renameNumbering.contains(origFile))
+ if ( !renameNumbering.tqcontains(origFile))
renameNumbering[origFile] = 1;
else
renameNumbering[origFile]++;
if ( file != origFile ) {
- if ( !renameNumbering.contains(file))
+ if ( !renameNumbering.tqcontains(file))
renameNumbering[file] = 1;
else
renameNumbering[file]++;
}
- if ( KIO::NetAccess::exists( curUrl, false, parentWidget() ) ) {
- if ( KMessageBox::warningContinueCancel( parentWidget(),
+ if ( KIO::NetAccess::exists( curUrl, false, tqparentWidget() ) ) {
+ if ( KMessageBox::warningContinueCancel( tqparentWidget(),
i18n( "A file named %1 already exists. Do you want to overwrite it?" )
.arg( curUrl.fileName() ),
i18n( "File Already Exists" ), i18n("&Overwrite") ) == KMessageBox::Cancel) {
@@ -2666,7 +2666,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveEncrypted = false;
bool bEncryptedParts = node->encryptionState() != KMMsgNotEncrypted;
if( bEncryptedParts )
- if( KMessageBox::questionYesNo( parentWidget(),
+ if( KMessageBox::questionYesNo( tqparentWidget(),
i18n( "The part %1 of the message is encrypted. Do you want to keep the encryption when saving?" ).
arg( url.fileName() ),
i18n( "KMail Question" ), i18n("Keep Encryption"), i18n("Do Not Keep") ) ==
@@ -2675,7 +2675,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
bool bSaveWithSig = true;
if( node->signatureState() != KMMsgNotSigned )
- if( KMessageBox::questionYesNo( parentWidget(),
+ if( KMessageBox::questionYesNo( tqparentWidget(),
i18n( "The part %1 of the message is signed. Do you want to keep the signature when saving?" ).
arg( url.fileName() ),
i18n( "KMail Question" ), i18n("Keep Signature"), i18n("Do Not Keep") ) !=
@@ -2749,7 +2749,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
file.setName( url.path() );
if ( !file.open( IO_WriteOnly ) )
{
- KMessageBox::error( parentWidget(),
+ KMessageBox::error( tqparentWidget(),
i18n( "%2 is detailed error description",
"Could not write the file %1:\n%2" )
.arg( file.name() )
@@ -2773,9 +2773,9 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
if ( !url.isLocalFile() )
{
tf.close();
- if ( !KIO::NetAccess::upload( tf.name(), url, parentWidget() ) )
+ if ( !KIO::NetAccess::upload( tf.name(), url, tqparentWidget() ) )
{
- KMessageBox::error( parentWidget(),
+ KMessageBox::error( tqparentWidget(),
i18n( "Could not write the file %1." )
.arg( url.path() ),
i18n( "KMail Error" ) );
@@ -2987,7 +2987,7 @@ KMCommand::Result KMIMChatCommand::execute()
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 ) ) ;
+ KABC::AddresseeList addressees = addressBook->tqfindByEmail( KPIM::getEmailAddress( addr ) ) ;
// start chat
if( addressees.count() == 1 ) {
@@ -3011,11 +3011,11 @@ KMCommand::Result KMIMChatCommand::execute()
{
nameList.append( (*it).realName() );
}
- TQString names = nameList.join( TQString::fromLatin1( ",\n" ) );
+ TQString names = nameList.join( TQString::tqfromLatin1( ",\n" ) );
apology = apology.arg( names );
}
- KMessageBox::sorry( parentWidget(), apology );
+ KMessageBox::sorry( tqparentWidget(), apology );
return Failed;
}
}
@@ -3128,13 +3128,13 @@ KService::Ptr KMHandleAttachmentCommand::getServiceOffer()
mimetype = KMimeType::mimeType( contentTypeStr );
if ( mimetype->name() == "application/octet-stream" ) {
// consider the filename if Content-Type is application/octet-stream
- mimetype = KMimeType::findByPath( mAtmName, 0, true /* no disk access */ );
+ mimetype = KMimeType::tqfindByPath( mAtmName, 0, true /* no disk access */ );
}
if ( ( mimetype->name() == "application/octet-stream" )
&& msgPart.isComplete() ) {
// consider the attachment's contents if neither the Content-Type header
// nor the filename give us a clue
- mimetype = KMimeType::findByFileContent( mAtmName );
+ mimetype = KMimeType::tqfindByFileContent( mAtmName );
}
return KServiceTypeProfile::preferredService( mimetype->name(), "Application" );
}
@@ -3196,13 +3196,13 @@ void KMHandleAttachmentCommand::atmSave()
parts.append( mNode );
// save, do not leave encoded
KMSaveAttachmentsCommand *command =
- new KMSaveAttachmentsCommand( parentWidget(), parts, mMsg, false );
+ new KMSaveAttachmentsCommand( tqparentWidget(), parts, mMsg, false );
command->start();
}
void KMHandleAttachmentCommand::atmProperties()
{
- KMMsgPartDialogCompat dlg( parentWidget() , 0, true );
+ KMMsgPartDialogCompat dlg( tqparentWidget() , 0, true );
KMMessagePart& msgPart = mNode->msgPart();
dlg.setMsgPart( &msgPart );
dlg.exec();
@@ -3229,12 +3229,12 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !listjob.get() ) {
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
if ( listjob->exec() ) {
- listjob->showErrorDialog( parentWidget(), i18n( "Chiasmus Backend Error" ) );
+ listjob->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3243,7 +3243,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3252,11 +3252,11 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- ChiasmusKeySelector selectorDlg( parentWidget(), i18n( "Chiasmus Decryption Key Selection" ),
+ ChiasmusKeySelector selectorDlg( tqparentWidget(), i18n( "Chiasmus Decryption Key Selection" ),
keys, GlobalSettings::chiasmusDecryptionKey(),
GlobalSettings::chiasmusDecryptionOptions() );
if ( selectorDlg.exec() != TQDialog::Accepted )
@@ -3270,7 +3270,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
if ( !job ) {
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
@@ -3281,13 +3281,13 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
!job->setProperty( "input", input ) ) {
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
setDeletesItself( true ); // the job below is async, we have to cleanup ourselves
if ( job->start() ) {
- job->showErrorDialog( parentWidget(), i18n( "Chiasmus Decryption Error" ) );
+ job->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Decryption Error" ) );
return;
}
@@ -3313,7 +3313,7 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
if ( err.isCanceled() )
return;
if ( err ) {
- job->showErrorDialog( parentWidget(), i18n( "Chiasmus Decryption Error" ) );
+ job->showErrorDialog( tqparentWidget(), i18n( "Chiasmus Decryption Error" ) );
return;
}
@@ -3321,21 +3321,21 @@ void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::E
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" ) );
+ KMessageBox::error( tqparentWidget(), msg, i18n( "Chiasmus Backend Error" ) );
return;
}
- const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString::null, parentWidget() );
+ const KURL url = KFileDialog::getSaveURL( chomp( mAtmName, ".xia", false ), TQString::null, tqparentWidget() );
if ( url.isEmpty() )
return;
- bool overwrite = KMail::Util::checkOverwrite( url, parentWidget() );
+ bool overwrite = KMail::Util::checkOverwrite( url, tqparentWidget() );
if ( !overwrite )
return;
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() );
+ uploadJob->setWindow( tqparentWidget() );
connect( uploadJob, TQT_SIGNAL(result(KIO::Job*)),
this, TQT_SLOT(slotAtmDecryptWithChiasmusUploadResult(KIO::Job*)) );
}
@@ -3452,7 +3452,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify()
KMMessage *newMsg = new KMMessage();
newMsg->fromDwString( msg->asDwString() );
- newMsg->setStatus( msg->status() );
+ newMsg->seStatus( msg->status() );
storeChangedMessage( newMsg );
return OK;
@@ -3500,7 +3500,7 @@ KMCommand::Result KMEditAttachmentCommand::doAttachmentModify()
KMail::EditorWatcher *watcher =
new KMail::EditorWatcher( KURL( mTempFile.file()->name() ),
part.typeStr() + "/" + part.subtypeStr(),
- false, this, parentWidget() );
+ false, this, tqparentWidget() );
connect( watcher, TQT_SIGNAL(editDone(KMail::EditorWatcher*)), TQT_SLOT(editDone(KMail::EditorWatcher*)) );
if ( !watcher->start() )
return Failed;
@@ -3543,7 +3543,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
KMMessage *newMsg = new KMMessage();
newMsg->fromDwString( msg->asDwString() );
- newMsg->setStatus( msg->status() );
+ newMsg->seStatus( msg->status() );
storeChangedMessage( newMsg );
}