summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kalarm/alarmcalendar.cpp4
-rw-r--r--kalarm/alarmevent.cpp12
-rw-r--r--kalarm/alarmevent.h106
-rw-r--r--kalarm/alarmtimewidget.cpp4
-rw-r--r--kalarm/editdlg.cpp22
-rw-r--r--kalarm/editdlg.h120
-rw-r--r--kalarm/eventlistviewbase.cpp2
-rw-r--r--kalarm/find.cpp6
-rw-r--r--kalarm/functions.cpp6
-rw-r--r--kalarm/kalarmapp.cpp10
-rw-r--r--kalarm/kalarmd/adcalendar.cpp4
-rw-r--r--kalarm/kalarmd/alarmdaemon.cpp4
-rw-r--r--kalarm/karecurrence.cpp10
-rw-r--r--kalarm/karecurrence.h8
-rw-r--r--kalarm/lib/datetime.h6
-rw-r--r--kalarm/lib/lineedit.cpp4
-rw-r--r--kalarm/lib/shellprocess.cpp4
-rw-r--r--kalarm/lib/timeedit.cpp3
-rw-r--r--kalarm/lib/timeperiod.cpp2
-rw-r--r--kalarm/recurrenceedit.cpp10
-rw-r--r--kalarm/recurrenceedit.h24
-rw-r--r--kalarm/recurrenceeditprivate.h64
-rw-r--r--kalarm/traywindow.cpp2
23 files changed, 218 insertions, 219 deletions
diff --git a/kalarm/alarmcalendar.cpp b/kalarm/alarmcalendar.cpp
index 8d11854bd..d0150d00e 100644
--- a/kalarm/alarmcalendar.cpp
+++ b/kalarm/alarmcalendar.cpp
@@ -373,7 +373,7 @@ bool AlarmCalendar::reload()
*/
bool AlarmCalendar::saveCal(const TQString& newFile)
{
- if (!mCalendar || !mOpen && newFile.isNull())
+ if (!mCalendar || (!mOpen && newFile.isNull()))
return false;
kdDebug(5950) << "AlarmCalendar::saveCal(\"" << newFile << "\", " << mType << ")\n";
@@ -638,7 +638,7 @@ void AlarmCalendar::setPurgeDays(int days)
mPurgeDays = days;
if (mPurgeDays <= 0)
StartOfDayTimer::disconnect(this);
- if (oldDays < 0 || days >= 0 && days < oldDays)
+ if (oldDays < 0 || (days >= 0 && days < oldDays))
{
// Alarms are now being kept for less long, so purge them
if (open())
diff --git a/kalarm/alarmevent.cpp b/kalarm/alarmevent.cpp
index 87f300401..b5c4fb030 100644
--- a/kalarm/alarmevent.cpp
+++ b/kalarm/alarmevent.cpp
@@ -977,8 +977,8 @@ Event* KAEvent::event() const
*/
bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool cancelCancelledDefer) const
{
- if (checkUid && !mEventID.isEmpty() && mEventID != ev.uid()
- || !mAlarmCount && (!original || !mMainExpired))
+ if ((checkUid && !mEventID.isEmpty() && mEventID != ev.uid())
+ || (!mAlarmCount && (!original || !mMainExpired)))
return false;
checkRecur(); // ensure recurrence/repetition data is consistent
@@ -1089,7 +1089,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
}
// Add subsidiary alarms
- if (mRepeatAtLogin || mArchiveRepeatAtLogin && original)
+ if (mRepeatAtLogin || (mArchiveRepeatAtLogin && original))
{
DateTime dtl;
if (mArchiveRepeatAtLogin)
@@ -1107,7 +1107,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 1;
}
}
- if (mReminderMinutes || mArchiveReminderMinutes && original)
+ if (mReminderMinutes || (mArchiveReminderMinutes && original))
{
int minutes = mReminderMinutes ? mReminderMinutes : mArchiveReminderMinutes;
initKCalAlarm(ev, -minutes * 60, TQStringList(mReminderOnceOnly ? REMINDER_ONCE_TYPE : REMINDER_TYPE));
@@ -1117,7 +1117,7 @@ bool KAEvent::updateKCalEvent(Event& ev, bool checkUid, bool original, bool canc
ancillaryType = 2;
}
}
- if (mDeferral > 0 || mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer)
+ if (mDeferral > 0 || (mDeferral == CANCEL_DEFERRAL && !cancelCancelledDefer))
{
DateTime nextDateTime = mNextMainDateTime;
if (mMainExpired)
@@ -1736,7 +1736,7 @@ bool KAEvent::setDisplaying(const KAEvent& event, KAAlarm::Type alarmType, const
setUid(DISPLAYING);
mDisplaying = true;
mDisplayingTime = (alarmType == KAAlarm::AT_LOGIN_ALARM) ? repeatAtLoginTime : al.dateTime();
- switch (al.type())
+ switch (al.subType())
{
case KAAlarm::AT_LOGIN__ALARM: mDisplayingFlags = REPEAT_AT_LOGIN; break;
case KAAlarm::REMINDER__ALARM: mDisplayingFlags = REMINDER; break;
diff --git a/kalarm/alarmevent.h b/kalarm/alarmevent.h
index 20f870b64..6bda36d95 100644
--- a/kalarm/alarmevent.h
+++ b/kalarm/alarmevent.h
@@ -61,32 +61,32 @@ class KAAlarmEventBase
TQString message() const { return (mActionType == T_MESSAGE || mActionType == T_EMAIL) ? mText : TQString(); }
TQString fileName() const { return (mActionType == T_FILE) ? mText : TQString(); }
TQString command() const { return (mActionType == T_COMMAND) ? mText : TQString(); }
- uint emailFromId() const { return mEmailFromIdentity; }
- const EmailAddressList& emailAddresses() const { return mEmailAddresses; }
+ uint emailFromId() const { return mEmailFromIdentity; }
+ const EmailAddressList& emailAddresses() const { return mEmailAddresses; }
TQString emailAddresses(const TQString& sep) const { return mEmailAddresses.join(sep); }
const TQString& emailSubject() const { return mEmailSubject; }
const TQStringList& emailAttachments() const { return mEmailAttachments; }
TQString emailAttachments(const TQString& sep) const { return mEmailAttachments.join(sep); }
- bool emailBcc() const { return mEmailBcc; }
+ bool emailBcc() const { return mEmailBcc; }
const TQColor& bgColour() const { return mBgColour; }
const TQColor& fgColour() const { return mFgColour; }
- bool defaultFont() const { return mDefaultFont; }
+ bool defaultFont() const { return mDefaultFont; }
const TQFont& font() const;
- int lateCancel() const { return mLateCancel; }
- bool autoClose() const { return mAutoClose; }
- bool commandScript() const { return mCommandScript; }
- bool confirmAck() const { return mConfirmAck; }
- bool repeatAtLogin() const { return mRepeatAtLogin; }
- int repeatCount() const { return mRepeatCount; }
- int repeatInterval() const { return mRepeatInterval; }
- bool displaying() const { return mDisplaying; }
- bool beep() const { return mBeep; }
- bool speak() const { return (mActionType == T_MESSAGE) && mSpeak; }
- int flags() const;
+ int lateCancel() const { return mLateCancel; }
+ bool autoClose() const { return mAutoClose; }
+ bool commandScript() const { return mCommandScript; }
+ bool confirmAck() const { return mConfirmAck; }
+ bool repeatAtLogin() const { return mRepeatAtLogin; }
+ int repeatCount() const { return mRepeatCount; }
+ int repeatInterval() const { return mRepeatInterval; }
+ bool displaying() const { return mDisplaying; }
+ bool beep() const { return mBeep; }
+ bool speak() const { return (mActionType == T_MESSAGE) && mSpeak; }
+ int flags() const;
#ifdef NDEBUG
- void dumpDebug() const { }
+ void dumpDebug() const { }
#else
- void dumpDebug() const;
+ void dumpDebug() const;
#endif
protected:
@@ -99,16 +99,16 @@ class KAAlarmEventBase
void copy(const KAAlarmEventBase&);
void set(int flags);
- TQString mEventID; // UID: KCal::Event unique ID
- TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
+ TQString mEventID; // UID: KCal::Event unique ID
+ TQString mText; // message text, file URL, command, email body [or audio file for KAAlarm]
DateTime mNextMainDateTime; // next time to display the alarm, excluding repetitions
- TQColor mBgColour; // background colour of alarm message
- TQColor mFgColour; // foreground colour of alarm message, or invalid for default
- TQFont mFont; // font of alarm message (ignored if mDefaultFont true)
+ TQColor mBgColour; // background colour of alarm message
+ TQColor mFgColour; // foreground colour of alarm message, or invalid for default
+ TQFont mFont; // font of alarm message (ignored if mDefaultFont true)
uint mEmailFromIdentity;// KMail identity for email 'From' field, or empty
EmailAddressList mEmailAddresses; // ATTENDEE: addresses to send email to
- TQString mEmailSubject; // SUMMARY: subject line of email
- TQStringList mEmailAttachments; // ATTACH: email attachment file names
+ TQString mEmailSubject; // SUMMARY: subject line of email
+ TQStringList mEmailAttachments; // ATTACH: email attachment file names
float mSoundVolume; // volume for sound file, or < 0 for unspecified
float mFadeVolume; // initial volume for sound file, or < 0 for no fade
int mFadeSeconds; // fade time for sound file, or 0 if none
@@ -194,13 +194,13 @@ class KAAlarm : public KAAlarmEventBase
bool valid() const { return mType != INVALID__ALARM; }
Type type() const { return static_cast<Type>(mType & ~TIMED_DEFERRAL_FLAG); }
SubType subType() const { return mType; }
- const TQString& eventID() const { return mEventID; }
+ const TQString& eventID() const { return mEventID; }
DateTime dateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- TQDate date() const { return mNextMainDateTime.date(); }
- TQTime time() const { return mNextMainDateTime.time(); }
- TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString(); }
+ TQDate date() const { return mNextMainDateTime.date(); }
+ TQTime time() const { return mNextMainDateTime.time(); }
+ TQString audioFile() const { return (mActionType == T_AUDIO) && !mBeep ? mText : TQString(); }
float soundVolume() const { return (mActionType == T_AUDIO) && !mBeep && !mText.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeSeconds && !mBeep && !mText.isEmpty() ? mFadeVolume : -1; }
int fadeSeconds() const { return (mActionType == T_AUDIO) && mSoundVolume >= 0 && mFadeVolume >= 0 && !mBeep && !mText.isEmpty() ? mFadeSeconds : 0; }
@@ -324,10 +324,10 @@ class KAEvent : public KAAlarmEventBase
void setActions(const TQString& pre, const TQString& post) { mPreAction = pre; mPostAction = post; mUpdated = true; }
OccurType setNextOccurrence(const TQDateTime& preDateTime);
void setFirstRecurrence();
- void setEventID(const TQString& id) { mEventID = id; mUpdated = true; }
- void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
- void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
- void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
+ void setEventID(const TQString& id) { mEventID = id; mUpdated = true; }
+ void setDate(const TQDate& d) { mNextMainDateTime.set(d); mUpdated = true; }
+ void setTime(const TQDateTime& dt) { mNextMainDateTime.set(dt); mUpdated = true; }
+ void setSaveDateTime(const TQDateTime& dt) { mSaveDateTime = dt; mUpdated = true; }
void setLateCancel(int lc) { mLateCancel = lc; mUpdated = true; }
void setAutoClose(bool ac) { mAutoClose = ac; mUpdated = true; }
void setRepeatAtLogin(bool rl) { mRepeatAtLogin = rl; mUpdated = true; }
@@ -350,7 +350,7 @@ class KAEvent : public KAAlarmEventBase
KCal::Event* event() const; // convert to new Event
bool isTemplate() const { return !mTemplateName.isEmpty(); }
- const TQString& templateName() const { return mTemplateName; }
+ const TQString& templateName() const { return mTemplateName; }
bool usingDefaultTime() const { return mTemplateAfterTime == 0; }
int templateAfterTime() const { return mTemplateAfterTime; }
KAAlarm alarm(KAAlarm::Type) const;
@@ -361,15 +361,15 @@ class KAEvent : public KAAlarmEventBase
bool updateKCalEvent(KCal::Event&, bool checkUid = true, bool original = false, bool cancelCancelledDefer = false) const;
Action action() const { return (Action)mActionType; }
bool displayAction() const { return mActionType == T_MESSAGE || mActionType == T_FILE; }
- const TQString& id() const { return mEventID; }
+ const TQString& id() const { return mEventID; }
bool valid() const { return mAlarmCount && (mAlarmCount != 1 || !mRepeatAtLogin); }
int alarmCount() const { return mAlarmCount; }
const DateTime& startDateTime() const { return mStartDateTime; }
DateTime mainDateTime(bool withRepeats = false) const
{ return (withRepeats && mNextRepeat && mRepeatInterval)
? mNextMainDateTime.addSecs(mNextRepeat * mRepeatInterval * 60) : mNextMainDateTime; }
- TQDate mainDate() const { return mNextMainDateTime.date(); }
- TQTime mainTime() const { return mNextMainDateTime.time(); }
+ TQDate mainDate() const { return mNextMainDateTime.date(); }
+ TQTime mainTime() const { return mNextMainDateTime.time(); }
DateTime mainEndRepeatTime() const { return (mRepeatCount > 0 && mRepeatInterval)
? mNextMainDateTime.addSecs(mRepeatCount * mRepeatInterval * 60) : mNextMainDateTime; }
int reminder() const { return mReminderMinutes; }
@@ -380,25 +380,25 @@ class KAEvent : public KAAlarmEventBase
DateTime deferralLimit(DeferLimitType* = 0) const;
int deferDefaultMinutes() const { return mDeferDefaultMinutes; }
DateTime displayDateTime() const;
- const TQString& messageFileOrCommand() const { return mText; }
- TQString logFile() const { return mLogFile; }
+ const TQString& messageFileOrCommand() const { return mText; }
+ TQString logFile() const { return mLogFile; }
bool commandXterm() const { return mCommandXterm; }
unsigned long kmailSerialNumber() const { return mKMailSerialNumber; }
bool copyToKOrganizer() const { return mCopyToKOrganizer; }
- const TQString& audioFile() const { return mAudioFile; }
+ const TQString& audioFile() const { return mAudioFile; }
float soundVolume() const { return !mAudioFile.isEmpty() ? mSoundVolume : -1; }
float fadeVolume() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeSeconds ? mFadeVolume : -1; }
int fadeSeconds() const { return !mAudioFile.isEmpty() && mSoundVolume >= 0 && mFadeVolume >= 0 ? mFadeSeconds : 0; }
bool repeatSound() const { return mRepeatSound && !mAudioFile.isEmpty(); }
- const TQString& preAction() const { return mPreAction; }
- const TQString& postAction() const { return mPostAction; }
+ const TQString& preAction() const { return mPreAction; }
+ const TQString& postAction() const { return mPostAction; }
bool recurs() const { return checkRecur() != KARecurrence::NO_RECUR; }
KARecurrence::Type recurType() const { return checkRecur(); }
KARecurrence* recurrence() const { return mRecurrence; }
int recurInterval() const; // recurrence period in units of the recurrence period type (minutes, days, etc)
int longestRecurrenceInterval() const { return mRecurrence ? mRecurrence->longestInterval() : 0; }
- TQString recurrenceText(bool brief = false) const;
- TQString repetitionText(bool brief = false) const;
+ TQString recurrenceText(bool brief = false) const;
+ TQString repetitionText(bool brief = false) const;
bool occursAfter(const TQDateTime& preDateTime, bool includeRepetitions) const;
OccurType nextOccurrence(const TQDateTime& preDateTime, DateTime& result, OccurOption = IGNORE_REPETITION) const;
OccurType previousOccurrence(const TQDateTime& afterDateTime, DateTime& result, bool includeRepetitions = false) const;
@@ -408,10 +408,10 @@ class KAEvent : public KAAlarmEventBase
bool enabled() const { return mEnabled; }
bool updated() const { return mUpdated; }
bool mainExpired() const { return mMainExpired; }
- bool expired() const { return mDisplaying && mMainExpired || uidStatus(mEventID) == EXPIRED; }
+ bool expired() const { return (mDisplaying && mMainExpired) || uidStatus(mEventID) == EXPIRED; }
Status uidStatus() const { return uidStatus(mEventID); }
static Status uidStatus(const TQString& uid);
- static TQString uid(const TQString& id, Status);
+ static TQString uid(const TQString& id, Status);
static KAEvent findTemplateName(AlarmCalendar&, const TQString& name);
struct MonthPos
@@ -437,7 +437,7 @@ class KAEvent : public KAAlarmEventBase
void dumpDebug() const;
#endif
static int calVersion();
- static TQString calVersionString();
+ static TQString calVersionString();
static bool adjustStartOfDay(const KCal::Event::List&);
static void convertKCalEvents(KCal::Calendar&, int version, bool adjustSummerTime);
static void convertRepetitions(KCal::CalendarLocal&);
@@ -467,13 +467,13 @@ class KAEvent : public KAAlarmEventBase
inline void set_reminder(int minutes);
inline void set_archiveReminder();
- TQString mTemplateName; // alarm template's name, or null if normal event
- TQString mAudioFile; // ATTACH: audio file to play
- TQString mPreAction; // command to execute before alarm is displayed
- TQString mPostAction; // command to execute after alarm window is closed
+ TQString mTemplateName; // alarm template's name, or null if normal event
+ TQString mAudioFile; // ATTACH: audio file to play
+ TQString mPreAction; // command to execute before alarm is displayed
+ TQString mPostAction; // command to execute after alarm window is closed
DateTime mStartDateTime; // DTSTART and DTEND: start and end time for event
- TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
- TQDateTime mAtLoginDateTime; // repeat-at-login time
+ TQDateTime mSaveDateTime; // CREATED: date event was created, or saved in expired calendar
+ TQDateTime mAtLoginDateTime; // repeat-at-login time
DateTime mDeferralTime; // extra time to trigger alarm (if alarm or reminder deferred)
DateTime mDisplayingTime; // date/time shown in the alarm currently being displayed
int mDisplayingFlags; // type of alarm which is currently being displayed
@@ -486,7 +486,7 @@ class KAEvent : public KAAlarmEventBase
DeferType mDeferral; // whether the alarm is an extra deferred/deferred-reminder alarm
unsigned long mKMailSerialNumber;// if email text, message's KMail serial number
int mTemplateAfterTime;// time not specified: use n minutes after default time, or -1 (applies to templates only)
- TQString mLogFile; // alarm output is to be logged to this URL
+ TQString mLogFile; // alarm output is to be logged to this URL
bool mCommandXterm; // command alarm is to be executed in a terminal window
bool mCopyToKOrganizer; // KOrganizer should hold a copy of the event
bool mReminderOnceOnly; // the reminder is output only for the first recurrence
diff --git a/kalarm/alarmtimewidget.cpp b/kalarm/alarmtimewidget.cpp
index 94abd0e3e..615696cfb 100644
--- a/kalarm/alarmtimewidget.cpp
+++ b/kalarm/alarmtimewidget.cpp
@@ -81,7 +81,7 @@ void AlarmTimeWidget::init(int mode)
{
static const TQString recurText = i18n("For a simple repetition, enter the date/time of the first occurrence.\n"
"If a recurrence is configured, the start date/time will be adjusted "
- "to the first recurrence on or after the entered date/time.");
+ "to the first recurrence on or after the entered date/time.");
connect(this, TQT_SIGNAL(buttonSet(int)), TQT_SLOT(slotButtonSet(int)));
TQBoxLayout* topLayout = new TQVBoxLayout(this, 0, KDialog::spacingHint());
@@ -466,7 +466,7 @@ void AlarmTimeWidget::slotTimer()
{
// The current date has reached or has passed the maximum date
if (now.date() > mMaxDateTime.date()
- || !mAnyTime && now.time() > mTimeEdit->maxTime())
+ || (!mAnyTime && now.time() > mTimeEdit->maxTime()))
{
mPastMax = true;
emit pastMax();
diff --git a/kalarm/editdlg.cpp b/kalarm/editdlg.cpp
index f6e1f0b08..bf500920d 100644
--- a/kalarm/editdlg.cpp
+++ b/kalarm/editdlg.cpp
@@ -1052,8 +1052,8 @@ bool EditAlarmDlg::stateChanged() const
{
if (mSavedTemplateName != mTemplateName->text()
|| mSavedTemplateTimeType != mTemplateTimeGroup->selected()
- || mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time()
- || mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value())
+ || (mTemplateUseTime->isOn() && mSavedTemplateTime != mTemplateTime->time())
+ || (mTemplateUseTimeAfter->isOn() && mSavedTemplateAfterTime != mTemplateTimeAfter->value()))
return true;
}
else
@@ -1061,7 +1061,7 @@ bool EditAlarmDlg::stateChanged() const
return true;
if (mSavedTypeRadio != mActionGroup->selected()
|| mSavedLateCancel != mLateCancel->minutes()
- || mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked()
+ || (mShowInKorganizer && mSavedShowInKorganizer != mShowInKorganizer->isChecked())
|| textFileCommandMessage != mSavedTextFileCommandMessage
|| mSavedRecurrenceType != mRecurrenceEdit->repeatType())
return true;
@@ -1114,7 +1114,7 @@ bool EditAlarmDlg::stateChanged() const
TQStringList emailAttach;
for (int i = 0; i < mEmailAttachList->count(); ++i)
emailAttach += mEmailAttachList->text(i);
- if (mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName()
+ if ((mEmailFromList && mSavedEmailFrom != mEmailFromList->currentIdentityName())
|| mSavedEmailTo != mEmailToEdit->text()
|| mSavedEmailSubject != mEmailSubjectEdit->text()
|| mSavedEmailAttach != emailAttach
@@ -1214,8 +1214,8 @@ void EditAlarmDlg::setEvent(KAEvent& event, const TQString& text, bool trial)
mRecurrenceEdit->updateEvent(event, !mTemplate);
TQDateTime now = TQDateTime::currentDateTime();
bool dateOnly = mAlarmDateTime.isDateOnly();
- if (dateOnly && mAlarmDateTime.date() < now.date()
- || !dateOnly && mAlarmDateTime.rawDateTime() < now)
+ if ((dateOnly && mAlarmDateTime.date() < now.date())
+ || (!dateOnly && mAlarmDateTime.rawDateTime() < now))
{
// A timed recurrence has an entered start date which has
// already expired, so we must adjust the next repetition.
@@ -1383,16 +1383,16 @@ void EditAlarmDlg::slotOk()
{
TQDateTime now = TQDateTime::currentDateTime();
if (mAlarmDateTime.date() < now.date()
- || mAlarmDateTime.date() == now.date()
- && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
+ || (mAlarmDateTime.date() == now.date()
+ && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
{
// A timed recurrence has an entered start date which
// has already expired, so we must adjust it.
KAEvent event;
getEvent(event); // this may adjust mAlarmDateTime
if (( mAlarmDateTime.date() < now.date()
- || mAlarmDateTime.date() == now.date()
- && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time())
+ || (mAlarmDateTime.date() == now.date()
+ && !mAlarmDateTime.isDateOnly() && mAlarmDateTime.time() < now.time()))
&& event.nextOccurrence(now, mAlarmDateTime, KAEvent::ALLOW_FOR_REPETITION) == KAEvent::NO_OCCURRENCE)
{
KMessageBox::sorry(this, i18n("Recurrence has already expired"));
@@ -1443,7 +1443,7 @@ void EditAlarmDlg::slotOk()
return;
}
if (recurEvent.repeatInterval() % 1440
- && (mTemplate && mTemplateAnyTime->isOn() || !mTemplate && mAlarmDateTime.isDateOnly()))
+ && ((mTemplate && mTemplateAnyTime->isOn()) || (!mTemplate && mAlarmDateTime.isDateOnly())))
{
KMessageBox::sorry(this, i18n("For a repetition within the recurrence, its period must be in units of days or weeks for a date-only alarm"));
mRecurrenceEdit->activateSubRepetition(); // display the alarm repetition dialog again
diff --git a/kalarm/editdlg.h b/kalarm/editdlg.h
index 1b2b0a492..93a3de076 100644
--- a/kalarm/editdlg.h
+++ b/kalarm/editdlg.h
@@ -58,7 +58,7 @@ class PickAlarmFileRadio;
class EditAlarmDlg : public KDialogBase
{
Q_OBJECT
-
+
public:
enum MessageType { MESSAGE, FILE };
enum CmdLogType { DISCARD_OUTPUT, LOG_TO_FILE, EXEC_IN_TERMINAL };
@@ -71,25 +71,25 @@ class EditAlarmDlg : public KDialogBase
static CheckBox* createConfirmAckCheckbox(TQWidget* parent, const char* name = 0);
- static TQString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
- static TQString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
- static TQString i18n_SpecialActions(); // plain text of 'Special Actions...' button
- static TQString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
- static TQString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
- static TQString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
- static TQString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
- static TQString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
- static TQString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
- static TQString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
- static TQString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
- static TQString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
- static TQString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
- static TQString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
- static TQString i18n_EmailFrom(); // plain text of 'From:' (email address)
- static TQString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
- static TQString i18n_EmailTo(); // plain text of 'To:' (email addressee)
- static TQString i18n_EmailSubject(); // plain text of 'Subject:' (email)
- static TQString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
+ static TQString i18n_ConfirmAck(); // plain text of 'Confirm acknowledgement' checkbox
+ static TQString i18n_k_ConfirmAck(); // text of 'Confirm acknowledgement' checkbox, with 'k' shortcut
+ static TQString i18n_SpecialActions(); // plain text of 'Special Actions...' button
+ static TQString i18n_ShowInKOrganizer(); // plain text of 'Show in KOrganizer' checkbox
+ static TQString i18n_g_ShowInKOrganizer(); // text of 'Show in KOrganizer' checkbox, with 'G' shortcut
+ static TQString i18n_EnterScript(); // plain text of 'Enter a script' checkbox
+ static TQString i18n_p_EnterScript(); // text of 'Enter a script' checkbox, with 'P' shortcut
+ static TQString i18n_ExecInTermWindow(); // plain text of 'Execute in terminal window' checkbox
+ static TQString i18n_w_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'W' shortcut
+ static TQString i18n_u_ExecInTermWindow(); // text of 'Execute in terminal window' radio button, with 'U' shortcut
+ static TQString i18n_g_LogToFile(); // text of 'Log to file' radio button, with 'G' shortcut
+ static TQString i18n_CopyEmailToSelf(); // plain text of 'Copy email to self' checkbox
+ static TQString i18n_e_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'E' shortcut
+ static TQString i18n_s_CopyEmailToSelf(); // text of 'Copy email to self' checkbox, with 'S' shortcut
+ static TQString i18n_EmailFrom(); // plain text of 'From:' (email address)
+ static TQString i18n_f_EmailFrom(); // text of 'From:' (email address), with 'F' shortcut
+ static TQString i18n_EmailTo(); // plain text of 'To:' (email addressee)
+ static TQString i18n_EmailSubject(); // plain text of 'Subject:' (email)
+ static TQString i18n_j_EmailSubject(); // text of 'Subject:' (email), with 'J' shortcut
protected:
virtual void resizeEvent(TQResizeEvent*);
@@ -132,7 +132,7 @@ class EditAlarmDlg : public KDialogBase
void saveState(const KAEvent*);
bool stateChanged() const;
- TQTabWidget* mTabs; // the tabs in the dialog
+ TQTabWidget* mTabs; // the tabs in the dialog
int mMainPageIndex;
int mRecurPageIndex;
bool mMainPageShown; // true once the main tab has been displayed
@@ -144,10 +144,10 @@ class EditAlarmDlg : public KDialogBase
RadioButton* mCommandRadio;
PickAlarmFileRadio* mFileRadio;
RadioButton* mEmailRadio;
- TQWidgetStack* mAlarmTypeStack;
+ TQWidgetStack* mAlarmTypeStack;
// Templates
- TQLineEdit* mTemplateName;
+ TQLineEdit* mTemplateName;
ButtonGroup* mTemplateTimeGroup;
RadioButton* mTemplateDefaultTime; // no alarm time is specified
RadioButton* mTemplateUseTimeAfter;// alarm time is specified as an offset from current
@@ -157,14 +157,14 @@ class EditAlarmDlg : public KDialogBase
TimeEdit* mTemplateTime; // the alarm time which is specified
// Display alarm options widgets
- TQFrame* mDisplayAlarmsFrame;
- TQHBox* mFileBox;
- TQHBox* mFilePadding;
+ TQFrame* mDisplayAlarmsFrame;
+ TQHBox* mFileBox;
+ TQHBox* mFilePadding;
SoundPicker* mSoundPicker;
CheckBox* mConfirmAck;
FontColourButton* mFontColourButton; // for text display option
ColourCombo* mBgColourButton; // for file display option
- TQHBox* mBgColourBox;
+ TQHBox* mBgColourBox;
SpecialActionsButton* mSpecialActionsButton;
Reminder* mReminder;
bool mReminderDeferral;
@@ -173,32 +173,32 @@ class EditAlarmDlg : public KDialogBase
TextEdit* mTextMessageEdit; // text message edit box
// Text file alarm widgets
LineEdit* mFileMessageEdit; // text file URL edit box
- TQPushButton* mFileBrowseButton; // text file browse button
- TQString mFileDefaultDir; // default directory for browse button
+ TQPushButton* mFileBrowseButton; // text file browse button
+ TQString mFileDefaultDir; // default directory for browse button
// Command alarm widgets
- TQFrame* mCommandFrame;
+ TQFrame* mCommandFrame;
CheckBox* mCmdTypeScript; // entering a script
LineEdit* mCmdCommandEdit; // command line edit box
TextEdit* mCmdScriptEdit; // script edit box
ButtonGroup* mCmdOutputGroup; // what to do with command output
LineEdit* mCmdLogFileEdit; // log file URL edit box
- TQWidget* mCmdPadding;
+ TQWidget* mCmdPadding;
// Email alarm widgets
- TQFrame* mEmailFrame;
+ TQFrame* mEmailFrame;
EmailIdCombo* mEmailFromList;
LineEdit* mEmailToEdit;
- TQPushButton* mEmailAddressButton; // email open address book button
- TQLineEdit* mEmailSubjectEdit;
+ TQPushButton* mEmailAddressButton; // email open address book button
+ TQLineEdit* mEmailSubjectEdit;
TextEdit* mEmailMessageEdit; // email body edit box
- TQComboBox* mEmailAttachList;
- TQPushButton* mEmailAddAttachButton;
- TQPushButton* mEmailRemoveButton;
+ TQComboBox* mEmailAttachList;
+ TQPushButton* mEmailAddAttachButton;
+ TQPushButton* mEmailRemoveButton;
CheckBox* mEmailBcc;
- TQString mAttachDefaultDir;
+ TQString mAttachDefaultDir;
- TQGroupBox* mDeferGroup;
- TQLabel* mDeferTimeLabel;
- TQPushButton* mDeferChangeButton;
+ TQGroupBox* mDeferGroup;
+ TQLabel* mDeferTimeLabel;
+ TQPushButton* mDeferChangeButton;
AlarmTimeWidget* mTimeWidget;
LateCancelSelector* mLateCancel;
@@ -206,11 +206,11 @@ class EditAlarmDlg : public KDialogBase
RecurrenceEdit* mRecurrenceEdit;
- TQString mAlarmMessage; // message text/file name/command/email message
+ TQString mAlarmMessage; // message text/file name/command/email message
DateTime mAlarmDateTime;
DateTime mDeferDateTime;
EmailAddressList mEmailAddresses; // list of addresses to send email to
- TQStringList mEmailAttachments; // list of email attachment file names
+ TQStringList mEmailAttachments; // list of email attachment file names
unsigned long mKMailSerialNumber; // if email text, message's KMail serial number, else 0
int mDeferGroupHeight; // height added by deferred time widget
int mDesktop; // desktop to display the dialog in
@@ -223,34 +223,34 @@ class EditAlarmDlg : public KDialogBase
// Initial state of all controls
KAEvent* mSavedEvent;
- TQString mSavedTemplateName; // mTemplateName value
- TQButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
- TQTime mSavedTemplateTime; // mTemplateTime value
+ TQString mSavedTemplateName; // mTemplateName value
+ TQButton* mSavedTemplateTimeType; // selected button in mTemplateTimeGroup
+ TQTime mSavedTemplateTime; // mTemplateTime value
int mSavedTemplateAfterTime; // mTemplateAfterTime value
- TQButton* mSavedTypeRadio; // mMessageRadio, etc
+ TQButton* mSavedTypeRadio; // mMessageRadio, etc
SoundPicker::Type mSavedSoundType; // mSoundPicker sound type
bool mSavedRepeatSound; // mSoundPicker repeat status
- TQString mSavedSoundFile; // mSoundPicker sound file
+ TQString mSavedSoundFile; // mSoundPicker sound file
float mSavedSoundVolume; // mSoundPicker volume
float mSavedSoundFadeVolume;// mSoundPicker fade volume
int mSavedSoundFadeSeconds;// mSoundPicker fade time
bool mSavedConfirmAck; // mConfirmAck status
- TQFont mSavedFont; // mFontColourButton font
- TQColor mSavedBgColour; // mFontColourButton background colour
- TQColor mSavedFgColour; // mFontColourButton foreground colour
- TQString mSavedPreAction; // mSpecialActionsButton pre-alarm action
- TQString mSavedPostAction; // mSpecialActionsButton post-alarm action
+ TQFont mSavedFont; // mFontColourButton font
+ TQColor mSavedBgColour; // mFontColourButton background colour
+ TQColor mSavedFgColour; // mFontColourButton foreground colour
+ TQString mSavedPreAction; // mSpecialActionsButton pre-alarm action
+ TQString mSavedPostAction; // mSpecialActionsButton post-alarm action
int mSavedReminder; // mReminder value
bool mSavedOnceOnly; // mReminder once-only status
- TQString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
- TQString mSavedEmailFrom; // mEmailFromList current value
- TQString mSavedEmailTo; // mEmailToEdit value
- TQString mSavedEmailSubject; // mEmailSubjectEdit value
- TQStringList mSavedEmailAttach; // mEmailAttachList values
+ TQString mSavedTextFileCommandMessage; // mTextMessageEdit/mFileMessageEdit/mCmdCommandEdit/mEmailMessageEdit value
+ TQString mSavedEmailFrom; // mEmailFromList current value
+ TQString mSavedEmailTo; // mEmailToEdit value
+ TQString mSavedEmailSubject; // mEmailSubjectEdit value
+ TQStringList mSavedEmailAttach; // mEmailAttachList values
bool mSavedEmailBcc; // mEmailBcc status
bool mSavedCmdScript; // mCmdTypeScript status
- TQButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
- TQString mSavedCmdLogFile; // mCmdLogFileEdit value
+ TQButton* mSavedCmdOutputRadio; // selected button in mCmdOutputGroup
+ TQString mSavedCmdLogFile; // mCmdLogFileEdit value
DateTime mSavedDateTime; // mTimeWidget value
int mSavedRecurrenceType; // RecurrenceEdit::RepeatType value
int mSavedLateCancel; // mLateCancel value
diff --git a/kalarm/eventlistviewbase.cpp b/kalarm/eventlistviewbase.cpp
index eea2f8743..14a7afd62 100644
--- a/kalarm/eventlistviewbase.cpp
+++ b/kalarm/eventlistviewbase.cpp
@@ -459,7 +459,7 @@ TQString EventListWhatsThisBase::text(const TQPoint& pt)
TQPoint viewportPt = mListView->viewport()->mapFrom(mListView, pt);
TQRect frame = mListView->header()->frameGeometry();
if (frame.contains(pt)
- || mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y())))
+ || (mListView->itemAt(TQPoint(mListView->itemMargin(), viewportPt.y())) && frame.contains(TQPoint(pt.x(), frame.y()))))
column = mListView->header()->sectionAt(pt.x());
return mListView->whatsThisText(column);
}
diff --git a/kalarm/find.cpp b/kalarm/find.cpp
index 9a469e57a..8e35cbe91 100644
--- a/kalarm/find.cpp
+++ b/kalarm/find.cpp
@@ -1,5 +1,5 @@
/*
- * find.cpp - search facility
+ * find.cpp - search facility
* Program: kalarm
* Copyright © 2005,2006,2008 by David Jarvie <djarvie@kde.org>
*
@@ -298,8 +298,8 @@ void Find::findNext(bool forward, bool sort, bool checkEnd, bool fromCurrent)
last = true; // we've wrapped round and reached the starting alarm again
fromCurrent = false;
bool live = !event.expired();
- if (live && !(mOptions & FIND_LIVE)
- || !live && !(mOptions & FIND_EXPIRED))
+ if ((live && !(mOptions & FIND_LIVE))
+ || (!live && !(mOptions & FIND_EXPIRED)))
continue; // we're not searching this type of alarm
switch (event.action())
{
diff --git a/kalarm/functions.cpp b/kalarm/functions.cpp
index cd1f95d57..b92e3f3e8 100644
--- a/kalarm/functions.cpp
+++ b/kalarm/functions.cpp
@@ -61,10 +61,10 @@
namespace
{
bool resetDaemonQueued = false;
-TQCString korganizerName = "korganizer";
-TQString korgStartError;
+TQCString korganizerName = "korganizer";
+TQString korgStartError;
#define KORG_DCOP_OBJECT "KOrganizerIface"
-const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow";
+//const char* KORG_DCOP_WINDOW = "KOrganizer MainWindow"; // not used
const char* KMAIL_DCOP_WINDOW = "kmail-mainwindow#1";
bool sendToKOrganizer(const KAEvent&);
diff --git a/kalarm/kalarmapp.cpp b/kalarm/kalarmapp.cpp
index 7530b14ac..476a8c1f8 100644
--- a/kalarm/kalarmapp.cpp
+++ b/kalarm/kalarmapp.cpp
@@ -229,7 +229,7 @@ bool KAlarmApp::restoreSession()
// Try to display the system tray icon if it is configured to be autostarted,
// or if we're in run-in-system-tray mode.
if (Preferences::autostartTrayIcon()
- || MainWindow::count() && wantRunInSystemTray())
+ || (MainWindow::count() && wantRunInSystemTray()))
{
displayTrayIcon(true, trayParent);
// Occasionally for no obvious reason, the main main window is
@@ -786,7 +786,7 @@ void KAlarmApp::quitIf(int exitCode, bool force)
return;
int mwcount = MainWindow::count();
MainWindow* mw = mwcount ? MainWindow::firstWindow() : 0;
- if (mwcount > 1 || mwcount && (!mw->isHidden() || !mw->isTrayParent()))
+ if (mwcount > 1 || (mwcount && (!mw->isHidden() || !mw->isTrayParent())))
return;
// There are no windows left except perhaps a main window which is a hidden tray icon parent
if (mTrayWindow)
@@ -1328,7 +1328,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
if (now >= limit)
{
if (type == KAEvent::LAST_RECURRENCE
- || type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs())
+ || (type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()))
cancel = true; // last occurrence (and there are no repetitions)
else
late = true;
@@ -1360,7 +1360,7 @@ bool KAlarmApp::handleEvent(const TQString& eventID, EventFunc function)
if (next.dateTime().secsTo(now) > maxlate)
{
if (type == KAEvent::LAST_RECURRENCE
- || type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs())
+ || (type == KAEvent::FIRST_OR_ONLY_OCCURRENCE && !event.recurs()))
cancel = true; // last occurrence (and there are no repetitions)
else
late = true;
@@ -1621,7 +1621,7 @@ void* KAlarmApp::execAlarm(KAEvent& event, const KAAlarm& alarm, bool reschedule
if (!event.enabled())
delete win; // event is disabled - close its window
else if (!win
- || !win->hasDefer() && !alarm.repeatAtLogin()
+ || (!win->hasDefer() && !alarm.repeatAtLogin())
|| replaceReminder)
{
// Either there isn't already a message for this event,
diff --git a/kalarm/kalarmd/adcalendar.cpp b/kalarm/kalarmd/adcalendar.cpp
index a2cc4836a..b1033eb04 100644
--- a/kalarm/kalarmd/adcalendar.cpp
+++ b/kalarm/kalarmd/adcalendar.cpp
@@ -153,8 +153,8 @@ bool ADCalendar::eventHandled(const KCal::Event* event, const TQValueList<TQDate
if (alarmtimes[i].isValid()
&& (i >= oldCount // is it an additional alarm?
|| !it.data().alarmTimes[i].isValid() // or has it just become due?
- || it.data().alarmTimes[i].isValid() // or has it changed?
- && alarmtimes[i] != it.data().alarmTimes[i]))
+ || (it.data().alarmTimes[i].isValid() // or has it changed?
+ && alarmtimes[i] != it.data().alarmTimes[i])))
return false; // this alarm has changed
}
return true;
diff --git a/kalarm/kalarmd/alarmdaemon.cpp b/kalarm/kalarmd/alarmdaemon.cpp
index 4af7f0de7..3b7f7456f 100644
--- a/kalarm/kalarmd/alarmdaemon.cpp
+++ b/kalarm/kalarmd/alarmdaemon.cpp
@@ -312,7 +312,7 @@ void AlarmDaemon::enableAutoStart(bool on)
{
ADConfigData::enableAutoStart(on);
}
-
+
/******************************************************************************
* Check if any alarms are pending for any enabled calendar, and display the
* pending alarms.
@@ -449,7 +449,7 @@ void AlarmDaemon::checkAlarms(ADCalendar* cal)
}
}
if (!dt.isValid() || dt > now
- || dt1.isValid() && dt1 > dt) // already tested dt1 <= now
+ || (dt1.isValid() && dt1 > dt)) // already tested dt1 <= now
dt = dt1;
}
alarmtimes.append(dt);
diff --git a/kalarm/karecurrence.cpp b/kalarm/karecurrence.cpp
index 8b7e9068f..b6051ca3c 100644
--- a/kalarm/karecurrence.cpp
+++ b/kalarm/karecurrence.cpp
@@ -110,8 +110,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
if (count < -1)
return false;
bool dateOnly = start.isDateOnly();
- if (!count && (!dateOnly && !end.isValid()
- || dateOnly && !end.date().isValid()))
+ if (!count && ((!dateOnly && !end.isValid())
+ || (dateOnly && !end.date().isValid())))
return false;
switch (recurType)
{
@@ -134,8 +134,8 @@ bool KARecurrence::init(RecurrenceRule::PeriodType recurType, int freq, int coun
else
setEndDateTime(end);
TQDateTime startdt = start.dateTime();
- if (recurType == RecurrenceRule::rYearly
- && feb29Type == FEB29_FEB28 || feb29Type == FEB29_MAR1)
+ if ((recurType == RecurrenceRule::rYearly
+ && feb29Type == FEB29_FEB28) || feb29Type == FEB29_MAR1)
{
int year = startdt.date().year();
if (!TQDate::leapYear(year)
@@ -257,7 +257,7 @@ void KARecurrence::fix()
{
// This is the second rule.
// Ensure that it can be combined with the first one.
- if (day == days[0] || day == -1 && days[0] == 60
+ if (day == days[0] || (day == -1 && days[0] == 60)
|| rrule->frequency() != rrules[0]->frequency()
|| rrule->startDt() != rrules[0]->startDt())
break;
diff --git a/kalarm/karecurrence.h b/kalarm/karecurrence.h
index f574cd59a..570f1f0cb 100644
--- a/kalarm/karecurrence.h
+++ b/kalarm/karecurrence.h
@@ -62,11 +62,11 @@ class KARecurrence : public KCal::Recurrence
{ return init(t, freq, count, f29, start, end); }
void fix();
void writeRecurrence(KCal::Recurrence&) const;
- TQDateTime endDateTime() const;
- TQDate endDate() const;
+ TQDateTime endDateTime() const;
+ TQDate endDate() const;
bool recursOn(const TQDate&) const;
- TQDateTime getNextDateTime(const TQDateTime& preDateTime) const;
- TQDateTime getPreviousDateTime(const TQDateTime& afterDateTime) const;
+ TQDateTime getNextDateTime(const TQDateTime& preDateTime) const;
+ TQDateTime getPreviousDateTime(const TQDateTime& afterDateTime) const;
int longestInterval() const;
Type type() const;
static Type type(const KCal::RecurrenceRule*);
diff --git a/kalarm/lib/datetime.h b/kalarm/lib/datetime.h
index bcfa434b1..d75aa94d5 100644
--- a/kalarm/lib/datetime.h
+++ b/kalarm/lib/datetime.h
@@ -73,7 +73,7 @@ class DateTime
/** Returns true if the date is null and, if it is a date-time value, the time is also null. */
bool isNull() const { return mDateTime.date().isNull() && (mDateOnly || mDateTime.time().isNull()); }
/** Returns true if the date is valid and, if it is a date-time value, the time is also valid. */
- bool isValid() const { return mDateTime.date().isValid() && (mDateOnly || mTimeValid && mDateTime.time().isValid()); }
+ bool isValid() const { return mDateTime.date().isValid() && (mDateOnly || (mTimeValid && mDateTime.time().isValid())); }
/** Returns true if it is date-only value. */
bool isDateOnly() const { return mDateOnly; }
/** Sets the value to be either date-only or date-time.
@@ -209,8 +209,8 @@ class DateTime
private:
static TQTime mStartOfDay;
TQDateTime mDateTime;
- bool mDateOnly;
- bool mTimeValid; // whether the time is potentially valid - applicable only if mDateOnly false
+ bool mDateOnly;
+ bool mTimeValid; // whether the time is potentially valid - applicable only if mDateOnly false
};
/** Returns true if the two values are equal. */
diff --git a/kalarm/lib/lineedit.cpp b/kalarm/lib/lineedit.cpp
index 4e40e2c7d..f561540ef 100644
--- a/kalarm/lib/lineedit.cpp
+++ b/kalarm/lib/lineedit.cpp
@@ -99,8 +99,8 @@ void LineEdit::dragEnterEvent(TQDragEnterEvent* e)
e->accept(false); // don't accept "text/calendar" objects
e->accept(TQTextDrag::canDecode(e)
|| KURLDrag::canDecode(e)
- || mType != Url && KPIM::MailListDrag::canDecode(e)
- || mType == Emails && KVCardDrag::canDecode(e));
+ || (mType != Url && KPIM::MailListDrag::canDecode(e))
+ || (mType == Emails && KVCardDrag::canDecode(e)));
}
void LineEdit::dropEvent(TQDropEvent* e)
diff --git a/kalarm/lib/shellprocess.cpp b/kalarm/lib/shellprocess.cpp
index c8ea891c4..1ed64df72 100644
--- a/kalarm/lib/shellprocess.cpp
+++ b/kalarm/lib/shellprocess.cpp
@@ -86,8 +86,8 @@ void ShellProcess::slotExited(TDEProcess* proc)
{
// Some shells report if the command couldn't be found, or is not executable
int status = proc->exitStatus();
- if (mShellName == "bash" && (status == 126 || status == 127)
- || mShellName == "ksh" && status == 127)
+ if ((mShellName == "bash" && (status == 126 || status == 127))
+ || (mShellName == "ksh" && status == 127))
{
kdWarning(5950) << "ShellProcess::slotExited(" << mCommand << ") " << mShellName << ": not found or not executable\n";
mStatus = NOT_FOUND;
diff --git a/kalarm/lib/timeedit.cpp b/kalarm/lib/timeedit.cpp
index 51760fc49..80713f2fe 100644
--- a/kalarm/lib/timeedit.cpp
+++ b/kalarm/lib/timeedit.cpp
@@ -77,8 +77,7 @@ bool TimeEdit::isValid() const
void TimeEdit::setValid(bool valid)
{
bool oldValid = mSpinBox->isValid();
- if (valid && !oldValid
- || !valid && oldValid)
+ if ((valid && !oldValid) || (!valid && oldValid))
{
mSpinBox->setValid(valid);
if (mAmPm)
diff --git a/kalarm/lib/timeperiod.cpp b/kalarm/lib/timeperiod.cpp
index 7f3706303..37c787029 100644
--- a/kalarm/lib/timeperiod.cpp
+++ b/kalarm/lib/timeperiod.cpp
@@ -207,7 +207,7 @@ void TimePeriod::setMinutes(int mins, bool dateOnly, TimePeriod::Units defaultUn
else if (item > mMaxUnitShown)
item = mMaxUnitShown;
mUnitsCombo->setCurrentItem(item - mDateOnlyOffset);
- if (dateOnly && !mDateOnlyOffset || !dateOnly && mDateOnlyOffset)
+ if ((dateOnly && !mDateOnlyOffset) || (!dateOnly && mDateOnlyOffset))
item = setDateOnly(mins, dateOnly, false);
}
showHourMin(item == HOURS_MINUTES && !mNoHourMinute);
diff --git a/kalarm/recurrenceedit.cpp b/kalarm/recurrenceedit.cpp
index 4a39022e4..1ccb94d2a 100644
--- a/kalarm/recurrenceedit.cpp
+++ b/kalarm/recurrenceedit.cpp
@@ -453,8 +453,8 @@ void RecurrenceEdit::periodClicked(int id)
void RecurrenceEdit::slotAnyTimeToggled(bool on)
{
TQButton* button = mRuleButtonGroup->selected();
- mEndTimeEdit->setEnabled(button == mAtLoginButton && !on
- || button == mSubDailyButton && mEndDateButton->isChecked());
+ mEndTimeEdit->setEnabled((button == mAtLoginButton && !on)
+ || (button == mSubDailyButton && mEndDateButton->isChecked()));
}
/******************************************************************************
@@ -465,7 +465,7 @@ void RecurrenceEdit::rangeTypeClicked()
bool endDate = mEndDateButton->isOn();
mEndDateEdit->setEnabled(endDate);
mEndTimeEdit->setEnabled(endDate
- && (mAtLoginButton->isOn() && !mEndAnyTimeCheckBox->isChecked()
+ && ((mAtLoginButton->isOn() && !mEndAnyTimeCheckBox->isChecked())
|| mSubDailyButton->isOn()));
bool repeatCount = mRepeatCountButton->isOn();
mRepeatCountEntry->setEnabled(repeatCount);
@@ -480,7 +480,7 @@ void RecurrenceEdit::showEvent(TQShowEvent*)
mRuleButtonGroup->selected()->setFocus();
emit shown();
}
-
+
/******************************************************************************
* Return the sub-repetition count within the recurrence, i.e. the number of
* repetitions after the main recurrence.
@@ -997,7 +997,7 @@ bool RecurrenceEdit::stateChanged() const
{
if (mSavedRuleButton != mRuleButtonGroup->selected()
|| mSavedRangeButton != mRangeButtonGroup->selected()
- || mRule && mRule->stateChanged())
+ || (mRule && mRule->stateChanged()))
return true;
if (mSavedRangeButton == mRepeatCountButton
&& mSavedRecurCount != mRepeatCountEntry->value())
diff --git a/kalarm/recurrenceedit.h b/kalarm/recurrenceedit.h
index 82ab954c6..ce99522f7 100644
--- a/kalarm/recurrenceedit.h
+++ b/kalarm/recurrenceedit.h
@@ -56,7 +56,7 @@ class YearlyRule;
class RecurrenceEdit : public TQFrame
{
Q_OBJECT
-
+
public:
// Don't alter the order of these recurrence types
enum RepeatType { INVALID_RECUR = -1, NO_RECUR, AT_LOGIN, SUBDAILY, DAILY, WEEKLY, MONTHLY, ANNUAL };
@@ -70,7 +70,7 @@ class RecurrenceEdit : public TQFrame
void set(const KAEvent&, bool keepDuration);
/** Write recurrence settings into an event */
void updateEvent(KAEvent&, bool adjustStart);
- TQWidget* checkData(const TQDateTime& startDateTime, TQString& errorMessage) const;
+ TQWidget* checkData(const TQDateTime& startDateTime, TQString& errorMessage) const;
RepeatType repeatType() const { return mRuleButtonType; }
bool isTimedRepeatType() const { return mRuleButtonType >= SUBDAILY; }
int subRepeatCount(int* subRepeatInterval = 0) const;
@@ -124,7 +124,7 @@ class RecurrenceEdit : public TQFrame
void saveState();
// Main rule box and choices
- TQWidgetStack* mRuleStack;
+ TQWidgetStack* mRuleStack;
Rule* mRule; // current rule widget, or 0 if NoRule
NoRule* mNoRule;
SubDailyRule* mSubDailyRule;
@@ -159,32 +159,32 @@ class RecurrenceEdit : public TQFrame
RadioButton* mNoEndDateButton;
RadioButton* mRepeatCountButton;
SpinBox* mRepeatCountEntry;
- TQLabel* mRepeatCountLabel;
+ TQLabel* mRepeatCountLabel;
RadioButton* mEndDateButton;
DateEdit* mEndDateEdit;
TimeEdit* mEndTimeEdit;
CheckBox* mEndAnyTimeCheckBox;
// Exceptions
- TQGroupBox* mExceptionGroup;
- TQListBox* mExceptionDateList;
+ TQGroupBox* mExceptionGroup;
+ TQListBox* mExceptionDateList;
DateEdit* mExceptionDateEdit;
- TQPushButton* mChangeExceptionButton;
- TQPushButton* mDeleteExceptionButton;
+ TQPushButton* mChangeExceptionButton;
+ TQPushButton* mDeleteExceptionButton;
TQValueList<TQDate> mExceptionDates;
// Current start date and time
- TQDateTime mCurrStartDateTime;
+ TQDateTime mCurrStartDateTime;
RepetitionButton* mSubRepetition;
bool mNoEmitTypeChanged; // suppress typeChanged() signal
bool mReadOnly;
// Initial state of non-rule controls
- TQButton* mSavedRuleButton; // which rule button was selected
- TQButton* mSavedRangeButton; // which range button was selected
+ TQButton* mSavedRuleButton; // which rule button was selected
+ TQButton* mSavedRangeButton; // which range button was selected
int mSavedRecurCount; // recurrence repeat count
DateTime mSavedEndDateTime; // end date/time
- TQValueList<TQDate> mSavedExceptionDates; // exception dates
+ TQValueList<TQDate> mSavedExceptionDates; // exception dates
int mSavedRepeatInterval; // sub-repetition interval (via mSubRepetition button)
int mSavedRepeatCount; // sub-repetition count (via mSubRepetition button)
};
diff --git a/kalarm/recurrenceeditprivate.h b/kalarm/recurrenceeditprivate.h
index 6a239ae78..a38248512 100644
--- a/kalarm/recurrenceeditprivate.h
+++ b/kalarm/recurrenceeditprivate.h
@@ -41,39 +41,39 @@ class NoRule : public TQFrame
public:
NoRule(TQWidget* parent, const char* name = 0) : TQFrame(parent, name)
{ setFrameStyle(TQFrame::NoFrame); }
- virtual int frequency() const { return 0; }
+ virtual int frequency() const { return 0; }
};
class Rule : public NoRule
{
Q_OBJECT
-
+
public:
Rule(const TQString& freqText, const TQString& freqWhatsThis, bool time, bool readOnly,
TQWidget* parent, const char* name = 0);
- int frequency() const;
- void setFrequency(int);
- virtual void setFrequencyFocus() { mSpinBox->setFocus(); }
+ int frequency() const;
+ void setFrequency(int);
+ virtual void setFrequencyFocus() { mSpinBox->setFocus(); }
TQVBoxLayout* layout() const { return mLayout; }
virtual TQWidget* validate(TQString&) { return 0; }
- virtual void saveState();
- virtual bool stateChanged() const;
+ virtual void saveState();
+ virtual bool stateChanged() const;
signals:
- void frequencyChanged();
+ void frequencyChanged();
private:
TQWidget* mSpinBox;
- SpinBox* mIntSpinBox;
- TimeSpinBox* mTimeSpinBox;
+ SpinBox* mIntSpinBox;
+ TimeSpinBox* mTimeSpinBox;
TQVBoxLayout* mLayout;
// Saved state of all controls
- int mSavedFrequency; // frequency for the selected rule
+ int mSavedFrequency; // frequency for the selected rule
};
// Subdaily rule choices
class SubDailyRule : public Rule
{
Q_OBJECT
-
+
public:
SubDailyRule(bool readOnly, TQWidget* parent, const char* name = 0);
};
@@ -82,19 +82,19 @@ class SubDailyRule : public Rule
class DayWeekRule : public Rule
{
Q_OBJECT
-
+
public:
DayWeekRule(const TQString& freqText, const TQString& freqWhatsThis, const TQString& daysWhatsThis,
bool readOnly, TQWidget* parent, const char* name = 0);
TQBitArray days() const;
- void setDays(bool);
- void setDays(const TQBitArray& days);
- void setDay(int dayOfWeek);
+ void setDays(bool);
+ void setDays(const TQBitArray& days);
+ void setDay(int dayOfWeek);
virtual TQWidget* validate(TQString& errorMessage);
- virtual void saveState();
- virtual bool stateChanged() const;
+ virtual void saveState();
+ virtual bool stateChanged() const;
private:
- CheckBox* mDayBox[7];
+ CheckBox* mDayBox[7];
// Saved state of all controls
TQBitArray mSavedDays; // ticked days for weekly rule
};
@@ -117,7 +117,7 @@ class WeeklyRule : public DayWeekRule
class MonthYearRule : public Rule
{
Q_OBJECT
-
+
public:
enum DayPosType { DATE, POS };
@@ -172,30 +172,30 @@ class MonthlyRule : public MonthYearRule
class YearlyRule : public MonthYearRule
{
Q_OBJECT
-
+
public:
YearlyRule(bool readOnly, TQWidget* parent, const char* name = 0);
TQValueList<int> months() const;
- void setMonths(const TQValueList<int>& months);
- void setDefaultValues(int dayOfMonth, int dayOfWeek, int month);
+ void setMonths(const TQValueList<int>& months);
+ void setDefaultValues(int dayOfMonth, int dayOfWeek, int month);
KARecurrence::Feb29Type feb29Type() const;
- void setFeb29Type(KARecurrence::Feb29Type);
+ void setFeb29Type(KARecurrence::Feb29Type);
virtual TQWidget* validate(TQString& errorMessage);
- virtual void saveState();
- virtual bool stateChanged() const;
+ virtual void saveState();
+ virtual bool stateChanged() const;
protected:
- virtual void daySelected(int day);
+ virtual void daySelected(int day);
protected slots:
- virtual void clicked(int id);
+ virtual void clicked(int id);
private slots:
- void enableFeb29();
+ void enableFeb29();
private:
- CheckBox* mMonthBox[12];
+ CheckBox* mMonthBox[12];
TQLabel* mFeb29Label;
- ComboBox* mFeb29Combo;
+ ComboBox* mFeb29Combo;
// Saved state of all controls
TQValueList<int> mSavedMonths; // ticked months for yearly rule
- int mSavedFeb29Type; // February 29th recurrence type
+ int mSavedFeb29Type; // February 29th recurrence type
};
#endif // RECURRENCEEDITPRIVATE_H
diff --git a/kalarm/traywindow.cpp b/kalarm/traywindow.cpp
index 7eb6d2a44..93afa2e52 100644
--- a/kalarm/traywindow.cpp
+++ b/kalarm/traywindow.cpp
@@ -95,7 +95,7 @@ TrayWindow::TrayWindow(MainWindow* parent, const char* name)
// Replace the default handler for the Quit context menu item
const char* quitName = KStdAction::name(KStdAction::Quit);
actcol->remove(actcol->action(quitName));
- actcol->accel()->remove(quitName);
+ actcol->tdeaccel()->remove(quitName);
KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), actcol);
// Set icon to correspond with the alarms enabled menu status