Commit e00b887e authored by Jonathan Marten's avatar Jonathan Marten

Fix compile with Qt 5.13 and QT_DISABLE_DEPRECATED_BEFORE=0x060000

Differential Revision: https://phabricator.kde.org/D19359
parent a7cfe514
......@@ -90,7 +90,7 @@ AddHostDialog::AddHostDialog(KLDAP::LdapServer *server, QWidget *parent)
mainLayout->addWidget(page);
mainLayout->addWidget(buttonBox);
QHBoxLayout *layout = new QHBoxLayout(page);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
d->mCfg = new KLDAP::LdapConfigWidget(
KLDAP::LdapConfigWidget::W_USER
......
......@@ -47,7 +47,7 @@ KCMLdap::KCMLdap(QWidget *parent, const QVariantList &)
about->addAuthor(i18n("Tobias Koenig"), QString(), QStringLiteral("tokoe@kde.org"));
setAboutData(about);
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
mLdapConfigureWidget = new KLDAP::LdapConfigureWidget(this);
layout->addWidget(mLdapConfigureWidget);
......
......@@ -293,7 +293,7 @@ void LdapConfigureWidget::initGUI()
{
QVBoxLayout *layout = new QVBoxLayout(this);
layout->setObjectName(QStringLiteral("layout"));
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
QGroupBox *groupBox = new QGroupBox(i18n("LDAP Servers"));
layout->addWidget(groupBox);
......@@ -309,7 +309,7 @@ void LdapConfigureWidget::initGUI()
mainLayout->addWidget(hBox);
QHBoxLayout *hBoxHBoxLayout = new QHBoxLayout(hBox);
hBoxHBoxLayout->setMargin(0);
hBoxHBoxLayout->setContentsMargins(0, 0, 0, 0);
hBoxHBoxLayout->setSpacing(6);
// Contents of the hbox: listview and up/down buttons on the right (vbox)
mHostListView = new QListWidget(hBox);
......@@ -318,7 +318,7 @@ void LdapConfigureWidget::initGUI()
QWidget *upDownBox = new QWidget(hBox);
QVBoxLayout *upDownBoxVBoxLayout = new QVBoxLayout(upDownBox);
upDownBoxVBoxLayout->setMargin(0);
upDownBoxVBoxLayout->setContentsMargins(0, 0, 0, 0);
hBoxHBoxLayout->addWidget(upDownBox);
upDownBoxVBoxLayout->setSpacing(6);
mUpButton = new QToolButton(upDownBox);
......
......@@ -504,7 +504,7 @@ LdapSearchDialog::LdapSearchDialog(QWidget *parent)
mainLayout->addWidget(buttonBox);
QVBoxLayout *topLayout = new QVBoxLayout(page);
topLayout->setMargin(0);
topLayout->setContentsMargins(0, 0, 0, 0);
QGroupBox *groupBox = new QGroupBox(i18n("Search for Addresses in Directory"),
page);
......@@ -589,7 +589,7 @@ LdapSearchDialog::LdapSearchDialog(QWidget *parent)
connect(d->mResultView, &QTableView::customContextMenuRequested, this, &LdapSearchDialog::slotCustomContextMenuRequested);
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->setMargin(0);
buttonLayout->setContentsMargins(0, 0, 0, 0);
topLayout->addLayout(buttonLayout);
d->progressIndication = new KPIM::ProgressIndicatorLabel(i18n("Searching..."));
......
......@@ -33,7 +33,7 @@ MultiplyingLineEditor::MultiplyingLineEditor(MultiplyingLineFactory *factory, QW
, mMultiplyingLineFactory(factory)
{
QBoxLayout *topLayout = new QHBoxLayout(this);
topLayout->setMargin(0);
topLayout->setContentsMargins(0, 0, 0, 0);
mView = new MultiplyingLineView(mMultiplyingLineFactory, this);
topLayout->addWidget(mView);
......
......@@ -46,7 +46,7 @@ MultiplyingLineView::MultiplyingLineView(MultiplyingLineFactory *factory, Multip
mPage->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
setWidget(mPage);
mTopLayout->setMargin(0);
mTopLayout->setContentsMargins(0, 0, 0, 0);
mTopLayout->setSpacing(0);
mPage->setLayout(mTopLayout);
}
......
......@@ -57,7 +57,7 @@ TransactionItemView::TransactionItemView(QWidget *parent, const QString &name)
setFrameStyle(NoFrame);
mBigBox = new QWidget(this);
QVBoxLayout *mBigBoxVBoxLayout = new QVBoxLayout(mBigBox);
mBigBoxVBoxLayout->setMargin(0);
mBigBoxVBoxLayout->setContentsMargins(0, 0, 0, 0);
setWidget(mBigBox);
setWidgetResizable(true);
setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
......@@ -139,7 +139,7 @@ TransactionItem::TransactionItem(QWidget *parent, ProgressItem *item, bool first
{
QVBoxLayout *vboxLayout = new QVBoxLayout(this);
vboxLayout->setSpacing(2);
vboxLayout->setMargin(2);
vboxLayout->setContentsMargins(2, 2, 2, 2);
setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
mFrame = new QFrame(this);
......@@ -150,7 +150,7 @@ TransactionItem::TransactionItem(QWidget *parent, ProgressItem *item, bool first
QWidget *h = new QWidget(this);
QHBoxLayout *hHBoxLayout = new QHBoxLayout(h);
hHBoxLayout->setMargin(0);
hHBoxLayout->setContentsMargins(0, 0, 0, 0);
hHBoxLayout->setSpacing(5);
layout()->addWidget(h);
......@@ -176,7 +176,7 @@ TransactionItem::TransactionItem(QWidget *parent, ProgressItem *item, bool first
h = new QWidget(this);
hHBoxLayout = new QHBoxLayout(h);
hHBoxLayout->setMargin(0);
hHBoxLayout->setContentsMargins(0, 0, 0, 0);
hHBoxLayout->setSpacing(5);
h->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
layout()->addWidget(h);
......
......@@ -67,7 +67,7 @@ StatusbarProgressWidget::StatusbarProgressWidget(ProgressDialog *progressDialog,
int w = fontMetrics().boundingRect(QStringLiteral(" 999.9 kB/s 00:00:01 ")).width() + 8;
QHBoxLayout *boxLayout = new QHBoxLayout(this);
boxLayout->setObjectName(QStringLiteral("boxLayout"));
boxLayout->setMargin(0);
boxLayout->setContentsMargins(0, 0, 0, 0);
boxLayout->setSpacing(0);
mButton = new QPushButton(this);
......
......@@ -103,12 +103,12 @@ void KWidgetLister::init(bool fewerMoreButton)
{
//--------- the button box
d->mLayout = new QVBoxLayout(this);
d->mLayout->setMargin(0);
d->mLayout->setContentsMargins(0, 0, 0, 0);
d->mLayout->setSpacing(4);
d->mButtonBox = new QWidget(this);
QHBoxLayout *mButtonBoxHBoxLayout = new QHBoxLayout(d->mButtonBox);
mButtonBoxHBoxLayout->setMargin(0);
mButtonBoxHBoxLayout->setContentsMargins(0, 0, 0, 0);
d->mLayout->addWidget(d->mButtonBox);
if (fewerMoreButton) {
......
......@@ -31,7 +31,7 @@ public:
, q(qq)
{
QHBoxLayout *lay = new QHBoxLayout(q);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
indicator = new ProgressIndicatorWidget;
lay->addWidget(indicator);
label = new QLabel;
......
......@@ -192,7 +192,7 @@ void AddresseeLineEditPrivate::setCompletedItems(const QStringList &items, bool
QListWidgetItem *item = new QListWidgetItem(items.at(i), completionBox);
if (!items.at(i).startsWith(s_completionItemIndentString)) {
item->setFlags(item->flags() & ~Qt::ItemIsSelectable);
item->setBackgroundColor(AddresseeLineEditManager::self()->alternateColor());
item->setBackground(AddresseeLineEditManager::self()->alternateColor());
}
completionBox->addItem(item);
}
......
......@@ -120,7 +120,7 @@ BlackListBalooEmailCompletionWidget::BlackListBalooEmailCompletionWidget(QWidget
searchLineLayout->addWidget(mSearchInResultLineEdit);
QHBoxLayout *excludeDomainLayout = new QHBoxLayout;
excludeDomainLayout->setMargin(0);
excludeDomainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->addLayout(excludeDomainLayout);
QLabel *excludeDomainLabel = new QLabel(i18n("Exclude domain names:"), this);
......
......@@ -242,7 +242,7 @@ CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
QWidget *page = new QWidget(this);
QHBoxLayout *pageHBoxLayout = new QHBoxLayout(page);
pageHBoxLayout->setMargin(0);
pageHBoxLayout->setContentsMargins(0, 0, 0, 0);
hbox->addWidget(page);
mListView = new QTreeWidget(page);
mListView->setObjectName(QStringLiteral("listview"));
......@@ -257,7 +257,7 @@ CompletionOrderWidget::CompletionOrderWidget(QWidget *parent)
QWidget *upDownBox = new QWidget(page);
QVBoxLayout *upDownBoxVBoxLayout = new QVBoxLayout(upDownBox);
upDownBoxVBoxLayout->setMargin(0);
upDownBoxVBoxLayout->setContentsMargins(0, 0, 0, 0);
pageHBoxLayout->addWidget(upDownBox);
mUpButton = new QPushButton(upDownBox);
upDownBoxVBoxLayout->addWidget(mUpButton);
......
......@@ -50,7 +50,7 @@ TagWidget::TagWidget(QWidget *parent)
d->mTagWidget = new Akonadi::TagWidget(this);
connect(d->mTagWidget, &Akonadi::TagWidget::selectionChanged, this, &TagWidget::onSelectionChanged);
QHBoxLayout *l = new QHBoxLayout(this);
l->setMargin(0);
l->setContentsMargins(0, 0, 0, 0);
l->setSpacing(0);
l->addWidget(d->mTagWidget);
}
......
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