Commit 2373f612 authored by Laurent Montel's avatar Laurent Montel 😁

const'ify

parent f20a22d0
Pipeline #37408 passed with stage
in 15 minutes and 24 seconds
...@@ -201,9 +201,8 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *par ...@@ -201,9 +201,8 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *par
setMinimumSize(280, 160); setMinimumSize(280, 160);
// take out some padding which makes it larger // take out some padding which makes it larger
topLayout->setSpacing(2); topLayout->setSpacing(2);
QMargins margins(0, 0, 0, 0); topLayout->setContentsMargins({});
topLayout->setContentsMargins(margins); setContentsMargins({});
setContentsMargins(margins);
QLabel *label = new QLabel( QLabel *label = new QLabel(
i18nc("@label", i18nc("@label",
...@@ -482,7 +481,7 @@ void AlarmDialog::dismiss(const ReminderList &selections) ...@@ -482,7 +481,7 @@ void AlarmDialog::dismiss(const ReminderList &selections)
void AlarmDialog::edit() void AlarmDialog::edit()
{ {
ReminderList selection = selectedItems(); const ReminderList selection = selectedItems();
if (selection.count() == 1) { if (selection.count() == 1) {
Incidence::Ptr incidence = CalendarSupport::incidence(selection.first()->mIncidence); Incidence::Ptr incidence = CalendarSupport::incidence(selection.first()->mIncidence);
if (!mCalendar->hasRight(selection.first()->mIncidence, if (!mCalendar->hasRight(selection.first()->mIncidence,
......
...@@ -171,7 +171,7 @@ bool KOAlarmClient::collectionsAvailable() const ...@@ -171,7 +171,7 @@ bool KOAlarmClient::collectionsAvailable() const
for (int row = 0; row < rowCount; ++row) { for (int row = 0; row < rowCount; ++row) {
static const int column = 0; static const int column = 0;
const QModelIndex index = mETM->index(row, column); const QModelIndex index = mETM->index(row, column);
bool haveData const bool haveData
= mETM->data(index, Akonadi::EntityTreeModel::IsPopulatedRole).toBool(); = mETM->data(index, Akonadi::EntityTreeModel::IsPopulatedRole).toBool();
if (!haveData) { if (!haveData) {
return false; return false;
......
...@@ -110,7 +110,7 @@ bool MailClient::mailAttendees(const KCalendarCore::IncidenceBase::Ptr &incidenc ...@@ -110,7 +110,7 @@ bool MailClient::mailAttendees(const KCalendarCore::IncidenceBase::Ptr &incidenc
QString subject; QString subject;
if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) { if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) {
KCalendarCore::Incidence::Ptr inc = incidence.staticCast<KCalendarCore::Incidence>(); const KCalendarCore::Incidence::Ptr inc = incidence.staticCast<KCalendarCore::Incidence>();
subject = inc->summary(); subject = inc->summary();
} else { } else {
subject = i18n("Free Busy Object"); subject = i18n("Free Busy Object");
...@@ -129,7 +129,7 @@ bool MailClient::mailOrganizer(const KCalendarCore::IncidenceBase::Ptr &incidenc ...@@ -129,7 +129,7 @@ bool MailClient::mailOrganizer(const KCalendarCore::IncidenceBase::Ptr &incidenc
QString subject = sub; QString subject = sub;
if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) { if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) {
KCalendarCore::Incidence::Ptr inc = incidence.staticCast<KCalendarCore::Incidence>(); const KCalendarCore::Incidence::Ptr inc = incidence.staticCast<KCalendarCore::Incidence>();
if (subject.isEmpty()) { if (subject.isEmpty()) {
subject = inc->summary(); subject = inc->summary();
} }
......
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