summaryrefslogtreecommitdiff
path: root/src/designer/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-10 12:28:58 +0100
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-02-11 18:59:40 +0000
commit2055c451f8ff2b2f5e7de105454790d7b240a6b3 (patch)
treefadcf53b118e7584e4f4828f2aa57a9bc26b53ed /src/designer/src
parentcc8b01240f54048ca16ace963bf205e813728bfb (diff)
downloadqttools-2055c451f8ff2b2f5e7de105454790d7b240a6b3.tar.gz
QtTools: replace deprecated QLayout::margin() with contentsMargins()
QLayout::margin()/setMargin() is deprecated - replace it with it's successors contentsMargins()/setContentsMargins() Change-Id: I8b6a36f3e0d0e00186a7d9cdf4827cf06f302235 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/designer/src')
-rw-r--r--src/designer/src/components/formeditor/dpi_chooser.cpp4
-rw-r--r--src/designer/src/components/formeditor/formwindow_widgetstack.cpp4
-rw-r--r--src/designer/src/components/objectinspector/objectinspector.cpp2
-rw-r--r--src/designer/src/components/propertyeditor/designerpropertymanager.cpp8
-rw-r--r--src/designer/src/components/propertyeditor/paletteeditor.cpp4
-rw-r--r--src/designer/src/components/propertyeditor/previewframe.cpp2
-rw-r--r--src/designer/src/components/propertyeditor/propertyeditor.cpp2
-rw-r--r--src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp2
-rw-r--r--src/designer/src/components/taskmenu/listwidgeteditor.cpp2
-rw-r--r--src/designer/src/components/widgetbox/widgetbox.cpp2
-rw-r--r--src/designer/src/designer/qdesigner_formwindow.cpp2
-rw-r--r--src/designer/src/lib/shared/actioneditor.cpp2
-rw-r--r--src/designer/src/lib/shared/iconselector.cpp6
-rw-r--r--src/designer/src/lib/shared/qtresourceview.cpp2
-rw-r--r--src/designer/src/lib/uilib/abstractformbuilder.cpp2
-rw-r--r--src/designer/src/plugins/tools/view3d/view3d.cpp2
16 files changed, 24 insertions, 24 deletions
diff --git a/src/designer/src/components/formeditor/dpi_chooser.cpp b/src/designer/src/components/formeditor/dpi_chooser.cpp
index 20e8f02fc..915623f40 100644
--- a/src/designer/src/components/formeditor/dpi_chooser.cpp
+++ b/src/designer/src/components/formeditor/dpi_chooser.cpp
@@ -100,11 +100,11 @@ DPI_Chooser::DPI_Chooser(QWidget *parent) :
this, &DPI_Chooser::syncSpinBoxes);
// top row with predefined settings
QVBoxLayout *vBoxLayout = new QVBoxLayout;
- vBoxLayout->setMargin(0);
+ vBoxLayout->setContentsMargins(QMargins());
vBoxLayout->addWidget(m_predefinedCombo);
// Spin box row
QHBoxLayout *hBoxLayout = new QHBoxLayout;
- hBoxLayout->setMargin(0);
+ hBoxLayout->setContentsMargins(QMargins());
m_dpiXSpinBox->setMinimum(minDPI);
m_dpiXSpinBox->setMaximum(maxDPI);
diff --git a/src/designer/src/components/formeditor/formwindow_widgetstack.cpp b/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
index a7e77eecf..c9fc88f04 100644
--- a/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
+++ b/src/designer/src/components/formeditor/formwindow_widgetstack.cpp
@@ -47,14 +47,14 @@ FormWindowWidgetStack::FormWindowWidgetStack(QObject *parent) :
m_formContainerLayout(new QStackedLayout),
m_layout(new QStackedLayout)
{
- m_layout->setMargin(0);
+ m_layout->setContentsMargins(QMargins());
m_layout->setSpacing(0);
m_layout->setStackingMode(QStackedLayout::StackAll);
// We choose a QStackedLayout as immediate layout for
// the form windows as it ignores the sizePolicy of
// its child (for example, Fixed would cause undesired side effects).
- m_formContainerLayout->setMargin(0);
+ m_formContainerLayout->setContentsMargins(QMargins());
m_formContainer->setObjectName(QStringLiteral("formContainer"));
m_formContainer->setLayout(m_formContainerLayout);
m_formContainerLayout->setStackingMode(QStackedLayout::StackAll);
diff --git a/src/designer/src/components/objectinspector/objectinspector.cpp b/src/designer/src/components/objectinspector/objectinspector.cpp
index 5fe5aed29..c74b2110f 100644
--- a/src/designer/src/components/objectinspector/objectinspector.cpp
+++ b/src/designer/src/components/objectinspector/objectinspector.cpp
@@ -758,7 +758,7 @@ ObjectInspector::ObjectInspector(QDesignerFormEditorInterface *core, QWidget *pa
m_impl(new ObjectInspectorPrivate(core))
{
QVBoxLayout *vbox = new QVBoxLayout(this);
- vbox->setMargin(0);
+ vbox->setContentsMargins(QMargins());
vbox->addWidget(m_impl->filterLineEdit());
QTreeView *treeView = m_impl->treeView();
diff --git a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
index 68d394f08..06fbb42c9 100644
--- a/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
+++ b/src/designer/src/components/propertyeditor/designerpropertymanager.cpp
@@ -341,7 +341,7 @@ TextEditor::TextEditor(QDesignerFormEditorInterface *core, QWidget *parent) :
m_button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Ignored);
m_button->setFixedWidth(20);
m_layout->addWidget(m_button);
- m_layout->setMargin(0);
+ m_layout->setContentsMargins(QMargins());
m_layout->setSpacing(0);
connect(m_resourceAction, &QAction::triggered, this, &TextEditor::resourceActionActivated);
@@ -597,7 +597,7 @@ PixmapEditor::PixmapEditor(QDesignerFormEditorInterface *core, QWidget *parent)
m_button->setFixedWidth(30);
m_button->setPopupMode(QToolButton::MenuButtonPopup);
m_layout->addWidget(m_button);
- m_layout->setMargin(0);
+ m_layout->setContentsMargins(QMargins());
m_layout->setSpacing(0);
m_pixmapLabel->setFixedWidth(16);
m_pixmapLabel->setAlignment(Qt::AlignCenter);
@@ -829,7 +829,7 @@ ResetWidget::ResetWidget(QtProperty *property, QWidget *parent) :
m_button->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding));
connect(m_button, &QAbstractButton::clicked, this, &ResetWidget::slotClicked);
QLayout *layout = new QHBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(m_spacing);
layout->addWidget(m_iconLabel);
layout->addWidget(m_textLabel);
@@ -856,7 +856,7 @@ void ResetWidget::setWidget(QWidget *widget)
}
delete layout();
QLayout *layout = new QHBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(m_spacing);
layout->addWidget(widget);
layout->addWidget(m_button);
diff --git a/src/designer/src/components/propertyeditor/paletteeditor.cpp b/src/designer/src/components/propertyeditor/paletteeditor.cpp
index c701c5369..6cfb5e41c 100644
--- a/src/designer/src/components/propertyeditor/paletteeditor.cpp
+++ b/src/designer/src/components/propertyeditor/paletteeditor.cpp
@@ -407,7 +407,7 @@ BrushEditor::BrushEditor(QDesignerFormEditorInterface *core, QWidget *parent) :
m_core(core)
{
QLayout *layout = new QHBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->addWidget(m_button);
connect(m_button, &QtColorButton::colorChanged, this, &BrushEditor::brushChanged);
setFocusProxy(m_button);
@@ -443,7 +443,7 @@ RoleEditor::RoleEditor(QWidget *parent) :
m_edited(false)
{
QHBoxLayout *layout = new QHBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(0);
layout->addWidget(m_label);
diff --git a/src/designer/src/components/propertyeditor/previewframe.cpp b/src/designer/src/components/propertyeditor/previewframe.cpp
index 5a5393f4b..f4f391583 100644
--- a/src/designer/src/components/propertyeditor/previewframe.cpp
+++ b/src/designer/src/components/propertyeditor/previewframe.cpp
@@ -70,7 +70,7 @@ PreviewFrame::PreviewFrame(QWidget *parent) :
setLineWidth(1);
QVBoxLayout *vbox = new QVBoxLayout(this);
- vbox->setMargin(0);
+ vbox->setContentsMargins(QMargins());
vbox->addWidget(m_mdiArea);
setMinimumSize(ensureMdiSubWindow()->minimumSizeHint());
diff --git a/src/designer/src/components/propertyeditor/propertyeditor.cpp b/src/designer/src/components/propertyeditor/propertyeditor.cpp
index d393caee5..486e7c202 100644
--- a/src/designer/src/components/propertyeditor/propertyeditor.cpp
+++ b/src/designer/src/components/propertyeditor/propertyeditor.cpp
@@ -325,7 +325,7 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare
layout->addWidget(m_classLabel);
layout->addSpacerItem(new QSpacerItem(0,1));
layout->addWidget(m_stackedWidget);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(0);
m_treeFactory = new DesignerEditorFactory(m_core, this);
diff --git a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
index 4358007c0..2b7ba45b8 100644
--- a/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
+++ b/src/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp
@@ -704,7 +704,7 @@ SignalSlotEditorWindow::SignalSlotEditorWindow(QDesignerFormEditorInterface *cor
m_view, &QTreeView::resizeColumnToContents);
QVBoxLayout *layout = new QVBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(0);
QToolBar *toolBar = new QToolBar;
diff --git a/src/designer/src/components/taskmenu/listwidgeteditor.cpp b/src/designer/src/components/taskmenu/listwidgeteditor.cpp
index 42e533dc3..337f9ea46 100644
--- a/src/designer/src/components/taskmenu/listwidgeteditor.cpp
+++ b/src/designer/src/components/taskmenu/listwidgeteditor.cpp
@@ -52,7 +52,7 @@ ListWidgetEditor::ListWidgetEditor(QDesignerFormWindowInterface *form,
connect(buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
m_itemsEditor = new ItemListEditor(form, 0);
- m_itemsEditor->layout()->setMargin(0);
+ m_itemsEditor->layout()->setContentsMargins(QMargins());
m_itemsEditor->setNewItemText(tr("New Item"));
QFrame *sep = new QFrame;
diff --git a/src/designer/src/components/widgetbox/widgetbox.cpp b/src/designer/src/components/widgetbox/widgetbox.cpp
index 38452f9dc..bb602b0c2 100644
--- a/src/designer/src/components/widgetbox/widgetbox.cpp
+++ b/src/designer/src/components/widgetbox/widgetbox.cpp
@@ -97,7 +97,7 @@ WidgetBox::WidgetBox(QDesignerFormEditorInterface *core, QWidget *parent, Qt::Wi
{
QVBoxLayout *l = new QVBoxLayout(this);
- l->setMargin(0);
+ l->setContentsMargins(QMargins());
l->setSpacing(0);
// Prevent the filter from grabbing focus since Our view has Qt::NoFocus
diff --git a/src/designer/src/designer/qdesigner_formwindow.cpp b/src/designer/src/designer/qdesigner_formwindow.cpp
index 9453115d1..da2324eca 100644
--- a/src/designer/src/designer/qdesigner_formwindow.cpp
+++ b/src/designer/src/designer/qdesigner_formwindow.cpp
@@ -72,7 +72,7 @@ QDesignerFormWindow::QDesignerFormWindow(QDesignerFormWindowInterface *editor, Q
}
QVBoxLayout *l = new QVBoxLayout(this);
- l->setMargin(0);
+ l->setContentsMargins(QMargins());
l->addWidget(m_editor);
m_action->setCheckable(true);
diff --git a/src/designer/src/lib/shared/actioneditor.cpp b/src/designer/src/lib/shared/actioneditor.cpp
index 85d54a767..4297065b5 100644
--- a/src/designer/src/lib/shared/actioneditor.cpp
+++ b/src/designer/src/lib/shared/actioneditor.cpp
@@ -128,7 +128,7 @@ ActionEditor::ActionEditor(QDesignerFormEditorInterface *core, QWidget *parent,
setWindowTitle(tr("Actions"));
QVBoxLayout *l = new QVBoxLayout(this);
- l->setMargin(0);
+ l->setContentsMargins(QMargins());
l->setSpacing(0);
QToolBar *toolbar = new QToolBar;
diff --git a/src/designer/src/lib/shared/iconselector.cpp b/src/designer/src/lib/shared/iconselector.cpp
index 919937dc6..139d61b90 100644
--- a/src/designer/src/lib/shared/iconselector.cpp
+++ b/src/designer/src/lib/shared/iconselector.cpp
@@ -430,7 +430,7 @@ IconSelector::IconSelector(QWidget *parent) :
d_ptr->m_iconButton->setPopupMode(QToolButton::MenuButtonPopup);
l->addWidget(d_ptr->m_stateComboBox);
l->addWidget(d_ptr->m_iconButton);
- l->setMargin(0);
+ l->setContentsMargins(QMargins());
d_ptr->m_stateToName << qMakePair(qMakePair(QIcon::Normal, QIcon::Off), tr("Normal Off") );
d_ptr->m_stateToName << qMakePair(qMakePair(QIcon::Normal, QIcon::On), tr("Normal On") );
@@ -556,14 +556,14 @@ IconThemeEditor::IconThemeEditor(QWidget *parent, bool wantResetButton) :
QWidget (parent), d(new IconThemeEditorPrivate)
{
QHBoxLayout *mainHLayout = new QHBoxLayout;
- mainHLayout->setMargin(0);
+ mainHLayout->setContentsMargins(QMargins());
// Vertically center theme preview label
d->m_themeLabel->setPixmap(d->m_emptyPixmap);
QVBoxLayout *themeLabelVLayout = new QVBoxLayout;
d->m_themeLabel->setMargin(1);
- themeLabelVLayout->setMargin(0);
+ themeLabelVLayout->setContentsMargins(QMargins());
themeLabelVLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
themeLabelVLayout->addWidget(d->m_themeLabel);
themeLabelVLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Ignored, QSizePolicy::MinimumExpanding));
diff --git a/src/designer/src/lib/shared/qtresourceview.cpp b/src/designer/src/lib/shared/qtresourceview.cpp
index 701ad6e5b..f79926d88 100644
--- a/src/designer/src/lib/shared/qtresourceview.cpp
+++ b/src/designer/src/lib/shared/qtresourceview.cpp
@@ -598,7 +598,7 @@ QtResourceView::QtResourceView(QDesignerFormEditorInterface *core, QWidget *pare
d_ptr->m_splitter->addWidget(d_ptr->m_listWidget);
QLayout *layout = new QVBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->setSpacing(0);
layout->addWidget(d_ptr->m_toolBar);
layout->addWidget(d_ptr->m_splitter);
diff --git a/src/designer/src/lib/uilib/abstractformbuilder.cpp b/src/designer/src/lib/uilib/abstractformbuilder.cpp
index 3cf2e047b..1511d709c 100644
--- a/src/designer/src/lib/uilib/abstractformbuilder.cpp
+++ b/src/designer/src/lib/uilib/abstractformbuilder.cpp
@@ -671,7 +671,7 @@ QLayout *QAbstractFormBuilder::create(DomLayout *ui_layout, QLayout *parentLayou
layoutInfo(ui_layout, p, &margin, &spacing);
if (margin != INT_MIN) {
- layout->setMargin(margin);
+ layout->setContentsMargins(margin, margin, margin, margin);
} else {
const QFormBuilderStrings &strings = QFormBuilderStrings::instance();
int left, top, right, bottom;
diff --git a/src/designer/src/plugins/tools/view3d/view3d.cpp b/src/designer/src/plugins/tools/view3d/view3d.cpp
index 8c10a176b..91700f650 100644
--- a/src/designer/src/plugins/tools/view3d/view3d.cpp
+++ b/src/designer/src/plugins/tools/view3d/view3d.cpp
@@ -461,7 +461,7 @@ QView3D::QView3D(QDesignerFormWindowInterface *form_window, QWidget *parent)
connect(m_3d_widget, SIGNAL(updateForm()), this, SLOT(updateForm()));
QGridLayout *layout = new QGridLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(QMargins());
layout->addWidget(m_3d_widget, 0, 0, 1, 1);
updateForm();