From 92b3ef24ed35b405f50ac67b2e51e74eb384451b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 4 Jun 2018 16:21:32 +0200 Subject: Fix window(child)geometry manual tests Task-number: QTBUG-67632 Change-Id: I16482d3501cc7c7893d6eac4617c77dc70e1e215 Reviewed-by: Gatis Paeglis --- tests/manual/windowchildgeometry/controllerwidget.cpp | 6 +++--- tests/manual/windowgeometry/controllerwidget.cpp | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tests/manual') diff --git a/tests/manual/windowchildgeometry/controllerwidget.cpp b/tests/manual/windowchildgeometry/controllerwidget.cpp index 871313d983..396fad53dc 100644 --- a/tests/manual/windowchildgeometry/controllerwidget.cpp +++ b/tests/manual/windowchildgeometry/controllerwidget.cpp @@ -236,7 +236,7 @@ private: WidgetWindowControl::WidgetWindowControl(QWidget *w ) : BaseWindowControl(w) - , m_statesControl(new WindowStatesControl(WindowStatesControl::WantVisibleCheckBox | WindowStatesControl::WantActiveCheckBox)) + , m_statesControl(new WindowStatesControl) { setTitle(w->windowTitle()); m_layout->addWidget(m_statesControl, 2, 0); @@ -364,14 +364,14 @@ private: virtual void setObjectWindowFlags(QObject *o, Qt::WindowFlags f) { static_cast(o)->setFlags(f); } - WindowStateControl *m_stateControl; + WindowStatesControl *m_statesControl; QWindow *m_window; QWindow *m_detachedParent; // set when this window is detached. This is the window we should re-attach to. }; WindowControl::WindowControl(QWindow *w ) : BaseWindowControl(w) - , m_stateControl(new WindowStateControl(WindowStateControl::WantVisibleCheckBox | WindowStateControl::WantMinimizeRadioButton)) + , m_statesControl(new WindowStatesControl) , m_window(w) , m_detachedParent(0) { diff --git a/tests/manual/windowgeometry/controllerwidget.cpp b/tests/manual/windowgeometry/controllerwidget.cpp index 7620d2df56..b05ea2907e 100644 --- a/tests/manual/windowgeometry/controllerwidget.cpp +++ b/tests/manual/windowgeometry/controllerwidget.cpp @@ -256,7 +256,7 @@ private: WidgetWindowControl::WidgetWindowControl(QWidget *w ) : BaseWindowControl(w) - , m_statesControl(new WindowStatesControl(WindowStatesControl::WantVisibleCheckBox | WindowStatesControl::WantActiveCheckBox)) + , m_statesControl(new WindowStatesControl) { setTitle(w->windowTitle()); m_layout->addWidget(m_statesControl, 2, 0); @@ -354,34 +354,34 @@ private: virtual void setObjectWindowFlags(QObject *o, Qt::WindowFlags f) { static_cast(o)->setFlags(f); } - WindowStateControl *m_stateControl; + WindowStatesControl *m_statesControl; }; WindowControl::WindowControl(QWindow *w ) : BaseWindowControl(w) - , m_stateControl(new WindowStateControl(WindowStateControl::WantVisibleCheckBox | WindowStateControl::WantMinimizeRadioButton)) + , m_statesControl(new WindowStatesControl) { setTitle(w->title()); QGroupBox *stateGroupBox = new QGroupBox(tr("State")); QVBoxLayout *l = new QVBoxLayout(stateGroupBox); - l->addWidget(m_stateControl); + l->addWidget(m_statesControl); m_layout->addWidget(stateGroupBox, 2, 0); - connect(m_stateControl, SIGNAL(changed()), this, SLOT(stateChanged())); + connect(m_statesControl, SIGNAL(changed()), this, SLOT(stateChanged())); } void WindowControl::refresh() { const QWindow *w = static_cast(m_object); BaseWindowControl::refresh(); - m_stateControl->setVisibleValue(w->isVisible()); - m_stateControl->setState(w->windowState()); + m_statesControl->setVisibleValue(w->isVisible()); + m_statesControl->setStates(w->windowStates()); } void WindowControl::stateChanged() { QWindow *w = static_cast(m_object); - w->setVisible(m_stateControl->visibleValue()); - w->setWindowState(m_stateControl->state()); + w->setVisible(m_statesControl->visibleValue()); + w->setWindowStates(m_statesControl->states()); } #endif -- cgit v1.2.3