diff --git a/korgac/alarmdialog.cpp b/korgac/alarmdialog.cpp index b15e8f269d26ec9829f7b08d2e9ea48084f45102..171c01d1f09f2a258a37210f0178fa3a9fa94a6b 100644 --- a/korgac/alarmdialog.cpp +++ b/korgac/alarmdialog.cpp @@ -201,9 +201,8 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr &calendar, QWidget *par setMinimumSize(280, 160); // take out some padding which makes it larger topLayout->setSpacing(2); - QMargins margins(0, 0, 0, 0); - topLayout->setContentsMargins(margins); - setContentsMargins(margins); + topLayout->setContentsMargins({}); + setContentsMargins({}); QLabel *label = new QLabel( i18nc("@label", @@ -482,7 +481,7 @@ void AlarmDialog::dismiss(const ReminderList &selections) void AlarmDialog::edit() { - ReminderList selection = selectedItems(); + const ReminderList selection = selectedItems(); if (selection.count() == 1) { Incidence::Ptr incidence = CalendarSupport::incidence(selection.first()->mIncidence); if (!mCalendar->hasRight(selection.first()->mIncidence, diff --git a/korgac/koalarmclient.cpp b/korgac/koalarmclient.cpp index d868dfcc9eda1acaca8d9739835c9c0fc082448c..d8cb3aef2b4421d8840b87cb8bcefad3d950e820 100644 --- a/korgac/koalarmclient.cpp +++ b/korgac/koalarmclient.cpp @@ -171,7 +171,7 @@ bool KOAlarmClient::collectionsAvailable() const for (int row = 0; row < rowCount; ++row) { static const int column = 0; const QModelIndex index = mETM->index(row, column); - bool haveData + const bool haveData = mETM->data(index, Akonadi::EntityTreeModel::IsPopulatedRole).toBool(); if (!haveData) { return false; diff --git a/korgac/mailclient.cpp b/korgac/mailclient.cpp index 233c4df0b421ea49b322861a1da850e8db32802f..ebe198488737489d6250ed42209f6ac16b8e4f8e 100644 --- a/korgac/mailclient.cpp +++ b/korgac/mailclient.cpp @@ -110,7 +110,7 @@ bool MailClient::mailAttendees(const KCalendarCore::IncidenceBase::Ptr &incidenc QString subject; if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) { - KCalendarCore::Incidence::Ptr inc = incidence.staticCast(); + const KCalendarCore::Incidence::Ptr inc = incidence.staticCast(); subject = inc->summary(); } else { subject = i18n("Free Busy Object"); @@ -129,7 +129,7 @@ bool MailClient::mailOrganizer(const KCalendarCore::IncidenceBase::Ptr &incidenc QString subject = sub; if (incidence->type() != KCalendarCore::Incidence::TypeFreeBusy) { - KCalendarCore::Incidence::Ptr inc = incidence.staticCast(); + const KCalendarCore::Incidence::Ptr inc = incidence.staticCast(); if (subject.isEmpty()) { subject = inc->summary(); }