From c822d344caac7367564ef929037082e3374267be Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Fri, 7 Aug 2015 17:06:29 +0900 Subject: Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739). (cherry picked from commit c036d97d35d25c4511d9569d40c1de07dab96bb6) Signed-off-by: Michele Calgaro --- kalarm/editdlg.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'kalarm/editdlg.cpp') 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 -- cgit v1.2.1