summaryrefslogtreecommitdiffstats
path: root/kmail/kmcommands.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:59:50 -0600
commit9cc13dcbb01a96c9e60a07ca63c61d24b374f50d (patch)
treeab537a329b9613e11dce8195761f93ffe82aed24 /kmail/kmcommands.cpp
parent3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (diff)
downloadtdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.tar.gz
tdepim-9cc13dcbb01a96c9e60a07ca63c61d24b374f50d.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.
Diffstat (limited to 'kmail/kmcommands.cpp')
-rw-r--r--kmail/kmcommands.cpp88
1 files changed, 44 insertions, 44 deletions
diff --git a/kmail/kmcommands.cpp b/kmail/kmcommands.cpp
index 2a0713c77..19661be97 100644
--- a/kmail/kmcommands.cpp
+++ b/kmail/kmcommands.cpp
@@ -54,7 +54,7 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <textcodec.h>
+#include <tqtextcodec.h>
#include <tqpopupmenu.h>
#include <tqeventloop.h>
@@ -133,7 +133,7 @@ using namespace KMime;
#include <kleo/cryptobackend.h>
#include <kleo/cryptobackendfactory.h>
-#include <clipboard.h>
+#include <tqclipboard.h>
#include <memory>
@@ -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();
@@ -586,7 +586,7 @@ KMUrlCopyCommand::KMUrlCopyCommand( const KURL &url, KMMainWidget *mainWidget )
KMCommand::Result KMUrlCopyCommand::execute()
{
- TQClipboard* clip = TQApplication::clipboard();
+ TQClipboard* clip = TQApplication::tqclipboard();
if (mUrl.protocol() == "mailto") {
// put the url into the mouse selection and the clipboard
@@ -640,7 +640,7 @@ KMCommand::Result KMUrlSaveCommand::execute()
{
if (KMessageBox::warningContinueCancel(0,
i18n("<qt>File <b>%1</b> exists.<br>Do you want to replace it?</qt>")
- .arg(saveUrl.prettyURL()), i18n("Save to File"), i18n("&Replace"))
+ .tqarg(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();
@@ -963,7 +963,7 @@ void KMSaveMsgCommand::slotSaveResult(KIO::Job *job)
{
if (KMessageBox::warningContinueCancel(0,
i18n("File %1 exists.\nDo you want to replace it?")
- .arg(mUrl.prettyURL()), i18n("Save to File"), i18n("&Replace"))
+ .tqarg(mUrl.prettyURL()), i18n("Save to File"), i18n("&Replace"))
== KMessageBox::Continue) {
mOffset = 0;
@@ -1395,14 +1395,14 @@ 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( TQString(msg->charset()) );
+ msgPartText += TQString( "; CHARSET=%1" ).tqarg( TQString(msg->charset()) );
msgPartText += '\n';
DwHeaders dwh;
dwh.MessageId().CreateDefault();
- msgPartText += TQString( "Content-ID: %1\n" ).arg( dwh.MessageId().AsString().c_str() );
- msgPartText += TQString( "Content-Description: %1" ).arg( msg->subject() );
+ msgPartText += TQString( "Content-ID: %1\n" ).tqarg( dwh.MessageId().AsString().c_str() );
+ msgPartText += TQString( "Content-Description: %1" ).tqarg( msg->subject() );
if ( !msg->subject().contains( "(fwd)" ) )
msgPartText += " (fwd)";
msgPartText += "\n\n";
@@ -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" );
@@ -1430,7 +1430,7 @@ KMCommand::Result KMForwardDigestCommand::execute()
msgPart->setSubtypeStr( tmp );
msgPart->setName( "unnamed" );
msgPart->setCte( DwMime::kCte7bit ); // does it have to be 7bit?
- msgPart->setContentDescription( TQString( "Digest of %1 messages." ).arg( msgCnt ) );
+ msgPart->setContentDescription( TQString( "Digest of %1 messages." ).tqarg( msgCnt ) );
// THIS HAS TO BE AFTER setCte()!!!!
msgPart->setBodyEncoded( TQCString( msgPartText.ascii() ) );
KCursorSaver busy( KBusyPtr::busy() );
@@ -1639,9 +1639,9 @@ KMCommand::Result KMPrintCommand::execute()
}
-KMSeStatusCommand::KMSeStatusCommand( KMMsgStatus status,
+KMSeStatusCommand::KMSeStatusCommand( KMMsgtqStatus status,
const TQValueList<TQ_UINT32> &serNums, bool toggle )
- : mStatus( status ), mSerNums( serNums ), mToggle( toggle )
+ : mtqStatus( status ), mSerNums( serNums ), mToggle( toggle )
{
}
@@ -1650,7 +1650,7 @@ KMCommand::Result KMSeStatusCommand::execute()
TQValueListIterator<TQ_UINT32> it;
int idx = -1;
KMFolder *folder = 0;
- bool parenStatus = false;
+ bool parentqStatus = false;
// Toggle actions on threads toggle the whole thread
// depending on the state of the parent.
@@ -1659,10 +1659,10 @@ KMCommand::Result KMSeStatusCommand::execute()
KMMsgDict::instance()->getLocation( *mSerNums.begin(), &folder, &idx );
if (folder) {
msg = folder->getMsgBase(idx);
- if (msg && (msg->status()&mStatus))
- parenStatus = true;
+ if (msg && (msg->status()&mtqStatus))
+ parentqStatus = true;
else
- parenStatus = false;
+ parentqStatus = false;
}
}
TQMap< KMFolder*, TQValueList<int> > folderMap;
@@ -1673,12 +1673,12 @@ KMCommand::Result KMSeStatusCommand::execute()
KMMsgBase *msg = folder->getMsgBase(idx);
// check if we are already at the target toggle state
if (msg) {
- bool myStatus;
- if (msg->status()&mStatus)
- myStatus = true;
+ bool mytqStatus;
+ if (msg->status()&mtqStatus)
+ mytqStatus = true;
else
- myStatus = false;
- if (myStatus != parenStatus)
+ mytqStatus = false;
+ if (mytqStatus != parentqStatus)
continue;
}
}
@@ -1690,7 +1690,7 @@ KMCommand::Result KMSeStatusCommand::execute()
TQMapIterator< KMFolder*, TQValueList<int> > it2 = folderMap.begin();
while ( it2 != folderMap.end() ) {
KMFolder *f = it2.key();
- f->seStatus( (*it2), mStatus, mToggle );
+ f->setqStatus( (*it2), mtqStatus, mToggle );
++it2;
}
//kapp->dcopClient()->emitDCOPSignal( "unreadCountChanged()", TQByteArray() );
@@ -1741,7 +1741,7 @@ KMCommand::Result KMFilterActionCommand::execute()
if ( diff < 10 || !( msgCount % 20 ) || msgCount <= 10 ) {
progressItem->updateProgress();
TQString statusMsg = i18n("Filtering message %1 of %2");
- statusMsg = statusMsg.arg( msgCount ).arg( msgCountToFilter );
+ statusMsg = statusMsg.tqarg( msgCount ).tqarg( msgCountToFilter );
KPIM::BroadcastStatus::instance()->seStatusMsg( statusMsg );
KApplication::kApplication()->eventLoop()->processEvents( TQEventLoop::ExcludeUserInput, 50 );
}
@@ -1995,7 +1995,7 @@ KMCommand::Result KMCopyCommand::execute()
// corrupt IMAP cache, see FolderStorage::getMsg()
if ( msg == 0 ) {
KMessageBox::error( parentWidget(), i18n("Corrupt IMAP cache detected in folder %1. "
- "Copying of messages aborted.").arg( srcFolder->prettyURL() ) );
+ "Copying of messages aborted.").tqarg( 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->seStatus(msg->status());
+ newMsg->setqStatus(msg->status());
if (srcFolder && !newMsg->isComplete())
{
@@ -2461,7 +2461,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() ), TQString(), i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes)
+ .tqarg( mUrl.prettyURL() ), TQString(), i18n("Execute"), KStdGuiItem::cancel() ) != KMessageBox::Yes)
return Canceled;
}
KRun * runner = new KRun( mUrl );
@@ -2605,7 +2605,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
++unnamedAtmCount;
s = i18n("filename for the %1-th unnamed attachment",
"attachment.%1")
- .arg( unnamedAtmCount );
+ .tqarg( unnamedAtmCount );
}
curUrl.setFileName( s );
} else {
@@ -2644,7 +2644,7 @@ void KMSaveAttachmentsCommand::slotSaveAll()
if ( KIO::NetAccess::exists( curUrl, false, parentWidget() ) ) {
if ( KMessageBox::warningContinueCancel( parentWidget(),
i18n( "A file named %1 already exists. Do you want to overwrite it?" )
- .arg( curUrl.fileName() ),
+ .tqarg( curUrl.fileName() ),
i18n( "File Already Exists" ), i18n("&Overwrite") ) == KMessageBox::Cancel) {
continue;
}
@@ -2752,8 +2752,8 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
KMessageBox::error( parentWidget(),
i18n( "%2 is detailed error description",
"Could not write the file %1:\n%2" )
- .arg( file.name() )
- .arg( TQString::fromLocal8Bit( strerror( errno ) ) ),
+ .tqarg( file.name() )
+ .tqarg( TQString::fromLocal8Bit( strerror( errno ) ) ),
i18n( "KMail Error" ) );
return Failed;
}
@@ -2777,7 +2777,7 @@ KMCommand::Result KMSaveAttachmentsCommand::saveItem( partNode *node,
{
KMessageBox::error( parentWidget(),
i18n( "Could not write the file %1." )
- .arg( url.path() ),
+ .tqarg( url.path() ),
i18n( "KMail Error" ) );
return Failed;
}
@@ -3011,8 +3011,8 @@ KMCommand::Result KMIMChatCommand::execute()
{
nameList.append( (*it).realName() );
}
- TQString names = nameList.join( TQString::fromLatin1( ",\n" ) );
- apology = apology.arg( names );
+ TQString names = nameList.join( TQString::tqfromLatin1( ",\n" ) );
+ apology = apology.tqarg( names );
}
KMessageBox::sorry( parentWidget(), apology );
@@ -3216,7 +3216,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
return;
// FIXME: better detection of mimetype??
- if ( !mAtmName.endsWith( ".xia", false ) )
+ if ( !mAtmName.tqendsWith( ".xia", false ) )
return;
const Kleo::CryptoBackend::Protocol * chiasmus =
@@ -3297,7 +3297,7 @@ void KMHandleAttachmentCommand::atmEncryptWithChiasmus()
}
static const TQString chomp( const TQString & base, const TQString & suffix, bool cs ) {
- return base.endsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ;
+ return base.tqendsWith( suffix, cs ) ? base.left( base.length() - suffix.length() ) : base ;
}
void KMHandleAttachmentCommand::slotAtmDecryptWithChiasmusResult( const GpgME::Error & err, const TQVariant & result )
@@ -3452,7 +3452,7 @@ KMCommand::Result KMDeleteAttachmentCommand::doAttachmentModify()
KMMessage *newMsg = new KMMessage();
newMsg->fromDwString( msg->asDwString() );
- newMsg->seStatus( msg->status() );
+ newMsg->setqStatus( msg->status() );
storeChangedMessage( newMsg );
return OK;
@@ -3543,7 +3543,7 @@ void KMEditAttachmentCommand::editDone(KMail::EditorWatcher * watcher)
KMMessage *newMsg = new KMMessage();
newMsg->fromDwString( msg->asDwString() );
- newMsg->seStatus( msg->status() );
+ newMsg->setqStatus( msg->status() );
storeChangedMessage( newMsg );
}
@@ -3563,8 +3563,8 @@ KMCommand::Result CreateTodoCommand::execute()
KMail::KorgHelper::ensureRunning();
- TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").arg( msg->from() )
- .arg( msg->to() ).arg( msg->subject() );
+ TQString txt = i18n("From: %1\nTo: %2\nSubject: %3").tqarg( msg->from() )
+ .tqarg( msg->to() ).tqarg( msg->subject() );
KTempFile tf;
tf.setAutoDelete( true );
@@ -3573,7 +3573,7 @@ KMCommand::Result CreateTodoCommand::execute()
tf.close();
KCalendarIface_stub *iface = new KCalendarIface_stub( kapp->dcopClient(), "korganizer", "CalendarIface" );
- iface->openTodoEditor( i18n("Mail: %1").arg( msg->subject() ), txt, uri,
+ iface->openTodoEditor( i18n("Mail: %1").tqarg( msg->subject() ), txt, uri,
tf.name(), TQStringList(), "message/rfc822", true );
delete iface;