Port setMargins to setContentsMargins

Change-Id: Ie6b3f3e4dddbbf4bcc7ea7561ec348ff2c666907
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Laurent Montel
2019-10-01 10:55:29 +02:00
parent d5320bb407
commit f467badc2f
7 changed files with 8 additions and 8 deletions

View File

@@ -40,7 +40,7 @@ BareMetalGdbCommandsDeployStepWidget::BareMetalGdbCommandsDeployStepWidget(BareM
: BuildStepConfigWidget(&step), m_step(step) : BuildStepConfigWidget(&step), m_step(step)
{ {
const auto fl = new QFormLayout(this); const auto fl = new QFormLayout(this);
fl->setMargin(0); fl->setContentsMargins(0, 0, 0, 0);
fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow); fl->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
setLayout(fl); setLayout(fl);
m_commands = new QPlainTextEdit(this); m_commands = new QPlainTextEdit(this);

View File

@@ -381,7 +381,7 @@ CppIncludeHierarchyWidget::CppIncludeHierarchyWidget()
m_delegate.setAnnotationRole(AnnotationRole); m_delegate.setAnnotationRole(AnnotationRole);
m_inspectedFile = new TextEditorLinkLabel(this); m_inspectedFile = new TextEditorLinkLabel(this);
m_inspectedFile->setMargin(5); m_inspectedFile->setContentsMargins(5, 5, 5, 5);
m_treeView = new CppIncludeHierarchyTreeView; m_treeView = new CppIncludeHierarchyTreeView;
m_treeView->setModel(&m_model); m_treeView->setModel(&m_model);

View File

@@ -91,7 +91,7 @@ namespace Internal {
CppTypeHierarchyWidget::CppTypeHierarchyWidget() CppTypeHierarchyWidget::CppTypeHierarchyWidget()
{ {
m_inspectedClass = new TextEditor::TextEditorLinkLabel(this); m_inspectedClass = new TextEditor::TextEditorLinkLabel(this);
m_inspectedClass->setMargin(5); m_inspectedClass->setContentsMargins(5, 5, 5, 5);
m_model = new CppTypeHierarchyModel(this); m_model = new CppTypeHierarchyModel(this);
m_treeView = new NavigationTreeView(this); m_treeView = new NavigationTreeView(this);
m_treeView->setActivationMode(SingleClickActivation); m_treeView->setActivationMode(SingleClickActivation);

View File

@@ -832,7 +832,7 @@ DebuggerPluginPrivate::DebuggerPluginPrivate(const QStringList &arguments)
QTC_ASSERT(vbox, return); QTC_ASSERT(vbox, return);
auto label = new QLabel(widget); auto label = new QLabel(widget);
label->setText(text); label->setText(text);
label->setMargin(6); label->setContentsMargins(6, 6, 6, 6);
vbox->insertWidget(0, label); vbox->insertWidget(0, label);
}; };

View File

@@ -725,7 +725,7 @@ MiniProjectTargetSelector::MiniProjectTargetSelector(QAction *targetSelectorActi
m_kitAreaWidget = new KitAreaWidget(this); m_kitAreaWidget = new KitAreaWidget(this);
m_summaryLabel = new QLabel(this); m_summaryLabel = new QLabel(this);
m_summaryLabel->setMargin(3); m_summaryLabel->setContentsMargins(3, 3, 3, 3);
m_summaryLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop); m_summaryLabel->setAlignment(Qt::AlignLeft | Qt::AlignTop);
m_summaryLabel->setStyleSheet(QString::fromLatin1("background: %1;") m_summaryLabel->setStyleSheet(QString::fromLatin1("background: %1;")
.arg(creatorTheme()->color(Theme::MiniProjectTargetSelectorSummaryBackgroundColor).name())); .arg(creatorTheme()->color(Theme::MiniProjectTargetSelectorSummaryBackgroundColor).name()));

View File

@@ -217,7 +217,7 @@ void TargetGroupItemPrivate::ensureWidget()
f.setPointSizeF(f.pointSizeF() * 1.4); f.setPointSizeF(f.pointSizeF() * 1.4);
f.setBold(true); f.setBold(true);
label->setFont(f); label->setFont(f);
label->setMargin(10); label->setContentsMargins(10, 10, 10, 10);
label->setAlignment(Qt::AlignTop); label->setAlignment(Qt::AlignTop);
auto layout = new QVBoxLayout(m_noKitLabel); auto layout = new QVBoxLayout(m_noKitLabel);

View File

@@ -44,13 +44,13 @@ PluginDialog::PluginDialog()
: m_view(new ExtensionSystem::PluginView(this)) : m_view(new ExtensionSystem::PluginView(this))
{ {
QVBoxLayout *vl = new QVBoxLayout(this); QVBoxLayout *vl = new QVBoxLayout(this);
vl->setMargin(0); vl->setContentsMargins(0, 0, 0, 0);
vl->setSpacing(0); vl->setSpacing(0);
vl->addWidget(m_view); vl->addWidget(m_view);
QHBoxLayout *hl = new QHBoxLayout; QHBoxLayout *hl = new QHBoxLayout;
vl->addLayout(hl); vl->addLayout(hl);
hl->setMargin(0); hl->setContentsMargins(0, 0, 0, 0);
hl->setSpacing(6); hl->setSpacing(6);
m_detailsButton = new QPushButton(tr("Details"), this); m_detailsButton = new QPushButton(tr("Details"), this);
m_errorDetailsButton = new QPushButton(tr("Error Details"), this); m_errorDetailsButton = new QPushButton(tr("Error Details"), this);