summaryrefslogtreecommitdiffstats
path: root/kalarm/alarmevent.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/alarmevent.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/alarmevent.cpp')
-rw-r--r--kalarm/alarmevent.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index 52206342b..66534b694 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -211,8 +211,8 @@ void KAEvent::set(const Event& event)
// Extract status from the event
mEventID = event.uid();
mRevision = event.revision();
- mTemplateName = TQString::null;
- mLogFile = TQString::null;
+ mTemplateName = TQString();
+ mLogFile = TQString();
mTemplateAfterTime = -1;
mBeep = false;
mSpeak = false;
@@ -334,7 +334,7 @@ void KAEvent::set(const Event& event)
}
mNextMainDateTime = readDateTime(event, dateOnly, mStartDateTime);
mSaveDateTime = event.created();
- if (uidStatus() == TEMPLATE)
+ if (uidtqStatus() == TEMPLATE)
mTemplateName = event.summary();
if (event.statusStr() == DISABLED_STATUS)
mEnabled = false;
@@ -789,10 +789,10 @@ void KAEvent::set(const TQDateTime& dateTime, const TQString& text, const TQColo
break;
}
mText = (mActionType == T_COMMAND) ? text.stripWhiteSpace() : text;
- mEventID = TQString::null;
- mTemplateName = TQString::null;
- mPreAction = TQString::null;
- mPostAction = TQString::null;
+ mEventID = TQString();
+ mTemplateName = TQString();
+ mPreAction = TQString();
+ mPostAction = TQString();
mAudioFile = "";
mSoundVolume = -1;
mFadeVolume = -1;
@@ -877,7 +877,7 @@ DateTime KAEvent::displayDateTime() const
{
if (mMainExpired)
return mDeferralTime;
- return QMIN(mDeferralTime, dt);
+ return TQMIN(mDeferralTime, dt);
}
return dt;
}
@@ -885,38 +885,38 @@ DateTime KAEvent::displayDateTime() const
/******************************************************************************
* Convert a unique ID to indicate that the event is in a specified calendar file.
*/
-TQString KAEvent::uid(const TQString& id, Status status)
+TQString KAEvent::uid(const TQString& id, tqStatus status)
{
TQString result = id;
- Status oldStatus;
+ tqStatus oldtqStatus;
int i, len;
- if ((i = result.find(EXPIRED_UID)) > 0)
+ if ((i = result.tqfind(EXPIRED_UID)) > 0)
{
- oldStatus = EXPIRED;
+ oldtqStatus = EXPIRED;
len = EXPIRED_UID.length();
}
- else if ((i = result.find(DISPLAYING_UID)) > 0)
+ else if ((i = result.tqfind(DISPLAYING_UID)) > 0)
{
- oldStatus = DISPLAYING;
+ oldtqStatus = DISPLAYING;
len = DISPLAYING_UID.length();
}
- else if ((i = result.find(TEMPLATE_UID)) > 0)
+ else if ((i = result.tqfind(TEMPLATE_UID)) > 0)
{
- oldStatus = TEMPLATE;
+ oldtqStatus = TEMPLATE;
len = TEMPLATE_UID.length();
}
- else if ((i = result.find(KORGANIZER_UID)) > 0)
+ else if ((i = result.tqfind(KORGANIZER_UID)) > 0)
{
- oldStatus = KORGANIZER;
+ oldtqStatus = KORGANIZER;
len = KORGANIZER_UID.length();
}
else
{
- oldStatus = ACTIVE;
+ oldtqStatus = ACTIVE;
i = result.findRev('-');
len = 1;
}
- if (status != oldStatus && i > 0)
+ if (status != oldtqStatus && i > 0)
{
TQString part;
switch (status)
@@ -935,15 +935,15 @@ TQString KAEvent::uid(const TQString& id, Status status)
/******************************************************************************
* Get the calendar type for a unique ID.
*/
-KAEvent::Status KAEvent::uidStatus(const TQString& uid)
+KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid)
{
- if (uid.find(EXPIRED_UID) > 0)
+ if (uid.tqfind(EXPIRED_UID) > 0)
return EXPIRED;
- if (uid.find(DISPLAYING_UID) > 0)
+ if (uid.tqfind(DISPLAYING_UID) > 0)
return DISPLAYING;
- if (uid.find(TEMPLATE_UID) > 0)
+ if (uid.tqfind(TEMPLATE_UID) > 0)
return TEMPLATE;
- if (uid.find(KORGANIZER_UID) > 0)
+ if (uid.tqfind(KORGANIZER_UID) > 0)
return KORGANIZER;
return ACTIVE;
}
@@ -1046,7 +1046,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
cats.append(ARCHIVE_CATEGORY);
}
ev.setCategories(cats);
- ev.setCustomStatus(mEnabled ? TQString::null : DISABLED_STATUS);
+ ev.setCustomtqStatus(mEnabled ? TQString() : DISABLED_STATUS);
ev.setRevision(mRevision);
ev.clearAlarms();
@@ -1279,7 +1279,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL
alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY,
TQString::tqfromLatin1("%1;%2;%3").arg(mBgColour.name())
.arg(mFgColour.name())
- .arg(mDefaultFont ? TQString::null : mFont.toString()));
+ .arg(mDefaultFont ? TQString() : mFont.toString()));
break;
case T_COMMAND:
if (mCommandScript)
@@ -2108,7 +2108,7 @@ TQString KAEvent::recurrenceText(bool brief) const
break;
}
}
- return brief ? TQString::null : i18n("None");
+ return brief ? TQString() : i18n("None");
}
/******************************************************************************
@@ -2131,7 +2131,7 @@ TQString KAEvent::repetitionText(bool brief) const
return i18n("1 Day", "%n Days", mRepeatInterval/1440);
return i18n("1 Week", "%n Weeks", mRepeatInterval/(7*1440));
}
- return brief ? TQString::null : i18n("None");
+ return brief ? TQString() : i18n("None");
}
/******************************************************************************
@@ -2551,7 +2551,7 @@ bool KAEvent::adjustStartOfDay(const Event::List& events)
{
Event* event = *evit;
const TQStringList cats = event->categories();
- if (cats.find(DATE_ONLY_CATEGORY) != cats.end())
+ if (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end())
{
// It's an untimed event, so fix it
TQTime oldTime = event->dtStart().time();
@@ -2694,9 +2694,9 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* All alarms were of type DISPLAY. Instead of the X-KDE-KALARM-TYPE
* alarm property, characteristics were stored as a prefix to the
* alarm DESCRIPTION property, as follows:
- * SEQNO;[FLAGS];TYPE:TEXT
+ * SETQNO;[FLAGS];TYPE:TEXT
* where
- * SEQNO = sequence number of alarm within the event
+ * SETQNO = sequence number of alarm within the event
* FLAGS = C for late-cancel, L for repeat-at-login, D for deferral
* TYPE = TEXT or FILE or CMD
* TEXT = message text, file name/URL or command
@@ -2732,14 +2732,14 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
else
i = 0; // invalid prefix
}
- if (txt.find(TEXT_PREFIX, i) == i)
+ if (txt.tqfind(TEXT_PREFIX, i) == i)
i += TEXT_PREFIX.length();
- else if (txt.find(FILE_PREFIX, i) == i)
+ else if (txt.tqfind(FILE_PREFIX, i) == i)
{
action = T_FILE;
i += FILE_PREFIX.length();
}
- else if (txt.find(COMMAND_PREFIX, i) == i)
+ else if (txt.tqfind(COMMAND_PREFIX, i) == i)
{
action = T_COMMAND;
i += COMMAND_PREFIX.length();
@@ -2818,7 +2818,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* X-KDE-KALARM-FONTCOLOUR property.
* Convert BEEP category into an audio alarm with no audio file.
*/
- if (uidStatus(event->uid()) == EXPIRED)
+ if (uidtqStatus(event->uid()) == EXPIRED)
event->setCreated(event->dtEnd());
TQDateTime start = event->dtStart();
if (event->doesFloat())
@@ -2882,7 +2882,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* Convert simple LATECANCEL category to LATECANCEL:n where n = minutes late.
*/
TQStringList::Iterator it;
- while ((it = cats.find(LATE_CANCEL_CAT)) != cats.end())
+ while ((it = cats.tqfind(LATE_CANCEL_CAT)) != cats.end())
{
cats.remove(it);
addLateCancel = true;
@@ -2915,7 +2915,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* Convert simple TMPLDEFTIME category to TMPLAFTTIME:n where n = minutes after.
*/
TQStringList::Iterator it;
- while ((it = cats.find(TEMPL_DEF_TIME_CAT)) != cats.end())
+ while ((it = cats.tqfind(TEMPL_DEF_TIME_CAT)) != cats.end())
{
cats.remove(it);
cats.append(TQString("%1%2").arg(TEMPL_AFTER_TIME_CATEGORY).arg(0));
@@ -2929,7 +2929,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* Convert simple XTERM category to LOG:xterm:
*/
TQStringList::Iterator it;
- while ((it = cats.find(EXEC_IN_XTERM_CAT)) != cats.end())
+ while ((it = cats.tqfind(EXEC_IN_XTERM_CAT)) != cats.end())
{
cats.remove(it);
cats.append(LOG_CATEGORY + xtermURL);
@@ -2952,7 +2952,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju
* alarm offsets to zero and deferral alarm offsets to be relative to
* the next recurrence.
*/
- bool dateOnly = (cats.find(DATE_ONLY_CATEGORY) != cats.end());
+ bool dateOnly = (cats.tqfind(DATE_ONLY_CATEGORY) != cats.end());
DateTime startDateTime(event->dtStart(), dateOnly);
// Convert the main alarm and get the next main trigger time from it
DateTime nextMainDateTime;
@@ -3431,8 +3431,8 @@ TQString EmailAddressList::join(const TQString& separator) const
*/
static void setProcedureAlarm(Alarm* alarm, const TQString& commandLine)
{
- TQString command = TQString::null;
- TQString arguments = TQString::null;
+ TQString command = TQString();
+ TQString arguments = TQString();
TQChar quoteChar;
bool quoted = false;
uint posMax = commandLine.length();