diff options
author | Edward Welbourne <[email protected]> | 2020-07-23 13:54:47 +0200 |
---|---|---|
committer | Edward Welbourne <[email protected]> | 2020-07-27 11:20:35 +0200 |
commit | 02c2c930f0874a8886cb0983606c38cb8b356cd7 (patch) | |
tree | 501d5fc16f2ba14f02bb27a75964ffe8993510d0 /tests/manual/windowgeometry/controllerwidget.cpp | |
parent | 2059170b33ffb05b99d9a3e1e374eb5a4bce9163 (diff) |
Fix some compiler errors caused by bit-rot in manual tests
Two methods that have gone away or been renamed,
an enum that now doesn't support being assigned from int.
QTime should no longer be used as a timer.
Removed a test of deprecated code that's gone away.
Task-number: QTBUG-85700
Change-Id: Idc6d59542625d22b9937084411b54b0d8aa87f00
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'tests/manual/windowgeometry/controllerwidget.cpp')
-rw-r--r-- | tests/manual/windowgeometry/controllerwidget.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/manual/windowgeometry/controllerwidget.cpp b/tests/manual/windowgeometry/controllerwidget.cpp index b05ea2907e1..3ad0cfb4094 100644 --- a/tests/manual/windowgeometry/controllerwidget.cpp +++ b/tests/manual/windowgeometry/controllerwidget.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2020 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the test suite of the Qt Toolkit. @@ -85,7 +85,8 @@ RectControl::RectControl() { QHBoxLayout *l = new QHBoxLayout(this); l->setSpacing(0); - l->setMargin(ControlLayoutMargin); + l->setContentsMargins(ControlLayoutMargin, ControlLayoutMargin, + ControlLayoutMargin, ControlLayoutMargin); connect(m_point, SIGNAL(pointValueChanged(QPoint)), this, SLOT(handleChanged())); connect(m_point, SIGNAL(pointValueChanged(QPoint)), this, SIGNAL(positionChanged(QPoint))); l->addWidget(m_point); @@ -128,11 +129,13 @@ BaseWindowControl::BaseWindowControl(QObject *w) m_geometry->setTitle(tr("Geometry")); int row = 0; m_layout->addWidget(m_geometry, row, 0, 1, 2); - m_layout->setMargin(ControlLayoutMargin); + m_layout->setContentsMargins(ControlLayoutMargin, ControlLayoutMargin, + ControlLayoutMargin, ControlLayoutMargin); QGroupBox *frameGB = new QGroupBox(tr("Frame")); QVBoxLayout *frameL = new QVBoxLayout(frameGB); frameL->setSpacing(0); - frameL->setMargin(ControlLayoutMargin); + frameL->setContentsMargins(ControlLayoutMargin, ControlLayoutMargin, + ControlLayoutMargin, ControlLayoutMargin); frameL->addWidget(m_framePosition); m_layout->addWidget(frameGB, row, 2); @@ -144,7 +147,8 @@ BaseWindowControl::BaseWindowControl(QObject *w) QGroupBox *eventGroupBox = new QGroupBox(tr("Events")); QVBoxLayout *l = new QVBoxLayout(eventGroupBox); l->setSpacing(0); - l->setMargin(ControlLayoutMargin); + l->setContentsMargins(ControlLayoutMargin, ControlLayoutMargin, + ControlLayoutMargin, ControlLayoutMargin); l->addWidget(m_moveEventLabel); l->addWidget(m_resizeEventLabel); l->addWidget(m_mouseEventLabel); |