diff --git a/src/collectionpage/collectionexpirypage.cpp b/src/collectionpage/collectionexpirypage.cpp --- a/src/collectionpage/collectionexpirypage.cpp +++ b/src/collectionpage/collectionexpirypage.cpp @@ -96,7 +96,7 @@ actionsGroup->setFlat(true); // for mutual exclusion of the radio buttons QHBoxLayout *moveToHBox = new QHBoxLayout(); - moveToHBox->setMargin(0); + moveToHBox->setContentsMargins(0, 0, 0, 0); moveToHBox->setSpacing(6); moveToRB = new QRadioButton(actionsGroup); diff --git a/src/filter/filteractions/filteractionaddheader.cpp b/src/filter/filteractions/filteractionaddheader.cpp --- a/src/filter/filteractions/filteractionaddheader.cpp +++ b/src/filter/filteractions/filteractionaddheader.cpp @@ -75,7 +75,7 @@ QWidget *widget = new QWidget(parent); QHBoxLayout *layout = new QHBoxLayout(widget); layout->setSpacing(4); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); PimCommon::MinimumComboBox *comboBox = new PimCommon::MinimumComboBox(widget); comboBox->setObjectName(QStringLiteral("combo")); diff --git a/src/filter/filteractions/filteractionforward.cpp b/src/filter/filteractions/filteractionforward.cpp --- a/src/filter/filteractions/filteractionforward.cpp +++ b/src/filter/filteractions/filteractionforward.cpp @@ -91,7 +91,7 @@ { QWidget *addressAndTemplate = new QWidget(parent); QHBoxLayout *layout = new QHBoxLayout(addressAndTemplate); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); QWidget *addressEdit = FilterActionWithAddress::createParamWidget(addressAndTemplate); addressEdit->setObjectName(QStringLiteral("addressEdit")); diff --git a/src/filter/filteractions/filteractionrewriteheader.cpp b/src/filter/filteractions/filteractionrewriteheader.cpp --- a/src/filter/filteractions/filteractionrewriteheader.cpp +++ b/src/filter/filteractions/filteractionrewriteheader.cpp @@ -111,7 +111,7 @@ QWidget *widget = new QWidget(parent); QHBoxLayout *layout = new QHBoxLayout(widget); layout->setSpacing(4); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); PimCommon::MinimumComboBox *comboBox = new PimCommon::MinimumComboBox(widget); comboBox->setEditable(true); diff --git a/src/filter/filteractions/filteractionwidget.cpp b/src/filter/filteractions/filteractionwidget.cpp --- a/src/filter/filteractions/filteractionwidget.cpp +++ b/src/filter/filteractions/filteractionwidget.cpp @@ -110,7 +110,7 @@ , d(new Private(this)) { QHBoxLayout *mainLayout = new QHBoxLayout(this); - mainLayout->setMargin(0); + mainLayout->setContentsMargins(0, 0, 0, 0); QWidget *widget = new QWidget(this); mainLayout->addWidget(widget); diff --git a/src/filter/filteractions/filteractionwithurl.cpp b/src/filter/filteractions/filteractionwithurl.cpp --- a/src/filter/filteractions/filteractionwithurl.cpp +++ b/src/filter/filteractions/filteractionwithurl.cpp @@ -58,7 +58,7 @@ { QWidget *widget = new QWidget(parent); QHBoxLayout *layout = new QHBoxLayout; - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(0); widget->setLayout(layout); KUrlRequester *requester = new KUrlRequester(parent); diff --git a/src/filter/invalidfilters/invalidfilterdialog.cpp b/src/filter/invalidfilters/invalidfilterdialog.cpp --- a/src/filter/invalidfilters/invalidfilterdialog.cpp +++ b/src/filter/invalidfilters/invalidfilterdialog.cpp @@ -46,7 +46,7 @@ QWidget *w = new QWidget(this); QVBoxLayout *vbox = new QVBoxLayout; - vbox->setMargin(0); + vbox->setContentsMargins(0, 0, 0, 0); w->setLayout(vbox); mInvalidFilterWidget = new InvalidFilterWidget(this); mInvalidFilterWidget->setObjectName(QStringLiteral("invalid_filter_widget")); diff --git a/src/filter/invalidfilters/invalidfilterwidget.cpp b/src/filter/invalidfilters/invalidfilterwidget.cpp --- a/src/filter/invalidfilters/invalidfilterwidget.cpp +++ b/src/filter/invalidfilters/invalidfilterwidget.cpp @@ -28,7 +28,7 @@ : QWidget(parent) { QVBoxLayout *vbox = new QVBoxLayout(this); - vbox->setMargin(0); + vbox->setContentsMargins(0, 0, 0, 0); QLabel *lab = new QLabel(i18n("The following filters are invalid (e.g. containing no actions " "or no search rules). Discard or edit invalid filters?")); lab->setWordWrap(true); diff --git a/src/filter/kmfilterdialog.cpp b/src/filter/kmfilterdialog.cpp --- a/src/filter/kmfilterdialog.cpp +++ b/src/filter/kmfilterdialog.cpp @@ -170,10 +170,10 @@ mainLayout->addWidget(w); mainLayout->addWidget(buttonBox); QVBoxLayout *topVLayout = new QVBoxLayout(w); - topVLayout->setMargin(0); + topVLayout->setContentsMargins(0, 0, 0, 0); QHBoxLayout *topLayout = new QHBoxLayout; topVLayout->addLayout(topLayout); - topLayout->setMargin(0); + topLayout->setContentsMargins(0, 0, 0, 0); QSplitter *splitter = new QSplitter; splitter->setChildrenCollapsible(false); @@ -296,7 +296,7 @@ QWidget *hbox = new QWidget(mAdvOptsGroup); QHBoxLayout *hboxHBoxLayout = new QHBoxLayout(hbox); - hboxHBoxLayout->setMargin(0); + hboxHBoxLayout->setContentsMargins(0, 0, 0, 0); mFilterActionLabel = new QLabel(i18n("Icon for this filter:"), hbox); hboxHBoxLayout->addWidget(mFilterActionLabel); mFilterActionLabel->setEnabled(false); diff --git a/src/filter/kmfilterlistbox.cpp b/src/filter/kmfilterlistbox.cpp --- a/src/filter/kmfilterlistbox.cpp +++ b/src/filter/kmfilterlistbox.cpp @@ -135,7 +135,7 @@ //----------- the first row of buttons QWidget *hb = new QWidget(this); QHBoxLayout *hbHBoxLayout = new QHBoxLayout(hb); - hbHBoxLayout->setMargin(0); + hbHBoxLayout->setContentsMargins(0, 0, 0, 0); hbHBoxLayout->setSpacing(4); mBtnTop = new QPushButton(QString(), hb); @@ -177,7 +177,7 @@ //----------- the second row of buttons hb = new QWidget(this); hbHBoxLayout = new QHBoxLayout(hb); - hbHBoxLayout->setMargin(0); + hbHBoxLayout->setContentsMargins(0, 0, 0, 0); hbHBoxLayout->setSpacing(4); mBtnNew = new QPushButton(hb); hbHBoxLayout->addWidget(mBtnNew); diff --git a/src/filter/soundtestwidget.cpp b/src/filter/soundtestwidget.cpp --- a/src/filter/soundtestwidget.cpp +++ b/src/filter/soundtestwidget.cpp @@ -37,7 +37,7 @@ : QWidget(parent) { QHBoxLayout *layout = new QHBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); m_playButton = new QPushButton(this); m_playButton->setIcon(QIcon::fromTheme(QStringLiteral("arrow-right"))); diff --git a/src/folder/accountconfigorderdialog.cpp b/src/folder/accountconfigorderdialog.cpp --- a/src/folder/accountconfigorderdialog.cpp +++ b/src/folder/accountconfigorderdialog.cpp @@ -85,7 +85,7 @@ mainLayout->addWidget(buttonBox); QVBoxLayout *vbox = new QVBoxLayout; - vbox->setMargin(0); + vbox->setContentsMargins(0, 0, 0, 0); page->setLayout(vbox); d->mEnableAccountOrder = new QCheckBox(i18n("Use custom order"), this); @@ -101,7 +101,7 @@ QWidget *upDownBox = new QWidget(page); QVBoxLayout *upDownBoxVBoxLayout = new QVBoxLayout(upDownBox); - upDownBoxVBoxLayout->setMargin(0); + upDownBoxVBoxLayout->setContentsMargins(0, 0, 0, 0); d->mUpButton = new QPushButton(upDownBox); upDownBoxVBoxLayout->addWidget(d->mUpButton); d->mUpButton->setIcon(QIcon::fromTheme(QStringLiteral("go-up"))); diff --git a/src/folder/foldertreewidget.cpp b/src/folder/foldertreewidget.cpp --- a/src/folder/foldertreewidget.cpp +++ b/src/folder/foldertreewidget.cpp @@ -86,7 +86,7 @@ connect(d->folderTreeView, &FolderTreeView::manualSortingChanged, this, &FolderTreeWidget::slotManualSortingChanged); QVBoxLayout *lay = new QVBoxLayout(this); - lay->setMargin(0); + lay->setContentsMargins(0, 0, 0, 0); d->label = new QLabel(i18n("You can start typing to filter the list of folders."), this); lay->addWidget(d->label); diff --git a/src/folder/foldertreewidgetproxymodel.cpp b/src/folder/foldertreewidgetproxymodel.cpp --- a/src/folder/foldertreewidgetproxymodel.cpp +++ b/src/folder/foldertreewidgetproxymodel.cpp @@ -226,7 +226,7 @@ QVariant FolderTreeWidgetProxyModel::data(const QModelIndex &index, int role) const { - if (role == Qt::TextColorRole) { + if (role == Qt::ForegroundRole) { const QModelIndex sourceIndex = mapToSource(index); const QModelIndex rowIndex = sourceIndex.sibling(sourceIndex.row(), 0); const Akonadi::Collection collection diff --git a/src/search/searchpatternedit.cpp b/src/search/searchpatternedit.cpp --- a/src/search/searchpatternedit.cpp +++ b/src/search/searchpatternedit.cpp @@ -153,7 +153,7 @@ void SearchRuleWidget::initWidget(SearchPatternEdit::SearchModeType modeType) { QHBoxLayout *hlay = new QHBoxLayout(this); - hlay->setMargin(0); + hlay->setContentsMargins(0, 0, 0, 0); // initialize the header field combo box mRuleField = new PimCommon::MinimumComboBox(this); @@ -610,7 +610,7 @@ void SearchPatternEdit::initLayout(SearchPatternEditOptions options, SearchModeType modeType) { QVBoxLayout *layout = new QVBoxLayout(this); - layout->setMargin(0); + layout->setContentsMargins(0, 0, 0, 0); const bool matchAllMessages = (options & MailCommon::SearchPatternEdit::MatchAllMessages); //------------the radio buttons diff --git a/src/snippets/snippetdialog.cpp b/src/snippets/snippetdialog.cpp --- a/src/snippets/snippetdialog.cpp +++ b/src/snippets/snippetdialog.cpp @@ -45,7 +45,7 @@ mOkButton->setEnabled(false); connect(mUi->nameEdit, &KLineEdit::textChanged, this, &SnippetDialog::slotTextChanged); - connect(mUi->groupBox, QOverload::of(&KComboBox::currentIndexChanged), this, &SnippetDialog::slotGroupChanged); + connect(mUi->groupBox, QOverload::of(&KComboBox::currentIndexChanged), this, &SnippetDialog::slotGroupChanged); mUi->snippetText->setMinimumSize(500, 300); diff --git a/src/tag/tagwidget.cpp b/src/tag/tagwidget.cpp --- a/src/tag/tagwidget.cpp +++ b/src/tag/tagwidget.cpp @@ -71,7 +71,7 @@ , d(new MailCommon::TagWidgetPrivate) { QGridLayout *settings = new QGridLayout(this); - settings->setMargin(0); + settings->setContentsMargins(0, 0, 0, 0); //Stretcher layout for adding some space after the label QVBoxLayout *spacer = new QVBoxLayout(); diff --git a/src/widgets/redirectdialog.cpp b/src/widgets/redirectdialog.cpp --- a/src/widgets/redirectdialog.cpp +++ b/src/widgets/redirectdialog.cpp @@ -150,7 +150,7 @@ QVBoxLayout *mainLayout = new QVBoxLayout; mainWidget->setLayout(mainLayout); - mainLayout->setMargin(0); + mainLayout->setContentsMargins(0, 0, 0, 0); QLabel *LabelTo = new QLabel(i18n("Select the recipient addresses to redirect to:")); mainLayout->addWidget(LabelTo); diff --git a/src/widgets/redirectwidget.cpp b/src/widgets/redirectwidget.cpp --- a/src/widgets/redirectwidget.cpp +++ b/src/widgets/redirectwidget.cpp @@ -39,7 +39,7 @@ { QHBoxLayout *hbox = new QHBoxLayout(this); hbox->setSpacing(0); - hbox->setMargin(0); + hbox->setContentsMargins(0, 0, 0, 0); hbox->setAlignment(Qt::AlignRight); mEdit = new MessageComposer::ComposerLineEdit(true);