Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 98a011cb authored by Laurent Montel's avatar Laurent Montel 😁

Remove deprecated method

parent 57f512ff
......@@ -74,7 +74,7 @@ private:
void ListViewItem::setBlocked(bool blocked)
{
m_blocked = blocked;
setData(0, Qt::TextColorRole, (blocked ? Qt::red : Qt::black));
setData(0, Qt::ForegroundRole, (blocked ? Qt::red : Qt::black));
QFont itemFont = font(0);
itemFont.setItalic(blocked);
itemFont.setBold(blocked);
......@@ -109,7 +109,7 @@ AdBlockDlg::AdBlockDlg(QWidget *parent, const AdElementList *elements, KHTMLPart
setMainWidget(page);
QVBoxLayout *layout = new QVBoxLayout(page);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
QLabel *l = new QLabel(i18n("Search:"), page);
layout->addWidget(l);
......
......@@ -151,7 +151,7 @@ FilterBar::FilterBar(QWidget *parent)
// Apply layout
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(closeButton);
layout->addWidget(filterLabel);
layout->addWidget(m_filterInput);
......
......@@ -96,7 +96,7 @@ void KIGPDialog::setupLookPage(const QString &path)
KConfigGroup look = m_config->group("Look");
QVBoxLayout *vlay = new QVBoxLayout(page);
vlay->setMargin(0);
vlay->setContentsMargins(0, 0, 0, 0);
QLabel *label = new QLabel(i18n("&Page title:"), page);
vlay->addWidget(label);
......@@ -195,7 +195,7 @@ void KIGPDialog::setupDirectoryPage(const QString &path)
KConfigGroup group = m_config->group("Directory");
QVBoxLayout *dvlay = new QVBoxLayout(page);
dvlay->setMargin(0);
dvlay->setContentsMargins(0, 0, 0, 0);
QLabel *label;
label = new QLabel(i18n("&Save to HTML file:"), page);
......@@ -300,7 +300,7 @@ void KIGPDialog::setupThumbnailPage(const QString &path)
QLabel *label;
QVBoxLayout *vlay = new QVBoxLayout(page);
vlay->setMargin(0);
vlay->setContentsMargins(0, 0, 0, 0);
QHBoxLayout *hlay3 = new QHBoxLayout();
vlay->addLayout(hlay3);
......
......@@ -27,7 +27,7 @@ ClickIconLabel::ClickIconLabel(QWidget *parent)
: QWidget(parent)
{
QHBoxLayout *lay = new QHBoxLayout(this);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
lay->setSpacing(3);
m_pixmap = new QLabel(this);
lay->addWidget(m_pixmap);
......
......@@ -67,7 +67,7 @@ ReportDialog::ReportDialog(const QList<ValidationResult *> &results, QWidget *pa
setCaption(i18nc("@title:window", "Validation Report"));
m_ui.setupUi(mainWidget());
mainWidget()->layout()->setMargin(0);
mainWidget()->layout()->setContentsMargins(0, 0, 0, 0);
QHeaderView *header = m_ui.reportsView->header();
header->setResizeMode(0, QHeaderView::ResizeToContents);
header->setResizeMode(1, QHeaderView::ResizeToContents);
......
......@@ -38,14 +38,14 @@ ValidatorsDialog::ValidatorsDialog(QWidget *parent)
#ifdef HAVE_TIDY
QWidget *internalConfiguration = new QWidget();
m_internalUi.setupUi(internalConfiguration);
internalConfiguration->layout()->setMargin(0);
internalConfiguration->layout()->setContentsMargins(0, 0, 0, 0);
KPageWidgetItem *internalConfigurationItem = addPage(internalConfiguration, i18n("Internal Validation"));
internalConfigurationItem->setIcon(QIcon::fromTheme("validators"));
#endif
QWidget *remoteConfiguration = new QWidget();
m_remoteUi.setupUi(remoteConfiguration);
remoteConfiguration->layout()->setMargin(0);
remoteConfiguration->layout()->setContentsMargins(0, 0, 0, 0);
KPageWidgetItem *remoteConfigurationItem = addPage(remoteConfiguration, i18n("Remote Validation"));
remoteConfigurationItem->setIcon(QIcon::fromTheme(QStringLiteral("validators")));
......
......@@ -97,7 +97,7 @@ KCustomMenuEditor::KCustomMenuEditor(QWidget *parent)
setDefaultButton(Ok);
QWidget *page = new QWidget(this);
QHBoxLayout *pageHBoxLayout = new QHBoxLayout(page);
pageHBoxLayout->setMargin(0);
pageHBoxLayout->setContentsMargins(0, 0, 0, 0);
setMainWidget(page);
m_listView = new K3ListView(page);
pageHBoxLayout->addWidget(m_listView);
......
......@@ -68,7 +68,7 @@ CSSConfig::CSSConfig(QWidget *parent, const QVariantList &)
connect(customDialog, SIGNAL(changed()), SIGNAL(changed()));
QVBoxLayout *vbox = new QVBoxLayout(this);
vbox->setMargin(0);
vbox->setContentsMargins(0, 0, 0, 0);
vbox->addWidget(configWidget);
}
......
......@@ -87,7 +87,7 @@ KCMFilter::KCMFilter(QWidget *parent, const QVariantList &)
QWidget *searchBox = new QWidget;
QHBoxLayout *searchBoxHBoxLayout = new QHBoxLayout(searchBox);
searchBoxHBoxLayout->setMargin(0);
searchBoxHBoxLayout->setContentsMargins(0, 0, 0, 0);
searchBoxHBoxLayout->setSpacing(-1);
new QLabel(i18n("Search:"), searchBox);
......@@ -106,7 +106,7 @@ KCMFilter::KCMFilter(QWidget *parent, const QVariantList &)
QWidget *buttonBox = new QWidget;
QHBoxLayout *buttonBoxHBoxLayout = new QHBoxLayout(buttonBox);
buttonBoxHBoxLayout->setMargin(0);
buttonBoxHBoxLayout->setContentsMargins(0, 0, 0, 0);
vbox->addWidget(buttonBox);
container->setLayout(vbox);
......@@ -152,7 +152,7 @@ KCMFilter::KCMFilter(QWidget *parent, const QVariantList &)
QWidget *impexpBox = new QWidget;
QHBoxLayout *impexpBoxHBoxLayout = new QHBoxLayout(impexpBox);
impexpBoxHBoxLayout->setMargin(0);
impexpBoxHBoxLayout->setContentsMargins(0, 0, 0, 0);
QLabel *impexpLabel = new QLabel(i18n("<qt>More information on "
"<a href=\"importhelp\">import format</a>, "
"<a href=\"exporthelp\">export format</a>"), impexpBox);
......
......@@ -46,7 +46,7 @@ KKonqGeneralOptions::KKonqGeneralOptions(QWidget *parent, const QVariantList &)
{
m_pConfig = KSharedConfig::openConfig(QStringLiteral("konquerorrc"), KConfig::NoGlobals);
QVBoxLayout *lay = new QVBoxLayout(this);
lay->setMargin(0);
lay->setContentsMargins(0, 0, 0, 0);
addHomeUrlWidgets(lay);
......@@ -80,7 +80,7 @@ void KKonqGeneralOptions::addHomeUrlWidgets(QVBoxLayout *lay)
QWidget *containerWidget = new QWidget(this);
QHBoxLayout *hboxLayout = new QHBoxLayout(containerWidget);
hboxLayout->setMargin(0);
hboxLayout->setContentsMargins(0, 0, 0, 0);
formLayout->addRow(startLabel, containerWidget);
m_startCombo = new QComboBox(this);
......
......@@ -107,7 +107,7 @@ KJavaOptions::KJavaOptions(const KSharedConfig::Ptr &config, const QString &grou
connect(enableShutdownCB, &QAbstractButton::clicked, this, &KJavaOptions::toggleJavaControls);
QWidget *secondsHB = new QWidget(javartGB);
QHBoxLayout *secondsHBHBoxLayout = new QHBoxLayout(secondsHB);
secondsHBHBoxLayout->setMargin(0);
secondsHBHBoxLayout->setContentsMargins(0, 0, 0, 0);
laygroup1->addWidget(secondsHB);
serverTimeoutSB = new KIntNumInput(secondsHB);
secondsHBHBoxLayout->addWidget(serverTimeoutSB);
......
......@@ -33,7 +33,7 @@ PolicyDialog::PolicyDialog(Policies *policies, QWidget *parent, const char *name
insertIdx = 1; // index where to insert additional panels
topl = new QVBoxLayout(main);
topl->setMargin(0);
topl->setContentsMargins(0, 0, 0, 0);
QGridLayout *grid = new QGridLayout();
topl->addLayout(grid);
......
......@@ -81,7 +81,7 @@ KonquerorConfig::KonquerorConfig(QWidget *parent_P, const QVariantList &)
" and for keeping instances preloaded."));
QVBoxLayout *topLayout = new QVBoxLayout(this);
topLayout->setMargin(0);
topLayout->setContentsMargins(0, 0, 0, 0);
widget = new Konqueror(this);
connect(widget, SIGNAL(changed()), SLOT(changed()));
topLayout->addWidget(widget);
......
......@@ -30,7 +30,7 @@ public:
Konqueror_ui(QWidget *parent) : QWidget(parent)
{
setupUi(this);
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
}
};
......
......@@ -33,7 +33,7 @@ public:
KonqSidebarHistoryDlg(QWidget *parent) : QWidget(parent)
{
setupUi(this);
layout()->setMargin(0);
layout()->setContentsMargins(0, 0, 0, 0);
}
};
......
......@@ -255,7 +255,7 @@ void Sidebar_Widget::doLayout()
{
delete m_layout;
m_layout = new QHBoxLayout(this);
m_layout->setMargin(0);
m_layout->setContentsMargins(0, 0, 0, 0);
m_layout->setSpacing(0);
if (m_showTabsLeft) {
m_layout->addWidget(m_buttonBar);
......
......@@ -35,13 +35,13 @@ KonqSidebarOldTreeModule::KonqSidebarOldTreeModule(const KComponentData &compone
widget = new QWidget(parent);
QVBoxLayout *widgetVBoxLayout = new QVBoxLayout(widget);
widgetVBoxLayout->setMargin(0);
widgetVBoxLayout->setContentsMargins(0, 0, 0, 0);
// TODO use QVBoxLayout
if (configGroup.readEntry("X-KDE-SearchableTreeModule", false)) {
QWidget *searchLine = new QWidget(widget);
QVBoxLayout *searchLineVBoxLayout = new QVBoxLayout(searchLine);
searchLineVBoxLayout->setMargin(0);
searchLineVBoxLayout->setContentsMargins(0, 0, 0, 0);
widgetVBoxLayout->addWidget(searchLine);
tree = new KonqSidebarTree(this, widget, virt, path);
new K3ListViewSearchLineWidget(tree, searchLine);
......
......@@ -136,7 +136,7 @@ void KonqSideBarWebModule::setAutoReload()
QWidget *hbox = new QWidget(&dlg);
QHBoxLayout *hboxHBoxLayout = new QHBoxLayout(hbox);
hboxHBoxLayout->setMargin(0);
hboxHBoxLayout->setContentsMargins(0, 0, 0, 0);
dlg.setMainWidget(hbox);
KIntNumInput *mins = new KIntNumInput(hbox);
......
......@@ -168,7 +168,7 @@ void KonqFrame::attachWidget(QWidget *widget)
m_pLayout = new QVBoxLayout(this);
m_pLayout->setObjectName(QStringLiteral("KonqFrame's QVBoxLayout"));
m_pLayout->setMargin(0);
m_pLayout->setContentsMargins(0, 0, 0, 0);
m_pLayout->setSpacing(0);
m_pLayout->addWidget(widget, 1);
......
......@@ -48,7 +48,7 @@ KonqHistoryDialog::KonqHistoryDialog(KonqMainWindow *parent)
setButtons(KDialog::Close);
QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget());
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
m_historyView = new KonqHistoryView(mainWidget());
connect(m_historyView->treeView(), SIGNAL(doubleClicked(QModelIndex)), this, SLOT(slotOpenWindowForIndex(QModelIndex)));
......
......@@ -116,7 +116,7 @@ KonqHistoryView::KonqHistoryView(QWidget *parent)
connect(m_searchLineEdit, &KLineEdit::textChanged, this, &KonqHistoryView::slotFilterTextChanged);
QVBoxLayout *mainLayout = new QVBoxLayout(this);
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
mainLayout->addWidget(m_searchLineEdit);
mainLayout->addWidget(m_treeView);
}
......
......@@ -69,7 +69,7 @@ KonqSessionDlg::KonqSessionDlg(KonqViewManager *manager, QWidget *parent)
: KDialog(parent)
, d(new KonqSessionDlgPrivate(manager, this))
{
d->layout()->setMargin(0);
d->layout()->setContentsMargins(0, 0, 0, 0);
setMainWidget(d);
setObjectName(QStringLiteral("konq_session_dialog"));
......@@ -222,7 +222,7 @@ KonqNewSessionDlg::KonqNewSessionDlg(QWidget *parent, KonqMainWindow *mainWindow
: KDialog(parent)
, d(new KonqNewSessionDlgPrivate(this, mainWindow, mode))
{
d->layout()->setMargin(0);
d->layout()->setContentsMargins(0, 0, 0, 0);
setMainWidget(d);
setObjectName(QStringLiteral("konq_new_session_dialog"));
......
......@@ -109,10 +109,10 @@ SessionRestoreDialog::SessionRestoreDialog(const QStringList &sessionFilePaths,
QWidget *mainWidget = new QWidget(this);
QVBoxLayout *mainLayout = new QVBoxLayout(mainWidget);
mainLayout->setSpacing(KDialog::spacingHint() * 2); // provide extra spacing
mainLayout->setMargin(0);
mainLayout->setContentsMargins(0, 0, 0, 0);
QHBoxLayout *hLayout = new QHBoxLayout();
hLayout->setMargin(0);
hLayout->setContentsMargins(0, 0, 0, 0);
hLayout->setSpacing(-1); // use default spacing
mainLayout->addLayout(hLayout, 5);
......
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