summaryrefslogtreecommitdiffstats
path: root/libkmime
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:50:21 -0600
commit3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch)
tree89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /libkmime
parent1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff)
downloadtdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz
tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'libkmime')
-rw-r--r--libkmime/CLASSTREE.bodyparts2
-rw-r--r--libkmime/kmime_content.cpp18
-rw-r--r--libkmime/kmime_content.h2
-rw-r--r--libkmime/kmime_header_parsing.cpp20
-rw-r--r--libkmime/kmime_headers.cpp20
-rw-r--r--libkmime/kmime_parsers.cpp4
-rw-r--r--libkmime/kmime_util.cpp10
-rw-r--r--libkmime/tests/test_dates.cpp10
8 files changed, 43 insertions, 43 deletions
diff --git a/libkmime/CLASSTREE.bodyparts b/libkmime/CLASSTREE.bodyparts
index 5952c2082..eeaa7726a 100644
--- a/libkmime/CLASSTREE.bodyparts
+++ b/libkmime/CLASSTREE.bodyparts
@@ -15,7 +15,7 @@
+ Message::RFC822
+ Message::Partial
+ Message::ExternalBody
- + Message::DeliverytqStatus
+ + Message::DeliveryStatus
+ GText
+ Text::Plain
+ Text::Enriched
diff --git a/libkmime/kmime_content.cpp b/libkmime/kmime_content.cpp
index eb8deb8a2..b49ccf4ea 100644
--- a/libkmime/kmime_content.cpp
+++ b/libkmime/kmime_content.cpp
@@ -22,7 +22,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <tqtextcodec.h>
+#include <textcodec.h>
using namespace KMime;
@@ -439,25 +439,25 @@ void Content::decodedText(TQStringList &l, bool trimText,
if(!decodeText()) //this is not a text content !!
return;
- TQString tqunicode;
+ TQString unicode;
bool ok=true;
TQTextCodec *codec=KGlobal::charsets()->codecForName(contentType()->charset(),ok);
- tqunicode=codec->toUnicode(b_ody.data(), b_ody.length());
+ unicode=codec->toUnicode(b_ody.data(), b_ody.length());
if (trimText && removeTrailingNewlines) {
int i;
- for (i=tqunicode.length()-1; i>=0; i--)
- if (!tqunicode[i].isSpace())
+ for (i=unicode.length()-1; i>=0; i--)
+ if (!unicode[i].isSpace())
break;
- tqunicode.truncate(i+1);
+ unicode.truncate(i+1);
} else {
- if (tqunicode.right(1)=="\n")
- tqunicode.truncate(tqunicode.length()-1); // remove trailing new-line
+ if (unicode.right(1)=="\n")
+ unicode.truncate(unicode.length()-1); // remove trailing new-line
}
- l=TQStringList::split('\n', tqunicode, true); //split the string at linebreaks
+ l=TQStringList::split('\n', unicode, true); //split the string at linebreaks
}
diff --git a/libkmime/kmime_content.h b/libkmime/kmime_content.h
index 1d2aac2d3..b7f56e6fe 100644
--- a/libkmime/kmime_content.h
+++ b/libkmime/kmime_content.h
@@ -29,7 +29,7 @@ class KMime::Headers::List;
#include "kmime_util.h"
#include "kmime_headers.h"
-#include <tqtextstream.h>
+#include <textstream.h>
namespace KMime {
diff --git a/libkmime/kmime_header_parsing.cpp b/libkmime/kmime_header_parsing.cpp
index 59957f10b..adbf72fc1 100644
--- a/libkmime/kmime_header_parsing.cpp
+++ b/libkmime/kmime_header_parsing.cpp
@@ -39,7 +39,7 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <tqtextcodec.h>
+#include <textcodec.h>
#include <tqmap.h>
#include <tqcstring.h>
#include <tqstringlist.h>
@@ -256,7 +256,7 @@ bool parseAtom( const char * & scursor, const char * const send,
TQPair<const char*,int> maybeResult;
if ( parseAtom( scursor, send, maybeResult, allow8Bit ) ) {
- result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -296,7 +296,7 @@ bool parseToken( const char * & scursor, const char * const send,
TQPair<const char*,int> maybeResult;
if ( parseToken( scursor, send, maybeResult, allow8Bit ) ) {
- result += TQString::tqfromLatin1( maybeResult.first, maybeResult.second );
+ result += TQString::fromLatin1( maybeResult.first, maybeResult.second );
return true;
}
@@ -1065,9 +1065,9 @@ bool parseAddressList( const char* & scursor, const char * const send,
}
-static TQString asterisk = TQString::tqfromLatin1("*0*",1);
-static TQString asteriskZero = TQString::tqfromLatin1("*0*",2);
-//static TQString asteriskZeroAsterisk = TQString::tqfromLatin1("*0*",3);
+static TQString asterisk = TQString::fromLatin1("*0*",1);
+static TQString asteriskZero = TQString::fromLatin1("*0*",2);
+//static TQString asteriskZeroAsterisk = TQString::fromLatin1("*0*",3);
bool parseParameter( const char* & scursor, const char * const send,
TQPair<TQString,TQStringOrTQPair> & result, bool isCRLF ) {
@@ -1223,7 +1223,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
// take the whole value to be in latin-1:
KMIME_WARN << "No charset in extended-initial-value. "
"Assuming \"iso-8859-1\"." << endl;
- value += TQString::tqfromLatin1( decBegin, source.second );
+ value += TQString::fromLatin1( decBegin, source.second );
return;
}
@@ -1263,7 +1263,7 @@ static void decodeRFC2231Value( Codec* & rfc2231Codec,
}
if ( !textcodec ) {
- value += TQString::tqfromLatin1( decCursor, decEnd - decCursor );
+ value += TQString::fromLatin1( decCursor, decEnd - decCursor );
return;
}
@@ -1348,7 +1348,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded.
if ( (*it).qpair.first )
- value += TQString::tqfromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
@@ -1377,7 +1377,7 @@ bool parseParameterList( const char* & scursor, const char * const send,
} else {
// not encoded
if ( (*it).qpair.first )
- value += TQString::tqfromLatin1( (*it).qpair.first, (*it).qpair.second );
+ value += TQString::fromLatin1( (*it).qpair.first, (*it).qpair.second );
else
value += (*it).qstring;
}
diff --git a/libkmime/kmime_headers.cpp b/libkmime/kmime_headers.cpp
index 85d4c4049..e939d8f40 100644
--- a/libkmime/kmime_headers.cpp
+++ b/libkmime/kmime_headers.cpp
@@ -25,7 +25,7 @@
#include "kqcstringsplitter.h"
-#include <tqtextcodec.h>
+#include <textcodec.h>
#include <tqstring.h>
#include <tqcstring.h>
#include <tqstringlist.h>
@@ -529,7 +529,7 @@ void MessageID::fromUnicodeString(const TQString &s, const TQCString&)
TQString MessageID::asUnicodeString()
{
- return TQString::tqfromLatin1(m_id);
+ return TQString::fromLatin1(m_id);
}
@@ -567,7 +567,7 @@ void Control::fromUnicodeString(const TQString &s, const TQCString&)
TQString Control::asUnicodeString()
{
- return TQString::tqfromLatin1(c_trlMsg);
+ return TQString::fromLatin1(c_trlMsg);
}
//-----</Control>------------------------------
@@ -797,7 +797,7 @@ void Date::fromUnicodeString(const TQString &s, const TQCString&)
TQString Date::asUnicodeString()
{
- return TQString::tqfromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
@@ -1075,7 +1075,7 @@ void References::fromUnicodeString(const TQString &s, const TQCString&)
TQString References::asUnicodeString()
{
- return TQString::tqfromLatin1(r_ef);
+ return TQString::fromLatin1(r_ef);
}
@@ -1174,7 +1174,7 @@ void References::append(const TQCString &s)
for (int i=1;i<=3;i++) { // include the last three ids
if (!lst.isEmpty()) {
temp = lst.last();
- r_ef.insert(insPos,(TQString(" %1").tqarg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
break;
@@ -1183,7 +1183,7 @@ void References::append(const TQCString &s)
while (!lst.isEmpty()) { // now insert the rest, up to 1000 characters
temp = lst.last();
if ((15+r_ef.length()+temp.length())<1000) {
- r_ef.insert(insPos,(TQString(" %1").tqarg(temp)).latin1());
+ r_ef.insert(insPos,(TQString(" %1").arg(temp)).latin1());
lst.remove(temp);
} else
return;
@@ -1221,7 +1221,7 @@ void UserAgent::fromUnicodeString(const TQString &s, const TQCString&)
TQString UserAgent::asUnicodeString()
{
- return TQString::tqfromLatin1(u_agent);
+ return TQString::fromLatin1(u_agent);
}
//-----</UserAgent>----------------------------
@@ -1268,7 +1268,7 @@ void ContentType::fromUnicodeString(const TQString &s, const TQCString&)
TQString ContentType::asUnicodeString()
{
- return TQString::tqfromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
@@ -1544,7 +1544,7 @@ void CTEncoding::fromUnicodeString(const TQString &s, const TQCString&)
TQString CTEncoding::asUnicodeString()
{
- return TQString::tqfromLatin1(as7BitString(false));
+ return TQString::fromLatin1(as7BitString(false));
}
//-----</CTEncoding>---------------------------
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp
index bd07c2375..202ce4bf4 100644
--- a/libkmime/kmime_parsers.cpp
+++ b/libkmime/kmime_parsers.cpp
@@ -391,7 +391,7 @@ bool YENCEncoded::parse()
ch+=256;
if (totalSize>=yencSize)
break;
- binary.tqat(totalSize++)=ch;
+ binary.at(totalSize++)=ch;
lineLength++;
}
else
@@ -404,7 +404,7 @@ bool YENCEncoded::parse()
ch+=256;
if (totalSize>=yencSize)
break;
- binary.tqat(totalSize++)=ch;
+ binary.at(totalSize++)=ch;
lineLength++;
pos++;
}
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 8110227e5..a31008d3d 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -29,7 +29,7 @@
#include <kcalendarsystem.h>
#endif
-#include <tqtextcodec.h>
+#include <textcodec.h>
#include <tqstrlist.h> // for TQStrIList
#include <tqregexp.h>
#include <tqdatetime.h>
@@ -72,7 +72,7 @@ bool isUsAscii(const TQString &s)
{
uint sLength = s.length();
for (uint i=0; i<sLength; i++)
- if (s.tqat(i).latin1()<=0) // c==0: non-latin1, c<0: non-us-ascii
+ if (s.at(i).latin1()<=0) // c==0: non-latin1, c<0: non-us-ascii
return false;
return true;
@@ -683,14 +683,14 @@ DateFormatter::fancy(time_t otime) const
if ( diff < 24 * 60 * 60 ) {
if ( old.date().year() == mDate.date().year() &&
old.date().dayOfYear() == mDate.date().dayOfYear() )
- return i18n( "Today %1" ).tqarg( locale->
+ return i18n( "Today %1" ).arg( locale->
formatTime( old.time(), true ) );
}
if ( diff < 2 * 24 * 60 * 60 ) {
TQDateTime yesterday( mDate.addDays( -1 ) );
if ( old.date().year() == yesterday.date().year() &&
old.date().dayOfYear() == yesterday.date().dayOfYear() )
- return i18n( "Yesterday %1" ).tqarg( locale->
+ return i18n( "Yesterday %1" ).arg( locale->
formatTime( old.time(), true) );
}
for ( int i = 3; i < 7; i++ )
@@ -739,7 +739,7 @@ DateFormatter::localized(time_t otime, bool shortFormat, bool includeSecs,
TQString
DateFormatter::cTime(time_t otime) const
{
- return TQString::tqfromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
+ return TQString::fromLatin1( ctime( &otime ) ).stripWhiteSpace() ;
}
TQString
diff --git a/libkmime/tests/test_dates.cpp b/libkmime/tests/test_dates.cpp
index e3a40f812..7087a01a6 100644
--- a/libkmime/tests/test_dates.cpp
+++ b/libkmime/tests/test_dates.cpp
@@ -80,14 +80,14 @@ main()
"Z MMMM dddd yyyy") <<endl;
t.setFormat(DateFormatter::Fancy);
kdDebug()<<"TQDateTime taking: (dates as in first test)"<<endl;
- kdDebug()<<"\tFancy : \t"<<t.dateString((TQDateTime::tqcurrentDateTime()))<<endl;
+ kdDebug()<<"\tFancy : \t"<<t.dateString((TQDateTime::currentDateTime()))<<endl;
t.setFormat(DateFormatter::Localized);
- kdDebug()<<"\tLocalized : \t"<<t.dateString(TQDateTime::tqcurrentDateTime())<<endl;
+ kdDebug()<<"\tLocalized : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::CTime);
- kdDebug()<<"\tCTime : \t"<<t.dateString(TQDateTime::tqcurrentDateTime())<<endl;
+ kdDebug()<<"\tCTime : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setFormat(DateFormatter::Iso);
- kdDebug()<<"\tIso : \t"<<t.dateString(TQDateTime::tqcurrentDateTime())<<endl;
+ kdDebug()<<"\tIso : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
t.setCustomFormat("MMMM d dddd yyyy Z");
- kdDebug()<<"\tCustom : \t"<<t.dateString(TQDateTime::tqcurrentDateTime())<<endl;
+ kdDebug()<<"\tCustom : \t"<<t.dateString(TQDateTime::currentDateTime())<<endl;
}