From a0be8ef271bb77c54676625f6f1cbdaf29857196 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 31 Jul 2012 14:00:11 +0200 Subject: [PATCH] Add command line options to windowgeometry test Add -widgetminimized, -widgetmaximized, -widgetfullscreen, -windowminimized, -windowmaximized, -windowfullscreen as command line option to test creation of windows in these modes Change-Id: If192c131c8996d3b67648427e5784da47ffee971 Reviewed-by: Friedemann Kleint --- .../windowgeometry/controllerwidget.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/tests/manual/windowgeometry/controllerwidget.cpp b/tests/manual/windowgeometry/controllerwidget.cpp index a53739881b..d7fe1523eb 100644 --- a/tests/manual/windowgeometry/controllerwidget.cpp +++ b/tests/manual/windowgeometry/controllerwidget.cpp @@ -442,7 +442,15 @@ ControllerWidget::ControllerWidget(QWidget *parent) } m_testWidget->move(x, y); m_testWidget->resize(200, 200); - m_testWidget->show(); + + if (args.contains(QLatin1String("-widgetminimized"), Qt::CaseInsensitive)) + m_testWidget->showMinimized(); + else if (args.contains(QLatin1String("-widgetmaximized"), Qt::CaseInsensitive)) + m_testWidget->showMaximized(); + else if (args.contains(QLatin1String("-widgetfullscreen"), Qt::CaseInsensitive)) + m_testWidget->showFullScreen(); + else + m_testWidget->show(); #if QT_VERSION >= 0x050000 x += 300; @@ -451,7 +459,14 @@ ControllerWidget::ControllerWidget(QWidget *parent) | Qt::WindowTitleHint); m_testWindow->setFramePos(QPoint(x, y)); m_testWindow->resize(200, 200); - m_testWindow->show(); + if (args.contains(QLatin1String("-windowminimized"), Qt::CaseInsensitive)) + m_testWindow->showMinimized(); + else if (args.contains(QLatin1String("-windowmaximized"), Qt::CaseInsensitive)) + m_testWindow->showMaximized(); + else if (args.contains(QLatin1String("-windowfullscreen"), Qt::CaseInsensitive)) + m_testWindow->showFullScreen(); + else + m_testWindow->show(); m_testWindow->setWindowTitle(tr("TestWindow")); #endif