Commit 98b8d2c6 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Fix compile with Qt 5.13 and QT_DISABLE_DEPRECATED_BEFORE=0x060000

Differential Revision: https://phabricator.kde.org/D19348
parent 4aec7279
......@@ -156,7 +156,7 @@ AttendeeLine::AttendeeLine(QWidget *parent)
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")),
......
......@@ -50,7 +50,7 @@ CategoryWidget::CategoryWidget(CategoryConfig *cc, QWidget *parent)
, 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 @@ CategoryDialog::CategoryDialog(CategoryConfig *cc, QWidget *parent)
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;
......
......@@ -50,7 +50,7 @@ CategorySelectWidget::CategorySelectWidget(CategoryConfig *cc, QWidget *parent)
, 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 @@ CategorySelectDialog::CategorySelectDialog(CategoryConfig *cc, QWidget *parent)
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);
......
......@@ -56,7 +56,7 @@ FreeBusyUrlDialog::FreeBusyUrlDialog(const AttendeeData::Ptr &attendee, QWidget
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);
......
......@@ -555,7 +555,7 @@ void IncidenceAttachment::setupAttachmentIconView()
&IncidenceAttachment::showContextMenu);
QGridLayout *layout = new QGridLayout(mUi->mAttachmentViewPlaceHolder);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(mAttachmentView);
}
......
......@@ -137,7 +137,7 @@ IncidenceDialogPrivate::IncidenceDialogPrivate(Akonadi::IncidenceChanger *change
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);
......
......@@ -151,7 +151,7 @@ void TemplateManagementDialog::slotAddTemplate()
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 @@ void TemplateManagementDialog::slotRemoveTemplate()
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();
......
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