author | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-05-24 01:20:33 (UTC) |
commit | 62d2ddfb5cd77e2637cdf7fe16d76aac04975984 (patch) (side-by-side diff) | |
tree | 2157d57bab2d6e491226f5bc8468a4c2527e1456 /noncore/net/mailit/textparser.cpp | |
parent | 0c4b5288ccd4bcd1668816a0c4e12ce0a76b4e6e (diff) | |
download | opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.zip opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.gz opie-62d2ddfb5cd77e2637cdf7fe16d76aac04975984.tar.bz2 |
QString to const QString
Diffstat (limited to 'noncore/net/mailit/textparser.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mailit/textparser.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/noncore/net/mailit/textparser.cpp b/noncore/net/mailit/textparser.cpp index 3fa5f6e..e5c9f7c 100644 --- a/noncore/net/mailit/textparser.cpp +++ b/noncore/net/mailit/textparser.cpp @@ -19,7 +19,7 @@ **********************************************************************/ #include "textparser.h" -TextParser::TextParser(QString in, QString lineBreak) +TextParser::TextParser(const QString &in, const QString &lineBreak) { data = in; lineSep = lineBreak; @@ -29,7 +29,7 @@ TextParser::TextParser(QString in, QString lineBreak) split(); } -TextParser::TextParser(QString in, QString lineBreak, QString sep) +TextParser::TextParser(const QString &in, const QString &lineBreak, const QString &sep) { data = in; lineSep = lineBreak; @@ -60,12 +60,12 @@ void TextParser::createSeparators() } /* Returns pos of given search criteria, -1 if not found */ -int TextParser::find(QString target, QChar sep, int pos, bool upperCase) +int TextParser::find(const QString &target, QChar sep, int pos, bool upperCase) { t_splitElm parsstr; - QString pString; - + QString pString, pTarget; + pTarget = target; int atLine = 0, atPosElm = 0; getLineReference(pos,&atLine,&atPosElm); @@ -77,13 +77,13 @@ int TextParser::find(QString target, QChar sep, int pos, bool upperCase) if (upperCase) { pString=parsstr.str.upper(); - target=target.upper(); + pTarget=pTarget.upper(); } else { pString=parsstr.str; } - if ((pString == target) && (parsstr.separator == sep)) + if ((pString == pTarget) && (parsstr.separator == sep)) { return x; } |