diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:59:01 -0600 |
commit | 716a5de8870d7c02bb4d0aed72f30291b17b763a (patch) | |
tree | 29e58b213ead28151ccf7eb33d12c968ea844120 /kmail/kmmsgbase.cpp | |
parent | 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78 (diff) | |
download | tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.tar.gz tdepim-716a5de8870d7c02bb4d0aed72f30291b17b763a.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'kmail/kmmsgbase.cpp')
-rw-r--r-- | kmail/kmmsgbase.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/kmail/kmmsgbase.cpp b/kmail/kmmsgbase.cpp index db57a1bf1..0f7e2890d 100644 --- a/kmail/kmmsgbase.cpp +++ b/kmail/kmmsgbase.cpp @@ -150,7 +150,7 @@ void KMMsgBase::toggleStatus(const KMMsgStatus aStatus, int idx) } //----------------------------------------------------------------------------- -void KMMsgBase::seStatus(const KMMsgStatus aStatus, int idx) +void KMMsgBase::setStatus(const KMMsgStatus aStatus, int idx) { mDirty = true; KMMsgStatus oldStatus = status(); @@ -267,40 +267,40 @@ void KMMsgBase::seStatus(const KMMsgStatus aStatus, int idx) //----------------------------------------------------------------------------- -void KMMsgBase::seStatus(const char* aStatusStr, const char* aXStatusStr) +void KMMsgBase::setStatus(const char* aStatusStr, const char* aXStatusStr) { // first try to find status from "X-Status" field if given if (aXStatusStr) { - if (strchr(aXStatusStr, 'N')) seStatus(KMMsgStatusNew); - if (strchr(aXStatusStr, 'U')) seStatus(KMMsgStatusUnread); - if (strchr(aXStatusStr, 'O')) seStatus(KMMsgStatusOld); - if (strchr(aXStatusStr, 'R')) seStatus(KMMsgStatusRead); - if (strchr(aXStatusStr, 'D')) seStatus(KMMsgStatusDeleted); - if (strchr(aXStatusStr, 'A')) seStatus(KMMsgStatusReplied); - if (strchr(aXStatusStr, 'F')) seStatus(KMMsgStatusForwarded); - if (strchr(aXStatusStr, 'Q')) seStatus(KMMsgStatusQueued); - if (strchr(aXStatusStr, 'K')) seStatus(KMMsgStatusTodo); - if (strchr(aXStatusStr, 'S')) seStatus(KMMsgStatusSent); - if (strchr(aXStatusStr, 'G')) seStatus(KMMsgStatusFlag); - if (strchr(aXStatusStr, 'P')) seStatus(KMMsgStatusSpam); - if (strchr(aXStatusStr, 'H')) seStatus(KMMsgStatusHam); - if (strchr(aXStatusStr, 'T')) seStatus(KMMsgStatusHasAttach); - if (strchr(aXStatusStr, 'C')) seStatus(KMMsgStatusHasNoAttach); + if (strchr(aXStatusStr, 'N')) setStatus(KMMsgStatusNew); + if (strchr(aXStatusStr, 'U')) setStatus(KMMsgStatusUnread); + if (strchr(aXStatusStr, 'O')) setStatus(KMMsgStatusOld); + if (strchr(aXStatusStr, 'R')) setStatus(KMMsgStatusRead); + if (strchr(aXStatusStr, 'D')) setStatus(KMMsgStatusDeleted); + if (strchr(aXStatusStr, 'A')) setStatus(KMMsgStatusReplied); + if (strchr(aXStatusStr, 'F')) setStatus(KMMsgStatusForwarded); + if (strchr(aXStatusStr, 'Q')) setStatus(KMMsgStatusQueued); + if (strchr(aXStatusStr, 'K')) setStatus(KMMsgStatusTodo); + if (strchr(aXStatusStr, 'S')) setStatus(KMMsgStatusSent); + if (strchr(aXStatusStr, 'G')) setStatus(KMMsgStatusFlag); + if (strchr(aXStatusStr, 'P')) setStatus(KMMsgStatusSpam); + if (strchr(aXStatusStr, 'H')) setStatus(KMMsgStatusHam); + if (strchr(aXStatusStr, 'T')) setStatus(KMMsgStatusHasAttach); + if (strchr(aXStatusStr, 'C')) setStatus(KMMsgStatusHasNoAttach); } // Merge the contents of the "Status" field if (aStatusStr) { if ((aStatusStr[0]== 'R' && aStatusStr[1]== 'O') || (aStatusStr[0]== 'O' && aStatusStr[1]== 'R')) { - seStatus( KMMsgStatusOld ); - seStatus( KMMsgStatusRead ); + setStatus( KMMsgStatusOld ); + setStatus( KMMsgStatusRead ); } else if (aStatusStr[0] == 'R') - seStatus(KMMsgStatusRead); + setStatus(KMMsgStatusRead); else if (aStatusStr[0] == 'D') - seStatus(KMMsgStatusDeleted); + setStatus(KMMsgStatusDeleted); else - seStatus(KMMsgStatusNew); + setStatus(KMMsgStatusNew); } } @@ -587,8 +587,8 @@ TQCString KMMsgBase::toUsAscii(const TQString& _str, bool *ok) TQString result = _str; int len = result.length(); for (int i = 0; i < len; i++) - if (result.tqat(i).tqunicode() >= 128) { - result.tqat(i) = '?'; + if (result.at(i).tqunicode() >= 128) { + result.at(i) = '?'; all_ok = false; } if (ok) @@ -800,7 +800,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, unsigned int nonAscii = 0; unsigned int strLength(_str.length()); for (unsigned int i = 0; i < strLength; i++) - if (_str.tqat(i).tqunicode() >= 128) nonAscii++; + if (_str.at(i).tqunicode() >= 128) nonAscii++; bool useBase64 = (nonAscii * 6 > strLength); unsigned int start, stop, p, pos = 0, encLength; @@ -813,17 +813,17 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, start = pos; p = pos; while (p < strLength) { - if (!breakLine && (_str.tqat(p) == ' ' || dontQuote.find(_str.tqat(p)) != -1)) + if (!breakLine && (_str.at(p) == ' ' || dontQuote.find(_str.at(p)) != -1)) start = p + 1; - if (_str.tqat(p).tqunicode() >= 128 || _str.tqat(p).tqunicode() < 32) + if (_str.at(p).tqunicode() >= 128 || _str.at(p).tqunicode() < 32) break; p++; } if (breakLine || p < strLength) { - while (dontQuote.find(_str.tqat(start)) != -1) start++; + while (dontQuote.find(_str.at(start)) != -1) start++; stop = start; - while (stop < strLength && dontQuote.find(_str.tqat(stop)) == -1) + while (stop < strLength && dontQuote.find(_str.at(stop)) == -1) stop++; result += _str.mid(pos, start - pos).latin1(); encLength = encodeRFC2047Quoted(codec->fromUnicode(_str. @@ -843,7 +843,7 @@ TQCString KMMsgBase::encodeRFC2047String(const TQString& _str, stop = start + dif; } p = stop; - while (p > start && _str.tqat(p) != ' ') p--; + while (p > start && _str.at(p) != ' ') p--; if (p > start) stop = p; if (result.right(3) == "?= ") start--; if (result.right(5) == "?=\n ") { @@ -956,13 +956,13 @@ TQString KMMsgBase::decodeRFC2231String(const TQCString& _str) p = 0; while (p < (int)st.length()) { - if (st.tqat(p) == 37) + if (st.at(p) == 37) { - ch = st.tqat(p+1) - 48; + ch = st.at(p+1) - 48; if (ch > 16) ch -= 7; - ch2 = st.tqat(p+2) - 48; + ch2 = st.at(p+2) - 48; if (ch2 > 16) ch2 -= 7; - st.tqat(p) = ch * 16 + ch2; + st.at(p) = ch * 16 + ch2; st.remove( p+1, 2 ); } p++; @@ -1193,7 +1193,7 @@ retry: } if(type == t) { // This works because the TQString constructor does a memcpy. - // Otherwise we would need to be concerned about the tqalignment. + // Otherwise we would need to be concerned about the alignment. if(l) ret = TQString((TQChar *)(g_chunk + g_chunk_offset), l/2); break; @@ -1477,7 +1477,7 @@ TQString KMMsgBase::replacePrefixes( const TQString& str, // 1. is anchored to the beginning of str (sans whitespace) // 2. matches at least one of the part regexps in prefixRegExps TQString bigRegExp = TQString::fromLatin1("^(?:\\s+|(?:%1))+\\s*") - .tqarg( prefixRegExps.join(")|(?:") ); + .arg( prefixRegExps.join(")|(?:") ); TQRegExp rx( bigRegExp, false /*case insens.*/ ); if ( !rx.isValid() ) { kdWarning(5006) << "KMMessage::replacePrefixes(): bigRegExp = \"" |