diff options
Diffstat (limited to 'libkmime/kmime_parsers.cpp')
-rw-r--r-- | libkmime/kmime_parsers.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libkmime/kmime_parsers.cpp b/libkmime/kmime_parsers.cpp index c9dc1e3d1..a7f758bf0 100644 --- a/libkmime/kmime_parsers.cpp +++ b/libkmime/kmime_parsers.cpp @@ -39,7 +39,7 @@ bool MultiPart::parse() //find the first valid boundary while(1) { - if( (pos1=s_rc.tqfind(b, pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all + if( (pos1=s_rc.tqfind(b.data(), pos1))==-1 || pos1==0 || s_rc[pos1-1]=='\n' ) //valid boundary found or no boundary at all break; pos1+=blen; //boundary found but not valid => skip it; } @@ -60,7 +60,7 @@ bool MultiPart::parse() //now find the next valid boundary pos2=++pos1; //pos1 and pos2 point now to the beginning of the next line after the boundary while(1) { - if( (pos2=s_rc.tqfind(b, pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found + if( (pos2=s_rc.tqfind(b.data(), pos2))==-1 || s_rc[pos2-1]=='\n' ) //valid boundary or no more boundaries found break; pos2+=blen; //boundary is invalid => skip it; } @@ -108,7 +108,7 @@ TQCString NonMimeParser::guessMimeType(const TQCString& fileName) int pos; if(!fileName.isEmpty()) { - pos=fileName.findRev('.'); + pos=fileName.tqfindRev('.'); if(pos++ != -1) { tmp=fileName.mid(pos, fileName.length()-pos).upper(); if(tmp=="JPG" || tmp=="JPEG") mimeType="image/jpeg"; @@ -188,7 +188,7 @@ bool UUEncoded::parse() break; //too many "non-M-Lines" found, we give up } - if( (!containsBegin || !containsEnd) && s_ubject) { // message may be split up => parse subject + if( (!containsBegin || !containsEnd) && !s_ubject.isNull()) { // message may be split up => parse subject TQRegExp rx("[0-9]+/[0-9]+"); pos=rx.search(TQString(s_ubject), 0); len=rx.matchedLength(); @@ -249,7 +249,7 @@ bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value) bool found = false; TQCString sought=name + "="; - int iPos=src.tqfind( sought); + int iPos=src.tqfind( sought.data() ); if (iPos>-1) { int pos1=src.tqfind(' ', iPos); int pos2=src.tqfind('\r', iPos); @@ -261,7 +261,7 @@ bool YENCEncoded::yencMeta(TQCString& src, const TQCString& name, int* value) pos1=pos3; if (pos4>=0 && (pos1<0 || pos1>pos4)) pos1=pos4; - iPos=src.findRev( '=', pos1)+1; + iPos=src.tqfindRev( '=', pos1)+1; if (iPos<pos1) { char c=src.at( iPos); if ( c>='0' && c<='9') { @@ -391,7 +391,7 @@ bool YENCEncoded::parse() ch+=256; if (totalSize>=yencSize) break; - binary.at(totalSize++)=ch; + binary.tqat(totalSize++)=ch; lineLength++; } else @@ -404,7 +404,7 @@ bool YENCEncoded::parse() ch+=256; if (totalSize>=yencSize) break; - binary.at(totalSize++)=ch; + binary.tqat(totalSize++)=ch; lineLength++; pos++; } |