From 376715f1a57209cbb19502954a37939e2d6d88c6 Mon Sep 17 00:00:00 2001 From: Sona Kurazyan Date: Tue, 23 Jul 2019 15:26:19 +0200 Subject: Remove usages of deprecated APIs of qtbase/widgets - Replace the usages of deprecated APIs by corresponding alternatives in the library code and documentation. - Build docs for deprecated APIs conditionally, based on deprecation version. Remove the docs of methods deprecated since 5.0.0, these methods are not compiled anymore. - Modify the tests to make them build when deprecated APIs disabled: * Make the the parts of the tests testing the deprecated APIs to be compiled conditionally, only when the corresponding methods are enabled. * If the test-case tests only the deprecated API, but not the corresponding replacement, add tests for the replacement Task-number: QTBUG-76491 Task-number: QTBUG-76540 Task-number: QTBUG-76541 Change-Id: I6aaf0a1369c479fb880369a38f2b8e1e86b46934 Reviewed-by: Volker Hilsheimer --- tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp') diff --git a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp index 5e0327319b..1d63d140fb 100644 --- a/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp +++ b/tests/auto/widgets/kernel/qgridlayout/tst_qgridlayout.cpp @@ -219,9 +219,9 @@ void tst_QGridLayout::badDistributionBug() QDialog dialog; Ui::SortDialog ui; ui.setupUi(&dialog); - ui.gridLayout->setMargin(0); + ui.gridLayout->setContentsMargins(0, 0, 0, 0); ui.gridLayout->setSpacing(0); - ui.vboxLayout->setMargin(0); + ui.vboxLayout->setContentsMargins(0, 0, 0, 0); ui.vboxLayout->setSpacing(0); ui.okButton->setFixedHeight(20); ui.moreButton->setFixedHeight(20); @@ -237,7 +237,7 @@ void tst_QGridLayout::setMinAndMaxSize() QWidget widget; setFrameless(&widget); QGridLayout layout(&widget); - layout.setMargin(0); + layout.setContentsMargins(0, 0, 0, 0); layout.setSpacing(0); layout.setSizeConstraint(QLayout::SetMinAndMaxSize); widget.show(); @@ -396,7 +396,7 @@ void tst_QGridLayout::spacingAndSpacers() QWidget widget; setFrameless(&widget); QGridLayout layout(&widget); - layout.setMargin(0); + layout.setContentsMargins(0, 0, 0, 0); layout.setSpacing(0); widget.show(); @@ -1541,7 +1541,7 @@ void tst_QGridLayout::spacerWithSpacing() QWidget window; QGridLayout layout(&window); layout.setSpacing(1); - layout.setMargin(0); + layout.setContentsMargins(0, 0, 0, 0); populate(&layout, 0, i); populate(&layout, 1, j); populate(&layout, 2, k); @@ -1651,7 +1651,7 @@ void tst_QGridLayout::taskQTBUG_52357_spacingWhenItemIsHidden() QWidget widget; setFrameless(&widget); QGridLayout layout(&widget); - layout.setMargin(0); + layout.setContentsMargins(0, 0, 0, 0); layout.setSpacing(5); QPushButton button1; layout.addWidget(&button1, 0, 0); -- cgit v1.2.3