summaryrefslogtreecommitdiffstats
path: root/kalarm/lib
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2015-08-07 17:06:29 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2015-08-07 17:06:29 +0900
commitc036d97d35d25c4511d9569d40c1de07dab96bb6 (patch)
treeabb9a42ff29a9c144450b6b6a5aafb851cbdc69c /kalarm/lib
parent74a91e13153f0696bb62baa78dac119f3a2e9fca (diff)
downloadtdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.tar.gz
tdepim-c036d97d35d25c4511d9569d40c1de07dab96bb6.zip
Fixed KAlarm building warnings. Minor style patch up. Fixed possible error in treating deferred evens (see kalarm/alarmevent.cpp:1739).
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kalarm/lib')
-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
5 files changed, 9 insertions, 10 deletions
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);