diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/spellingfilter.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/spellingfilter.cpp')
-rw-r--r-- | libkdepim/spellingfilter.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/libkdepim/spellingfilter.cpp b/libkdepim/spellingfilter.cpp index d58ab3162..cc94968d4 100644 --- a/libkdepim/spellingfilter.cpp +++ b/libkdepim/spellingfilter.cpp @@ -27,9 +27,9 @@ // SpellingFilter implementation // -SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix, +SpellingFilter::SpellingFilter(const TQString& text, const TQString& quotePrefix, UrlFiltering filterUrls, EmailAddressFiltering filterEmailAddresses, - const QStringList& filterStrings) + const TQStringList& filterStrings) : mOriginal(text) { TextCensor c(text); @@ -43,7 +43,7 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix, if(filterEmailAddresses) c.censorEmailAddresses(); - QStringList::const_iterator iter = filterStrings.begin(); + TQStringList::const_iterator iter = filterStrings.begin(); while(iter != filterStrings.end()) { c.censorString(*iter); @@ -53,12 +53,12 @@ SpellingFilter::SpellingFilter(const QString& text, const QString& quotePrefix, mFiltered = c.censoredText(); } -QString SpellingFilter::originalText() const +TQString SpellingFilter::originalText() const { return mOriginal; } -QString SpellingFilter::filteredText() const +TQString SpellingFilter::filteredText() const { return mFiltered; } @@ -67,13 +67,13 @@ QString SpellingFilter::filteredText() const // SpellingFilter::TextCensor implementation // -SpellingFilter::TextCensor::TextCensor(const QString& s) +SpellingFilter::TextCensor::TextCensor(const TQString& s) : LinkLocator(s) { } -void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix) +void SpellingFilter::TextCensor::censorQuotations(const TQString& quotePrefix) { mPos = 0; while(mPos < static_cast<int>(mText.length())) @@ -87,7 +87,7 @@ void SpellingFilter::TextCensor::censorQuotations(const QString& quotePrefix) // Replace quotation with spaces int len = mPos - start; - QString spaces; + TQString spaces; spaces.fill(' ', len); mText.replace(start, len, spaces); @@ -103,7 +103,7 @@ void SpellingFilter::TextCensor::censorUrls() while(mPos < static_cast<int>(mText.length())) { // Find start of url - QString url; + TQString url; while(mPos < static_cast<int>(mText.length()) && url.isEmpty()) { url = getUrl(); @@ -133,7 +133,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses() findEmailAddress(); if(mPos < static_cast<int>(mText.length())) { - QString address = getEmailAddress(); + TQString address = getEmailAddress(); ++mPos; if(!address.isEmpty()) { @@ -150,7 +150,7 @@ void SpellingFilter::TextCensor::censorEmailAddresses() } } -void SpellingFilter::TextCensor::censorString(const QString& s) +void SpellingFilter::TextCensor::censorString(const TQString& s) { mPos = 0; while(mPos != -1) @@ -160,7 +160,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s) if(mPos != -1) { // Replace string with spaces - QString spaces; + TQString spaces; spaces.fill(' ', s.length()); mText.replace(mPos, s.length(), spaces); mPos += s.length(); @@ -171,7 +171,7 @@ void SpellingFilter::TextCensor::censorString(const QString& s) } } -QString SpellingFilter::TextCensor::censoredText() const +TQString SpellingFilter::TextCensor::censoredText() const { return mText; } @@ -194,19 +194,19 @@ void SpellingFilter::TextCensor::skipLine() ++mPos; } -bool SpellingFilter::TextCensor::atQuotation(const QString& quotePrefix) const +bool SpellingFilter::TextCensor::atQuotation(const TQString& quotePrefix) const { return atLineStart() && mText.mid(mPos, quotePrefix.length()) == quotePrefix; } -void SpellingFilter::TextCensor::skipQuotation(const QString& quotePrefix) +void SpellingFilter::TextCensor::skipQuotation(const TQString& quotePrefix) { while(atQuotation(quotePrefix)) skipLine(); } -void SpellingFilter::TextCensor::findQuotation(const QString& quotePrefix) +void SpellingFilter::TextCensor::findQuotation(const TQString& quotePrefix) { while(mPos < static_cast<int>(mText.length()) && !atQuotation(quotePrefix)) skipLine(); |