From 02c2c930f0874a8886cb0983606c38cb8b356cd7 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 23 Jul 2020 13:54:47 +0200 Subject: 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 --- tests/manual/windowgeometry/controllerwidget.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'tests/manual/windowgeometry/controllerwidget.cpp') 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); -- cgit v1.2.3