Commit 3d940a51 authored by Laurent Montel's avatar Laurent Montel 😁

Fix some warning

parent fd32bed7
......@@ -181,9 +181,8 @@ QStringList availablePresets(AlarmPresets::When when)
return *sBeforeStartPresetNames;
case AlarmPresets::BeforeEnd:
return *sBeforeEndPresetNames;
default:
return QStringList();
}
return QStringList();
}
KCalCore::Alarm::Ptr preset(When when, const QString &name)
......@@ -210,9 +209,8 @@ KCalCore::Alarm::Ptr preset(When when, const QString &name)
return KCalCore::Alarm::Ptr(
new KCalCore::Alarm(*sBeforeEndPresets->at(sBeforeEndPresetNames->indexOf(name))));
default:
return KCalCore::Alarm::Ptr();
}
return KCalCore::Alarm::Ptr();
}
KCalCore::Alarm::Ptr defaultAlarm(When when)
......@@ -224,9 +222,8 @@ KCalCore::Alarm::Ptr defaultAlarm(When when)
return Alarm::Ptr(new Alarm(*sBeforeStartPresets->at(sDefaultPresetIndex)));
case AlarmPresets::BeforeEnd:
return Alarm::Ptr(new Alarm(*sBeforeEndPresets->at(sDefaultPresetIndex)));
default:
return Alarm::Ptr();
}
return Alarm::Ptr();
}
int presetIndex(When when, const KCalCore::Alarm::Ptr &alarm)
......
......@@ -131,7 +131,7 @@ void AttendeeLineEdit::keyPressEvent(QKeyEvent *ev)
&& !ev->modifiers().testFlag(Qt::ShiftModifier)) {
// Shift would be pressed during selection
Q_EMIT leftPressed();
} else if (ev->key() == Qt::Key_Right && cursorPosition() == (int)text().length()
} else if (ev->key() == Qt::Key_Right && cursorPosition() == text().length()
&& !ev->modifiers().testFlag(Qt::ShiftModifier)) {
// Shift would be pressed during selection
Q_EMIT rightPressed();
......
......@@ -187,7 +187,7 @@ bool ConflictResolver::tryDate(const KCalCore::FreeBusy::Ptr &fb, QDateTime &try
} else {
// the current busy period blocks the try period, try
// after the end of the current busy period
const int secsDuration = tryFrom.secsTo(tryTo);
const qint64 secsDuration = tryFrom.secsTo(tryTo);
tryFrom = (*it).end();
tryTo = tryFrom.addSecs(secsDuration);
// try again with the new try period
......@@ -216,7 +216,7 @@ bool ConflictResolver::findFreeSlot(const KCalCore::Period &dateTimeRange)
QDateTime now = QDateTime::currentDateTimeUtc();
if (tryFrom < now) {
// The slot to look for is at least partially in the past.
const int secs = tryFrom.secsTo(tryTo);
const qint64 secs = tryFrom.secsTo(tryTo);
tryFrom = now;
tryTo = tryFrom.addSecs(secs);
}
......
......@@ -310,10 +310,9 @@ Akonadi::Item EditorItemManager::item(ItemState state) const
<< "; and haPayload is " << d->mPrevItem.hasPayload();
}
break;
default:
qCDebug(INCIDENCEEDITOR_LOG) << "state = " << state;
Q_ASSERT_X(false, "EditorItemManager::item", "Unknown enum value");
}
qCDebug(INCIDENCEEDITOR_LOG) << "state = " << state;
Q_ASSERT_X(false, "EditorItemManager::item", "Unknown enum value");
return Akonadi::Item();
}
......
......@@ -128,8 +128,6 @@ bool IncidenceAttachment::isDirty() const
// No incidence loaded, so if the user added attachments we're dirty.
return mAttachmentView->count() != 0;
}
return false;
}
int IncidenceAttachment::attachmentCount() const
......
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