Remove usages of deprecated APIs of QLayout

Replaced:
  QLayout::setMargin() -> QLayout::setContentsMargins()
  QLayout::margin() -> QLayout::getContentsMargins()

Task-number: QTBUG-76491
Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sona Kurazyan
2019-08-29 10:36:01 +02:00
parent 228f5fc319
commit 8e31932c29
117 changed files with 177 additions and 181 deletions

View File

@@ -45,7 +45,7 @@ ClangDiagnosticConfigsSelectionWidget::ClangDiagnosticConfigsSelectionWidget(QWi
, m_selectionComboBox(new QComboBox(this))
{
auto *layout = new QHBoxLayout(this);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
setLayout(layout);
layout->addWidget(m_label);
layout->addWidget(m_selectionComboBox, 1);
@@ -108,7 +108,7 @@ void ClangDiagnosticConfigsSelectionWidget::connectToClangDiagnosticConfigsDialo
{
connect(button, &QPushButton::clicked, [this]() {
ClangDiagnosticConfigsWidget *widget = new ClangDiagnosticConfigsWidget(currentConfigId());
widget->layout()->setMargin(0);
widget->layout()->setContentsMargins(0, 0, 0, 0);
QDialog dialog;
dialog.setWindowTitle(ClangDiagnosticConfigsWidget::tr("Diagnostic Configurations"));
dialog.setLayout(new QVBoxLayout);

View File

@@ -106,7 +106,7 @@ QWidget *CppCodeStylePreferencesFactory::createEditor(TextEditor::ICodeStylePref
if (!cppPreferences)
return nullptr;
auto widget = new Internal::CppCodeStylePreferencesWidget(parent);
widget->layout()->setMargin(0);
widget->layout()->setContentsMargins(0, 0, 0, 0);
widget->setCodeStyle(cppPreferences);
return widget;
}

View File

@@ -263,7 +263,7 @@ SymbolsFindFilterConfigWidget::SymbolsFindFilterConfigWidget(SymbolsFindFilter *
auto layout = new QGridLayout(this);
setLayout(layout);
layout->setMargin(0);
layout->setContentsMargins(0, 0, 0, 0);
auto typeLabel = new QLabel(tr("Types:"));
layout->addWidget(typeLabel, 0, 0);