summaryrefslogtreecommitdiffstats
path: root/kmail/kmcommands.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit4c6f8d69e2d1501837affb472c4eb8fec4462240 (patch)
tree766a8ad7939fcf3eec534184c36bd0e0f80489e2 /kmail/kmcommands.cpp
parent469cc56a805bd3d6940d54adbef554877c29853c (diff)
downloadtdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.tar.gz
tdepim-4c6f8d69e2d1501837affb472c4eb8fec4462240.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r--kmail/kmcommands.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 3f83fad6..bdd700bf 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -229,7 +229,7 @@ void KMCommand::slotStart()
this, TQT_SLOT( slotPostTransfer( KMCommand::Result ) ) );
kmkernel->filterMgr()->ref();
- if (mMsgList.tqfind(0) != -1) {
+ if (mMsgList.find(0) != -1) {
emit messagesTransfered( Failed );
return;
}
@@ -316,7 +316,7 @@ void KMCommand::transferSelectedMsgs()
else
{
KMFolder *folder = mb->tqparent();
- int idx = folder->tqfind(mb);
+ int idx = folder->find(mb);
if (idx < 0) continue;
thisMsg = folder->getMsg(idx);
}
@@ -441,7 +441,7 @@ void KMCommand::slotTransferCancelled()
if (!folder)
continue;
msg->setTransferInProgress(false);
- int idx = folder->tqfind(msg);
+ int idx = folder->find(msg);
if (idx > 0) folder->unGetMsg(idx);
}
mRetrievedMsgs.clear();
@@ -682,7 +682,7 @@ KMCommand::Result KMEditMsgCommand::execute()
// edit is discarded, for n > 1.
KMFolder *tqparent = msg->tqparent();
if ( tqparent )
- tqparent->take( tqparent->tqfind( msg ) );
+ tqparent->take( tqparent->find( msg ) );
KMail::Composer * win = KMail::makeComposer();
msg->setTransferInProgress(false); // From here on on, the composer owns the message.
@@ -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()
- .tqreplace( TQDir::separator(), '_' )
- .tqreplace( ": ", "_" )
- .tqreplace( ':', '_' )
- .tqreplace( '.', '_' )
- .tqreplace( '~', '_' );
+ .replace( TQDir::separator(), '_' )
+ .replace( ": ", "_" )
+ .replace( ':', '_' )
+ .replace( '.', '_' )
+ .replace( '~', '_' );
return KFileDialog::getSaveURL( cleanSubject, filter );
}
@@ -945,7 +945,7 @@ void KMSaveMsgCommand::slotMessageRetrievedForSaving(KMMessage *msg)
++mMsgListIndex;
// Get rid of the message.
if ( msg && msg->tqparent() && msg->getMsgSerNum() &&
- mUngetMsgs.tqcontains( msg ) ) {
+ mUngetMsgs.contains( msg ) ) {
int idx = -1;
KMFolder * p = 0;
KMMsgDict::instance()->getLocation( msg, &p, &idx );
@@ -1041,7 +1041,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
else {
int startOfMessage = 0;
if ( mMsgString.compare( 0, 5, "From ", 5 ) == 0 ) {
- startOfMessage = mMsgString.tqfind( '\n' );
+ startOfMessage = mMsgString.find( '\n' );
if ( startOfMessage == -1 ) {
KMessageBox::sorry( parentWidget(),
i18n( "The file does not contain a message." ) );
@@ -1060,7 +1060,7 @@ void KMOpenMsgCommand::slotResult( KIO::Job *job )
}
// check for multiple messages in the file
bool multipleMessages = true;
- int endOfMessage = mMsgString.tqfind( "\nFrom " );
+ int endOfMessage = mMsgString.find( "\nFrom " );
if ( endOfMessage == -1 ) {
endOfMessage = mMsgString.length();
multipleMessages = false;
@@ -1403,7 +1403,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
dwh.MessageId().CreateDefault();
msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() );
msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() );
- if ( !msg->subject().tqcontains( "(fwd)" ) )
+ if ( !msg->subject().contains( "(fwd)" ) )
msgPartText += " (fwd)";
msgPartText += "\n\n";
// remove headers that shouldn't be forwarded
@@ -1849,7 +1849,7 @@ void KMMenuCommand::folderToPopupMenu(bool move,
{
while ( menu->count() )
{
- TQPopupMenu *popup = menu->tqfindItem( menu->idAt( 0 ) )->popup();
+ TQPopupMenu *popup = menu->findItem( menu->idAt( 0 ) )->popup();
if (popup)
delete popup;
else
@@ -1932,7 +1932,7 @@ void KMMenuCommand::makeFolderMenu(KMFolderNode* node, bool move,
continue;
KMFolder *child = static_cast<KMFolder*>(it);
TQString label = child->label();
- label.tqreplace("&","&&");
+ label.replace("&","&&");
if (child->child() && child->child()->first()) {
// descend
TQPopupMenu *subMenu = new TQPopupMenu(menu, "subMenu");
@@ -1989,7 +1989,7 @@ KMCommand::Result KMCopyCommand::execute()
{
msg = static_cast<KMMessage*>(msgBase);
} else {
- idx = srcFolder->tqfind(msgBase);
+ idx = srcFolder->find(msgBase);
assert(idx != -1);
msg = srcFolder->getMsg(idx);
// corrupt IMAP cache, see FolderStorage::getMsg()
@@ -2307,7 +2307,7 @@ void KMMoveCommand::slotImapFolderCompleted(KMFolderImap* imapFolder, bool succe
void KMMoveCommand::slotMsgAddedToDestFolder(KMFolder *folder, TQ_UINT32 serNum)
{
- if ( folder != mDestFolder || mLostBoys.tqfind( serNum ) == mLostBoys.end() ) {
+ if ( folder != mDestFolder || mLostBoys.find( serNum ) == mLostBoys.end() ) {
//kdDebug(5006) << "KMMoveCommand::msgAddedToDestFolder different "
// "folder or invalid serial number." << endl;
return;
@@ -2421,7 +2421,7 @@ KMCommand::Result KMUrlClickedCommand::execute()
TQString query=mUrl.query();
while (!query.isEmpty()) {
TQString queryPart;
- int secondQuery = query.tqfind('?',1);
+ int secondQuery = query.find('?',1);
if (secondQuery != -1)
queryPart = query.left(secondQuery);
else
@@ -2572,9 +2572,9 @@ void KMSaveAttachmentsCommand::slotSaveAll()
partNode *node = mAttachmentMap.begin().key();
// replace all ':' with '_' because ':' isn't allowed on FAT volumes
TQString s =
- node->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' );
+ node->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
- s = node->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' );
+ s = node->msgPart().name().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
s = i18n("filename for an unnamed attachment", "attachment.1");
url = KFileDialog::getSaveURL( s, TQString(), parentWidget(),
@@ -2598,9 +2598,9 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( !dirUrl.isEmpty() ) {
curUrl = dirUrl;
TQString s =
- it.key()->msgPart().fileName().stripWhiteSpace().tqreplace( ':', '_' );
+ it.key()->msgPart().fileName().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() )
- s = it.key()->msgPart().name().stripWhiteSpace().tqreplace( ':', '_' );
+ s = it.key()->msgPart().name().stripWhiteSpace().replace( ':', '_' );
if ( s.isEmpty() ) {
++unnamedAtmCount;
s = i18n("filename for the %1-th unnamed attachment",
@@ -2619,22 +2619,22 @@ void KMSaveAttachmentsCommand::slotSaveAll()
TQString origFile = curUrl.fileName();
TQString file = origFile;
- while ( renameNumbering.tqcontains(file) ) {
+ while ( renameNumbering.contains(file) ) {
file = origFile;
int num = renameNumbering[file] + 1;
- int dotIdx = file.tqfindRev('.');
+ int dotIdx = file.findRev('.');
file = file.insert( (dotIdx>=0) ? dotIdx : file.length(), TQString("_") + TQString::number(num) );
}
curUrl.setFileName(file);
// Increment the counter for both the old and the new filename
- if ( !renameNumbering.tqcontains(origFile))
+ if ( !renameNumbering.contains(origFile))
renameNumbering[origFile] = 1;
else
renameNumbering[origFile]++;
if ( file != origFile ) {
- if ( !renameNumbering.tqcontains(file))
+ if ( !renameNumbering.contains(file))
renameNumbering[file] = 1;
else
renameNumbering[file]++;