summaryrefslogtreecommitdiffstats
path: root/kresources/kolab/shared
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/kolab/shared
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/kolab/shared')
-rw-r--r--kresources/kolab/shared/kmailconnection.cpp134
-rw-r--r--kresources/kolab/shared/kmailconnection.h84
-rw-r--r--kresources/kolab/shared/kolabbase.cpp120
-rw-r--r--kresources/kolab/shared/kolabbase.h94
-rw-r--r--kresources/kolab/shared/resourcekolabbase.cpp100
-rw-r--r--kresources/kolab/shared/resourcekolabbase.h108
-rw-r--r--kresources/kolab/shared/subresource.cpp14
-rw-r--r--kresources/kolab/shared/subresource.h26
8 files changed, 340 insertions, 340 deletions
diff --git a/kresources/kolab/shared/kmailconnection.cpp b/kresources/kolab/shared/kmailconnection.cpp
index 6db9f3dab..9135e16db 100644
--- a/kresources/kolab/shared/kmailconnection.cpp
+++ b/kresources/kolab/shared/kmailconnection.cpp
@@ -47,7 +47,7 @@ using namespace Kolab;
KMailConnection::KMailConnection( ResourceKolabBase* resource,
- const QCString& objId )
+ const TQCString& objId )
: DCOPObject( objId ), mResource( resource ), mKMailIcalIfaceStub( 0 )
{
// Make the connection to KMail ready
@@ -56,8 +56,8 @@ KMailConnection::KMailConnection( ResourceKolabBase* 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()
@@ -69,15 +69,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,
@@ -89,34 +89,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, bool, bool )",
- "fromKMailAddSubresource( QString, QString, QString, bool, bool )" ) )
+ if ( !connectKMailSignal( "subresourceAdded( TQString, TQString, TQString, bool, bool )",
+ "fromKMailAddSubresource( TQString, TQString, TQString, bool, bool )" ) )
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 )
@@ -126,25 +126,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,
bool writable,
bool alarmRelevant )
{
@@ -154,30 +154,30 @@ void KMailConnection::fromKMailAddSubresource( const QString& type,
writable, alarmRelevant );
}
-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;
@@ -187,8 +187,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;
@@ -197,9 +197,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 )
{
@@ -212,9 +212,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;
@@ -223,10 +223,10 @@ bool KMailConnection::kmailGetAttachment( KURL& url,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
- const QString & resource,
+bool KMailConnection::kmailAttachmentMimetype( TQString & mimeType,
+ const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if ( !connectToKMail() )
return false;
@@ -234,8 +234,8 @@ bool KMailConnection::kmailAttachmentMimetype( QString & mimeType,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailListAttachments(QStringList &list,
- const QString & resource, Q_UINT32 sernum)
+bool KMailConnection::kmailListAttachments(TQStringList &list,
+ const TQString & resource, Q_UINT32 sernum)
{
if ( !connectToKMail() )
return false;
@@ -244,7 +244,7 @@ bool KMailConnection::kmailListAttachments(QStringList &list,
return mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailDeleteIncidence( const QString& resource,
+bool KMailConnection::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return connectToKMail()
@@ -252,15 +252,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() ) {
@@ -272,16 +272,16 @@ bool KMailConnection::kmailUpdate( const QString& resource,
return false;
}
-bool KMailConnection::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailConnection::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return connectToKMail()
&& mKMailIcalIfaceStub->addSubresource( resource, parent, contentsType )
&& mKMailIcalIfaceStub->ok();
}
-bool KMailConnection::kmailRemoveSubresource( const QString& resource )
+bool KMailConnection::kmailRemoveSubresource( const TQString& resource )
{
return connectToKMail()
&& mKMailIcalIfaceStub->removeSubresource( resource )
@@ -290,7 +290,7 @@ bool KMailConnection::kmailRemoveSubresource( const QString& resource )
bool KMailConnection::kmailStorageFormat( KMailICalIface::StorageFormat& type,
- const QString& folder )
+ const TQString& folder )
{
bool ok = connectToKMail();
type = mKMailIcalIfaceStub->storageFormat( folder );
@@ -298,13 +298,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,
diff --git a/kresources/kolab/shared/kmailconnection.h b/kresources/kolab/shared/kmailconnection.h
index cbb69a155..16b80bfb0 100644
--- a/kresources/kolab/shared/kmailconnection.h
+++ b/kresources/kolab/shared/kmailconnection.h
@@ -48,26 +48,26 @@ class ResourceKolabBase;
/**
This class provides the kmail connectivity for IMAP resources.
*/
-class KMailConnection : public QObject, public DCOPObject {
+class KMailConnection : public TQObject, public DCOPObject {
Q_OBJECT
K_DCOP
// These are the methods called by KMail when the resource changes
k_dcop:
- bool fromKMailAddIncidence( const QString& type, const QString& resource,
- Q_UINT32 sernum, int format, const QString& xml );
- void fromKMailDelIncidence( const QString& type, const QString& resource,
- const QString& xml );
- void fromKMailRefresh( const QString& type, const QString& resource );
- void fromKMailAddSubresource( const QString& type, const QString& resource,
- const QString& label, bool writable,
+ bool fromKMailAddIncidence( const TQString& type, const TQString& resource,
+ Q_UINT32 sernum, int format, const TQString& xml );
+ void fromKMailDelIncidence( const TQString& type, const TQString& resource,
+ const TQString& xml );
+ void fromKMailRefresh( const TQString& type, const TQString& resource );
+ void fromKMailAddSubresource( const TQString& type, const TQString& resource,
+ const TQString& label, bool writable,
bool alarmRelevant );
- void fromKMailDelSubresource( const QString& type, const QString& resource );
- void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map, const QString& type,
- const QString& folder );
+ void fromKMailDelSubresource( const TQString& type, const TQString& resource );
+ void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map, const TQString& type,
+ const TQString& folder );
public:
- KMailConnection( ResourceKolabBase* resource, const QCString& objId );
+ KMailConnection( ResourceKolabBase* resource, const TQCString& objId );
virtual ~KMailConnection();
/**
@@ -76,47 +76,47 @@ public:
bool connectToKMail();
// Call the DCOP methods
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType );
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType );
bool kmailIncidencesCount( int& count,
- const QString& mimetype,
- const QString& resource );
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ const TQString& mimetype,
+ const TQString& resource );
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages );
- bool kmailGetAttachment( KURL& url, const QString& resource, Q_UINT32 sernum,
- const QString& filename );
- bool kmailAttachmentMimetype( QString &mimeType, const QString &resource,
- Q_UINT32 sernum, const QString &filename );
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource, Q_UINT32 sernum,
+ const TQString& filename );
+ bool kmailAttachmentMimetype( TQString &mimeType, const TQString &resource,
+ Q_UINT32 sernum, const TQString &filename );
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum );
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
- bool kmailUpdate( const QString& resource,
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
+ bool 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 );
-
- bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const QString& folder);
-
- bool kmailTriggerSync( const QString& contentsType );
- bool kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentMimetypes,
+ const TQStringList& attachmentNames,
+ const TQStringList& deletedAttachments );
+
+ bool kmailStorageFormat( KMailICalIface::StorageFormat& type, const TQString& folder);
+
+ bool kmailTriggerSync( const TQString& contentsType );
+ bool kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
private slots:
- virtual void unregisteredFromDCOP( const QCString& );
+ virtual void unregisteredFromDCOP( const TQCString& );
private:
/** Connect a signal from KMail to a local slot. */
- bool connectKMailSignal( const QCString&, const QCString& );
+ bool connectKMailSignal( const TQCString&, const TQCString& );
ResourceKolabBase* mResource;
DCOPClient* mDCOPClient;
diff --git a/kresources/kolab/shared/kolabbase.cpp b/kresources/kolab/shared/kolabbase.cpp
index 44c44ead2..9a4a17f7c 100644
--- a/kresources/kolab/shared/kolabbase.cpp
+++ b/kresources/kolab/shared/kolabbase.cpp
@@ -37,14 +37,14 @@
#include <libkcal/journal.h>
#include <libkdepim/kpimprefs.h>
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
using namespace Kolab;
-KolabBase::KolabBase( const QString& tz )
- : mCreationDate( QDateTime::currentDateTime() ),
- mLastModified( QDateTime::currentDateTime() ),
+KolabBase::KolabBase( const TQString& tz )
+ : mCreationDate( TQDateTime::currentDateTime() ),
+ mLastModified( TQDateTime::currentDateTime() ),
mSensitivity( Public ), mTimeZoneId( tz ),
mHasPilotSyncId( false ), mHasPilotSyncStatus( false )
{
@@ -89,20 +89,20 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
setCategories( addressee->categories().join( "," ) );
// Set creation-time and last-modification-time
- const QString creationString = addressee->custom( "KOLAB", "CreationDate" );
+ const TQString creationString = addressee->custom( "KOLAB", "CreationDate" );
kdDebug(5006) << "Creation time string: " << creationString << endl;
- QDateTime creationDate;
+ TQDateTime creationDate;
if ( creationString.isEmpty() ) {
- creationDate = QDateTime::currentDateTime();
+ creationDate = TQDateTime::currentDateTime();
kdDebug(5006) << "Creation date set to current time\n";
}
else {
creationDate = stringToDateTime( creationString );
kdDebug(5006) << "Creation date loaded\n";
}
- QDateTime modified = addressee->revision();
+ TQDateTime modified = addressee->revision();
if ( !modified.isValid() )
- modified = QDateTime::currentDateTime();
+ modified = TQDateTime::currentDateTime();
setLastModified( modified );
if ( modified < creationDate ) {
// It's not possible that the modification date is earlier than creation
@@ -110,7 +110,7 @@ void KolabBase::setFields( const KABC::Addressee* addressee )
kdDebug(5006) << "Creation date set to modification date\n";
}
setCreationDate( creationDate );
- const QString newCreationDate = dateTimeToString( creationDate );
+ const TQString newCreationDate = dateTimeToString( creationDate );
if ( creationString != newCreationDate ) {
// We modified the creation date, so store it for future reference
const_cast<KABC::Addressee*>( addressee )
@@ -136,7 +136,7 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
{
addressee->setUid( uid() );
addressee->setNote( body() );
- addressee->setCategories( QStringList::split( ',', categories() ) );
+ addressee->setCategories( TQStringList::split( ',', categories() ) );
addressee->setRevision( lastModified() );
addressee->insertCustom( "KOLAB", "CreationDate",
dateTimeToString( creationDate() ) );
@@ -156,52 +156,52 @@ void KolabBase::saveTo( KABC::Addressee* addressee ) const
// TODO: Attachments
}
-void KolabBase::setUid( const QString& uid )
+void KolabBase::setUid( const TQString& uid )
{
mUid = uid;
}
-QString KolabBase::uid() const
+TQString KolabBase::uid() const
{
return mUid;
}
-void KolabBase::setBody( const QString& body )
+void KolabBase::setBody( const TQString& body )
{
mBody = body;
}
-QString KolabBase::body() const
+TQString KolabBase::body() const
{
return mBody;
}
-void KolabBase::setCategories( const QString& categories )
+void KolabBase::setCategories( const TQString& categories )
{
mCategories = categories;
}
-QString KolabBase::categories() const
+TQString KolabBase::categories() const
{
return mCategories;
}
-void KolabBase::setCreationDate( const QDateTime& date )
+void KolabBase::setCreationDate( const TQDateTime& date )
{
mCreationDate = date;
}
-QDateTime KolabBase::creationDate() const
+TQDateTime KolabBase::creationDate() const
{
return mCreationDate;
}
-void KolabBase::setLastModified( const QDateTime& date )
+void KolabBase::setLastModified( const TQDateTime& date )
{
mLastModified = date;
}
-QDateTime KolabBase::lastModified() const
+TQDateTime KolabBase::lastModified() const
{
return mLastModified;
}
@@ -248,14 +248,14 @@ int KolabBase::pilotSyncStatus() const
return mPilotSyncStatus;
}
-bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
+bool KolabBase::loadEmailAttribute( TQDomElement& element, Email& email )
{
- for ( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
+ for ( TQDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
if ( n.isComment() )
continue;
if ( n.isElement() ) {
- QDomElement e = n.toElement();
- const QString tagName = e.tagName();
+ TQDomElement e = n.toElement();
+ const TQString tagName = e.tagName();
if ( tagName == "display-name" )
email.displayName = e.text();
@@ -271,18 +271,18 @@ bool KolabBase::loadEmailAttribute( QDomElement& element, Email& email )
return true;
}
-void KolabBase::saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName ) const
+void KolabBase::saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName ) const
{
- QDomElement e = element.ownerDocument().createElement( tagName );
+ TQDomElement e = element.ownerDocument().createElement( tagName );
element.appendChild( e );
writeString( e, "display-name", email.displayName );
writeString( e, "smtp-address", email.smtpAddress );
}
-bool KolabBase::loadAttribute( QDomElement& element )
+bool KolabBase::loadAttribute( TQDomElement& element )
{
- const QString tagName = element.tagName();
+ const TQString tagName = element.tagName();
switch ( tagName[0].latin1() ) {
case 'u':
if ( tagName == "uid" ) {
@@ -336,7 +336,7 @@ bool KolabBase::loadAttribute( QDomElement& element )
return false;
}
-bool KolabBase::saveAttributes( QDomElement& element ) const
+bool KolabBase::saveAttributes( TQDomElement& element ) const
{
writeString( element, "product-id", productID() );
writeString( element, "uid", uid() );
@@ -347,17 +347,17 @@ bool KolabBase::saveAttributes( QDomElement& element ) const
dateTimeToString( lastModified() ) );
writeString( element, "sensitivity", sensitivityToString( sensitivity() ) );
if ( hasPilotSyncId() )
- writeString( element, "pilot-sync-id", QString::number( pilotSyncId() ) );
+ writeString( element, "pilot-sync-id", TQString::number( pilotSyncId() ) );
if ( hasPilotSyncStatus() )
- writeString( element, "pilot-sync-status", QString::number( pilotSyncStatus() ) );
+ writeString( element, "pilot-sync-status", TQString::number( pilotSyncStatus() ) );
return true;
}
-bool KolabBase::load( const QString& xml )
+bool KolabBase::load( const TQString& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -370,11 +370,11 @@ bool KolabBase::load( const QString& xml )
return loadXML( document );
}
-bool KolabBase::load( QFile& xml )
+bool KolabBase::load( TQFile& xml )
{
- QString errorMsg;
+ TQString errorMsg;
int errorLine, errorColumn;
- QDomDocument document;
+ TQDomDocument document;
bool ok = document.setContent( &xml, &errorMsg, &errorLine, &errorColumn );
if ( !ok ) {
@@ -387,41 +387,41 @@ bool KolabBase::load( QFile& xml )
return loadXML( document );
}
-QDomDocument KolabBase::domTree()
+TQDomDocument KolabBase::domTree()
{
- QDomDocument document;
+ TQDomDocument document;
- QString p = "version=\"1.0\" encoding=\"UTF-8\"";
+ TQString p = "version=\"1.0\" encoding=\"UTF-8\"";
document.appendChild(document.createProcessingInstruction( "xml", p ) );
return document;
}
-QString KolabBase::dateTimeToString( const QDateTime& time )
+TQString KolabBase::dateTimeToString( const TQDateTime& time )
{
return time.toString( Qt::ISODate ) + 'Z';
}
-QString KolabBase::dateToString( const QDate& date )
+TQString KolabBase::dateToString( const TQDate& date )
{
return date.toString( Qt::ISODate );
}
-QDateTime KolabBase::stringToDateTime( const QString& _date )
+TQDateTime KolabBase::stringToDateTime( const TQString& _date )
{
- QString date( _date );
+ TQString date( _date );
if ( date.endsWith( "Z" ) )
date.truncate( date.length() - 1 );
- return QDateTime::fromString( date, Qt::ISODate );
+ return TQDateTime::fromString( date, Qt::ISODate );
}
-QDate KolabBase::stringToDate( const QString& date )
+TQDate KolabBase::stringToDate( const TQString& date )
{
- return QDate::fromString( date, Qt::ISODate );
+ return TQDate::fromString( date, Qt::ISODate );
}
-QString KolabBase::sensitivityToString( Sensitivity s )
+TQString KolabBase::sensitivityToString( Sensitivity s )
{
switch( s ) {
case Private: return "private";
@@ -432,7 +432,7 @@ QString KolabBase::sensitivityToString( Sensitivity s )
return "What what what???";
}
-KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
+KolabBase::Sensitivity KolabBase::stringToSensitivity( const TQString& s )
{
if ( s == "private" )
return Private;
@@ -441,34 +441,34 @@ KolabBase::Sensitivity KolabBase::stringToSensitivity( const QString& s )
return Public;
}
-QString KolabBase::colorToString( const QColor& color )
+TQString KolabBase::colorToString( const TQColor& color )
{
// Color is in the format "#RRGGBB"
return color.name();
}
-QColor KolabBase::stringToColor( const QString& s )
+TQColor KolabBase::stringToColor( const TQString& s )
{
- return QColor( s );
+ return TQColor( s );
}
-void KolabBase::writeString( QDomElement& element, const QString& tag,
- const QString& tagString )
+void KolabBase::writeString( TQDomElement& element, const TQString& tag,
+ const TQString& tagString )
{
if ( !tagString.isEmpty() ) {
- QDomElement e = element.ownerDocument().createElement( tag );
- QDomText t = element.ownerDocument().createTextNode( tagString );
+ TQDomElement e = element.ownerDocument().createElement( tag );
+ TQDomText t = element.ownerDocument().createTextNode( tagString );
e.appendChild( t );
element.appendChild( e );
}
}
-QDateTime KolabBase::localToUTC( const QDateTime& time ) const
+TQDateTime KolabBase::localToUTC( const TQDateTime& time ) const
{
return KPimPrefs::localTimeToUtc( time, mTimeZoneId );
}
-QDateTime KolabBase::utcToLocal( const QDateTime& time ) const
+TQDateTime KolabBase::utcToLocal( const TQDateTime& time ) const
{
return KPimPrefs::utcToLocalTime( time, mTimeZoneId );
}
diff --git a/kresources/kolab/shared/kolabbase.h b/kresources/kolab/shared/kolabbase.h
index 053683989..ac34eb884 100644
--- a/kresources/kolab/shared/kolabbase.h
+++ b/kresources/kolab/shared/kolabbase.h
@@ -34,9 +34,9 @@
#ifndef KOLABBASE_H
#define KOLABBASE_H
-#include <qdom.h>
-#include <qdatetime.h>
-#include <qcolor.h>
+#include <tqdom.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
class QFile;
@@ -54,38 +54,38 @@ class KolabBase {
public:
struct Email {
public:
- Email( const QString& name = QString::null,
- const QString& email = QString::null )
+ Email( const TQString& name = TQString::null,
+ const TQString& email = TQString::null )
: displayName( name ), smtpAddress( email )
{
}
- QString displayName;
- QString smtpAddress;
+ TQString displayName;
+ TQString smtpAddress;
};
enum Sensitivity { Public = 0, Private = 1, Confidential = 2 };
- explicit KolabBase( const QString& timezone = QString::null );
+ explicit KolabBase( const TQString& timezone = TQString::null );
virtual ~KolabBase();
// Return a string identifying this type
- virtual QString type() const = 0;
+ virtual TQString type() const = 0;
- virtual void setUid( const QString& uid );
- virtual QString uid() const;
+ virtual void setUid( const TQString& uid );
+ virtual TQString uid() const;
- virtual void setBody( const QString& body );
- virtual QString body() const;
+ virtual void setBody( const TQString& body );
+ virtual TQString body() const;
- virtual void setCategories( const QString& categories );
- virtual QString categories() const;
+ virtual void setCategories( const TQString& categories );
+ virtual TQString categories() const;
- virtual void setCreationDate( const QDateTime& date );
- virtual QDateTime creationDate() const;
+ virtual void setCreationDate( const TQDateTime& date );
+ virtual TQDateTime creationDate() const;
- virtual void setLastModified( const QDateTime& date );
- virtual QDateTime lastModified() const;
+ virtual void setLastModified( const TQDateTime& date );
+ virtual TQDateTime lastModified() const;
virtual void setSensitivity( Sensitivity sensitivity );
virtual Sensitivity sensitivity() const;
@@ -99,28 +99,28 @@ public:
virtual int pilotSyncStatus() const;
// String - Date conversion methods
- static QString dateTimeToString( const QDateTime& time );
- static QString dateToString( const QDate& date );
- static QDateTime stringToDateTime( const QString& time );
- static QDate stringToDate( const QString& date );
+ static TQString dateTimeToString( const TQDateTime& time );
+ static TQString dateToString( const TQDate& date );
+ static TQDateTime stringToDateTime( const TQString& time );
+ static TQDate stringToDate( const TQString& date );
// String - Sensitivity conversion methods
- static QString sensitivityToString( Sensitivity );
- static Sensitivity stringToSensitivity( const QString& );
+ static TQString sensitivityToString( Sensitivity );
+ static Sensitivity stringToSensitivity( const TQString& );
// String - Color conversion methods
- static QString colorToString( const QColor& );
- static QColor stringToColor( const QString& );
+ static TQString colorToString( const TQColor& );
+ static TQColor stringToColor( const TQString& );
// Load this object by reading the XML file
- bool load( const QString& xml );
- bool load( QFile& xml );
+ bool load( const TQString& xml );
+ bool load( TQFile& xml );
// Load this QDomDocument
- virtual bool loadXML( const QDomDocument& xml ) = 0;
+ virtual bool loadXML( const TQDomDocument& xml ) = 0;
// Serialize this object to an XML string
- virtual QString saveXML() const = 0;
+ virtual TQString saveXML() const = 0;
protected:
/// Read all known fields from this ical incidence
@@ -136,35 +136,35 @@ protected:
void saveTo( KABC::Addressee* ) const;
// This just makes the initial dom tree with version and doctype
- static QDomDocument domTree();
+ static TQDomDocument domTree();
- bool loadEmailAttribute( QDomElement& element, Email& email );
+ bool loadEmailAttribute( TQDomElement& element, Email& email );
- void saveEmailAttribute( QDomElement& element, const Email& email,
- const QString& tagName = "email" ) const;
+ void saveEmailAttribute( TQDomElement& element, const Email& email,
+ const TQString& tagName = "email" ) const;
// Load the attributes of this class
- virtual bool loadAttribute( QDomElement& );
+ virtual bool loadAttribute( TQDomElement& );
// Save the attributes of this class
- virtual bool saveAttributes( QDomElement& ) const;
+ virtual bool saveAttributes( TQDomElement& ) const;
// Return the product ID
- virtual QString productID() const = 0;
+ virtual TQString productID() const = 0;
// Write a string tag
- static void writeString( QDomElement&, const QString&, const QString& );
+ static void writeString( TQDomElement&, const TQString&, const TQString& );
- QDateTime localToUTC( const QDateTime& time ) const;
- QDateTime utcToLocal( const QDateTime& time ) const;
+ TQDateTime localToUTC( const TQDateTime& time ) const;
+ TQDateTime utcToLocal( const TQDateTime& time ) const;
- QString mUid;
- QString mBody;
- QString mCategories;
- QDateTime mCreationDate;
- QDateTime mLastModified;
+ TQString mUid;
+ TQString mBody;
+ TQString mCategories;
+ TQDateTime mCreationDate;
+ TQDateTime mLastModified;
Sensitivity mSensitivity;
- QString mTimeZoneId;
+ TQString mTimeZoneId;
// KPilot synchronization stuff
bool mHasPilotSyncId, mHasPilotSyncStatus;
diff --git a/kresources/kolab/shared/resourcekolabbase.cpp b/kresources/kolab/shared/resourcekolabbase.cpp
index d62a5bb54..291910fb9 100644
--- a/kresources/kolab/shared/resourcekolabbase.cpp
+++ b/kresources/kolab/shared/resourcekolabbase.cpp
@@ -42,19 +42,19 @@
#include <kurl.h>
#include <ktempfile.h>
#include <kmessagebox.h>
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
using namespace Kolab;
static unsigned int uniquifier = 0;
-ResourceKolabBase::ResourceKolabBase( const QCString& objId )
+ResourceKolabBase::ResourceKolabBase( const TQCString& objId )
: mSilent( false )
{
KGlobal::locale()->insertCatalogue( "kres_kolab" );
KGlobal::locale()->insertCatalogue( "libkcal" );
- QString uniqueObjId = QString( objId ) + QString::number( uniquifier++ );
+ TQString uniqueObjId = TQString( objId ) + TQString::number( uniquifier++ );
mConnection = new KMailConnection( this, uniqueObjId.utf8() );
}
@@ -64,61 +64,61 @@ ResourceKolabBase::~ResourceKolabBase()
}
-bool ResourceKolabBase::kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const
+bool ResourceKolabBase::kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const
{
return mConnection->kmailSubresources( lst, contentsType );
}
-bool ResourceKolabBase::kmailTriggerSync( const QString& contentsType ) const
+bool ResourceKolabBase::kmailTriggerSync( const TQString& contentsType ) const
{
return mConnection->kmailTriggerSync( contentsType );
}
bool ResourceKolabBase::kmailIncidencesCount( int &count,
- const QString& mimetype,
- const QString& resource ) const
+ const TQString& mimetype,
+ const TQString& resource ) const
{
return mConnection->kmailIncidencesCount( count, mimetype, resource );
}
-bool ResourceKolabBase::kmailIncidences( QMap<Q_UINT32, QString>& lst,
- const QString& mimetype,
- const QString& resource,
+bool ResourceKolabBase::kmailIncidences( TQMap<Q_UINT32, TQString>& lst,
+ const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const
{
return mConnection->kmailIncidences( lst, mimetype, resource, startIndex, nbMessages );
}
-bool ResourceKolabBase::kmailGetAttachment( KURL& url, const QString& resource,
+bool ResourceKolabBase::kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const
+ const TQString& filename ) const
{
return mConnection->kmailGetAttachment( url, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailAttachmentMimetype( QString & mimeType, QString & resource,
- Q_UINT32 sernum, const QString & filename ) const
+bool ResourceKolabBase::kmailAttachmentMimetype( TQString & mimeType, TQString & resource,
+ Q_UINT32 sernum, const TQString & filename ) const
{
return mConnection->kmailAttachmentMimetype( mimeType, resource, sernum, filename );
}
-bool ResourceKolabBase::kmailListAttachments( QStringList &list,
- const QString & resource,
+bool ResourceKolabBase::kmailListAttachments( TQStringList &list,
+ const TQString & resource,
Q_UINT32 sernum ) const
{
return mConnection->kmailListAttachments( list, resource, sernum );
}
-bool ResourceKolabBase::kmailDeleteIncidence( const QString& resource,
+bool ResourceKolabBase::kmailDeleteIncidence( const TQString& resource,
Q_UINT32 sernum )
{
return mSilent || mConnection->kmailDeleteIncidence( resource, sernum );
}
-static QString plainTextBody()
+static TQString plainTextBody()
{
const char * firstPartTextToTranslate = I18N_NOOP(
"This is a Kolab Groupware object.\nTo view this object you"
@@ -126,8 +126,8 @@ static QString plainTextBody()
" Groupware format.\nFor a list of such email clients please"
" visit\n%1" );
const char * url = "http://www.kolab.org/kolab2-clients.html";
- QString firstPartTextUntranslated = QString::fromLatin1( firstPartTextToTranslate ).arg( url );
- QString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
+ TQString firstPartTextUntranslated = TQString::fromLatin1( firstPartTextToTranslate ).arg( url );
+ TQString firstPartText = i18n( firstPartTextToTranslate ).arg( url );
if ( firstPartText != firstPartTextUntranslated ) {
firstPartText.append("\n\n-----------------------------------------------------\n\n");
firstPartText.append( firstPartTextUntranslated );
@@ -135,21 +135,21 @@ static QString plainTextBody()
return firstPartText;
}
-bool ResourceKolabBase::kmailUpdate( const QString& resource,
+bool ResourceKolabBase::kmailUpdate( const TQString& resource,
Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& _customHeaders,
- const QStringList& _attachmentURLs,
- const QStringList& _attachmentMimetypes,
- const QStringList& _attachmentNames,
- const QStringList& deletedAttachments )
+ const TQStringList& _attachmentURLs,
+ const TQStringList& _attachmentMimetypes,
+ const TQStringList& _attachmentNames,
+ const TQStringList& deletedAttachments )
{
if ( mSilent )
return true;
- QString subj = subject;
+ TQString subj = subject;
if ( subj.isEmpty() )
subj = i18n("Internal kolab data: Do not delete this mail.");
@@ -158,15 +158,15 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
// Save the xml file. Will be deleted at the end of this method
KTempFile file;
file.setAutoDelete( true );
- QTextStream* stream = file.textStream();
- stream->setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream* stream = file.textStream();
+ stream->setEncoding( TQTextStream::UnicodeUTF8 );
*stream << xml;
file.close();
// Add the xml file as an attachment
- QStringList attachmentURLs = _attachmentURLs;
- QStringList attachmentMimeTypes = _attachmentMimetypes;
- QStringList attachmentNames = _attachmentNames;
+ TQStringList attachmentURLs = _attachmentURLs;
+ TQStringList attachmentMimeTypes = _attachmentMimetypes;
+ TQStringList attachmentNames = _attachmentNames;
KURL url;
url.setPath( file.name() );
url.setFileEncoding( "UTF-8" );
@@ -187,10 +187,10 @@ bool ResourceKolabBase::kmailUpdate( const QString& resource,
}
}
-QString ResourceKolabBase::configFile( const QString& type ) const
+TQString ResourceKolabBase::configFile( const TQString& type ) const
{
return locateLocal( "config",
- QString( "kresources/kolab/%1rc" ).arg( type ) );
+ TQString( "kresources/kolab/%1rc" ).arg( type ) );
}
bool ResourceKolabBase::connectToKMail() const
@@ -198,25 +198,25 @@ bool ResourceKolabBase::connectToKMail() const
return mConnection->connectToKMail();
}
-bool ResourceKolabBase::kmailAddSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool ResourceKolabBase::kmailAddSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
return mConnection->kmailAddSubresource( resource, parent, contentsType );
}
-bool ResourceKolabBase::kmailRemoveSubresource( const QString& resource )
+bool ResourceKolabBase::kmailRemoveSubresource( const TQString& resource )
{
return mConnection->kmailRemoveSubresource( resource );
}
-QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
- const QString& text )
+TQString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
+ const TQString& text )
{
// I have to use the label (shown in the dialog) as key here. But given how the
// label is made up, it should be unique. If it's not, well the dialog would suck anyway...
- QMap<QString, QString> possible;
- QStringList labels;
+ TQMap<TQString, TQString> possible;
+ TQStringList labels;
ResourceMap::ConstIterator it;
for ( it = resources.begin(); it != resources.end(); ++it ) {
if ( it.data().writable() && it.data().active() ) {
@@ -228,26 +228,26 @@ QString ResourceKolabBase::findWritableResource( const ResourceMap& resources,
if ( possible.isEmpty() ) { // None found!!
kdWarning(5650) << "No writable resource found!" << endl;
KMessageBox::error( 0, i18n( "No writable resource was found, saving will not be possible. Reconfigure KMail first." ) );
- return QString::null;
+ return TQString::null;
}
if ( possible.count() == 1 )
// Just one found
return possible.begin().data(); // yes this is the subresource key, i.e. location
- QString t = text;
+ TQString t = text;
if ( t.isEmpty() )
i18n( "You have more than one writable resource folder. "
"Please select the one you want to write to." );
// Several found, ask the user
- QString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
+ TQString chosenLabel = KPIM::FolderSelectDialog::getItem( i18n( "Select Resource Folder" ),
t, possible.keys() );
if ( chosenLabel.isEmpty() ) // cancelled
- return QString::null;
+ return TQString::null;
return possible[chosenLabel];
}
-KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const QString &folder ) const
+KMailICalIface::StorageFormat ResourceKolabBase::kmailStorageFormat( const TQString &folder ) const
{
KMailICalIface::StorageFormat format = (KMailICalIface::StorageFormat) 3;
mConnection->kmailStorageFormat( format, folder );
diff --git a/kresources/kolab/shared/resourcekolabbase.h b/kresources/kolab/shared/resourcekolabbase.h
index 806220189..eca5cc80b 100644
--- a/kresources/kolab/shared/resourcekolabbase.h
+++ b/kresources/kolab/shared/resourcekolabbase.h
@@ -34,9 +34,9 @@
#ifndef RESOURCEKOLABBASE_H
#define RESOURCEKOLABBASE_H
-#include <qstring.h>
-#include <qmap.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqstringlist.h>
#include "subresource.h"
#include <kmail/kmailicalIface.h>
@@ -73,31 +73,31 @@ class KMailConnection;
*/
class ResourceKolabBase {
public:
- ResourceKolabBase( const QCString& objId );
+ ResourceKolabBase( const TQCString& objId );
virtual ~ResourceKolabBase();
// These are the methods called by KMail when the resource changes
- virtual bool fromKMailAddIncidence( const QString& type,
- const QString& resource,
+ virtual bool fromKMailAddIncidence( const TQString& type,
+ const TQString& resource,
Q_UINT32 sernum,
int format,
- const QString& data ) = 0;
- virtual void fromKMailDelIncidence( const QString& type,
- const QString& resource,
- const QString& xml ) = 0;
- virtual void fromKMailRefresh( const QString& type,
- const QString& resource ) = 0;
- virtual void fromKMailAddSubresource( const QString& type,
- const QString& resource,
- const QString& label,
+ const TQString& data ) = 0;
+ virtual void fromKMailDelIncidence( const TQString& type,
+ const TQString& resource,
+ const TQString& xml ) = 0;
+ virtual void fromKMailRefresh( const TQString& type,
+ const TQString& resource ) = 0;
+ virtual void fromKMailAddSubresource( const TQString& type,
+ const TQString& resource,
+ const TQString& label,
bool writable,
bool alarmRelevant ) = 0;
- virtual void fromKMailDelSubresource( const QString& type,
- const QString& resource ) = 0;
+ virtual void fromKMailDelSubresource( const TQString& type,
+ const TQString& resource ) = 0;
- virtual void fromKMailAsyncLoadResult( const QMap<Q_UINT32, QString>& map,
- const QString& type,
- const QString& folder ) = 0;
+ virtual void fromKMailAsyncLoadResult( const TQMap<Q_UINT32, TQString>& map,
+ const TQString& type,
+ const TQString& folder ) = 0;
protected:
/// Do the connection to KMail.
bool connectToKMail() const;
@@ -105,71 +105,71 @@ protected:
// These are the KMail dcop function connections. The docs here say
// "Get", which here means that the first argument is the return arg
- /// List all folders with a certain contentsType. Returns a QMap with
+ /// List all folders with a certain contentsType. Returns a TQMap with
/// resourcename/writable pairs
- bool kmailSubresources( QValueList<KMailICalIface::SubResource>& lst,
- const QString& contentsType ) const;
+ bool kmailSubresources( TQValueList<KMailICalIface::SubResource>& lst,
+ const TQString& contentsType ) const;
/// Get the number of messages in this folder.
/// Used to iterate over kmailIncidences by chunks
- bool kmailIncidencesCount( int& count, const QString& mimetype,
- const QString& resource ) const;
+ bool kmailIncidencesCount( int& count, const TQString& mimetype,
+ const TQString& resource ) const;
/// Get the mimetype attachments from a chunk of messages from this folder.
- /// Returns a QMap with serialNumber/attachment pairs.
- bool kmailIncidences( QMap<Q_UINT32, QString>& lst, const QString& mimetype,
- const QString& resource,
+ /// Returns a TQMap with serialNumber/attachment pairs.
+ bool kmailIncidences( TQMap<Q_UINT32, TQString>& lst, const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages ) const;
- bool kmailTriggerSync( const QString& contentType ) const;
+ bool kmailTriggerSync( const TQString& contentType ) const;
public: // for Contact
/// Get an attachment from a mail. Returns a URL to it. This can
/// be called by the resource after obtaining the incidence.
/// The resource must delete the temp file.
- bool kmailGetAttachment( KURL& url, const QString& resource,
+ bool kmailGetAttachment( KURL& url, const TQString& resource,
Q_UINT32 sernum,
- const QString& filename ) const;
+ const TQString& filename ) const;
/** Get the mimetype of the specified attachment. */
- bool kmailAttachmentMimetype( QString &mimeType, QString &resource,
- Q_UINT32 sernum, const QString &filename ) const;
+ bool kmailAttachmentMimetype( TQString &mimeType, TQString &resource,
+ Q_UINT32 sernum, const TQString &filename ) const;
/// List all attachments of a mail.
- bool kmailListAttachments( QStringList &list, const QString &resource,
+ bool kmailListAttachments( TQStringList &list, const TQString &resource,
Q_UINT32 sernum ) const;
protected:
/// Delete an incidence.
- bool kmailDeleteIncidence( const QString& resource, Q_UINT32 sernum );
+ bool kmailDeleteIncidence( const TQString& resource, Q_UINT32 sernum );
- KMailICalIface::StorageFormat kmailStorageFormat( const QString& folder ) const;
+ KMailICalIface::StorageFormat kmailStorageFormat( const TQString& folder ) const;
- typedef QMap<QCString, QString> CustomHeaderMap;
+ typedef TQMap<TQCString, TQString> CustomHeaderMap;
/// Update an incidence. The list of attachments are URLs.
/// The parameter sernum is updated with the right KMail serial number
- bool kmailUpdate( const QString& resource, Q_UINT32& sernum,
- const QString& xml,
- const QString& mimetype,
- const QString& subject,
+ bool kmailUpdate( const TQString& resource, Q_UINT32& sernum,
+ const TQString& xml,
+ const TQString& mimetype,
+ const TQString& subject,
const CustomHeaderMap& customHeaders = CustomHeaderMap(),
- const QStringList& attachmentURLs = QStringList(),
- const QStringList& attachmentMimetypes = QStringList(),
- const QStringList& attachmentNames = QStringList(),
- const QStringList& deletedAttachments = QStringList() );
+ const TQStringList& attachmentURLs = TQStringList(),
+ const TQStringList& attachmentMimetypes = TQStringList(),
+ const TQStringList& attachmentNames = TQStringList(),
+ const TQStringList& deletedAttachments = TQStringList() );
- bool kmailAddSubresource( const QString& resource, const QString& parent,
- const QString& contentsType );
- bool kmailRemoveSubresource( const QString& resource );
+ bool kmailAddSubresource( const TQString& resource, const TQString& parent,
+ const TQString& contentsType );
+ bool kmailRemoveSubresource( const TQString& resource );
/// Get the full path of the config file.
- QString configFile( const QString& type ) const;
+ TQString configFile( const TQString& type ) const;
/// If only one of these is writable, return that. Otherwise return null.
- QString findWritableResource( const ResourceMap& resources,
- const QString& text = QString::null );
+ TQString findWritableResource( const ResourceMap& resources,
+ const TQString& text = TQString::null );
bool mSilent;
@@ -182,9 +182,9 @@ protected:
/// This is used to distinguish operations triggered by the user,
/// from operations triggered by KMail
- QStringList mUidsPendingAdding;
- QStringList mUidsPendingDeletion;
- QStringList mUidsPendingUpdate;
+ TQStringList mUidsPendingAdding;
+ TQStringList mUidsPendingDeletion;
+ TQStringList mUidsPendingUpdate;
private:
mutable KMailConnection* mConnection;
diff --git a/kresources/kolab/shared/subresource.cpp b/kresources/kolab/shared/subresource.cpp
index 67216913a..de4048fc7 100644
--- a/kresources/kolab/shared/subresource.cpp
+++ b/kresources/kolab/shared/subresource.cpp
@@ -35,7 +35,7 @@
using namespace Kolab;
SubResource::SubResource( bool active, bool writable,
- bool alarmRelevant, const QString& label,
+ bool alarmRelevant, const TQString& label,
int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( alarmRelevant ),
mLabel( label ), mCompletionWeight( completionWeight )
@@ -43,7 +43,7 @@ SubResource::SubResource( bool active, bool writable,
}
SubResource::SubResource( bool active, bool writable,
- const QString& label, int completionWeight )
+ const TQString& label, int completionWeight )
: mActive( active ), mWritable( writable ), mAlarmRelevant( false ),
mLabel( label ), mCompletionWeight( completionWeight )
{
@@ -83,12 +83,12 @@ bool SubResource::writable() const
return mWritable;
}
-void SubResource::setLabel( const QString& label )
+void SubResource::setLabel( const TQString& label )
{
mLabel = label;
}
-QString SubResource::label() const
+TQString SubResource::label() const
{
return mLabel;
}
@@ -103,7 +103,7 @@ int SubResource::completionWeight() const
return mCompletionWeight;
}
-StorageReference::StorageReference( const QString& resource, Q_UINT32 sernum )
+StorageReference::StorageReference( const TQString& resource, Q_UINT32 sernum )
: mResource( resource ), mSerialNumber( sernum )
{
}
@@ -112,12 +112,12 @@ StorageReference::~StorageReference()
{
}
-void StorageReference::setResource( const QString& resource )
+void StorageReference::setResource( const TQString& resource )
{
mResource = resource;
}
-QString StorageReference::resource() const
+TQString StorageReference::resource() const
{
return mResource;
}
diff --git a/kresources/kolab/shared/subresource.h b/kresources/kolab/shared/subresource.h
index 1bdd98cd5..87f98e6dd 100644
--- a/kresources/kolab/shared/subresource.h
+++ b/kresources/kolab/shared/subresource.h
@@ -33,8 +33,8 @@
#ifndef SUBRESOURCE_H
#define SUBRESOURCE_H
-#include <qstring.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqmap.h>
namespace Kolab {
@@ -48,11 +48,11 @@ public:
// This is just for QMap
SubResource() {}
- SubResource( bool active, bool writable, const QString& label,
+ SubResource( bool active, bool writable, const TQString& label,
int completionWeight = 100 );
SubResource( bool active, bool writable, bool alarmRelevant,
- const QString& label, int completionWeight = 100 );
+ const TQString& label, int completionWeight = 100 );
virtual ~SubResource();
virtual void setActive( bool active );
@@ -64,8 +64,8 @@ public:
virtual void setAlarmRelevant( bool active );
virtual bool alarmRelevant() const;
- virtual void setLabel( const QString& label );
- virtual QString label() const;
+ virtual void setLabel( const TQString& label );
+ virtual TQString label() const;
virtual void setCompletionWeight( int completionWeight );
virtual int completionWeight() const;
@@ -75,7 +75,7 @@ private:
bool mWritable; // Set if the KMail folder is writable
bool mAlarmRelevant; // Set if the alarms from this resource are of
// interest to the user, as per folder acls
- QString mLabel; // The GUI name of this resource
+ TQString mLabel; // The GUI name of this resource
// This is just for the abc plugin. But as long as only this is here,
// it's just as cheap to have it in here as making a d-pointer that
@@ -84,7 +84,7 @@ private:
int mCompletionWeight;
};
-typedef QMap<QString, SubResource> ResourceMap;
+typedef TQMap<TQString, SubResource> ResourceMap;
/**
* This class is used to store a mapping from the XML UID to the KMail
@@ -96,21 +96,21 @@ public:
// Just for QMap
StorageReference() {}
- StorageReference( const QString& resource, Q_UINT32 sernum );
+ StorageReference( const TQString& resource, Q_UINT32 sernum );
virtual ~StorageReference();
- virtual void setResource( const QString& resource );
- virtual QString resource() const;
+ virtual void setResource( const TQString& resource );
+ virtual TQString resource() const;
virtual void setSerialNumber( Q_UINT32 serialNumber );
virtual Q_UINT32 serialNumber() const;
private:
- QString mResource;
+ TQString mResource;
Q_UINT32 mSerialNumber;
};
-typedef QMap<QString, StorageReference> UidMap;
+typedef TQMap<TQString, StorageReference> UidMap;
}