summaryrefslogtreecommitdiffstats
path: root/kmail/kmaccount.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kmail/kmaccount.cpp
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmaccount.cpp')
-rw-r--r--kmail/kmaccount.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kmail/kmaccount.cpp b/kmail/kmaccount.cpp
index 65222dd4b..ad0f55b30 100644
--- a/kmail/kmaccount.cpp
+++ b/kmail/kmaccount.cpp
@@ -30,7 +30,7 @@ using KMail::FolderJob;
#include <kdebug.h>
#include <kconfig.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include <stdlib.h>
#include <unistd.h>
@@ -42,8 +42,8 @@ using KMail::FolderJob;
#include "kmaccount.moc"
//-----------------------------------------------------------------------------
-KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent)
- : QObject(parent), mPrecommand(precommand)
+KMPrecommand::KMPrecommand(const TQString &precommand, TQObject *parent)
+ : TQObject(parent), mPrecommand(precommand)
{
BroadcastStatus::instance()->setStatusMsg(
i18n("Executing precommand %1").arg(precommand ));
@@ -51,8 +51,8 @@ KMPrecommand::KMPrecommand(const QString &precommand, QObject *parent)
mPrecommandProcess.setUseShell(true);
mPrecommandProcess << precommand;
- connect(&mPrecommandProcess, SIGNAL(processExited(KProcess *)),
- SLOT(precommandExited(KProcess *)));
+ connect(&mPrecommandProcess, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(precommandExited(KProcess *)));
}
//-----------------------------------------------------------------------------
@@ -83,7 +83,7 @@ void KMPrecommand::precommandExited(KProcess *p)
//-----------------------------------------------------------------------------
-KMAccount::KMAccount(AccountManager* aOwner, const QString& aName, uint id)
+KMAccount::KMAccount(AccountManager* aOwner, const TQString& aName, uint id)
: KAccount( id, aName ),
mTrash(KMKernel::self()->trashFolder()->idString()),
mOwner(aOwner),
@@ -116,7 +116,7 @@ KMAccount::~KMAccount()
//-----------------------------------------------------------------------------
-void KMAccount::setName(const QString& aName)
+void KMAccount::setName(const TQString& aName)
{
mName = aName;
}
@@ -144,7 +144,7 @@ void KMAccount::setFolder(KMFolder* aFolder, bool addAccount)
//-----------------------------------------------------------------------------
void KMAccount::readConfig(KConfig& config)
{
- QString folderName;
+ TQString folderName;
mFolder = 0;
folderName = config.readEntry("Folder");
setCheckInterval(config.readNumEntry("check-interval", 0));
@@ -181,7 +181,7 @@ void KMAccount::writeConfig(KConfig& config)
KAccount::writeConfig(config);
config.writeEntry("Type", type());
- config.writeEntry("Folder", mFolder ? mFolder->idString() : QString::null);
+ config.writeEntry("Folder", mFolder ? mFolder->idString() : TQString::null);
config.writeEntry("check-interval", mInterval);
config.writeEntry("check-exclude", mExclude);
config.writePathEntry("precommand", mPrecommand);
@@ -207,7 +207,7 @@ void KMAccount::sendReceipt(KMMessage* aMsg)
KMMessage *newMsg = aMsg->createDeliveryReceipt();
if (newMsg) {
mReceipts.append(newMsg);
- QTimer::singleShot( 0, this, SLOT( sendReceipts() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( sendReceipts() ) );
}
}
@@ -239,9 +239,9 @@ bool KMAccount::processNewMsg(KMMessage* aMsg)
aMsg->setStatus(KMMsgStatusNew);
}
/*
-QFile fileD0( "testdat_xx-kmaccount-0" );
+TQFile fileD0( "testdat_xx-kmaccount-0" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
@@ -252,7 +252,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
if (processResult == 2) {
perror("Critical error: Unable to collect mail (out of space?)");
KMessageBox::information(0,(i18n("Critical error: "
- "Unable to collect mail: ")) + QString::fromLocal8Bit(strerror(errno)));
+ "Unable to collect mail: ")) + TQString::fromLocal8Bit(strerror(errno)));
return false;
}
else if (processResult == 1)
@@ -265,9 +265,9 @@ if( fileD0.open( IO_WriteOnly ) ) {
kmkernel->filterMgr()->tempOpenFolder(mFolder);
rc = mFolder->addMsg(aMsg);
/*
-QFile fileD0( "testdat_xx-kmaccount-1" );
+TQFile fileD0( "testdat_xx-kmaccount-1" );
if( fileD0.open( IO_WriteOnly ) ) {
- QDataStream ds( &fileD0 );
+ TQDataStream ds( &fileD0 );
ds.writeRawBytes( aMsg->asString(), aMsg->asString().length() );
fileD0.close(); // If data is 0 we just create a zero length file.
}
@@ -275,7 +275,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
if (rc) {
perror("failed to add message");
KMessageBox::information(0, i18n("Failed to add message:\n") +
- QString(strerror(rc)));
+ TQString(strerror(rc)));
return false;
}
int count = mFolder->count();
@@ -285,7 +285,7 @@ if( fileD0.open( IO_WriteOnly ) ) {
}
// Count number of new messages for each folder
- QString folderId;
+ TQString folderId;
if ( processResult == 1 ) {
folderId = ( type() == "cachedimap" ) ? parent->folder()->idString()
: mFolder->idString();
@@ -327,7 +327,7 @@ void KMAccount::deleteFolderJobs()
void KMAccount::ignoreJobsForMessage( KMMessage* msg )
{
//FIXME: remove, make folders handle those
- for( QPtrListIterator<FolderJob> it(mJobList); it.current(); ++it ) {
+ for( TQPtrListIterator<FolderJob> it(mJobList); it.current(); ++it ) {
if ( it.current()->msgList().first() == msg) {
FolderJob *job = it.current();
mJobList.remove( job );
@@ -350,8 +350,8 @@ void KMAccount::installTimer()
if (mInterval <= 0) return;
if(!mTimer)
{
- mTimer = new QTimer(0, "mTimer");
- connect(mTimer,SIGNAL(timeout()),SLOT(mailCheck()));
+ mTimer = new TQTimer(0, "mTimer");
+ connect(mTimer,TQT_SIGNAL(timeout()),TQT_SLOT(mailCheck()));
}
else
{
@@ -369,7 +369,7 @@ void KMAccount::deinstallTimer()
}
//-----------------------------------------------------------------------------
-bool KMAccount::runPrecommand(const QString &precommand)
+bool KMAccount::runPrecommand(const TQString &precommand)
{
// Run the pre command if there is one
if ( precommand.isEmpty() )
@@ -380,8 +380,8 @@ bool KMAccount::runPrecommand(const QString &precommand)
BroadcastStatus::instance()->setStatusMsg(
i18n("Executing precommand %1").arg(precommand ));
- connect(&precommandProcess, SIGNAL(finished(bool)),
- SLOT(precommandExited(bool)));
+ connect(&precommandProcess, TQT_SIGNAL(finished(bool)),
+ TQT_SLOT(precommandExited(bool)));
kdDebug(5006) << "Running precommand " << precommand << endl;
if (!precommandProcess.start()) return false;
@@ -414,30 +414,30 @@ void KMAccount::mailCheck()
//-----------------------------------------------------------------------------
void KMAccount::sendReceipts()
{
- QValueList<KMMessage*>::Iterator it;
+ TQValueList<KMMessage*>::Iterator it;
for(it = mReceipts.begin(); it != mReceipts.end(); ++it)
kmkernel->msgSender()->send(*it); //might process events
mReceipts.clear();
}
//-----------------------------------------------------------------------------
-QString KMAccount::encryptStr(const QString &aStr)
+TQString KMAccount::encryptStr(const TQString &aStr)
{
- QString result;
+ TQString result;
for (uint i = 0; i < aStr.length(); i++)
/* yes, no typo. can't encode ' ' or '!' because
they're the unicode BOM. stupid scrambling. stupid. */
result += (aStr[i].unicode() <= 0x21 ) ? aStr[i] :
- QChar(0x1001F - aStr[i].unicode());
+ TQChar(0x1001F - aStr[i].unicode());
return result;
}
//-----------------------------------------------------------------------------
-QString KMAccount::importPassword(const QString &aStr)
+TQString KMAccount::importPassword(const TQString &aStr)
{
unsigned int i, val;
unsigned int len = aStr.length();
- QCString result;
+ TQCString result;
result.resize(len+1);
for (i=0; i<len; i++)
@@ -491,7 +491,7 @@ void KMAccount::checkDone( bool newmail, CheckStatus status )
}
//-----------------------------------------------------------------------------
-void KMAccount::addToNewInFolder( QString folderId, int num )
+void KMAccount::addToNewInFolder( TQString folderId, int num )
{
if ( mNewInFolder.find( folderId ) == mNewInFolder.end() )
mNewInFolder[folderId] = num;