summaryrefslogtreecommitdiffstats
path: root/kmail/imapaccountbase.h
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 /kmail/imapaccountbase.h
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 'kmail/imapaccountbase.h')
-rw-r--r--kmail/imapaccountbase.h122
1 files changed, 61 insertions, 61 deletions
diff --git a/kmail/imapaccountbase.h b/kmail/imapaccountbase.h
index 57147330..46fd577c 100644
--- a/kmail/imapaccountbase.h
+++ b/kmail/imapaccountbase.h
@@ -28,8 +28,8 @@
#include "networkaccount.h"
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
#include <kio/global.h>
class AccountManager;
@@ -52,14 +52,14 @@ namespace KPIM {
namespace KMail {
struct ACLListEntry;
struct QuotaInfo;
- typedef QValueVector<KMail::ACLListEntry> ACLList;
+ typedef TQValueVector<KMail::ACLListEntry> ACLList;
class AttachmentStrategy;
class ImapAccountBase : public KMail::NetworkAccount {
Q_OBJECT
protected:
- ImapAccountBase( AccountManager * parent, const QString & name, uint id );
+ ImapAccountBase( AccountManager * parent, const TQString & name, uint id );
public:
virtual ~ImapAccountBase();
@@ -127,43 +127,43 @@ namespace KMail {
enum imapNamespace { PersonalNS=0, OtherUsersNS=1, SharedNS=2 };
// map a namespace type to a list of namespaces
- typedef QMap<imapNamespace, QStringList> nsMap;
+ typedef TQMap<imapNamespace, TQStringList> nsMap;
// map a namespace to a delimiter
- typedef QMap<QString, QString> namespaceDelim;
+ typedef TQMap<TQString, TQString> namespaceDelim;
// map a namespace type to a map with the namespace and the delimiter
- typedef QMap<imapNamespace, namespaceDelim> nsDelimMap;
+ typedef TQMap<imapNamespace, namespaceDelim> nsDelimMap;
/**
* Info Data for the Job
*/
struct jobData
{
- // Needed by QMap, don't use
- jobData() : url(QString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0),
+ // Needed by TQMap, don't use
+ jobData() : url(TQString::null), parent(0), current(0), total(1), done(0), offset(0), progressItem(0),
onlySubscribed(false), quiet(false), cancellable(false) {}
// Real constructor
- jobData( const QString& _url, KMFolder *_parent = 0,
+ jobData( const TQString& _url, KMFolder *_parent = 0,
int _total = 1, int _done = 0, bool _quiet = false,
bool _cancelable = false )
: url(_url), parent(_parent), current(0), total(_total), done(_done), offset(0),
progressItem(0), quiet(_quiet), cancellable(_cancelable) {}
- QString path;
- QString url;
- QString curNamespace;
- QByteArray data;
- QCString cdata;
- QStringList items;
+ TQString path;
+ TQString url;
+ TQString curNamespace;
+ TQByteArray data;
+ TQCString cdata;
+ TQStringList items;
KMFolder *parent, *current;
- QPtrList<KMMessage> msgList;
+ TQPtrList<KMMessage> msgList;
int total, done, offset;
KPIM::ProgressItem *progressItem;
bool onlySubscribed, quiet, cancellable;
};
- typedef QMap<KIO::Job *, jobData>::Iterator JobIterator;
+ typedef TQMap<KIO::Job *, jobData>::Iterator JobIterator;
/**
* Call this when starting a new job
*/
@@ -188,19 +188,19 @@ namespace KMail {
* identified by @p imapPath.
* Emits subscriptionChanged signal on success.
*/
- void changeSubscription(bool subscribe, const QString& imapPath);
+ void changeSubscription(bool subscribe, const TQString& imapPath);
/**
* Returns whether the account is locally subscribed to the
* folder @param imapPath. No relation to server side subscription above.
*/
- bool locallySubscribedTo( const QString& imapPath );
+ bool locallySubscribedTo( const TQString& imapPath );
/**
* Locally subscribe (@p subscribe = TRUE) / Unsubscribe the folder
* identified by @p imapPath.
*/
- void changeLocalSubscription( const QString& imapPath, bool subscribe );
+ void changeLocalSubscription( const TQString& imapPath, bool subscribe );
/**
@@ -208,33 +208,33 @@ namespace KMail {
* identified by @p folder and @p imapPath.
* Emits receivedUserRights signal on success/error.
*/
- void getUserRights( KMFolder* folder, const QString& imapPath );
+ void getUserRights( KMFolder* folder, const TQString& imapPath );
/**
* Retrieve the complete list of ACLs on the folder
* identified by @p imapPath.
* Emits receivedACL signal on success/error.
*/
- void getACL( KMFolder* folder, const QString& imapPath );
+ void getACL( KMFolder* folder, const TQString& imapPath );
/**
* Retrieve the the quota inforamiton on the folder
* identified by @p imapPath.
* Emits receivedQuotaInfo signal on success/error.
*/
- void getStorageQuotaInfo( KMFolder* folder, const QString& imapPath );
+ void getStorageQuotaInfo( KMFolder* folder, const TQString& imapPath );
/**
* Set the status on the server
* Emits imapStatusChanged signal on success/error.
*/
- void setImapStatus( KMFolder* folder, const QString& path, const QCString& flags );
+ void setImapStatus( KMFolder* folder, const TQString& path, const TQCString& flags );
/**
* Set seen status on the server.
* Emits imapStatusChanged signal on success/error.
*/
- void setImapSeenStatus( KMFolder* folder, const QString& path, bool seen );
+ void setImapSeenStatus( KMFolder* folder, const TQString& path, bool seen );
/**
* The KIO-Slave died
@@ -278,7 +278,7 @@ namespace KMail {
/**
* Handles the result from a BODYSTRUCTURE fetch
*/
- void handleBodyStructure( QDataStream & stream, KMMessage * msg,
+ void handleBodyStructure( TQDataStream & stream, KMMessage * msg,
const AttachmentStrategy *as );
/**
@@ -318,7 +318,7 @@ namespace KMail {
* React to an error from the job. Uses job->error and job->errorString and calls
* the protected virtual handleJobError with them. See handleError below for details.
*/
- bool handleJobError( KIO::Job* job, const QString& context, bool abortSync = false );
+ bool handleJobError( KIO::Job* job, const TQString& context, bool abortSync = false );
/**
* Returns the root folder of this account
@@ -356,22 +356,22 @@ namespace KMail {
/**
* @return the namespace for the @p folder
*/
- QString namespaceForFolder( FolderStorage* );
+ TQString namespaceForFolder( FolderStorage* );
/**
* Adds "/" as needed to the given namespace
*/
- QString addPathToNamespace( const QString& ns );
+ TQString addPathToNamespace( const TQString& ns );
/**
* @return the delimiter for the @p namespace
*/
- QString delimiterForNamespace( const QString& prefix );
+ TQString delimiterForNamespace( const TQString& prefix );
/**
* @return the delimiter for the @p folderstorage
*/
- QString delimiterForFolder( FolderStorage* );
+ TQString delimiterForFolder( FolderStorage* );
/**
* @return the namespace - delimiter map
@@ -388,12 +388,12 @@ namespace KMail {
/**
* Returns true if the given string is a namespace
*/
- bool isNamespaceFolder( QString& name );
+ bool isNamespaceFolder( TQString& name );
/**
* Returns true if the account has the given capability
*/
- bool hasCapability( const QString& capa ) {
+ bool hasCapability( const TQString& capa ) {
return mCapabilities.contains( capa ); }
/**
@@ -401,12 +401,12 @@ namespace KMail {
* Parent and folder are separated with the delimiter of the account
* The path starts and ends with '/'
*/
- QString createImapPath( FolderStorage* parent, const QString& folderName );
+ TQString createImapPath( FolderStorage* parent, const TQString& folderName );
/**
* Create an IMAP path for a parent imapPath and a folderName
*/
- QString createImapPath( const QString& parent, const QString& folderName );
+ TQString createImapPath( const TQString& parent, const TQString& folderName );
public slots:
@@ -429,7 +429,7 @@ namespace KMail {
/// Handle a message coming from the KIO scheduler saying that the slave is now connected
void slotSchedulerSlaveConnected(KIO::Slave *aSlave);
/// Handle an error coming from the KIO scheduler
- void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const QString &errorMsg);
+ void slotSchedulerSlaveError(KIO::Slave *aSlave, int, const TQString &errorMsg);
/**
* Only delete information about the job and ignore write errors
@@ -465,7 +465,7 @@ namespace KMail {
void slotSimpleResult(KIO::Job * job);
/** Gets and parses the namespaces */
- void slotNamespaceResult( KIO::Job*, const QString& str );
+ void slotNamespaceResult( KIO::Job*, const TQString& str );
/**
* Saves the fetched namespaces
@@ -475,7 +475,7 @@ namespace KMail {
/**
* Saves the capabilities list
*/
- void slotCapabilitiesResult( KIO::Job*, const QString& result );
+ void slotCapabilitiesResult( KIO::Job*, const TQString& result );
protected:
@@ -495,39 +495,39 @@ namespace KMail {
* @param abortSync if true, abort sync in all cases (see above). If false, ask the user (when possible).
* @return false when aborting, true when continuing
*/
- virtual bool handleError( int error, const QString &errorMsg, KIO::Job* job, const QString& context, bool abortSync = false );
+ virtual bool handleError( int error, const TQString &errorMsg, KIO::Job* job, const TQString& context, bool abortSync = false );
/** Handle an error during KIO::put - helper method */
bool handlePutError( KIO::Job* job, jobData& jd, KMFolder* folder );
- virtual QString protocol() const;
+ virtual TQString protocol() const;
virtual unsigned short int defaultPort() const;
/**
* Build KMMessageParts and DwBodyParts from the bodystructure-stream
*/
- void constructParts( QDataStream & stream, int count, KMMessagePart* parentKMPart,
+ void constructParts( TQDataStream & stream, int count, KMMessagePart* parentKMPart,
DwBodyPart * parent, const DwMessage * dwmsg );
/** Migrate the prefix */
void migratePrefix();
// used for writing the blacklist out to the config file
- QStringList locallyBlacklistedFolders() const;
- void localBlacklistFromStringList( const QStringList & );
- QString prettifyQuotaError( const QString& _error, KIO::Job * job );
+ TQStringList locallyBlacklistedFolders() const;
+ void localBlacklistFromStringList( const TQStringList & );
+ TQString prettifyQuotaError( const TQString& _error, KIO::Job * job );
protected:
- QPtrList<QGuardedPtr<KMFolder> > mOpenFolders;
- QStringList mSubfolderNames, mSubfolderPaths,
+ TQPtrList<TQGuardedPtr<KMFolder> > mOpenFolders;
+ TQStringList mSubfolderNames, mSubfolderPaths,
mSubfolderMimeTypes, mSubfolderAttributes;
- QMap<KIO::Job *, jobData> mapJobData;
+ TQMap<KIO::Job *, jobData> mapJobData;
/** used to detect when the slave has not been used for a while */
- QTimer mIdleTimer;
+ TQTimer mIdleTimer;
/** used to send a noop to the slave in regular intervals to keep it from disonnecting */
- QTimer mNoopTimer;
+ TQTimer mNoopTimer;
int mTotal, mCountUnread, mCountLastUnread;
- QMap<QString, int> mUnreadBeforeCheck;
+ TQMap<TQString, int> mUnreadBeforeCheck;
bool mAutoExpunge : 1;
bool mHiddenFolders : 1;
bool mOnlySubscribedFolders : 1;
@@ -546,15 +546,15 @@ namespace KMail {
bool mCheckingSingleFolder : 1;
// folders that should be checked for new mails
- QValueList<QGuardedPtr<KMFolder> > mMailCheckFolders;
+ TQValueList<TQGuardedPtr<KMFolder> > mMailCheckFolders;
// folders that should be checked after the current check is done
- QValueList<QGuardedPtr<KMFolder> > mFoldersQueuedForChecking;
+ TQValueList<TQGuardedPtr<KMFolder> > mFoldersQueuedForChecking;
// holds messageparts from the bodystructure
- QPtrList<KMMessagePart> mBodyPartList;
+ TQPtrList<KMMessagePart> mBodyPartList;
// the current message for the bodystructure
KMMessage* mCurrentMsg;
- QGuardedPtr<KPIM::ProgressItem> mListDirProgressItem;
+ TQGuardedPtr<KPIM::ProgressItem> mListDirProgressItem;
// our namespaces in the form section=namespaceList
nsMap mNamespaces;
@@ -563,12 +563,12 @@ namespace KMail {
namespaceDelim mNamespaceToDelimiter;
// old prefix for migration
- QString mOldPrefix;
+ TQString mOldPrefix;
// capabilities
- QStringList mCapabilities;
+ TQStringList mCapabilities;
- std::set<QString> mLocalSubscriptionBlackList;
+ std::set<TQString> mLocalSubscriptionBlackList;
signals:
/**
@@ -577,20 +577,20 @@ namespace KMail {
* @param errorCode 0 for success, != 0 in case of error
* @param errorMsg if errorCode is != 0, this goes with errorCode to call KIO::buildErrorString
*/
- void connectionResult( int errorCode, const QString& errorMsg );
+ void connectionResult( int errorCode, const TQString& errorMsg );
/**
* Emitted when the subscription has changed,
* as a result of a changeSubscription call.
*/
- void subscriptionChanged(const QString& imapPath, bool subscribed);
+ void subscriptionChanged(const TQString& imapPath, bool subscribed);
/**
* Emitted upon completion of the job for setting the status for a group of UIDs,
* as a result of a setImapStatus call.
* On error, if the user chooses abort (not continue), cont is set to false.
*/
- void imapStatusChanged( KMFolder*, const QString& imapPath, bool cont );
+ void imapStatusChanged( KMFolder*, const TQString& imapPath, bool cont );
/**
* Emitted when the get-user-rights job is done,