Commit 772ac972 authored by Allen Winter's avatar Allen Winter
Browse files

agenda/agenda.cpp - fix condition testing for failed deletion

now we don't see "Failed to remove" messages on
successful incidence deletions.
parent b348c030
...@@ -1552,7 +1552,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch) ...@@ -1552,7 +1552,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
// Highlight working hours // Highlight working hours
if (d->mWorkingHoursEnable && d->mHolidayMask) { if (d->mWorkingHoursEnable && d->mHolidayMask) {
QColor workColor; QColor workColor;
if (!d->preferences()->useSystemColor()) { if (!d->preferences()->useSystemColor()) {
workColor = d->preferences()->workingHoursColor(); workColor = d->preferences()->workingHoursColor();
} else { } else {
...@@ -1615,10 +1615,10 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch) ...@@ -1615,10 +1615,10 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
} else { } else {
busyColor = palette().color(QPalette::Window); busyColor = palette().color(QPalette::Window);
if ((busyColor.blue() + busyColor.red() + busyColor.green()) > (256 / 2 * 3)) { if ((busyColor.blue() + busyColor.red() + busyColor.green()) > (256 / 2 * 3)) {
// dark // dark
busyColor = busyColor.lighter(140); busyColor = busyColor.lighter(140);
} else { } else {
// light // light
busyColor = busyColor.darker(140); busyColor = busyColor.darker(140);
} }
} }
...@@ -1664,7 +1664,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch) ...@@ -1664,7 +1664,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
// The grid colors are always computed as a function of the palette's windowText color. // The grid colors are always computed as a function of the palette's windowText color.
QPen hourPen; QPen hourPen;
QPen halfHourPen; QPen halfHourPen;
const QColor windowTextColor = palette().color(QPalette::WindowText); const QColor windowTextColor = palette().color(QPalette::WindowText);
if (windowTextColor.red() + windowTextColor.green() + windowTextColor.blue() < (256 / 2 * 3)) { if (windowTextColor.red() + windowTextColor.green() + windowTextColor.blue() < (256 / 2 * 3)) {
// dark grey line // dark grey line
...@@ -1675,7 +1675,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch) ...@@ -1675,7 +1675,7 @@ void Agenda::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
hourPen = windowTextColor.darker(150); hourPen = windowTextColor.darker(150);
halfHourPen = windowTextColor.darker(200); halfHourPen = windowTextColor.darker(200);
} }
dbp.setPen(hourPen); dbp.setPen(hourPen);
// Draw vertical lines of grid, start with the last line not yet visible // Draw vertical lines of grid, start with the last line not yet visible
...@@ -1991,7 +1991,7 @@ void Agenda::removeIncidence(const KCalendarCore::Incidence::Ptr &incidence) ...@@ -1991,7 +1991,7 @@ void Agenda::removeIncidence(const KCalendarCore::Incidence::Ptr &incidence)
if (incidence->instanceIdentifier() != agendaItem->incidence()->instanceIdentifier()) { if (incidence->instanceIdentifier() != agendaItem->incidence()->instanceIdentifier()) {
continue; continue;
} }
if (removeAgendaItem(agendaItem)) { if (!removeAgendaItem(agendaItem)) {
qCWarning(CALENDARVIEW_LOG) << "Agenda::removeIncidence() Failed to remove " qCWarning(CALENDARVIEW_LOG) << "Agenda::removeIncidence() Failed to remove "
<< incidence->uid(); << incidence->uid();
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment