summaryrefslogtreecommitdiffstats
path: root/kmail/kmailicalifaceimpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmailicalifaceimpl.cpp')
-rw-r--r--kmail/kmailicalifaceimpl.cpp438
1 files changed, 219 insertions, 219 deletions
diff --git a/kmail/kmailicalifaceimpl.cpp b/kmail/kmailicalifaceimpl.cpp
index 38eb426f4..c1f626f85 100644
--- a/kmail/kmailicalifaceimpl.cpp
+++ b/kmail/kmailicalifaceimpl.cpp
@@ -61,9 +61,9 @@ using KMail::AccountManager;
#include <mimelib/body.h>
#include <mimelib/mimepp.h>
-#include <qfile.h>
-#include <qmap.h>
-#include <qtextcodec.h>
+#include <tqfile.h>
+#include <tqmap.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -76,7 +76,7 @@ using KMail::AccountManager;
using namespace KMail;
// Local helper methods
-static void vPartMicroParser( const QString& str, QString& s );
+static void vPartMicroParser( const TQString& str, TQString& s );
static void reloadFolderTree();
// The index in this array is the KMail::FolderContentsType enum
@@ -95,12 +95,12 @@ static const struct {
{ "Journal", "application/x-vnd.kolab.journal", KFolderTreeItem::Journals, "journal", I18N_NOOP( "Journal" ) }
};
-static QString folderContentsType( KMail::FolderContentsType type )
+static TQString folderContentsType( KMail::FolderContentsType type )
{
return s_folderContentsType[type].contentsTypeStr;
}
-static QString folderKolabMimeType( KMail::FolderContentsType type )
+static TQString folderKolabMimeType( KMail::FolderContentsType type )
{
return s_folderContentsType[type].mimetype;
}
@@ -110,7 +110,7 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::globalStorageFormat() cons
== GlobalSettings::EnumTheIMAPResourceStorageFormat::XML ? StorageXML : StorageIcalVcard;
}
-static KMail::FolderContentsType folderContentsType( const QString& type )
+static KMail::FolderContentsType folderContentsType( const TQString& type )
{
for ( uint i = 0 ; i < sizeof s_folderContentsType / sizeof *s_folderContentsType; ++i )
if ( type == s_folderContentsType[i].contentsTypeStr )
@@ -118,7 +118,7 @@ static KMail::FolderContentsType folderContentsType( const QString& type )
return KMail::ContentsTypeMail;
}
-static QString localizedDefaultFolderName( KMail::FolderContentsType type )
+static TQString localizedDefaultFolderName( KMail::FolderContentsType type )
{
return i18n( s_folderContentsType[type].translatedName );
}
@@ -152,15 +152,15 @@ ExtraFolder::~ExtraFolder()
*/
KMailICalIfaceImpl::KMailICalIfaceImpl()
- : DCOPObject( "KMailICalIface" ), QObject( 0, "KMailICalIfaceImpl" ),
+ : DCOPObject( "KMailICalIface" ), TQObject( 0, "KMailICalIfaceImpl" ),
mContacts( 0 ), mCalendar( 0 ), mNotes( 0 ), mTasks( 0 ), mJournals( 0 ),
mFolderLanguage( 0 ), mFolderParentDir( 0 ), mFolderType( KMFolderTypeUnknown ),
mUseResourceIMAP( false ), mResourceQuiet( false ), mHideFolders( true )
{
// Listen to config changes
- connect( kmkernel, SIGNAL( configChanged() ), this, SLOT( readConfig() ) );
- connect( kmkernel, SIGNAL( folderRemoved( KMFolder* ) ),
- this, SLOT( slotFolderRemoved( KMFolder* ) ) );
+ connect( kmkernel, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( readConfig() ) );
+ connect( kmkernel, TQT_SIGNAL( folderRemoved( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderRemoved( KMFolder* ) ) );
mExtraFolders.setAutoDelete( true );
mAccumulators.setAutoDelete( true );
@@ -184,7 +184,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy
DwMediaType& contentType = part->Headers().ContentType();
if ( startsWith ) {
if ( contentType.TypeStr() == sType
- && QString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) )
+ && TQString( contentType.SubtypeStr().c_str() ).startsWith( sSubtype ) )
return part;
}
else
@@ -198,7 +198,7 @@ static DwBodyPart* findBodyPartByMimeType( const KMMessage& msg, const char* sTy
}
// Helper function to find an attachment with a given filename
-static DwBodyPart* findBodyPart( const KMMessage& msg, const QString& attachmentName )
+static DwBodyPart* findBodyPart( const KMMessage& msg, const TQString& attachmentName )
{
// quickly searching for our message part: since Kolab parts are
// top-level parts we do *not* have to travel into embedded multiparts
@@ -236,9 +236,9 @@ inline static void debugBodyParts( const char*, const KMMessage& ) {}
// If lookupByName if false the attachment to replace is looked up by mimetype.
// return value: wrong if attachment could not be added/updated
bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
- const QString& attachmentURL,
- const QString& attachmentName,
- const QString& attachmentMimetype,
+ const TQString& attachmentURL,
+ const TQString& attachmentName,
+ const TQString& attachmentMimetype,
bool lookupByName )
{
kdDebug(5006) << "KMailICalIfaceImpl::updateAttachment( " << attachmentURL << " )" << endl;
@@ -247,10 +247,10 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
KURL url( attachmentURL );
if ( url.isValid() && url.isLocalFile() ) {
- const QString fileName( url.path() );
- QFile file( fileName );
+ const TQString fileName( url.path() );
+ TQFile file( fileName );
if( file.open( IO_ReadOnly ) ) {
- QByteArray rawData = file.readAll();
+ TQByteArray rawData = file.readAll();
file.close();
// create the new message part with data read from temp file
@@ -258,15 +258,15 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
msgPart.setName( attachmentName );
const int iSlash = attachmentMimetype.find('/');
- const QCString sType = attachmentMimetype.left( iSlash ).latin1();
- const QCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = attachmentMimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = attachmentMimetype.mid( iSlash+1 ).latin1();
msgPart.setTypeStr( sType );
msgPart.setSubtypeStr( sSubtype );
- QCString ctd("attachment;\n filename=\"");
+ TQCString ctd("attachment;\n filename=\"");
ctd.append( attachmentName.latin1() );
ctd.append("\"");
msgPart.setContentDisposition( ctd );
- QValueList<int> dummy;
+ TQValueList<int> dummy;
msgPart.setBodyAndGuessCte( rawData, dummy );
msgPart.setPartSpecifier( fileName );
@@ -304,16 +304,16 @@ bool KMailICalIfaceImpl::updateAttachment( KMMessage& msg,
}
// Look for the attachment with the right mimetype
-bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QString& mimetype, QString& s )
+bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const TQString& mimetype, TQString& s )
{
const int iSlash = mimetype.find('/');
- const QCString sType = mimetype.left( iSlash ).latin1();
- const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = mimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
DwBodyPart* part = findBodyPartByMimeType( msg, sType, sSubtype, true /* starts with sSubtype, to accept application/x-vnd.kolab.contact.distlist */ );
if ( part ) {
KMMessagePart msgPart;
KMMessage::bodyPart(part, &msgPart);
- s = msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) );
+ s = msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) );
return true;
}
return false;
@@ -326,7 +326,7 @@ bool KMailICalIfaceImpl::kolabXMLFoundAndDecoded( const KMMessage& msg, const QS
// the attachment by an empty dummy attachment since Mimelib
// does not provide an option for deleting attachments yet.
bool KMailICalIfaceImpl::deleteAttachment( KMMessage& msg,
- const QString& attachmentName )
+ const TQString& attachmentName )
{
kdDebug(5006) << "KMailICalIfaceImpl::deleteAttachment( " << attachmentName << " )" << endl;
@@ -381,7 +381,7 @@ static void setIcalVcardContentTypeHeader( KMMessage *msg, KMail::FolderContents
}
}
-static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody )
+static void setXMLContentTypeHeader( KMMessage *msg, const TQString plainTextBody )
{
// add a first body part to be displayed by all mailer
// than can NOT display Kolab data: no matter if these
@@ -400,12 +400,12 @@ static void setXMLContentTypeHeader( KMMessage *msg, const QString plainTextBody
// Store a new entry that was received from the resource
Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
- const QString& subject,
- const QString& plainTextBody,
- const QMap<QCString, QString>& customHeaders,
- const QStringList& attachmentURLs,
- const QStringList& attachmentNames,
- const QStringList& attachmentMimetypes )
+ const TQString& subject,
+ const TQString& plainTextBody,
+ const TQMap<TQCString, TQString>& customHeaders,
+ const TQStringList& attachmentURLs,
+ const TQStringList& attachmentNames,
+ const TQStringList& attachmentMimetypes )
{
kdDebug(5006) << "KMailICalIfaceImpl::addIncidenceKolab( " << attachmentNames << " )" << endl;
@@ -418,8 +418,8 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
msg->setSubject( subject );
msg->setAutomaticFields( true );
- QMap<QCString, QString>::ConstIterator ith = customHeaders.begin();
- const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.end();
+ TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin();
+ const TQMap<TQCString, TQString>::ConstIterator ithEnd = customHeaders.end();
for ( ; ith != ithEnd ; ++ith ) {
msg->setHeaderField( ith.key(), ith.data() );
}
@@ -438,9 +438,9 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
Q_ASSERT( attachmentMimetypes.count() == attachmentURLs.count() );
Q_ASSERT( attachmentNames.count() == attachmentURLs.count() );
// Add all attachments by reading them from their temp. files
- QStringList::ConstIterator itmime = attachmentMimetypes.begin();
- QStringList::ConstIterator iturl = attachmentURLs.begin();
- for( QStringList::ConstIterator itname = attachmentNames.begin();
+ TQStringList::ConstIterator itmime = attachmentMimetypes.begin();
+ TQStringList::ConstIterator iturl = attachmentURLs.begin();
+ for( TQStringList::ConstIterator itname = attachmentNames.begin();
itname != attachmentNames.end()
&& itmime != attachmentMimetypes.end()
&& iturl != attachmentURLs.end();
@@ -473,7 +473,7 @@ Q_UINT32 KMailICalIfaceImpl::addIncidenceKolab( KMFolder& folder,
return sernum;
}
-bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource,
+bool KMailICalIfaceImpl::deleteIncidenceKolab( const TQString& resource,
Q_UINT32 sernum )
{
// Find the message from the serial number and delete it.
@@ -505,8 +505,8 @@ bool KMailICalIfaceImpl::deleteIncidenceKolab( const QString& resource,
}
-int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype,
- const QString& resource )
+int KMailICalIfaceImpl::incidencesKolabCount( const TQString& mimetype,
+ const TQString& resource )
{
Q_UNUSED( mimetype ); // honouring that would be too slow...
@@ -527,16 +527,16 @@ int KMailICalIfaceImpl::incidencesKolabCount( const QString& mimetype,
return n;
}
-QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mimetype,
- const QString& resource,
+TQMap<Q_UINT32, TQString> KMailICalIfaceImpl::incidencesKolab( const TQString& mimetype,
+ const TQString& resource,
int startIndex,
int nbMessages )
{
/// Get the mimetype attachments from this folder. Returns a
- /// QMap with serialNumber/attachment pairs.
+ /// TQMap with serialNumber/attachment pairs.
/// (serial numbers of the mail are provided for easier later update)
- QMap<Q_UINT32, QString> aMap;
+ TQMap<Q_UINT32, TQString> aMap;
if( !mUseResourceIMAP )
return aMap;
@@ -562,8 +562,8 @@ QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mime
#endif
if ( msg ) {
const int iSlash = mimetype.find('/');
- const QCString sType = mimetype.left( iSlash ).latin1();
- const QCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
+ const TQCString sType = mimetype.left( iSlash ).latin1();
+ const TQCString sSubtype = mimetype.mid( iSlash+1 ).latin1();
if ( sType.isEmpty() || sSubtype.isEmpty() ) {
kdError(5006) << mimetype << " not an type/subtype combination" << endl;
} else {
@@ -571,13 +571,13 @@ QMap<Q_UINT32, QString> KMailICalIfaceImpl::incidencesKolab( const QString& mime
if ( dwPart ) {
KMMessagePart msgPart;
KMMessage::bodyPart(dwPart, &msgPart);
- aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( QTextCodec::codecForName( "utf8" ) ));
+ aMap.insert(msg->getMsgSerNum(), msgPart.bodyToUnicode( TQTextCodec::codecForName( "utf8" ) ));
} else {
// Check if the whole message has the right types. This is what
// happens in the case of ical storage, where the whole mail is
// the data
- const QCString type( msg->typeStr() );
- const QCString subtype( msg->subtypeStr() );
+ const TQCString type( msg->typeStr() );
+ const TQCString subtype( msg->subtypeStr() );
if (type.lower() == sType && subtype.lower() == sSubtype ) {
aMap.insert( msg->getMsgSerNum(), msg->bodyToUnicode() );
}
@@ -611,9 +611,9 @@ void KMailICalIfaceImpl::slotMessageRetrieved( KMMessage* msg )
// do we have an accumulator for this folder?
Accumulator *ac = mAccumulators.find( parent->location() );
if( ac ) {
- QString s;
+ TQString s;
if ( !vPartFoundAndDecoded( msg, s ) ) return;
- QString uid( "UID" );
+ TQString uid( "UID" );
vPartMicroParser( s, uid );
const Q_UINT32 sernum = msg->getMsgSerNum();
mUIDToSerNum.insert( uid, sernum );
@@ -652,21 +652,21 @@ static int dimapAccountCount()
return count;
}
-static QString subresourceLabelForPresentation( const KMFolder * folder )
+static TQString subresourceLabelForPresentation( const KMFolder * folder )
{
- QString label = folder->prettyURL();
- QStringList parts = QStringList::split( QString::fromLatin1("/"), label );
+ TQString label = folder->prettyURL();
+ TQStringList parts = TQStringList::split( TQString::fromLatin1("/"), label );
// In the common special case of some other user's folder shared with us
// the url looks like "Server Name/user/$USERNAME/Folder/Name". Make
// those a bit nicer.
- if ( parts[1] == QString::fromLatin1("user") ) {
- QStringList remainder(parts);
+ if ( parts[1] == TQString::fromLatin1("user") ) {
+ TQStringList remainder(parts);
remainder.pop_front();
remainder.pop_front();
remainder.pop_front();
label = i18n("%1's %2")
.arg( parts[2] )
- .arg( remainder.join( QString::fromLatin1("/") ) );
+ .arg( remainder.join( TQString::fromLatin1("/") ) );
}
// Another special case is our own folders, under the imap INBOX, make
// those prettier too
@@ -674,16 +674,16 @@ static QString subresourceLabelForPresentation( const KMFolder * folder )
while ( parent->parent() && parent->parent()->owner() ) {
parent = parent->parent()->owner();
if ( parent->isSystemFolder() ) {
- QStringList remainder(parts);
+ TQStringList remainder(parts);
remainder.pop_front();
remainder.pop_front();
if ( dimapAccountCount() > 1 ) {
label = i18n( "My %1 (%2)")
- .arg( remainder.join( QString::fromLatin1("/") ),
+ .arg( remainder.join( TQString::fromLatin1("/") ),
static_cast<const KMFolderCachedImap*>( folder->storage() )->account()->name() );
} else {
label = i18n("My %1")
- .arg( remainder.join( QString::fromLatin1("/") ) );
+ .arg( remainder.join( TQString::fromLatin1("/") ) );
}
break;
}
@@ -692,12 +692,12 @@ static QString subresourceLabelForPresentation( const KMFolder * folder )
}
/* list all available subresources */
-QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKolab( const QString& contentsType )
+TQValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKolab( const TQString& contentsType )
{
- QValueList<SubResource> subResources;
+ TQValueList<SubResource> subResources;
// Add the default one
- KMFolder* f = folderFromType( contentsType, QString::null );
+ KMFolder* f = folderFromType( contentsType, TQString::null );
if ( f ) {
subResources.append( SubResource( f->location(), subresourceLabelForPresentation( f ),
!f->isReadOnly(), folderIsAlarmRelevant( f ) ) );
@@ -707,7 +707,7 @@ QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKola
// get the extra ones
const KMail::FolderContentsType t = folderContentsType( contentsType );
- QDictIterator<ExtraFolder> it( mExtraFolders );
+ TQDictIterator<ExtraFolder> it( mExtraFolders );
for ( ; it.current(); ++it ){
f = it.current()->folder;
if ( f && f->storage()->contentsType() == t ) {
@@ -723,11 +723,11 @@ QValueList<KMailICalIfaceImpl::SubResource> KMailICalIfaceImpl::subresourcesKola
return subResources;
}
-bool KMailICalIfaceImpl::triggerSync( const QString& contentsType )
+bool KMailICalIfaceImpl::triggerSync( const TQString& contentsType )
{
kdDebug(5006) << k_funcinfo << endl;
- QValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType );
- for ( QValueList<KMailICalIfaceImpl::SubResource>::const_iterator it( folderList.begin() ),
+ TQValueList<KMailICalIfaceImpl::SubResource> folderList = subresourcesKolab( contentsType );
+ for ( TQValueList<KMailICalIfaceImpl::SubResource>::const_iterator it( folderList.begin() ),
end( folderList.end() );
it != end ; ++it ) {
KMFolder * const f = findResourceFolder( (*it).location );
@@ -750,8 +750,8 @@ bool KMailICalIfaceImpl::triggerSync( const QString& contentsType )
}
/* Used by the resource to query whether folders are writable. */
-bool KMailICalIfaceImpl::isWritableFolder( const QString& type,
- const QString& resource )
+bool KMailICalIfaceImpl::isWritableFolder( const TQString& type,
+ const TQString& resource )
{
KMFolder* f = folderFromType( type, resource );
if ( !f )
@@ -762,7 +762,7 @@ bool KMailICalIfaceImpl::isWritableFolder( const QString& type,
}
/* Used by the resource to query the storage format of the folder. */
-KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QString& resource )
+KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const TQString& resource )
{
StorageFormat format;
KMFolder* f = findResourceFolder( resource );
@@ -787,15 +787,15 @@ KMailICalIfaceImpl::StorageFormat KMailICalIfaceImpl::storageFormat( const QStri
// number, and the mail is just added instead. In this case
// the deletedAttachments can be forgotten.
*/
-Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
+Q_UINT32 KMailICalIfaceImpl::update( 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 )
{
Q_UINT32 rc = 0;
@@ -826,15 +826,15 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
// Message found - make a copy and update it:
KMMessage* newMsg = new KMMessage( *msg );
newMsg->setSubject( subject );
- QMap<QCString, QString>::ConstIterator ith = customHeaders.begin();
- const QMap<QCString, QString>::ConstIterator ithEnd = customHeaders.begin();
+ TQMap<TQCString, TQString>::ConstIterator ith = customHeaders.begin();
+ const TQMap<TQCString, TQString>::ConstIterator ithEnd = customHeaders.begin();
for ( ; ith != ithEnd ; ++ith )
newMsg->setHeaderField( ith.key(), ith.data() );
newMsg->setParent( 0 ); // workaround strange line in KMMsgBase::assign. newMsg is not in any folder yet.
// Note that plainTextBody isn't used in this branch. We assume it's still valid from when the mail was created.
// Delete some attachments according to list
- for( QStringList::ConstIterator it = deletedAttachments.begin();
+ for( TQStringList::ConstIterator it = deletedAttachments.begin();
it != deletedAttachments.end();
++it ){
if( !deleteAttachment( *newMsg, *it ) ){
@@ -843,8 +843,8 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
}
const KMail::FolderContentsType t = f->storage()->contentsType();
- const QCString type = msg->typeStr();
- const QCString subtype = msg->subtypeStr();
+ const TQCString type = msg->typeStr();
+ const TQCString subtype = msg->subtypeStr();
const bool messageWasIcalVcardFormat = ( type.lower() == "text" &&
( subtype.lower() == "calendar" || subtype.lower() == "x-vcard" ) );
@@ -862,9 +862,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
}
//kdDebug(5006) << k_funcinfo << " StorageFormatXML " << endl;
// Add all attachments by reading them from their temp. files
- QStringList::ConstIterator iturl = attachmentURLs.begin();
- QStringList::ConstIterator itmime = attachmentMimetypes.begin();
- QStringList::ConstIterator itname = attachmentNames.begin();
+ TQStringList::ConstIterator iturl = attachmentURLs.begin();
+ TQStringList::ConstIterator itmime = attachmentMimetypes.begin();
+ TQStringList::ConstIterator itname = attachmentNames.begin();
for( ;
iturl != attachmentURLs.end()
&& itmime != attachmentMimetypes.end()
@@ -905,9 +905,9 @@ Q_UINT32 KMailICalIfaceImpl::update( const QString& resource,
return rc;
}
-KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
+KURL KMailICalIfaceImpl::getAttachment( const TQString& resource,
Q_UINT32 sernum,
- const QString& filename )
+ const TQString& filename )
{
// This finds the attachment with the filename, saves it to a
// temp file and returns a URL to it. It's up to the resource
@@ -944,7 +944,7 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
// Save the contents of the attachment.
KMMessagePart aPart;
msg->bodyPart( part, &aPart );
- QByteArray rawData( aPart.bodyDecodedBinary() );
+ TQByteArray rawData( aPart.bodyDecodedBinary() );
KTempFile file;
file.file()->writeBlock( rawData.data(), rawData.size() );
@@ -965,16 +965,16 @@ KURL KMailICalIfaceImpl::getAttachment( const QString& resource,
return url;
}
-QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
+TQString KMailICalIfaceImpl::attachmentMimetype( const TQString & resource,
Q_UINT32 sernum,
- const QString & filename )
+ const TQString & filename )
{
if( !mUseResourceIMAP )
- return QString();
+ return TQString();
KMFolder* f = findResourceFolder( resource );
if( !f || storageFormat( f ) != StorageXML ) {
kdError(5006) << "attachmentMimetype(" << resource << ") : Wrong folder" << endl;
- return QString();
+ return TQString();
}
KMMessage* msg = findMessageBySerNum( sernum, f );
@@ -984,7 +984,7 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
if ( part ) {
KMMessagePart kmPart;
msg->bodyPart( part, &kmPart );
- return QString( kmPart.typeStr() ) + "/" + QString( kmPart.subtypeStr() );
+ return TQString( kmPart.typeStr() ) + "/" + TQString( kmPart.subtypeStr() );
} else {
kdDebug(5006) << "Attachment " << filename << " not found." << endl;
}
@@ -992,12 +992,12 @@ QString KMailICalIfaceImpl::attachmentMimetype( const QString & resource,
kdDebug(5006) << "Message not found." << endl;
}
- return QString();
+ return TQString();
}
-QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT32 sernum)
+TQStringList KMailICalIfaceImpl::listAttachments(const TQString & resource, Q_UINT32 sernum)
{
- QStringList rv;
+ TQStringList rv;
if( !mUseResourceIMAP )
return rv;
@@ -1016,10 +1016,10 @@ QStringList KMailICalIfaceImpl::listAttachments(const QString & resource, Q_UINT
if( msg ) {
for ( DwBodyPart* part = msg->getFirstDwBodyPart(); part; part = part->Next() ) {
if ( part->hasHeaders() ) {
- QString name;
+ TQString name;
DwMediaType& contentType = part->Headers().ContentType();
- if ( QString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." )
- || QString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) )
+ if ( TQString( contentType.SubtypeStr().c_str() ).startsWith( "x-vnd.kolab." )
+ || TQString( contentType.SubtypeStr().c_str() ).contains( "tnef" ) )
continue;
if ( !part->Headers().ContentDisposition().Filename().empty() )
name = part->Headers().ContentDisposition().Filename().c_str();
@@ -1061,7 +1061,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
return;
// kdDebug(5006) << "KMailICalIfaceImpl::slotIncidenceAdded" << endl;
- QString type = folderContentsType( folder->storage()->contentsType() );
+ TQString type = folderContentsType( folder->storage()->contentsType() );
if( type.isEmpty() ) {
kdError(5006) << "Not an IMAP resource folder" << endl;
return;
@@ -1073,8 +1073,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
assert( folder == aFolder );
bool unget = !folder->isMessage( i );
- QString s;
- QString uid( "UID" );
+ TQString s;
+ TQString uid( "UID" );
KMMessage *msg = folder->getMsg( i );
if( !msg ) return;
if( msg->isComplete() ) {
@@ -1115,8 +1115,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
// TODO: Till, port me
if ( unget ) mTheUnGetMes.insert( msg->getMsgSerNum(), true );
FolderJob *job = msg->parent()->createJob( msg );
- connect( job, SIGNAL( messageRetrieved( KMMessage* ) ),
- this, SLOT( slotMessageRetrieved( KMMessage* ) ) );
+ connect( job, TQT_SIGNAL( messageRetrieved( KMMessage* ) ),
+ this, TQT_SLOT( slotMessageRetrieved( KMMessage* ) ) );
job->start();
return;
}
@@ -1130,7 +1130,7 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
if( mResourceQuiet || !mUseResourceIMAP )
return;
- QString type = folderContentsType( folder->storage()->contentsType() );
+ TQString type = folderContentsType( folder->storage()->contentsType() );
//kdDebug(5006) << folder << " " << type << " " << sernum << endl;
if( !type.isEmpty() ) {
// Get the index of the mail
@@ -1141,10 +1141,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
// Read the iCal or vCard
bool unget = !folder->isMessage( i );
- QString s;
+ TQString s;
bool ok = false;
KMMessage* msg = folder->getMsg( i );
- QString uid( "UID" );
+ TQString uid( "UID" );
switch( storageFormat( folder ) ) {
case StorageIcalVcard:
if( vPartFoundAndDecoded( msg, s ) ) {
@@ -1171,10 +1171,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder,
}
// KMail orders a refresh
-void KMailICalIfaceImpl::slotRefresh( const QString& type )
+void KMailICalIfaceImpl::slotRefresh( const TQString& type )
{
if( mUseResourceIMAP ) {
- signalRefresh( type, QString::null /* PENDING(bo) folder->location() */ );
+ signalRefresh( type, TQString::null /* PENDING(bo) folder->location() */ );
kdDebug(5006) << "Emitting DCOP signal signalRefresh( " << type << " )" << endl;
}
}
@@ -1200,8 +1200,8 @@ void KMailICalIfaceImpl::slotRefreshFolder( KMFolder* folder)
* The folder and message stuff code
*/
-KMFolder* KMailICalIfaceImpl::folderFromType( const QString& type,
- const QString& folder )
+KMFolder* KMailICalIfaceImpl::folderFromType( const TQString& type,
+ const TQString& folder )
{
if( mUseResourceIMAP ) {
KMFolder* f = 0;
@@ -1272,8 +1272,8 @@ KFolderTreeItem::Type KMailICalIfaceImpl::folderType( KMFolder* folder ) const
// Global tables of foldernames is different languages
// For now: 0->English, 1->German, 2->French, 3->Dutch
-static QMap<KFolderTreeItem::Type,QString> folderNames[4];
-QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const
+static TQMap<KFolderTreeItem::Type,TQString> folderNames[4];
+TQString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language ) const
{
// With the XML storage, folders are always (internally) named in English
if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML )
@@ -1286,33 +1286,33 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language
GroupwarePage in configuredialog.cpp */
// English
- folderNames[0][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendar");
- folderNames[0][KFolderTreeItem::Tasks] = QString::fromLatin1("Tasks");
- folderNames[0][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[0][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts");
- folderNames[0][KFolderTreeItem::Notes] = QString::fromLatin1("Notes");
+ folderNames[0][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendar");
+ folderNames[0][KFolderTreeItem::Tasks] = TQString::fromLatin1("Tasks");
+ folderNames[0][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[0][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts");
+ folderNames[0][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes");
// German
- folderNames[1][KFolderTreeItem::Calendar] = QString::fromLatin1("Kalender");
- folderNames[1][KFolderTreeItem::Tasks] = QString::fromLatin1("Aufgaben");
- folderNames[1][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[1][KFolderTreeItem::Contacts] = QString::fromLatin1("Kontakte");
- folderNames[1][KFolderTreeItem::Notes] = QString::fromLatin1("Notizen");
+ folderNames[1][KFolderTreeItem::Calendar] = TQString::fromLatin1("Kalender");
+ folderNames[1][KFolderTreeItem::Tasks] = TQString::fromLatin1("Aufgaben");
+ folderNames[1][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[1][KFolderTreeItem::Contacts] = TQString::fromLatin1("Kontakte");
+ folderNames[1][KFolderTreeItem::Notes] = TQString::fromLatin1("Notizen");
// French
- folderNames[2][KFolderTreeItem::Calendar] = QString::fromLatin1("Calendrier");
+ folderNames[2][KFolderTreeItem::Calendar] = TQString::fromLatin1("Calendrier");
// Tasks = Tâches (â == 0xE2 in latin1)
- folderNames[2][KFolderTreeItem::Tasks] = QString::fromLatin1("T\342ches");
- folderNames[2][KFolderTreeItem::Journals] = QString::fromLatin1("Journal");
- folderNames[2][KFolderTreeItem::Contacts] = QString::fromLatin1("Contacts");
- folderNames[2][KFolderTreeItem::Notes] = QString::fromLatin1("Notes");
+ folderNames[2][KFolderTreeItem::Tasks] = TQString::fromLatin1("T\342ches");
+ folderNames[2][KFolderTreeItem::Journals] = TQString::fromLatin1("Journal");
+ folderNames[2][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contacts");
+ folderNames[2][KFolderTreeItem::Notes] = TQString::fromLatin1("Notes");
// Dutch
- folderNames[3][KFolderTreeItem::Calendar] = QString::fromLatin1("Agenda");
- folderNames[3][KFolderTreeItem::Tasks] = QString::fromLatin1("Taken");
- folderNames[3][KFolderTreeItem::Journals] = QString::fromLatin1("Logboek");
- folderNames[3][KFolderTreeItem::Contacts] = QString::fromLatin1("Contactpersonen");
- folderNames[3][KFolderTreeItem::Notes] = QString::fromLatin1("Notities");
+ folderNames[3][KFolderTreeItem::Calendar] = TQString::fromLatin1("Agenda");
+ folderNames[3][KFolderTreeItem::Tasks] = TQString::fromLatin1("Taken");
+ folderNames[3][KFolderTreeItem::Journals] = TQString::fromLatin1("Logboek");
+ folderNames[3][KFolderTreeItem::Contacts] = TQString::fromLatin1("Contactpersonen");
+ folderNames[3][KFolderTreeItem::Notes] = TQString::fromLatin1("Notities");
}
if( language < 0 || language > 3 ) {
@@ -1325,7 +1325,7 @@ QString KMailICalIfaceImpl::folderName( KFolderTreeItem::Type type, int language
// Find message matching a given UID
-KMMessage *KMailICalIfaceImpl::findMessageByUID( const QString& uid, KMFolder* folder )
+KMMessage *KMailICalIfaceImpl::findMessageByUID( const TQString& uid, KMFolder* folder )
{
if( !folder || !mUIDToSerNum.contains( uid ) ) return 0;
int i;
@@ -1389,7 +1389,7 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
return;
// Check if already know that 'extra folder'
- const QString location = folder->location();
+ const TQString location = folder->location();
ExtraFolder* ef = mExtraFolders.find( location );
if ( ef && ef->folder ) {
// Notify that the old folder resource is no longer available
@@ -1422,9 +1422,9 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
// coworker appears as /user/hirohito/Kalender, although Hirohito sees his folder
// in Japanese. On the server the folders are always in English.
if ( folder->folderType() == KMFolderTypeCachedImap ) {
- QString annotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
+ TQString annotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
kdDebug(5006) << "folderContentsTypeChanged: " << folder->name() << " has annotation " << annotation << endl;
- if ( annotation == QString( s_folderContentsType[contentsType].annotation ) + ".default" )
+ if ( annotation == TQString( s_folderContentsType[contentsType].annotation ) + ".default" )
folder->setLabel( localizedDefaultFolderName( contentsType ) );
}
@@ -1435,8 +1435,8 @@ void KMailICalIfaceImpl::folderContentsTypeChanged( KMFolder* folder,
!folder->isReadOnly(), folderIsAlarmRelevant( folder ) );
}
-KMFolder* KMailICalIfaceImpl::extraFolder( const QString& type,
- const QString& folder )
+KMFolder* KMailICalIfaceImpl::extraFolder( const TQString& type,
+ const TQString& folder )
{
// If an extra folder exists that matches the type and folder location,
// use that
@@ -1488,7 +1488,7 @@ void KMailICalIfaceImpl::addFolderChange( KMFolder* folder, FolderChanges change
KMailICalIfaceImpl::FolderInfo KMailICalIfaceImpl::readFolderInfo( const KMFolder * const folder ) const
{
KConfigGroup configGroup( kmkernel->config(), "GroupwareFolderInfo" );
- QString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" );
+ TQString str = configGroup.readEntry( folder->idString() + "-storageFormat", "unset" );
FolderInfo info;
if ( str == "unset" ) {
info.mStorageFormat = globalStorageFormat();
@@ -1542,7 +1542,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
httpURL.setPort( 0 ); // remove imap port
// IMAP path is either /INBOX/<path> or /user/someone/<path>
- QString path = folderURL.path( -1 );
+ TQString path = folderURL.path( -1 );
Q_ASSERT( path.startsWith( "/" ) );
int secondSlash = path.find( '/', 1 );
if ( secondSlash == -1 ) {
@@ -1560,7 +1560,7 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
}
httpURL.setPath( "/freebusy/trigger/" + path + ".pfb" );
- httpURL.setQuery( QString::null );
+ httpURL.setQuery( TQString::null );
// Ensure that we encode everything with UTF8
httpURL = KURL( httpURL.url(0,106), 106 );
kdDebug() << "Triggering PFB update for " << folderURL << " : getting " << httpURL << endl;
@@ -1572,8 +1572,8 @@ void KMailICalIfaceImpl::triggerKolabFreeBusy( const KURL& folderURL )
void KMailICalIfaceImpl::slotFolderPropertiesChanged( KMFolder* folder )
{
if ( isResourceFolder( folder ) ) {
- const QString location = folder->location();
- const QString contentsTypeStr = folderContentsType( folder->storage()->contentsType() );
+ const TQString location = folder->location();
+ const TQString contentsTypeStr = folderContentsType( folder->storage()->contentsType() );
subresourceDeleted( contentsTypeStr, location );
subresourceAdded( contentsTypeStr, location, subresourceLabelForPresentation( folder ),
@@ -1589,8 +1589,8 @@ void KMailICalIfaceImpl::slotFolderRenamed()
slotFolderPropertiesChanged( const_cast<KMFolder*>( folder ) );
}
-void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation,
- const QString &newLocation )
+void KMailICalIfaceImpl::slotFolderLocationChanged( const TQString &oldLocation,
+ const TQString &newLocation )
{
KMFolder *folder = findResourceFolder( oldLocation );
ExtraFolder* ef = mExtraFolders.find( oldLocation );
@@ -1606,7 +1606,7 @@ void KMailICalIfaceImpl::slotFolderLocationChanged( const QString &oldLocation,
}
-KMFolder* KMailICalIfaceImpl::findResourceFolder( const QString& resource )
+KMFolder* KMailICalIfaceImpl::findResourceFolder( const TQString& resource )
{
// Try the standard folders
if( mCalendar && mCalendar->location() == resource )
@@ -1651,7 +1651,7 @@ void KMailICalIfaceImpl::readConfig()
// Read remaining options
const bool hideFolders = GlobalSettings::self()->hideGroupwareFolders();
- QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
+ TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
// Find the folder parent
KMFolderDir* folderParentDir;
@@ -1666,10 +1666,10 @@ void KMailICalIfaceImpl::readConfig()
Q_ASSERT( account );
if ( account ) {
// just in case we were connected already
- disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
- connect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
+ disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
+ connect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
}
mUseResourceIMAP = false;
// We can't really call cleanup(), if those folders were completely deleted.
@@ -1691,7 +1691,7 @@ void KMailICalIfaceImpl::readConfig()
// Globally there are 3 cases: nothing found, some stuff found by type/name heuristics, or everything found OK
bool noneFound = true;
bool mustFix = false; // true when at least one was found by heuristics
- QValueVector<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 );
+ TQValueVector<StandardFolderSearchResult> results( KMail::ContentsTypeLast + 1 );
for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) {
if ( i != KMail::ContentsTypeMail ) {
results[i] = findStandardResourceFolder( folderParentDir, static_cast<KMail::FolderContentsType>(i) );
@@ -1719,8 +1719,8 @@ void KMailICalIfaceImpl::readConfig()
}
if( noneFound || mustFix ) {
- QString msg;
- QString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name();
+ TQString msg;
+ TQString parentFolderName = folderParent != 0 ? folderParent->name() : folderParentDir->name();
if ( noneFound ) {
// No subfolder was found, so ask if we can make them
msg = i18n("KMail will now create the required groupware folders"
@@ -1728,10 +1728,10 @@ void KMailICalIfaceImpl::readConfig()
" and the IMAP resource will be disabled").arg(parentFolderName);
} else {
// Some subfolders were found, be more precise
- QString operations = "<ul>";
+ TQString operations = "<ul>";
for ( int i = 0; i < KMail::ContentsTypeLast+1; ++i ) {
if ( i != KMail::ContentsTypeMail ) {
- QString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) );
+ TQString typeName = localizedDefaultFolderName( static_cast<KMail::FolderContentsType>( i ) );
if ( results[i].found == StandardFolderSearchResult::NotFound )
operations += "<li>" + i18n( "%1: no folder found. It will be created." ).arg( typeName ) + "</li>";
else if ( results[i].found == StandardFolderSearchResult::FoundByType || results[i].found == StandardFolderSearchResult::FoundByName )
@@ -1798,10 +1798,10 @@ void KMailICalIfaceImpl::readConfig()
kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- for(QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin();
+ for(TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin();
it != folderList.end(); ++it)
{
FolderStorage* storage = (*it)->storage();
@@ -1861,10 +1861,10 @@ void KMailICalIfaceImpl::readConfig()
kdDebug(5006) << k_funcinfo << "mNotes=" << mNotes << " " << mNotes->location() << endl;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- QValueList<QGuardedPtr<KMFolder> >::iterator it;
+ TQValueList<TQGuardedPtr<KMFolder> >::iterator it;
for(it = folderList.begin(); it != folderList.end(); ++it)
{
FolderStorage *storage = (*it)->storage();
@@ -1872,7 +1872,7 @@ void KMailICalIfaceImpl::readConfig()
if ( (*it)->folderType() == KMFolderTypeCachedImap ) {
KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage );
- const QString attributes = imapFolder->folderAttributes();
+ const TQString attributes = imapFolder->folderAttributes();
if ( attributes.contains( "X-FolderClass" ) ) {
if ( !attributes.contains( "X-SpecialFolder" ) || (*it)->location().contains( "@" ) ) {
const Scalix::FolderAttributeParser parser( attributes );
@@ -1906,15 +1906,15 @@ void KMailICalIfaceImpl::readConfig()
void KMailICalIfaceImpl::slotCheckDone()
{
- QString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
+ TQString parentName = GlobalSettings::self()->theIMAPResourceFolderParent();
KMFolder* folderParent = kmkernel->findFolderById( parentName );
//kdDebug(5006) << k_funcinfo << " folderParent=" << folderParent << endl;
if ( folderParent ) // cool it exists now
{
KMAccount* account = kmkernel->acctMgr()->find( GlobalSettings::self()->theIMAPResourceAccount() );
if ( account )
- disconnect( account, SIGNAL( finishedCheck( bool, CheckStatus ) ),
- this, SLOT( slotCheckDone() ) );
+ disconnect( account, TQT_SIGNAL( finishedCheck( bool, CheckStatus ) ),
+ this, TQT_SLOT( slotCheckDone() ) );
readConfig();
}
}
@@ -1971,12 +1971,12 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
KMFolder* folder = 0;
// Find all extra folders
- QStringList folderNames;
- QValueList<QGuardedPtr<KMFolder> > folderList;
+ TQStringList folderNames;
+ TQValueList<TQGuardedPtr<KMFolder> > folderList;
Q_ASSERT( kmkernel );
Q_ASSERT( kmkernel->dimapFolderMgr() );
kmkernel->dimapFolderMgr()->createFolderList(&folderNames, &folderList);
- QValueList<QGuardedPtr<KMFolder> >::iterator it = folderList.begin();
+ TQValueList<TQGuardedPtr<KMFolder> >::iterator it = folderList.begin();
for(; it != folderList.end(); ++it)
{
FolderStorage *storage = (*it)->storage();
@@ -1984,7 +1984,7 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
if ( (*it)->folderType() == KMFolderTypeCachedImap ) {
KMFolderCachedImap *imapFolder = static_cast<KMFolderCachedImap*>( storage );
- const QString attributes = imapFolder->folderAttributes();
+ const TQString attributes = imapFolder->folderAttributes();
if ( attributes.contains( "X-SpecialFolder" ) ) {
const Scalix::FolderAttributeParser parser( attributes );
if ( contentsType == Scalix::Utils::scalixIdToContentsType( parser.folderClass() ) ) {
@@ -2018,32 +2018,32 @@ KMFolder* KMailICalIfaceImpl::initScalixFolder( KMail::FolderContentsType conten
void KMailICalIfaceImpl::connectFolder( KMFolder* folder )
{
// avoid multiple connections
- disconnect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
- disconnect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
- disconnect( folder, SIGNAL( expunged( KMFolder* ) ),
- this, SLOT( slotRefreshFolder( KMFolder* ) ) );
- disconnect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ),
- this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
- disconnect( folder, SIGNAL( nameChanged() ),
- this, SLOT( slotFolderRenamed() ) );
- disconnect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ),
- this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) );
+ disconnect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
+ disconnect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
+ disconnect( folder, TQT_SIGNAL( expunged( KMFolder* ) ),
+ this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) );
+ disconnect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
+ disconnect( folder, TQT_SIGNAL( nameChanged() ),
+ this, TQT_SLOT( slotFolderRenamed() ) );
+ disconnect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) );
// Setup the signals to listen for changes
- connect( folder, SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
- connect( folder, SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
- this, SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
- connect( folder, SIGNAL( expunged( KMFolder* ) ),
- this, SLOT( slotRefreshFolder( KMFolder* ) ) );
- connect( folder->storage(), SIGNAL( readOnlyChanged( KMFolder* ) ),
- this, SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
- connect( folder, SIGNAL( nameChanged() ),
- this, SLOT( slotFolderRenamed() ) );
- connect( folder->storage(), SIGNAL( locationChanged( const QString&, const QString&) ),
- this, SLOT( slotFolderLocationChanged( const QString&, const QString&) ) );
+ connect( folder, TQT_SIGNAL( msgAdded( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceAdded( KMFolder*, Q_UINT32 ) ) );
+ connect( folder, TQT_SIGNAL( msgRemoved( KMFolder*, Q_UINT32 ) ),
+ this, TQT_SLOT( slotIncidenceDeleted( KMFolder*, Q_UINT32 ) ) );
+ connect( folder, TQT_SIGNAL( expunged( KMFolder* ) ),
+ this, TQT_SLOT( slotRefreshFolder( KMFolder* ) ) );
+ connect( folder->storage(), TQT_SIGNAL( readOnlyChanged( KMFolder* ) ),
+ this, TQT_SLOT( slotFolderPropertiesChanged( KMFolder* ) ) );
+ connect( folder, TQT_SIGNAL( nameChanged() ),
+ this, TQT_SLOT( slotFolderRenamed() ) );
+ connect( folder->storage(), TQT_SIGNAL( locationChanged( const TQString&, const TQString&) ),
+ this, TQT_SLOT( slotFolderLocationChanged( const TQString&, const TQString&) ) );
}
@@ -2067,23 +2067,23 @@ void KMailICalIfaceImpl::cleanup()
mContacts = mCalendar = mNotes = mTasks = mJournals = 0;
}
-QString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const
+TQString KMailICalIfaceImpl::folderPixmap( KFolderTreeItem::Type type ) const
{
if( !mUseResourceIMAP )
- return QString::null;
+ return TQString::null;
if( type == KFolderTreeItem::Contacts )
- return QString::fromLatin1( "kmgroupware_folder_contacts" );
+ return TQString::fromLatin1( "kmgroupware_folder_contacts" );
else if( type == KFolderTreeItem::Calendar )
- return QString::fromLatin1( "kmgroupware_folder_calendar" );
+ return TQString::fromLatin1( "kmgroupware_folder_calendar" );
else if( type == KFolderTreeItem::Notes )
- return QString::fromLatin1( "kmgroupware_folder_notes" );
+ return TQString::fromLatin1( "kmgroupware_folder_notes" );
else if( type == KFolderTreeItem::Tasks )
- return QString::fromLatin1( "kmgroupware_folder_tasks" );
+ return TQString::fromLatin1( "kmgroupware_folder_tasks" );
else if( type == KFolderTreeItem::Journals )
- return QString::fromLatin1( "kmgroupware_folder_journals" );
+ return TQString::fromLatin1( "kmgroupware_folder_journals" );
- return QString::null;
+ return TQString::null;
}
static void reloadFolderTree()
@@ -2095,9 +2095,9 @@ static void reloadFolderTree()
// This is a very light-weight and fast 'parser' to retrieve
// a data entry from a vCal taking continuation lines
// into account
-static void vPartMicroParser( const QString& str, QString& s )
+static void vPartMicroParser( const TQString& str, TQString& s )
{
- QString line;
+ TQString line;
uint len = str.length();
for( uint i=0; i<len; ++i){
@@ -2125,14 +2125,14 @@ static void vPartMicroParser( const QString& str, QString& s )
}
// Returns the first child folder having the given annotation
-static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const QString& annotation )
+static KMFolder* findFolderByAnnotation( KMFolderDir* folderParentDir, const TQString& annotation )
{
- QPtrListIterator<KMFolderNode> it( *folderParentDir );
+ TQPtrListIterator<KMFolderNode> it( *folderParentDir );
for ( ; it.current(); ++it ) {
if ( !it.current()->isDir() ) {
KMFolder* folder = static_cast<KMFolder *>( it.current() );
if ( folder->folderType() == KMFolderTypeCachedImap ) {
- QString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
+ TQString folderAnnotation = static_cast<KMFolderCachedImap*>( folder->storage() )->annotationFolderType();
//kdDebug(5006) << "findStandardResourceFolder: " << folder->name() << " has annotation " << folderAnnotation << endl;
if ( folderAnnotation == annotation )
return folder;
@@ -2147,12 +2147,12 @@ KMailICalIfaceImpl::StandardFolderSearchResult KMailICalIfaceImpl::findStandardR
if ( GlobalSettings::self()->theIMAPResourceStorageFormat() == GlobalSettings::EnumTheIMAPResourceStorageFormat::XML )
{
// Look for a folder with an annotation like "event.default"
- KMFolder* folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) + ".default" );
+ KMFolder* folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) + ".default" );
if ( folder )
return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundAndStandard );
// Fallback: look for a folder with an annotation like "event"
- folder = findFolderByAnnotation( folderParentDir, QString( s_folderContentsType[contentsType].annotation ) );
+ folder = findFolderByAnnotation( folderParentDir, TQString( s_folderContentsType[contentsType].annotation ) );
if ( folder )
return StandardFolderSearchResult( folder, StandardFolderSearchResult::FoundByType );
@@ -2217,9 +2217,9 @@ bool KMailICalIfaceImpl::isResourceQuiet() const
}
-bool KMailICalIfaceImpl::addSubresource( const QString& resource,
- const QString& parent,
- const QString& contentsType )
+bool KMailICalIfaceImpl::addSubresource( const TQString& resource,
+ const TQString& parent,
+ const TQString& contentsType )
{
kdDebug(5006) << "Adding subresource to parent: " << parent << " with name: " << resource << endl;
kdDebug(5006) << "contents type: " << contentsType << endl;
@@ -2246,7 +2246,7 @@ bool KMailICalIfaceImpl::addSubresource( const QString& resource,
return true;
}
-bool KMailICalIfaceImpl::removeSubresource( const QString& location )
+bool KMailICalIfaceImpl::removeSubresource( const TQString& location )
{
kdDebug(5006) << k_funcinfo << endl;