diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:34:45 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-03 04:24:29 +0200 |
commit | e3649f744289c180537d2d8474dc0e39050e654f (patch) | |
tree | 5d3d773985c0bfdfed5e0aed35fe8b2441d60787 /kalarm/alarmevent.cpp | |
parent | 4b4a3f32d8e71d79626206211ee6e23ee1e968b8 (diff) | |
download | tdepim-e3649f744289c180537d2d8474dc0e39050e654f.tar.gz tdepim-e3649f744289c180537d2d8474dc0e39050e654f.zip |
Rename old tq methods that no longer need a unique name
(cherry picked from commit 0e00c0a86a4c9d7e80c7b66d91940cc7dcb79f78)
Diffstat (limited to 'kalarm/alarmevent.cpp')
-rw-r--r-- | kalarm/alarmevent.cpp | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp index c5e487caa..9acb722d1 100644 --- a/kalarm/alarmevent.cpp +++ b/kalarm/alarmevent.cpp @@ -44,7 +44,7 @@ const TQCString APPNAME("KALARM"); // KAlarm version which first used the current calendar/event format. // If this changes, KAEvent::convertKCalEvents() must be changed correspondingly. // The string version is the KAlarm version string used in the calendar file. -TQString KAEvent::calVersionString() { return TQString::tqfromLatin1("1.5.0"); } +TQString KAEvent::calVersionString() { return TQString::fromLatin1("1.5.0"); } int KAEvent::calVersion() { return KAlarm::Version(1,5,0); } // Custom calendar properties. @@ -54,16 +54,16 @@ static const TQCString NEXT_RECUR_PROPERTY("NEXTRECUR"); // X-KDE-KALARM-NEX static const TQCString REPEAT_PROPERTY("REPEAT"); // X-KDE-KALARM-REPEAT property // - General alarm properties static const TQCString TYPE_PROPERTY("TYPE"); // X-KDE-KALARM-TYPE property -static const TQString FILE_TYPE = TQString::tqfromLatin1("FILE"); -static const TQString AT_LOGIN_TYPE = TQString::tqfromLatin1("LOGIN"); -static const TQString REMINDER_TYPE = TQString::tqfromLatin1("REMINDER"); -static const TQString REMINDER_ONCE_TYPE = TQString::tqfromLatin1("REMINDER_ONCE"); -static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::tqfromLatin1("ONCE"); -static const TQString TIME_DEFERRAL_TYPE = TQString::tqfromLatin1("DEFERRAL"); -static const TQString DATE_DEFERRAL_TYPE = TQString::tqfromLatin1("DATE_DEFERRAL"); -static const TQString DISPLAYING_TYPE = TQString::tqfromLatin1("DISPLAYING"); // used only in displaying calendar -static const TQString PRE_ACTION_TYPE = TQString::tqfromLatin1("PRE"); -static const TQString POST_ACTION_TYPE = TQString::tqfromLatin1("POST"); +static const TQString FILE_TYPE = TQString::fromLatin1("FILE"); +static const TQString AT_LOGIN_TYPE = TQString::fromLatin1("LOGIN"); +static const TQString REMINDER_TYPE = TQString::fromLatin1("REMINDER"); +static const TQString REMINDER_ONCE_TYPE = TQString::fromLatin1("REMINDER_ONCE"); +static const TQString ARCHIVE_REMINDER_ONCE_TYPE = TQString::fromLatin1("ONCE"); +static const TQString TIME_DEFERRAL_TYPE = TQString::fromLatin1("DEFERRAL"); +static const TQString DATE_DEFERRAL_TYPE = TQString::fromLatin1("DATE_DEFERRAL"); +static const TQString DISPLAYING_TYPE = TQString::fromLatin1("DISPLAYING"); // used only in displaying calendar +static const TQString PRE_ACTION_TYPE = TQString::fromLatin1("PRE"); +static const TQString POST_ACTION_TYPE = TQString::fromLatin1("POST"); static const TQCString NEXT_REPEAT_PROPERTY("NEXTREPEAT"); // X-KDE-KALARM-NEXTREPEAT property // - Display alarm properties static const TQCString FONT_COLOUR_PROPERTY("FONTCOLOR"); // X-KDE-KALARM-FONTCOLOR property @@ -74,27 +74,27 @@ static const TQCString VOLUME_PROPERTY("VOLUME"); // X-KDE-KALARM-VOL static const TQCString SPEAK_PROPERTY("SPEAK"); // X-KDE-KALARM-SPEAK property // Event categories -static const TQString DATE_ONLY_CATEGORY = TQString::tqfromLatin1("DATE"); -static const TQString EMAIL_BCC_CATEGORY = TQString::tqfromLatin1("BCC"); -static const TQString CONFIRM_ACK_CATEGORY = TQString::tqfromLatin1("ACKCONF"); -static const TQString LATE_CANCEL_CATEGORY = TQString::tqfromLatin1("LATECANCEL;"); -static const TQString AUTO_CLOSE_CATEGORY = TQString::tqfromLatin1("LATECLOSE;"); -static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::tqfromLatin1("TMPLAFTTIME;"); -static const TQString KMAIL_SERNUM_CATEGORY = TQString::tqfromLatin1("KMAIL:"); -static const TQString KORGANIZER_CATEGORY = TQString::tqfromLatin1("KORG"); -static const TQString DEFER_CATEGORY = TQString::tqfromLatin1("DEFER;"); -static const TQString ARCHIVE_CATEGORY = TQString::tqfromLatin1("SAVE"); -static const TQString ARCHIVE_CATEGORIES = TQString::tqfromLatin1("SAVE:"); -static const TQString LOG_CATEGORY = TQString::tqfromLatin1("LOG:"); -static const TQString xtermURL = TQString::tqfromLatin1("xterm:"); +static const TQString DATE_ONLY_CATEGORY = TQString::fromLatin1("DATE"); +static const TQString EMAIL_BCC_CATEGORY = TQString::fromLatin1("BCC"); +static const TQString CONFIRM_ACK_CATEGORY = TQString::fromLatin1("ACKCONF"); +static const TQString LATE_CANCEL_CATEGORY = TQString::fromLatin1("LATECANCEL;"); +static const TQString AUTO_CLOSE_CATEGORY = TQString::fromLatin1("LATECLOSE;"); +static const TQString TEMPL_AFTER_TIME_CATEGORY = TQString::fromLatin1("TMPLAFTTIME;"); +static const TQString KMAIL_SERNUM_CATEGORY = TQString::fromLatin1("KMAIL:"); +static const TQString KORGANIZER_CATEGORY = TQString::fromLatin1("KORG"); +static const TQString DEFER_CATEGORY = TQString::fromLatin1("DEFER;"); +static const TQString ARCHIVE_CATEGORY = TQString::fromLatin1("SAVE"); +static const TQString ARCHIVE_CATEGORIES = TQString::fromLatin1("SAVE:"); +static const TQString LOG_CATEGORY = TQString::fromLatin1("LOG:"); +static const TQString xtermURL = TQString::fromLatin1("xterm:"); // Event status strings -static const TQString DISABLED_STATUS = TQString::tqfromLatin1("DISABLED"); +static const TQString DISABLED_STATUS = TQString::fromLatin1("DISABLED"); -static const TQString EXPIRED_UID = TQString::tqfromLatin1("-exp-"); -static const TQString DISPLAYING_UID = TQString::tqfromLatin1("-disp-"); -static const TQString TEMPLATE_UID = TQString::tqfromLatin1("-tmpl-"); -static const TQString KORGANIZER_UID = TQString::tqfromLatin1("-korg-"); +static const TQString EXPIRED_UID = TQString::fromLatin1("-exp-"); +static const TQString DISPLAYING_UID = TQString::fromLatin1("-disp-"); +static const TQString TEMPLATE_UID = TQString::fromLatin1("-tmpl-"); +static const TQString KORGANIZER_UID = TQString::fromLatin1("-korg-"); struct AlarmData { @@ -334,7 +334,7 @@ void KAEvent::set(const Event& event) } mNextMainDateTime = readDateTime(event, dateOnly, mStartDateTime); mSaveDateTime = event.created(); - if (uidtqStatus() == TEMPLATE) + if (uidStatus() == TEMPLATE) mTemplateName = event.summary(); if (event.statusStr() == DISABLED_STATUS) mEnabled = false; @@ -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, tqStatus status) +TQString KAEvent::uid(const TQString& id, Status status) { TQString result = id; - tqStatus oldtqStatus; + Status oldStatus; int i, len; if ((i = result.find(EXPIRED_UID)) > 0) { - oldtqStatus = EXPIRED; + oldStatus = EXPIRED; len = EXPIRED_UID.length(); } else if ((i = result.find(DISPLAYING_UID)) > 0) { - oldtqStatus = DISPLAYING; + oldStatus = DISPLAYING; len = DISPLAYING_UID.length(); } else if ((i = result.find(TEMPLATE_UID)) > 0) { - oldtqStatus = TEMPLATE; + oldStatus = TEMPLATE; len = TEMPLATE_UID.length(); } else if ((i = result.find(KORGANIZER_UID)) > 0) { - oldtqStatus = KORGANIZER; + oldStatus = KORGANIZER; len = KORGANIZER_UID.length(); } else { - oldtqStatus = ACTIVE; + oldStatus = ACTIVE; i = result.findRev('-'); len = 1; } - if (status != oldtqStatus && i > 0) + if (status != oldStatus && i > 0) { TQString part; switch (status) @@ -935,7 +935,7 @@ TQString KAEvent::uid(const TQString& id, tqStatus status) /****************************************************************************** * Get the calendar type for a unique ID. */ -KAEvent::tqStatus KAEvent::uidtqStatus(const TQString& uid) +KAEvent::Status KAEvent::uidStatus(const TQString& uid) { if (uid.find(EXPIRED_UID) > 0) return EXPIRED; @@ -1039,14 +1039,14 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc if (params.count() > 0) { TQString cat = ARCHIVE_CATEGORIES; - cat += params.join(TQString::tqfromLatin1(";")); + cat += params.join(TQString::fromLatin1(";")); cats.append(cat); } else cats.append(ARCHIVE_CATEGORY); } ev.setCategories(cats); - ev.setCustomtqStatus(mEnabled ? TQString() : DISABLED_STATUS); + ev.setCustomStatus(mEnabled ? TQString() : DISABLED_STATUS); ev.setRevision(mRevision); ev.clearAlarms(); @@ -1097,9 +1097,9 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc else if (mAtLoginDateTime.isValid()) dtl = mAtLoginDateTime; else if (mStartDateTime.isDateOnly()) - dtl = TQDate::tqcurrentDate().addDays(-1); + dtl = TQDate::currentDate().addDays(-1); else - dtl = TQDateTime::tqcurrentDateTime(); + dtl = TQDateTime::currentDateTime(); initKCalAlarm(ev, dtl, AT_LOGIN_TYPE); if (!ancillaryType && dtl.isValid()) { @@ -1243,7 +1243,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case KAAlarm::AUDIO_ALARM: alarm->setAudioAlarm(mAudioFile); // empty for a beep or for speaking if (mSpeak) - alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::tqfromLatin1("Y")); + alarm->setCustomProperty(APPNAME, SPEAK_PROPERTY, TQString::fromLatin1("Y")); if (mRepeatSound) { alarm->setRepeatCount(-1); @@ -1251,7 +1251,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL } if (!mAudioFile.isEmpty() && mSoundVolume >= 0) alarm->setCustomProperty(APPNAME, VOLUME_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").tqarg(TQString::number(mSoundVolume, 'f', 2)) + TQString::fromLatin1("%1;%2;%3").tqarg(TQString::number(mSoundVolume, 'f', 2)) .tqarg(TQString::number(mFadeVolume, 'f', 2)) .tqarg(mFadeSeconds)); break; @@ -1277,7 +1277,7 @@ Alarm* KAEvent::initKCalAlarm(Event& event, int startOffsetSecs, const TQStringL case T_MESSAGE: alarm->setDisplayAlarm(AlarmText::toCalendarText(mText)); alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;%2;%3").tqarg(mBgColour.name()) + TQString::fromLatin1("%1;%2;%3").tqarg(mBgColour.name()) .tqarg(mFgColour.name()) .tqarg(mDefaultFont ? TQString() : mFont.toString())); break; @@ -1601,7 +1601,7 @@ bool KAEvent::defer(const DateTime& dateTime, bool reminder, bool adjustRecurren set_deferral(NORMAL_DEFERRAL); if (adjustRecurrence) { - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); if (mainEndRepeatTime() < now) { // The last repetition (if any) of the current recurrence has already passed. @@ -1641,7 +1641,7 @@ void KAEvent::cancelDefer() // Set the deferral time to be the same as the next recurrence/repetition. // This prevents an immediate retriggering of the alarm. if (mMainExpired - || nextOccurrence(TQDateTime::tqcurrentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE) + || nextOccurrence(TQDateTime::currentDateTime(), mDeferralTime, RETURN_REPETITION) == NO_OCCURRENCE) { // The main alarm has expired, so simply delete the deferral mDeferralTime = DateTime(); @@ -1678,7 +1678,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const // It's a repeated alarm. Don't allow it to be deferred past its // next occurrence or repetition. DateTime reminderTime; - TQDateTime now = TQDateTime::tqcurrentDateTime(); + TQDateTime now = TQDateTime::currentDateTime(); OccurType type = nextOccurrence(now, endTime, RETURN_REPETITION); if (type & OCCURRENCE_REPEAT) ltype = LIMIT_REPETITION; @@ -1695,7 +1695,7 @@ DateTime KAEvent::deferralLimit(KAEvent::DeferLimitType* limitType) const ltype = LIMIT_RECURRENCE; } else if ((mReminderMinutes || mDeferral == REMINDER_DEFERRAL || mArchiveReminderMinutes) - && TQDateTime::tqcurrentDateTime() < mNextMainDateTime.dateTime()) + && TQDateTime::currentDateTime() < mNextMainDateTime.dateTime()) { // It's an reminder alarm. Don't allow it to be deferred past its main alarm time. endTime = mNextMainDateTime; @@ -2633,21 +2633,21 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju static const TQChar LATE_CANCEL_CODE = 'C'; static const TQChar AT_LOGIN_CODE = 'L'; // subsidiary alarm at every login static const TQChar DEFERRAL_CODE = 'D'; // extra deferred alarm - static const TQString TEXT_PREFIX = TQString::tqfromLatin1("TEXT:"); - static const TQString FILE_PREFIX = TQString::tqfromLatin1("FILE:"); - static const TQString COMMAND_PREFIX = TQString::tqfromLatin1("CMD:"); + static const TQString TEXT_PREFIX = TQString::fromLatin1("TEXT:"); + static const TQString FILE_PREFIX = TQString::fromLatin1("FILE:"); + static const TQString COMMAND_PREFIX = TQString::fromLatin1("CMD:"); // KAlarm pre-0.9.2 codes held in the event's CATEGORY property - static const TQString BEEP_CATEGORY = TQString::tqfromLatin1("BEEP"); + static const TQString BEEP_CATEGORY = TQString::fromLatin1("BEEP"); // KAlarm pre-1.1.1 LATECANCEL category with no parameter - static const TQString LATE_CANCEL_CAT = TQString::tqfromLatin1("LATECANCEL"); + static const TQString LATE_CANCEL_CAT = TQString::fromLatin1("LATECANCEL"); // KAlarm pre-1.3.0 TMPLDEFTIME category with no parameter - static const TQString TEMPL_DEF_TIME_CAT = TQString::tqfromLatin1("TMPLDEFTIME"); + static const TQString TEMPL_DEF_TIME_CAT = TQString::fromLatin1("TMPLDEFTIME"); // KAlarm pre-1.3.1 XTERM category - static const TQString EXEC_IN_XTERM_CAT = TQString::tqfromLatin1("XTERM"); + static const TQString EXEC_IN_XTERM_CAT = TQString::fromLatin1("XTERM"); // KAlarm pre-1.4.22 properties static const TQCString KMAIL_ID_PROPERTY("KMAILID"); // X-KDE-KALARM-KMAILID property @@ -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 (uidtqStatus(event->uid()) == EXPIRED) + if (uidStatus(event->uid()) == EXPIRED) event->setCreated(event->dtEnd()); TQDateTime start = event->dtStart(); if (event->doesFloat()) @@ -2844,7 +2844,7 @@ void KAEvent::convertKCalEvents(KCal::Calendar& calendar, int version, bool adju Alarm* alarm = *alit; if (alarm->type() == Alarm::Display) alarm->setCustomProperty(APPNAME, FONT_COLOUR_PROPERTY, - TQString::tqfromLatin1("%1;;").tqarg(cats[0])); + TQString::fromLatin1("%1;;").tqarg(cats[0])); } cats.remove(cats.begin()); } |