diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kresources/scalix/kioslave | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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 'kresources/scalix/kioslave')
-rw-r--r-- | kresources/scalix/kioslave/scalix.cpp | 56 | ||||
-rw-r--r-- | kresources/scalix/kioslave/scalix.h | 10 |
2 files changed, 33 insertions, 33 deletions
diff --git a/kresources/scalix/kioslave/scalix.cpp b/kresources/scalix/kioslave/scalix.cpp index 199bd0980..043b0f4a1 100644 --- a/kresources/scalix/kioslave/scalix.cpp +++ b/kresources/scalix/kioslave/scalix.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qeventloop.h> +#include <tqapplication.h> +#include <tqeventloop.h> #include <kapplication.h> #include <kcmdlineargs.h> @@ -62,7 +62,7 @@ int kdemain( int argc, char **argv ) return 0; } -Scalix::Scalix( const QCString &protocol, const QCString &pool, const QCString &app ) +Scalix::Scalix( const TQCString &protocol, const TQCString &pool, const TQCString &app ) : SlaveBase( protocol, pool, app ) { } @@ -71,7 +71,7 @@ void Scalix::get( const KURL &url ) { mimeType( "text/plain" ); - QString path = url.path(); + TQString path = url.path(); if ( path.contains( "/freebusy/" ) ) { retrieveFreeBusy( url ); @@ -82,7 +82,7 @@ void Scalix::get( const KURL &url ) void Scalix::put( const KURL& url, int, bool, bool ) { - QString path = url.path(); + TQString path = url.path(); if ( path.contains( "/freebusy/" ) ) { publishFreeBusy( url ); @@ -99,27 +99,27 @@ void Scalix::retrieveFreeBusy( const KURL &url ) */ // Extract user@domain (e.g. everything between '/freebusy/' and '.ifb') - const QString requestUser = url.path().mid( 10, url.path().length() - 14 ); + const TQString requestUser = url.path().mid( 10, url.path().length() - 14 ); - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString argument = QString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser ); - const QString command = QString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() ); + const TQString argument = TQString( "BEGIN:VFREEBUSY\nATTENDEE:MAILTO:%1\nEND:VFREEBUSY" ).arg( requestUser ); + const TQString command = TQString( "X-GET-ICAL-FREEBUSY {%1}" ).arg( argument.length() ); stream << (int) 'X' << 'E' << command << argument; - QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? + TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? url.user() : url.user() + ":" + url.pass() ) .arg( url.host() ); - mFreeBusyData = QString(); + mFreeBusyData = TQString(); KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false ); - connect( job, SIGNAL( infoMessage( KIO::Job*, const QString& ) ), - this, SLOT( slotInfoMessage( KIO::Job*, const QString& ) ) ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotRetrieveResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( infoMessage( KIO::Job*, const TQString& ) ), + this, TQT_SLOT( slotInfoMessage( KIO::Job*, const TQString& ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotRetrieveResult( KIO::Job* ) ) ); qApp->eventLoop()->enterLoop(); } @@ -130,8 +130,8 @@ void Scalix::publishFreeBusy( const KURL &url ) * The url is of the following form: * scalix://user:password@host/freebusy/path/to/calendar/user@domain */ - QString requestUser, calendar; - QString path = url.path(); + TQString requestUser, calendar; + TQString path = url.path(); // extract user name int lastSlash = path.findRev( '/' ); @@ -149,11 +149,11 @@ void Scalix::publishFreeBusy( const KURL &url ) }; // read freebusy information - QByteArray data; + TQByteArray data; while ( true ) { dataReq(); - QByteArray buffer; + TQByteArray buffer; const int newSize = readData(buffer); if ( newSize < 0 ) { // read error: network in unknown state so disconnect @@ -169,26 +169,26 @@ void Scalix::publishFreeBusy( const KURL &url ) memcpy( data.data() + oldSize, buffer.data(), buffer.size() ); } - QByteArray packedArgs; - QDataStream stream( packedArgs, IO_WriteOnly ); + TQByteArray packedArgs; + TQDataStream stream( packedArgs, IO_WriteOnly ); - const QString argument = QString::fromUtf8( data ); - const QString command = QString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() ); + const TQString argument = TQString::fromUtf8( data ); + const TQString command = TQString( "X-PUT-ICAL-FREEBUSY Calendar {%1}" ).arg( argument.length() ); stream << (int) 'X' << 'E' << command << argument; - QString imapUrl = QString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? + TQString imapUrl = TQString( "imap://%1@%3/" ).arg( url.pass().isEmpty() ? url.user() : url.user() + ":" + url.pass() ) .arg( url.host() ); KIO::SimpleJob *job = KIO::special( imapUrl, packedArgs, false ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotPublishResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotPublishResult( KIO::Job* ) ) ); qApp->eventLoop()->enterLoop(); } -void Scalix::slotInfoMessage( KIO::Job *job, const QString &data ) +void Scalix::slotInfoMessage( KIO::Job *job, const TQString &data ) { if ( job->error() ) { // error is handled in slotResult diff --git a/kresources/scalix/kioslave/scalix.h b/kresources/scalix/kioslave/scalix.h index 3697c49d7..25a2fdeac 100644 --- a/kresources/scalix/kioslave/scalix.h +++ b/kresources/scalix/kioslave/scalix.h @@ -24,14 +24,14 @@ #include <kio/job.h> #include <kio/slavebase.h> -#include <qobject.h> +#include <tqobject.h> -class Scalix : public QObject, public KIO::SlaveBase +class Scalix : public TQObject, public KIO::SlaveBase { Q_OBJECT public: - Scalix( const QCString &protocol, const QCString &pool, const QCString &app ); + Scalix( const TQCString &protocol, const TQCString &pool, const TQCString &app ); void get( const KURL &url ); void put( const KURL &url, int permissions, bool overwrite, bool resume ); @@ -39,13 +39,13 @@ class Scalix : public QObject, public KIO::SlaveBase private slots: void slotRetrieveResult( KIO::Job* ); void slotPublishResult( KIO::Job* ); - void slotInfoMessage( KIO::Job*, const QString& ); + void slotInfoMessage( KIO::Job*, const TQString& ); private: void retrieveFreeBusy( const KURL& ); void publishFreeBusy( const KURL& ); - QString mFreeBusyData; + TQString mFreeBusyData; }; #endif |