diff --git a/src/attendeeline.cpp b/src/attendeeline.cpp --- a/src/attendeeline.cpp +++ b/src/attendeeline.cpp @@ -156,7 +156,7 @@ setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); QBoxLayout *topLayout = new QHBoxLayout(this); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); mRoleCombo->addItem(QIcon::fromTheme(QStringLiteral("meeting-participant")), KCalUtils::Stringify::attendeeRole(KCalCore::Attendee::ReqParticipant)); mRoleCombo->addItem(QIcon::fromTheme(QStringLiteral("meeting-participant-optional")), diff --git a/src/categorydialog.cpp b/src/categorydialog.cpp --- a/src/categorydialog.cpp +++ b/src/categorydialog.cpp @@ -50,7 +50,7 @@ , mCategoryConfig(cc) { QHBoxLayout *topL = new QHBoxLayout(this); - topL->setMargin(0); + topL->setContentsMargins(0, 0, 0, 0); mWidgets = new CategoryWidgetBase(this); topL->addWidget(mWidgets); @@ -247,7 +247,7 @@ mainLayout->addWidget(page); mainLayout->addWidget(buttonBox); QVBoxLayout *lay = new QVBoxLayout(page); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); mWidgets = new CategoryWidget(cc, this); mCategoryConfig = cc; diff --git a/src/categoryselectdialog.cpp b/src/categoryselectdialog.cpp --- a/src/categoryselectdialog.cpp +++ b/src/categoryselectdialog.cpp @@ -50,7 +50,7 @@ , mCategoryConfig(cc) { QHBoxLayout *topL = new QHBoxLayout(this); - topL->setMargin(0); + topL->setContentsMargins(0, 0, 0, 0); mWidgets = new CategorySelectWidgetBase(this); topL->addWidget(mWidgets); connect(mWidgets->mButtonEdit, &QAbstractButton::clicked, @@ -178,7 +178,7 @@ QWidget *page = new QWidget; QVBoxLayout *lay = new QVBoxLayout(page); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); mWidgets = new CategorySelectWidget(cc, this); mainLayout->addWidget(page); diff --git a/src/freebusyurldialog.cpp b/src/freebusyurldialog.cpp --- a/src/freebusyurldialog.cpp +++ b/src/freebusyurldialog.cpp @@ -56,7 +56,7 @@ okButton->setDefault(true); QBoxLayout *topLayout = new QVBoxLayout(topFrame); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); mWidget = new FreeBusyUrlWidget(attendee, topFrame); topLayout->addWidget(mWidget); diff --git a/src/incidenceattachment.cpp b/src/incidenceattachment.cpp --- a/src/incidenceattachment.cpp +++ b/src/incidenceattachment.cpp @@ -555,7 +555,7 @@ &IncidenceAttachment::showContextMenu); QGridLayout *layout = new QGridLayout(mUi->mAttachmentViewPlaceHolder); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(mAttachmentView); } diff --git a/src/incidencedialog.cpp b/src/incidencedialog.cpp --- a/src/incidencedialog.cpp +++ b/src/incidencedialog.cpp @@ -137,7 +137,7 @@ mUi->setupUi(q); QGridLayout *layout = new QGridLayout(mUi->mCalSelectorPlaceHolder); layout->setSpacing(0); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(mCalSelector); mCalSelector->setAccessRightsFilter(Akonadi::Collection::CanCreateItem); mUi->label->setBuddy(mCalSelector); diff --git a/src/templatemanagementdialog.cpp b/src/templatemanagementdialog.cpp --- a/src/templatemanagementdialog.cpp +++ b/src/templatemanagementdialog.cpp @@ -151,7 +151,7 @@ m_templates.append(newTemplate); m_base.m_listBox->addItem(newTemplate); QListWidgetItem *item = m_base.m_listBox->item(count); - m_base.m_listBox->setItemSelected(item, true); + item->setSelected(true); } m_newTemplate = newTemplate; m_changed = true; @@ -183,9 +183,7 @@ m_templates.removeAll(item->text()); m_base.m_listBox->takeItem(current); - - m_base.m_listBox->setItemSelected( - m_base.m_listBox->item(qMax(current - 1, 0)), true); + m_base.m_listBox->item(qMax(current - 1, 0))->setSelected(true); updateButtons();