summaryrefslogtreecommitdiffstats
path: root/libkmime/kmime_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libkmime/kmime_util.cpp')
-rw-r--r--libkmime/kmime_util.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/libkmime/kmime_util.cpp b/libkmime/kmime_util.cpp
index 167ac78d7..6fea9fc84 100644
--- a/libkmime/kmime_util.cpp
+++ b/libkmime/kmime_util.cpp
@@ -32,6 +32,7 @@
#include <tqtextcodec.h>
#include <tqstrlist.h> // for TQStrIList
#include <tqregexp.h>
+#include <tqdatetime.h>
#include <stdlib.h>
#include <ctype.h>
@@ -71,7 +72,7 @@ bool isUsAscii(const TQString &s)
{
uint sLength = s.length();
for (uint i=0; i<sLength; i++)
- if (s.at(i).latin1()<=0) // c==0: non-latin1, c<0: non-us-ascii
+ if (s.tqat(i).latin1()<=0) // c==0: non-latin1, c<0: non-us-ascii
return false;
return true;
@@ -126,7 +127,8 @@ TQString decodeRFC2047String(const TQCString &src, const char **usedCS,
{
TQCString result, str;
TQCString declaredCS;
- char *pos, *dest, *beg, *end, *mid, *endOfLastEncWord=0;
+ const char *beg, *end, *mid, *pos=0;
+ char *dest, *endOfLastEncWord=0;
char encoding = '\0';
bool valid, onlySpacesSinceLastWord=false;
const int maxLen=400;
@@ -375,7 +377,7 @@ TQCString extractHeader(const TQCString &src, const char *name)
pos1 = 0;
} else {
n.prepend("\n");
- pos1 = src.tqfind(n,0,false);
+ pos1 = src.tqfind(n.data(),0,false);
}
if (pos1>-1) { //there is a header with the given name
@@ -681,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" ).arg( locale->
+ return i18n( "Today %1" ).tqarg( 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" ).arg( locale->
+ return i18n( "Yesterday %1" ).tqarg( locale->
formatTime( old.time(), true) );
}
for ( int i = 3; i < 7; i++ )