Commit a348aea1 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix cppcheck warning

parent 9ce0afc0
...@@ -246,7 +246,7 @@ void AlarmDialog::fillCombo() ...@@ -246,7 +246,7 @@ void AlarmDialog::fillCombo()
items << i18n("Before the to-do is due") << i18n("After the to-do is due"); items << i18n("Before the to-do is due") << i18n("After the to-do is due");
} }
} else { } else {
if (mAllowEndReminders) { if (mAllowBeginReminders) {
items << i18n("Before the event starts") << i18n("After the event starts"); items << i18n("Before the event starts") << i18n("After the event starts");
} }
if (mAllowEndReminders) { if (mAllowEndReminders) {
......
...@@ -293,8 +293,7 @@ void IncidenceAttachment::showAttachment(QListWidgetItem *item) ...@@ -293,8 +293,7 @@ void IncidenceAttachment::showAttachment(QListWidgetItem *item)
void IncidenceAttachment::showContextMenu(const QPoint &pos) void IncidenceAttachment::showContextMenu(const QPoint &pos)
{ {
QListWidgetItem *item = mAttachmentView->itemAt(pos); const bool enable = mAttachmentView->itemAt(pos) != nullptr;
const bool enable = item != nullptr;
int numSelected = 0; int numSelected = 0;
for (int itemIndex = 0; itemIndex < mAttachmentView->count(); ++itemIndex) { for (int itemIndex = 0; itemIndex < mAttachmentView->count(); ++itemIndex) {
......
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