summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/manual/windowchildgeometry/controllerwidget.cpp6
-rw-r--r--tests/manual/windowgeometry/controllerwidget.cpp18
2 files changed, 12 insertions, 12 deletions
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<QWindow *>(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<QWindow *>(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<const QWindow *>(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<QWindow *>(m_object);
- w->setVisible(m_stateControl->visibleValue());
- w->setWindowState(m_stateControl->state());
+ w->setVisible(m_statesControl->visibleValue());
+ w->setWindowStates(m_statesControl->states());
}
#endif