Commit 6fc711f7 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/D19360
parent c1ba81ef
......@@ -96,7 +96,7 @@ void CollectionExpiryPage::init()
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);
......
......@@ -75,7 +75,7 @@ QWidget *FilterActionAddHeader::createParamWidget(QWidget *parent) const
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"));
......
......@@ -91,7 +91,7 @@ QWidget *FilterActionForward::createParamWidget(QWidget *parent) const
{
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"));
......
......@@ -111,7 +111,7 @@ QWidget *FilterActionRewriteHeader::createParamWidget(QWidget *parent) const
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);
......
......@@ -110,7 +110,7 @@ FilterActionWidget::FilterActionWidget(QWidget *parent)
, 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);
......
......@@ -58,7 +58,7 @@ QWidget *FilterActionWithUrl::createParamWidget(QWidget *parent) const
{
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);
......
......@@ -46,7 +46,7 @@ InvalidFilterDialog::InvalidFilterDialog(QWidget *parent)
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"));
......
......@@ -28,7 +28,7 @@ InvalidFilterWidget::InvalidFilterWidget(QWidget *parent)
: 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);
......
......@@ -170,10 +170,10 @@ KMFilterDialog::KMFilterDialog(const QList<KActionCollection *> &actionCollectio
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 @@ KMFilterDialog::KMFilterDialog(const QList<KActionCollection *> &actionCollectio
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);
......
......@@ -135,7 +135,7 @@ KMFilterListBox::KMFilterListBox(const QString &title, QWidget *parent)
//----------- 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 @@ KMFilterListBox::KMFilterListBox(const QString &title, QWidget *parent)
//----------- 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);
......
......@@ -37,7 +37,7 @@ SoundTestWidget::SoundTestWidget(QWidget *parent)
: 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")));
......
......@@ -85,7 +85,7 @@ AccountConfigOrderDialog::AccountConfigOrderDialog(MailCommon::MailCommonSetting
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 @@ AccountConfigOrderDialog::AccountConfigOrderDialog(MailCommon::MailCommonSetting
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")));
......
......@@ -86,7 +86,7 @@ FolderTreeWidget::FolderTreeWidget(
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);
......
......@@ -226,7 +226,7 @@ bool FolderTreeWidgetProxyModel::acceptRow(int sourceRow, const QModelIndex &sou
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
......
......@@ -153,7 +153,7 @@ void SearchRuleWidget::setPatternEditOptions(SearchPatternEdit::SearchPatternEdi
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::setPatternEditOptions(SearchPatternEdit::SearchPatternEd
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
......
......@@ -45,7 +45,7 @@ SnippetDialog::SnippetDialog(KActionCollection *actionCollection, bool inGroupMo
mOkButton->setEnabled(false);
connect(mUi->nameEdit, &KLineEdit::textChanged, this, &SnippetDialog::slotTextChanged);
connect(mUi->groupBox, QOverload<const QString &>::of(&KComboBox::currentIndexChanged), this, &SnippetDialog::slotGroupChanged);
connect(mUi->groupBox, QOverload<int>::of(&KComboBox::currentIndexChanged), this, &SnippetDialog::slotGroupChanged);
mUi->snippetText->setMinimumSize(500, 300);
......
......@@ -71,7 +71,7 @@ TagWidget::TagWidget(const QList<KActionCollection *> &actionCollections, QWidge
, 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();
......
......@@ -150,7 +150,7 @@ RedirectDialog::RedirectDialog(SendMode mode, QWidget *parent)
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);
......
......@@ -39,7 +39,7 @@ RedirectWidget::RedirectWidget(QWidget *parent)
{
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);
......
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