aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2019-08-29 10:36:01 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2019-09-02 13:01:07 +0000
commit8e31932c295b158805410a9991bef8edc869d21b (patch)
treef12f6fcdccecf70760b0ae9c1fedaefef5e5a807 /src/plugins/projectexplorer
parent228f5fc319e33ed32cb1f997c65b68b5ddc18fd7 (diff)
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>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/abiwidget.cpp2
-rw-r--r--src/plugins/projectexplorer/allprojectsfind.cpp2
-rw-r--r--src/plugins/projectexplorer/appoutputpane.cpp2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/buildenvironmentwidget.cpp2
-rw-r--r--src/plugins/projectexplorer/buildstep.cpp2
-rw-r--r--src/plugins/projectexplorer/buildstepspage.cpp4
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/environmentaspectwidget.cpp4
-rw-r--r--src/plugins/projectexplorer/environmentwidget.cpp4
-rw-r--r--src/plugins/projectexplorer/kitmanagerconfigwidget.cpp2
-rw-r--r--src/plugins/projectexplorer/miniprojecttargetselector.cpp2
-rw-r--r--src/plugins/projectexplorer/panelswidget.cpp2
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/runsettingspropertiespage.cpp4
-rw-r--r--src/plugins/projectexplorer/selectablefilesmodel.cpp2
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp6
-rw-r--r--src/plugins/projectexplorer/targetsetuppage.cpp2
-rw-r--r--src/plugins/projectexplorer/targetsetupwidget.cpp2
19 files changed, 26 insertions, 26 deletions
diff --git a/src/plugins/projectexplorer/abiwidget.cpp b/src/plugins/projectexplorer/abiwidget.cpp
index 5df9a3ee05..8171ec03d5 100644
--- a/src/plugins/projectexplorer/abiwidget.cpp
+++ b/src/plugins/projectexplorer/abiwidget.cpp
@@ -78,7 +78,7 @@ AbiWidget::AbiWidget(QWidget *parent) : QWidget(parent),
d(std::make_unique<Internal::AbiWidgetPrivate>())
{
auto *layout = new QHBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(2);
d->m_abi = new QComboBox(this);
diff --git a/src/plugins/projectexplorer/allprojectsfind.cpp b/src/plugins/projectexplorer/allprojectsfind.cpp
index feb80bad05..28ed75fe5f 100644
--- a/src/plugins/projectexplorer/allprojectsfind.cpp
+++ b/src/plugins/projectexplorer/allprojectsfind.cpp
@@ -128,7 +128,7 @@ QWidget *AllProjectsFind::createConfigWidget()
if (!m_configWidget) {
m_configWidget = new QWidget;
auto gridLayout = new QGridLayout(m_configWidget);
- gridLayout->setMargin(0);
+ gridLayout->setContentsMargins(0, 0, 0, 0);
m_configWidget->setLayout(gridLayout);
const QList<QPair<QWidget *, QWidget *>> patternWidgets = createPatternWidgets();
int row = 0;
diff --git a/src/plugins/projectexplorer/appoutputpane.cpp b/src/plugins/projectexplorer/appoutputpane.cpp
index f04f4e09db..d9f2f06fc8 100644
--- a/src/plugins/projectexplorer/appoutputpane.cpp
+++ b/src/plugins/projectexplorer/appoutputpane.cpp
@@ -230,7 +230,7 @@ AppOutputPane::AppOutputPane() :
// Spacer (?)
auto *layout = new QVBoxLayout;
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
m_tabWidget->setDocumentMode(true);
m_tabWidget->setTabsClosable(true);
m_tabWidget->setMovable(true);
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index e53728b5a1..ccf333aa21 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -151,14 +151,14 @@ NamedWidget *BuildConfiguration::createConfigWidget()
container->setWidget(widget);
auto vbox = new QVBoxLayout(named);
- vbox->setMargin(0);
+ vbox->setContentsMargins(0, 0, 0, 0);
vbox->addWidget(container);
} else {
widget = named;
}
auto formLayout = new QFormLayout(widget);
- formLayout->setMargin(0);
+ formLayout->setContentsMargins(0, 0, 0, 0);
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
for (ProjectConfigurationAspect *aspect : aspects()) {
diff --git a/src/plugins/projectexplorer/buildenvironmentwidget.cpp b/src/plugins/projectexplorer/buildenvironmentwidget.cpp
index 047412fbf3..4995d1bc50 100644
--- a/src/plugins/projectexplorer/buildenvironmentwidget.cpp
+++ b/src/plugins/projectexplorer/buildenvironmentwidget.cpp
@@ -39,7 +39,7 @@ BuildEnvironmentWidget::BuildEnvironmentWidget(BuildConfiguration *bc) :
m_buildConfiguration(nullptr)
{
auto vbox = new QVBoxLayout(this);
- vbox->setMargin(0);
+ vbox->setContentsMargins(0, 0, 0, 0);
m_clearSystemEnvironmentCheckBox = new QCheckBox(this);
m_clearSystemEnvironmentCheckBox->setText(tr("Clear system environment"));
diff --git a/src/plugins/projectexplorer/buildstep.cpp b/src/plugins/projectexplorer/buildstep.cpp
index 3067b8c800..38968fe514 100644
--- a/src/plugins/projectexplorer/buildstep.cpp
+++ b/src/plugins/projectexplorer/buildstep.cpp
@@ -150,7 +150,7 @@ BuildStepConfigWidget *BuildStep::createConfigWidget()
auto widget = new BuildStepConfigWidget(this);
auto formLayout = new QFormLayout(widget);
- formLayout->setMargin(0);
+ formLayout->setContentsMargins(0, 0, 0, 0);
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
for (ProjectConfigurationAspect *aspect : m_aspects) {
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index 7942bceae0..de40258b11 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -53,7 +53,7 @@ using namespace Utils;
ToolWidget::ToolWidget(QWidget *parent) : FadingPanel(parent)
{
auto layout = new QHBoxLayout;
- layout->setMargin(4);
+ layout->setContentsMargins(4, 4, 4, 4);
layout->setSpacing(4);
setLayout(layout);
m_firstWidget = new FadingWidget(this);
@@ -75,7 +75,7 @@ ToolWidget::ToolWidget(QWidget *parent) : FadingPanel(parent)
m_secondWidget = new FadingWidget(this);
m_secondWidget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
hbox = new QHBoxLayout();
- hbox->setMargin(0);
+ hbox->setContentsMargins(0, 0, 0, 0);
hbox->setSpacing(4);
m_secondWidget->setLayout(hbox);
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index c96eed5e10..2f5e4463b7 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -101,7 +101,7 @@ CustomExecutableDialog::CustomExecutableDialog(RunConfiguration *rc)
auto layout = new QFormLayout;
layout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
auto detailsContainer = new DetailsWidget(this);
detailsContainer->setState(DetailsWidget::NoSummary);
diff --git a/src/plugins/projectexplorer/environmentaspectwidget.cpp b/src/plugins/projectexplorer/environmentaspectwidget.cpp
index db341ab609..b50c861972 100644
--- a/src/plugins/projectexplorer/environmentaspectwidget.cpp
+++ b/src/plugins/projectexplorer/environmentaspectwidget.cpp
@@ -49,11 +49,11 @@ EnvironmentAspectWidget::EnvironmentAspectWidget(EnvironmentAspect *aspect, QWid
setContentsMargins(0, 0, 0, 0);
auto topLayout = new QVBoxLayout(this);
- topLayout->setMargin(0);
+ topLayout->setContentsMargins(0, 0, 0, 0);
auto baseEnvironmentWidget = new QWidget;
auto baseLayout = new QHBoxLayout(baseEnvironmentWidget);
- baseLayout->setMargin(0);
+ baseLayout->setContentsMargins(0, 0, 0, 0);
auto label = new QLabel(tr("Base environment for this run configuration:"), this);
baseLayout->addWidget(label);
diff --git a/src/plugins/projectexplorer/environmentwidget.cpp b/src/plugins/projectexplorer/environmentwidget.cpp
index c517bbd996..04d68dd42d 100644
--- a/src/plugins/projectexplorer/environmentwidget.cpp
+++ b/src/plugins/projectexplorer/environmentwidget.cpp
@@ -123,13 +123,13 @@ EnvironmentWidget::EnvironmentWidget(QWidget *parent, Type type, QWidget *additi
details->setVisible(false);
auto vbox2 = new QVBoxLayout(details);
- vbox2->setMargin(0);
+ vbox2->setContentsMargins(0, 0, 0, 0);
if (additionalDetailsWidget)
vbox2->addWidget(additionalDetailsWidget);
auto horizontalLayout = new QHBoxLayout();
- horizontalLayout->setMargin(0);
+ horizontalLayout->setContentsMargins(0, 0, 0, 0);
auto tree = new Utils::TreeView(this);
connect(tree, &QAbstractItemView::activated,
tree, [tree](const QModelIndex &idx) { tree->edit(idx); });
diff --git a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
index f709d58c72..fd7584ea21 100644
--- a/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
+++ b/src/plugins/projectexplorer/kitmanagerconfigwidget.cpp
@@ -95,7 +95,7 @@ KitManagerConfigWidget::KitManagerConfigWidget(Kit *k) :
inner->setLayout(m_layout);
auto mainLayout = new QGridLayout(this);
- mainLayout->setMargin(1);
+ mainLayout->setContentsMargins(1, 1, 1, 1);
mainLayout->addWidget(inner, 0, 0);
label = createLabel(tr("Name:"), tr("Kit name and icon."));
diff --git a/src/plugins/projectexplorer/miniprojecttargetselector.cpp b/src/plugins/projectexplorer/miniprojecttargetselector.cpp
index c609dc8e62..372712f8bc 100644
--- a/src/plugins/projectexplorer/miniprojecttargetselector.cpp
+++ b/src/plugins/projectexplorer/miniprojecttargetselector.cpp
@@ -612,7 +612,7 @@ QListWidgetItem *GenericListWidget::itemForProjectConfiguration(QObject *pc)
KitAreaWidget::KitAreaWidget(QWidget *parent) : QWidget(parent),
m_layout(new QGridLayout(this))
{
- m_layout->setMargin(3);
+ m_layout->setContentsMargins(3, 3, 3, 3);
setAutoFillBackground(true);
connect(KitManager::instance(), &KitManager::kitUpdated, this, &KitAreaWidget::updateKit);
}
diff --git a/src/plugins/projectexplorer/panelswidget.cpp b/src/plugins/projectexplorer/panelswidget.cpp
index 6e6e1f0177..77e4cb204a 100644
--- a/src/plugins/projectexplorer/panelswidget.cpp
+++ b/src/plugins/projectexplorer/panelswidget.cpp
@@ -128,7 +128,7 @@ PanelsWidget::PanelsWidget(QWidget *parent) :
// The layout holding the individual panels:
auto topLayout = new QVBoxLayout(m_root);
- topLayout->setMargin(0);
+ topLayout->setContentsMargins(0, 0, 0, 0);
topLayout->setSpacing(0);
m_layout = new QGridLayout;
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index 2aa005ad4f..0830211946 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -252,7 +252,7 @@ QWidget *RunConfiguration::createConfigurationWidget()
{
auto widget = new QWidget;
auto formLayout = new QFormLayout(widget);
- formLayout->setMargin(0);
+ formLayout->setContentsMargins(0, 0, 0, 0);
formLayout->setFieldGrowthPolicy(QFormLayout::ExpandingFieldsGrow);
for (ProjectConfigurationAspect *aspect : m_aspects) {
diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
index b740a6b9af..8a934874a7 100644
--- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
@@ -121,7 +121,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target) :
// deploy part
deployWidget->setContentsMargins(0, 10, 0, 25);
m_deployLayout = new QVBoxLayout(deployWidget);
- m_deployLayout->setMargin(0);
+ m_deployLayout->setContentsMargins(0, 0, 0, 0);
m_deployLayout->setSpacing(5);
m_deployConfigurationCombo->setModel(m_target->deployConfigurationModel());
@@ -153,7 +153,7 @@ RunSettingsWidget::RunSettingsWidget(Target *target) :
// run part
runWidget->setContentsMargins(0, 10, 0, 25);
m_runLayout = new QVBoxLayout(runWidget);
- m_runLayout->setMargin(0);
+ m_runLayout->setContentsMargins(0, 0, 0, 0);
m_runLayout->setSpacing(5);
m_disabledIcon = new QLabel;
diff --git a/src/plugins/projectexplorer/selectablefilesmodel.cpp b/src/plugins/projectexplorer/selectablefilesmodel.cpp
index cfb99c4b68..6ef592598e 100644
--- a/src/plugins/projectexplorer/selectablefilesmodel.cpp
+++ b/src/plugins/projectexplorer/selectablefilesmodel.cpp
@@ -550,7 +550,7 @@ SelectableFilesWidget::SelectableFilesWidget(QWidget *parent) :
QLatin1String(HIDE_FILE_FILTER_DEFAULT)).toString();
auto layout = new QGridLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
m_baseDirLabel->setText(tr("Source directory:"));
m_baseDirChooser->setHistoryCompleter(QLatin1String("PE.AddToProjectDir.History"));
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index 3377c12ee0..6774cb73e3 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -151,7 +151,7 @@ TargetSetupPageWrapper::TargetSetupPageWrapper(Project *project)
hbox->addWidget(box);
auto layout = new QVBoxLayout(this);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
m_setupPageContainer = new QVBoxLayout;
layout->addLayout(m_setupPageContainer);
layout->addLayout(hbox);
@@ -268,7 +268,7 @@ void TargetGroupItemPrivate::ensureWidget()
label->setAlignment(Qt::AlignTop);
auto layout = new QVBoxLayout(m_noKitLabel);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
layout->addWidget(label);
layout->addStretch(10);
@@ -287,7 +287,7 @@ void TargetGroupItemPrivate::ensureWidget()
auto widget = new QWidget;
auto label = new QLabel("This project is already configured.");
auto layout = new QVBoxLayout(widget);
- layout->setMargin(0);
+ layout->setContentsMargins(0, 0, 0, 0);
layout->addWidget(label);
layout->addStretch(10);
m_configuredPage = new PanelsWidget(tr("Configure Project"),
diff --git a/src/plugins/projectexplorer/targetsetuppage.cpp b/src/plugins/projectexplorer/targetsetuppage.cpp
index 0f3d9944fa..7f45cf69b7 100644
--- a/src/plugins/projectexplorer/targetsetuppage.cpp
+++ b/src/plugins/projectexplorer/targetsetuppage.cpp
@@ -195,7 +195,7 @@ TargetSetupPage::TargetSetupPage(QWidget *parent) :
m_ui->scrollArea->setWidget(centralWidget);
centralWidget->setLayout(new QVBoxLayout);
m_ui->centralWidget->setLayout(new QVBoxLayout);
- m_ui->centralWidget->layout()->setMargin(0);
+ m_ui->centralWidget->layout()->setContentsMargins(0, 0, 0, 0);
setTitle(tr("Kit Selection"));
diff --git a/src/plugins/projectexplorer/targetsetupwidget.cpp b/src/plugins/projectexplorer/targetsetupwidget.cpp
index e6cbff1460..12a16d31c1 100644
--- a/src/plugins/projectexplorer/targetsetupwidget.cpp
+++ b/src/plugins/projectexplorer/targetsetupwidget.cpp
@@ -84,7 +84,7 @@ TargetSetupWidget::TargetSetupWidget(Kit *k, const FilePath &projectPath) :
auto w = new QWidget;
m_newBuildsLayout = new QGridLayout;
- m_newBuildsLayout->setMargin(0);
+ m_newBuildsLayout->setContentsMargins(0, 0, 0, 0);
if (Utils::HostOsInfo::isMacHost())
m_newBuildsLayout->setSpacing(0);
w->setLayout(m_newBuildsLayout);