summaryrefslogtreecommitdiffstats
path: root/kmail/sievejob.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/sievejob.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/sievejob.cpp')
-rw-r--r--kmail/sievejob.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/kmail/sievejob.cpp b/kmail/sievejob.cpp
index c876c4284..ade08b1da 100644
--- a/kmail/sievejob.cpp
+++ b/kmail/sievejob.cpp
@@ -26,16 +26,16 @@ using KIO::UDSEntryList;
using KIO::UDSEntry;
#include <kdebug.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <cassert>
namespace KMail {
- SieveJob::SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ SieveJob::SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
mUrl( url ), mJob( 0 ), mDec( 0 ),
mScript( script ), mFileExists( DontKnow ), mCommands( commands ),
mShowProgressInfo(true)
@@ -44,11 +44,11 @@ namespace KMail {
schedule( commands.top(), true );
}
- SieveJob::SieveJob( const KURL & url, const QString & script,
- const QValueStack<Command> & commands,
+ SieveJob::SieveJob( const KURL & url, const TQString & script,
+ const TQValueStack<Command> & commands,
bool showProgressInfo,
- QObject * parent, const char * name )
- : QObject( parent, name ),
+ TQObject * parent, const char * name )
+ : TQObject( parent, name ),
mUrl( url ), mJob( 0 ), mDec( 0 ),
mScript( script ), mFileExists( DontKnow ), mCommands( commands ),
mShowProgressInfo(showProgressInfo)
@@ -72,14 +72,14 @@ namespace KMail {
case Get:
kdDebug(5006) << "SieveJob::schedule: get( " << mUrl.prettyURL() << " )" << endl;
mJob = KIO::get( mUrl, false /*reload*/, showProgressInfo );
- connect( mJob, SIGNAL(data(KIO::Job*,const QByteArray&)),
- SLOT(slotData(KIO::Job*,const QByteArray&)) );
+ connect( mJob, TQT_SIGNAL(data(KIO::Job*,const TQByteArray&)),
+ TQT_SLOT(slotData(KIO::Job*,const TQByteArray&)) );
break;
case Put:
kdDebug(5006) << "SieveJob::schedule: put( " << mUrl.prettyURL() << " )" << endl;
mJob = KIO::put( mUrl, 0600, true /*overwrite*/, false /*resume*/, showProgressInfo );
- connect( mJob, SIGNAL(dataReq(KIO::Job*,QByteArray&)),
- SLOT(slotDataReq(KIO::Job*,QByteArray&)) );
+ connect( mJob, TQT_SIGNAL(dataReq(KIO::Job*,TQByteArray&)),
+ TQT_SLOT(slotDataReq(KIO::Job*,TQByteArray&)) );
break;
case Activate:
kdDebug(5006) << "SieveJob::schedule: chmod( " << mUrl.prettyURL() << ", 0700 )"
@@ -95,23 +95,23 @@ namespace KMail {
kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl;
{
KURL url = mUrl;
- QString query = url.query(); //save query part, because KURL::cd() erases it
+ TQString query = url.query(); //save query part, because KURL::cd() erases it
if ( !url.fileName().isEmpty() )
url.cd("..");
url.setQuery( query );
kdDebug(5006) << "SieveJob::schedule: listDir's real URL: " << url.prettyURL()
<< endl;
mJob = KIO::listDir( url, showProgressInfo );
- connect( mJob, SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)),
- SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) );
+ connect( mJob, TQT_SIGNAL(entries(KIO::Job*,const KIO::UDSEntryList&)),
+ TQT_SLOT(slotEntries(KIO::Job*,const KIO::UDSEntryList&)) );
break;
}
case List:
kdDebug(5006) << "SieveJob::schedule: listDir( " << mUrl.prettyURL() << " )" << endl;
{
mJob = KIO::listDir( mUrl, showProgressInfo );
- connect( mJob, SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ),
- SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
+ connect( mJob, TQT_SIGNAL( entries(KIO::Job *, const KIO::UDSEntryList & ) ),
+ TQT_SLOT( slotEntries( KIO::Job *, const KIO::UDSEntryList & ) ) );
break;
}
case Delete:
@@ -123,26 +123,26 @@ namespace KMail {
}
mJob->setInteractive(showProgressInfo);
// common to all jobs:
- connect( mJob, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*)) );
+ connect( mJob, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)) );
}
- void SieveJob::slotData( Job *, const QByteArray & data ) {
+ void SieveJob::slotData( Job *, const TQByteArray & data ) {
// check for end-of-data marker:
if ( data.size() == 0 )
return;
// make sure we have a textdecoder;
if ( !mDec )
- mDec = QTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder();
+ mDec = TQTextCodec::codecForMib( 106 /*utf8*/ )->makeDecoder();
// decode utf8; add to mScript:
mScript += mDec->toUnicode( data.data(), data.size() );
}
- void SieveJob::slotDataReq( Job *, QByteArray & data ) {
+ void SieveJob::slotDataReq( Job *, TQByteArray & data ) {
// check whether we have already sent our data:
if ( mScript.isEmpty() ) {
- data = QByteArray(); // end-of-data marker
+ data = TQByteArray(); // end-of-data marker
return;
}
@@ -154,7 +154,7 @@ namespace KMail {
data.resize( data.size() - 1 );
// mark mScript sent:
- mScript = QString::null;
+ mScript = TQString::null;
}
void SieveJob::slotEntries( Job *, const UDSEntryList & l ) {
@@ -163,7 +163,7 @@ namespace KMail {
// Loop over all UDS atoms to find the UDS_ACCESS and UDS_NAME atoms;
// note if we find an exec'able file ( == active script )
// or the requested filename (mUrl.fileName()).
- QString filename;
+ TQString filename;
bool isActive = false;
for ( UDSEntry::const_iterator et = (*it).begin() ; et != (*it).end() ; ++ et ) {
if ( ( *et ).m_uds == KIO::UDS_NAME ) {
@@ -197,7 +197,7 @@ namespace KMail {
delete mDec; mDec = 0;
if ( mSieveCapabilities.empty() ) {
- mSieveCapabilities = QStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) );
+ mSieveCapabilities = TQStringList::split( ' ', job->queryMetaData( "sieveExtensions" ) );
kdDebug(5006) << "Received Sieve extensions supported:" << endl
<< mSieveCapabilities.join("\n") << endl;
}
@@ -224,7 +224,7 @@ namespace KMail {
if ( !mCommands.empty() ) {
// Don't fail get'ting a non-existant script:
if ( mCommands.top() == Get && mFileExists == No ) {
- mScript = QString::null;
+ mScript = TQString::null;
mCommands.pop();
}
}
@@ -246,9 +246,9 @@ namespace KMail {
}
}
- SieveJob * SieveJob::put( const KURL & dest, const QString & script,
+ SieveJob * SieveJob::put( const KURL & dest, const TQString & script,
bool makeActive, bool wasActive ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
if ( makeActive )
commands.push( Activate );
if ( wasActive )
@@ -258,27 +258,27 @@ namespace KMail {
}
SieveJob * SieveJob::get( const KURL & src, bool showProgressInfo ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Get );
commands.push( SearchActive );
- return new SieveJob( src, QString::null, commands, showProgressInfo );
+ return new SieveJob( src, TQString::null, commands, showProgressInfo );
}
SieveJob * SieveJob::list( const KURL & src ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( List );
- return new SieveJob( src, QString::null, commands );
+ return new SieveJob( src, TQString::null, commands );
}
SieveJob * SieveJob::del( const KURL & url ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Delete );
- return new SieveJob( url, QString::null, commands );
+ return new SieveJob( url, TQString::null, commands );
}
SieveJob * SieveJob::activate( const KURL & url ) {
- QValueStack<Command> commands;
+ TQValueStack<Command> commands;
commands.push( Activate );
- return new SieveJob( url, QString::null, commands );
+ return new SieveJob( url, TQString::null, commands );
}
} // namespace KMail