diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkmime/kmime_util.h | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-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 'libkmime/kmime_util.h')
-rw-r--r-- | libkmime/kmime_util.h | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/libkmime/kmime_util.h b/libkmime/kmime_util.h index ed8710c92..e2b3c8334 100644 --- a/libkmime/kmime_util.h +++ b/libkmime/kmime_util.h @@ -16,27 +16,27 @@ #ifndef __KMIME_UTIL_H__ #define __KMIME_UTIL_H__ -#include "qdatetime.h" -#include "qstring.h" -#include "qcstring.h" -#include "qvaluelist.h" +#include "tqdatetime.h" +#include "tqstring.h" +#include "tqcstring.h" +#include "tqvaluelist.h" #include "time.h" #include <kdepimmacros.h> -typedef QValueList<QCString> QCStringList; +typedef TQValueList<TQCString> QCStringList; namespace KMime { /** Consult the charset cache. Only used for reducing mem usage by keeping strings in a common repository.*/ - extern const char* cachedCharset(const QCString &name) KDE_EXPORT; + extern const char* cachedCharset(const TQCString &name) KDE_EXPORT; /** Consult the language cache. Only used for reducing mem usage by keeping strings in a common repository.*/ - extern const char* cachedLanguage(const QCString &name) KDE_EXPORT; + extern const char* cachedLanguage(const TQCString &name) KDE_EXPORT; /** checks whether @p s contains any non-us-ascii characters */ - extern bool isUsAscii(const QString &s) KDE_EXPORT; + extern bool isUsAscii(const TQString &s) KDE_EXPORT; inline bool isOfSet(const uchar map[16], unsigned char ch) { Q_ASSERT( ch < 128 ); @@ -74,15 +74,15 @@ namespace KMime { @param forceCS force the use of the default charset. @return the decoded string. */ - extern QString decodeRFC2047String(const QCString &src, const char **usedCS, - const QCString &defaultCS, bool forceCS) KDE_EXPORT; + extern TQString decodeRFC2047String(const TQCString &src, const char **usedCS, + const TQCString &defaultCS, bool forceCS) KDE_EXPORT; /** Decode string @p src according to RFC2047 (ie. the =?charset?[qb]?encoded?= construct). @param src source string. @return the decoded string. */ - extern QString decodeRFC2047String(const QCString &src) KDE_EXPORT; + extern TQString decodeRFC2047String(const TQCString &src) KDE_EXPORT; /** Encode string @p src according to RFC2047 using charset @p charset. @@ -94,7 +94,7 @@ namespace KMime { are allowed. @return the encoded string. */ - extern QCString encodeRFC2047String(const QString &src, const char *charset, + extern TQCString encodeRFC2047String(const TQString &src, const char *charset, bool addressHeader=false, bool allow8bitHeaders=false) KDE_EXPORT; /** Uses current time, pid and random numbers to construct a string @@ -103,7 +103,7 @@ namespace KMime { @return the unique string. @see multiPartBoundary */ - extern QCString uniqueString() KDE_EXPORT; + extern TQCString uniqueString() KDE_EXPORT; /** Constructs a random string (sans leading/trailing "--") that can be used as a multipart delimiter (ie. as @p boundary parameter @@ -111,16 +111,16 @@ namespace KMime { @return the randomized string. @see uniqueString */ - extern QCString multiPartBoundary() KDE_EXPORT; + extern TQCString multiPartBoundary() KDE_EXPORT; /** Tries to extract the header with name @p name from the string @p src, unfolding it if necessary. @param src the source string. @param name the name of the header to search for. @return the first instance of the header @p name in @p src - or a null QCString if no such header was found. + or a null TQCString if no such header was found. */ - extern QCString extractHeader(const QCString &src, const char *name) KDE_EXPORT; + extern TQCString extractHeader(const TQCString &src, const char *name) KDE_EXPORT; /** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF). This function is expensive and should be used only if the mail @@ -130,7 +130,7 @@ namespace KMime { @return the string with CRLF's substitued for LF's @see CRLFtoLF(const char*) LFtoCRLF */ - extern QCString CRLFtoLF(const QCString &s) KDE_EXPORT; + extern TQCString CRLFtoLF(const TQCString &s) KDE_EXPORT; /** Converts all occurrences of "\r\n" (CRLF) in @p s to "\n" (LF). This function is expensive and should be used only if the mail @@ -138,9 +138,9 @@ namespace KMime { line endings. @param s source string containing CRLF's @return the string with CRLF's substitued for LF's - @see CRLFtoLF(const QCString&) LFtoCRLF + @see CRLFtoLF(const TQCString&) LFtoCRLF */ - extern QCString CRLFtoLF(const char *s) KDE_EXPORT; + extern TQCString CRLFtoLF(const char *s) KDE_EXPORT; /** Converts all occurrences of "\n" (LF) in @p s to "\r\n" (CRLF). This function is expensive and should be used only if the mail @@ -150,29 +150,29 @@ namespace KMime { @param s source string containing CRLF's @return the string with CRLF's substitued for LF's - @see CRLFtoLF(const QCString&) LFtoCRLF + @see CRLFtoLF(const TQCString&) LFtoCRLF */ - extern QCString LFtoCRLF(const QCString &s) KDE_EXPORT; + extern TQCString LFtoCRLF(const TQCString &s) KDE_EXPORT; /** Removes quote (DQUOTE) characters and decodes "quoted-pairs" (ie. backslash-escaped characters) @param str the string to work on. @see addQuotes */ - KDE_EXPORT extern void removeQuots(QCString &str); + KDE_EXPORT extern void removeQuots(TQCString &str); /** Removes quote (DQUOTE) characters and decodes "quoted-pairs" (ie. backslash-escaped characters) @param str the string to work on. @see addQuotes */ - KDE_EXPORT extern void removeQuots(QString &str); + KDE_EXPORT extern void removeQuots(TQString &str); /** Converts the given string into a quoted-string if the string contains any special characters (ie. one of ()<>@,.;:[]=\"). @param str us-ascii string to work on. @param forceQuotes if @p true, always add quote characters. */ - KDE_EXPORT extern void addQuotes(QCString &str, bool forceQuotes); + KDE_EXPORT extern void addQuotes(TQCString &str, bool forceQuotes); /** @@ -226,12 +226,12 @@ namespace KMime { * @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime * @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime */ - QString dateString(time_t otime, const QString& lang = QString::null, + TQString dateString(time_t otime, const TQString& lang = TQString::null, bool shortFormat = true, bool includeSecs=false) const; /** * overloaded, does exactly what #dateString does (it's slower) */ - QString dateString(const QDateTime& dtime, const QString& lang = QString::null, + TQString dateString(const TQDateTime& dtime, const TQString& lang = TQString::null, bool shortFormat = true, bool includeSecs=false) const; @@ -239,19 +239,19 @@ namespace KMime { * makes the class use the custom format for * date to string conversions. * Method accepts the same arguments - * as QDateTime::toString method and adds + * as TQDateTime::toString method and adds * "Z" expression which is substituted with the * RFC-822 style numeric timezone (-0500) * @param format the custom format */ - void setCustomFormat(const QString& format); - QString getCustomFormat() const; + void setCustomFormat(const TQString& format); + TQString getCustomFormat() const; /** * returns rfc2822 formatted string * @param otime time to use for formatting */ - QCString rfc2822(time_t otime) const; + TQCString rfc2822(time_t otime) const; /** * resets the internal clock */ @@ -266,8 +266,8 @@ namespace KMime { * @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime * @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime */ - static QString formatDate( DateFormatter::FormatType t, time_t time, - const QString& data = QString::null, + static TQString formatDate( DateFormatter::FormatType t, time_t time, + const TQString& data = TQString::null, bool shortFormat = true, bool includeSecs=false); /** convenience function, same as #formatDate @@ -278,12 +278,12 @@ namespace KMime { * @param shortFormat used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime * @param includeSecs used <em>only</em> by the Localized format, is passed to KLocale::formatDateTime */ - static QString formatCurrentDate( DateFormatter::FormatType t, - const QString& data = QString::null, + static TQString formatCurrentDate( DateFormatter::FormatType t, + const TQString& data = TQString::null, bool shortFormat = true, bool includeSecs=false); /** convenience function, same as #rfc2822 */ - static QCString rfc2822FormatDate( time_t time ); + static TQCString rfc2822FormatDate( time_t time ); static bool isDaylight(); protected: /** @@ -291,7 +291,7 @@ namespace KMime { * @param otime time to format * @internal */ - QString fancy(time_t otime) const ; + TQString fancy(time_t otime) const ; /** * returns localized formatted date string * @param otime time to format @@ -300,18 +300,18 @@ namespace KMime { * @param localeLanguage language used for formatting * @internal */ - QString localized(time_t otime, bool shortFormat = true, bool includeSecs = false, - const QString& localeLanguage=QString::null ) const; + TQString localized(time_t otime, bool shortFormat = true, bool includeSecs = false, + const TQString& localeLanguage=TQString::null ) const; /** * returns string as formatted with ctime function * @internal */ - QString cTime(time_t otime) const; + TQString cTime(time_t otime) const; /** * returns a string in the "%Y-%m-%d %H:%M:%S" format * @internal */ - QString isoDate(time_t otime) const; + TQString isoDate(time_t otime) const; /** * returns date formatted with the earlier @@ -319,19 +319,19 @@ namespace KMime { * @param t time used for formatting * @internal */ - QString custom(time_t t) const; + TQString custom(time_t t) const; /** * returns a string identifying the timezone (eg."-0500") * @internal */ - QCString zone(time_t otime) const; + TQCString zone(time_t otime) const; - time_t qdateToTimeT(const QDateTime& dt) const; + time_t qdateToTimeT(const TQDateTime& dt) const; private: FormatType mFormat; mutable time_t mCurrentTime; - mutable QDateTime mDate; - QString mCustomFormat; + mutable TQDateTime mDate; + TQString mCustomFormat; static int mDaylight; }; |