summaryrefslogtreecommitdiffstats
path: root/kresources/scalix/shared/kmailconnection.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 /kresources/scalix/shared/kmailconnection.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 'kresources/scalix/shared/kmailconnection.cpp')
-rw-r--r--kresources/scalix/shared/kmailconnection.cpp116
1 files changed, 58 insertions, 58 deletions
diff --git a/kresources/scalix/shared/kmailconnection.cpp b/kresources/scalix/shared/kmailconnection.cpp
index af32cd74b..b4b4b9ebf 100644
--- a/kresources/scalix/shared/kmailconnection.cpp
+++ b/kresources/scalix/shared/kmailconnection.cpp
@@ -46,7 +46,7 @@ using namespace Scalix;
KMailConnection::KMailConnection( ResourceScalixBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -55,8 +55,8 @@ KMailConnection::KMailConnection( ResourceScalixBase* resource,
mDCOPClient->registerAs( objId, true );
kapp->dcopClient()->setNotifications( true );
- connect( kapp->dcopClient(), SIGNAL( applicationRemoved( const QCString& ) ),
- this, SLOT( unregisteredFromDCOP( const QCString& ) ) );
+ connect( kapp->dcopClient(), TQT_SIGNAL( applicationRemoved( const TQCString& ) ),
+ this, TQT_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
}
KMailConnection::~KMailConnection()
@@ -68,15 +68,15 @@ KMailConnection::~KMailConnection()
mDCOPClient = 0;
}
-static const QCString dcopObjectId = "KMailICalIface";
+static const TQCString dcopObjectId = "KMailICalIface";
bool KMailConnection::connectToKMail()
{
if ( !mKMailIcalIfaceStub ) {
- QString error;
- QCString dcopService;
+ TQString error;
+ TQCString dcopService;
int result = KDCOPServiceStarter::self()->
- findServiceFor( "DCOP/ResourceBackend/IMAP", QString::null,
- QString::null, &error, &dcopService );
+ findServiceFor( "DCOP/ResourceBackend/IMAP", TQString::null,
+ TQString::null, &error, &dcopService );
if ( result != 0 ) {
kdError(5650) << "Couldn't connect to the IMAP resource backend\n";
// TODO: You might want to show "error" (if not empty) here,
@@ -88,34 +88,34 @@ bool KMailConnection::connectToKMail()
dcopService, dcopObjectId );
// Attach to the KMail signals
- if ( !connectKMailSignal( "incidenceAdded(QString,QString,Q_UINT32,int,QString)",
- "fromKMailAddIncidence(QString,QString,Q_UINT32,int,QString)" ) )
+ if ( !connectKMailSignal( "incidenceAdded(TQString,TQString,Q_UINT32,int,TQString)",
+ "fromKMailAddIncidence(TQString,TQString,Q_UINT32,int,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceAdded failed" << endl;
- if ( !connectKMailSignal( "incidenceDeleted(QString,QString,QString)",
- "fromKMailDelIncidence(QString,QString,QString)" ) )
+ if ( !connectKMailSignal( "incidenceDeleted(TQString,TQString,TQString)",
+ "fromKMailDelIncidence(TQString,TQString,TQString)" ) )
kdError(5650) << "DCOP connection to incidenceDeleted failed" << endl;
- if ( !connectKMailSignal( "signalRefresh(QString,QString)",
- "fromKMailRefresh(QString,QString)" ) )
+ if ( !connectKMailSignal( "signalRefresh(TQString,TQString)",
+ "fromKMailRefresh(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to signalRefresh failed" << endl;
- if ( !connectKMailSignal( "subresourceAdded( QString, QString, QString )",
- "fromKMailAddSubresource( QString, QString, QString )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString )",
+ "fromKMailAddSubresource( TQString, TQString, TQString )" ) )
kdError(5650) << "DCOP connection to subresourceAdded failed" << endl;
- if ( !connectKMailSignal( "subresourceDeleted(QString,QString)",
- "fromKMailDelSubresource(QString,QString)" ) )
+ if ( !connectKMailSignal( "subresourceDeleted(TQString,TQString)",
+ "fromKMailDelSubresource(TQString,TQString)" ) )
kdError(5650) << "DCOP connection to subresourceDeleted failed" << endl;
- if ( !connectKMailSignal( "asyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)",
- "fromKMailAsyncLoadResult(QMap<Q_UINT32, QString>, QString, QString)" ) )
+ if ( !connectKMailSignal( "asyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)",
+ "fromKMailAsyncLoadResult(TQMap<Q_UINT32, TQString>, TQString, TQString)" ) )
kdError(5650) << "DCOP connection to asyncLoadResult failed" << endl;
}
return ( mKMailIcalIfaceStub != 0 );
}
-bool KMailConnection::fromKMailAddIncidence( const QString& type,
- const QString& folder,
+bool KMailConnection::fromKMailAddIncidence( const TQString& type,
+ const TQString& folder,
Q_UINT32 sernum,
int format,
- const QString& data )
+ const TQString& data )
{
if ( format != KMailICalIface::StorageXML
&& format != KMailICalIface::StorageIcalVcard )
@@ -125,25 +125,25 @@ bool KMailConnection::fromKMailAddIncidence( const QString& type,
return mResource->fromKMailAddIncidence( type, folder, sernum, format, data );
}
-void KMailConnection::fromKMailDelIncidence( const QString& type,
- const QString& folder,
- const QString& xml )
+void KMailConnection::fromKMailDelIncidence( const TQString& type,
+ const TQString& folder,
+ const TQString& xml )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelIncidence( " << type << ", "
// << folder << ", " << uid << " )\n";
mResource->fromKMailDelIncidence( type, folder, xml );
}
-void KMailConnection::fromKMailRefresh( const QString& type, const QString& folder )
+void KMailConnection::fromKMailRefresh( const TQString& type, const TQString& folder )
{
// kdDebug(5650) << "KMailConnection::fromKMailRefresh( " << type << ", "
// << folder << " )\n";
mResource->fromKMailRefresh( type, folder );
}
-void KMailConnection::fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label )
+void KMailConnection::fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label )
{
// kdDebug(5650) << "KMailConnection::fromKMailAddSubresource( " << type << ", "
// << resource << " )\n";
@@ -156,30 +156,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
mResource->fromKMailAddSubresource( type, resource, label, writable );
}
-void KMailConnection::fromKMailDelSubresource( const QString& type,
- const QString& resource )
+void KMailConnection::fromKMailDelSubresource( const TQString& type,
+ const TQString& resource )
{
// kdDebug(5650) << "KMailConnection::fromKMailDelSubresource( " << type << ", "
// << resource << " )\n";
mResource->fromKMailDelSubresource( type, resource );
}
-void KMailConnection::fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder )
+void KMailConnection::fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder )
{
mResource->fromKMailAsyncLoadResult( map, type, folder );
}
-bool KMailConnection::connectKMailSignal( const QCString& signal,
- const QCString& method )
+bool KMailConnection::connectKMailSignal( const TQCString& signal,
+ const TQCString& method )
{
return connectDCOPSignal( "kmail", dcopObjectId, signal, method, false )
&& connectDCOPSignal( "kontact", dcopObjectId, signal, method, false );
}
-bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType )
+bool KMailConnection::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType )
{
if ( !connectToKMail() )
return false;
@@ -189,8 +189,8 @@ bool KMailConnection::kmailSubresources( QValueList<KMailICalIface::SubResource>
}
bool KMailConnection::kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource )
+ const TQString& mimetype,
+ const TQString& resource )
{
if ( !connectToKMail() )
return false;
@@ -199,9 +199,9 @@ bool KMailConnection::kmailIncidencesCount( int& count,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool KMailConnection::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
@@ -214,9 +214,9 @@ bool KMailConnection::kmailIncidences( QMap<Q_UINT32, QString>& lst,
bool KMailConnection::kmailGetAttachment( KURL& url,
- const QString& resource,
+ const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
if ( !connectToKMail() )
return false;
@@ -225,7 +225,7 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -233,15 +233,15 @@ bool KMailConnection::kmailDeleteIncidence( const QString& resource,
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailUpdate( const QString& resource,
+bool KMailConnection::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentMimetypes,
- const QStringList& attachmentNames,
- const QStringList& deletedAttachments )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments )
{
//kdDebug(5006) << kdBacktrace() << endl;
if ( connectToKMail() ) {
@@ -254,7 +254,7 @@ bool KMailConnection::kmailUpdate( const QString& resource,
}
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -262,13 +262,13 @@ bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
}
-bool KMailConnection::kmailTriggerSync( const QString &contentsType )
+bool KMailConnection::kmailTriggerSync( const TQString &contentsType )
{
bool ok = connectToKMail();
return ok && mKMailIcalIfaceStub->triggerSync( contentsType );
}
-void KMailConnection::unregisteredFromDCOP( const QCString& appId )
+void KMailConnection::unregisteredFromDCOP( const TQCString& appId )
{
if ( mKMailIcalIfaceStub && mKMailIcalIfaceStub->app() == appId ) {
// Delete the stub so that the next time we need to talk to kmail,