From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kresources/kolab/shared/resourcekolabbase.cpp | 100 +++++++++++++------------- 1 file changed, 50 insertions(+), 50 deletions(-) (limited to 'kresources/kolab/shared/resourcekolabbase.cpp') 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 #include #include -#include +#include #include 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& lst, - const QString& contentsType ) const +bool ResourceKolabBase::kmailSubresources( TQValueList& 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& lst, - const QString& mimetype, - const QString& resource, +bool ResourceKolabBase::kmailIncidences( TQMap& 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 possible; - QStringList labels; + TQMap 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 ); -- cgit v1.2.1