summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmtext.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-13 00:46:47 +0000
commit67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch)
tree5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kalarm/alarmtext.cpp
parent2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff)
downloadtdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz
tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4, however Qt3 builds are OK. Any alterations this commit makes to kdepim behaviour under Qt3 are unintentional and should be fixed. git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kalarm/alarmtext.cpp')
-rw-r--r--kalarm/alarmtext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/kalarm/alarmtext.cpp b/kalarm/alarmtext.cpp
index 5be991f0d..6cf07c34f 100644
--- a/kalarm/alarmtext.cpp
+++ b/kalarm/alarmtext.cpp
@@ -44,7 +44,7 @@ void AlarmText::setText(const TQString& text)
mBody = text;
mIsScript = text.startsWith(TQString::tqfromLatin1("#!"));
mIsEmail = false;
- mTo = mFrom = mCc = mTime = mSubject = TQString::null;
+ mTo = mFrom = mCc = mTime = mSubject = TQString();
mKMailSerialNum = 0;
}
@@ -136,14 +136,14 @@ int AlarmText::emailHeaderCount(const TQStringList& lines)
/******************************************************************************
* Check whether a text is an email, and if so return its headers or optionally
* only its subject line.
-* Reply = headers/subject line, or TQString::null if not the text of an email.
+* Reply = headers/subject line, or TQString() if not the text of an email.
*/
TQString AlarmText::emailHeaders(const TQString& text, bool subjectOnly)
{
TQStringList lines = TQStringList::split('\n', text);
int n = emailHeaderCount(lines);
if (!n)
- return TQString::null;
+ return TQString();
if (subjectOnly)
return lines[n-1].mid(mSubjectPrefix.length()).stripWhiteSpace();
TQString h = lines[0];
@@ -184,8 +184,8 @@ TQString AlarmText::fromCalendarText(const TQString& text, bool& email)
dispText += mCcPrefix + lines[2].mid(mCcPrefixEn.length()) + '\n';
dispText += mDatePrefix + lines[n].mid(mDatePrefixEn.length()) + '\n';
dispText += mSubjectPrefix + lines[n+1].mid(mSubjectPrefixEn.length());
- int i = text.find(mSubjectPrefixEn);
- i = text.find('\n', i);
+ int i = text.tqfind(mSubjectPrefixEn);
+ i = text.tqfind('\n', i);
if (i > 0)
dispText += text.mid(i);
email = true;
@@ -224,8 +224,8 @@ TQString AlarmText::toCalendarText(const TQString& text)
calText += mCcPrefixEn + lines[2].mid(mCcPrefix.length()) + '\n';
calText += mDatePrefixEn + lines[n].mid(mDatePrefix.length()) + '\n';
calText += mSubjectPrefixEn + lines[n+1].mid(mSubjectPrefix.length());
- int i = text.find(mSubjectPrefix);
- i = text.find('\n', i);
+ int i = text.tqfind(mSubjectPrefix);
+ i = text.tqfind('\n', i);
if (i > 0)
calText += text.mid(i);
return calText;
@@ -276,7 +276,7 @@ TQString AlarmText::summary(const KAEvent& event, int maxLines, bool* truncated)
int newline = -1;
for (int i = 0; i < maxLines; ++i)
{
- newline = text.find('\n', newline + 1);
+ newline = text.tqfind('\n', newline + 1);
if (newline < 0)
return text; // not truncated after all !?!
}