diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-15 00:00:10 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2010-12-15 00:00:10 (GMT) |
commit | d8df35d7949a619cb9ca86bf111fd892d06f674a (patch) | |
tree | 0eab085b5e4e03b36d06f64e0f9908955187c975 /tests/auto/qwidget | |
parent | a8759624f80cbad50a94aacb955c75fbad3613e4 (diff) | |
parent | d6dace9bebd8a8ad8caaecb69dd24dd1ddf96f4a (diff) | |
download | Qt-d8df35d7949a619cb9ca86bf111fd892d06f674a.zip Qt-d8df35d7949a619cb9ca86bf111fd892d06f674a.tar.gz Qt-d8df35d7949a619cb9ca86bf111fd892d06f674a.tar.bz2 |
Merge branch 'master-upstream' into master-water
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index e6af8fb..ffa61fc 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -10019,6 +10019,28 @@ void tst_QWidget::openModal_taskQTBUG_5804() } #ifdef Q_OS_SYMBIAN + +static CEikButtonGroupContainer* cba() +{ + CEikButtonGroupContainer *oldCba = NULL; + + // Due to convoluted/buggy implementation of MEikAppUiFactory interface in Symbian, + // the only way to get the correct cba is to use SwapButtonGroup function. + // Calling SwapButtonGroup doesn't trigger anything, it only changes the value of iToolbar + // member variable, so this double switching should not cause any interference for test. + QT_TRAP_THROWING( + CEikButtonGroupContainer *dummyCba = CEikButtonGroupContainer::NewL( + CEikButtonGroupContainer::ECba, CEikButtonGroupContainer::EHorizontal, NULL, 0); + + oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(dummyCba); + CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(oldCba); + + delete dummyCba; + ) + + return oldCba; +} + void tst_QWidget::cbaVisibility() { // Test case for task 261048 @@ -10051,7 +10073,7 @@ void tst_QWidget::cbaVisibility() // Verify window decorations i.e. status pane and CBA are visible. CEikStatusPane* statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); QVERIFY(statusPane->IsVisible()); - CEikButtonGroupContainer* buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + CEikButtonGroupContainer* buttonGroup = cba(); QVERIFY(buttonGroup->IsVisible()); } @@ -10068,7 +10090,7 @@ void tst_QWidget::fullScreenWindowModeTransitions() const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); - CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + CEikButtonGroupContainer *buttonGroup = cba(); //Enter widget.showNormal(); @@ -10122,7 +10144,7 @@ void tst_QWidget::maximizedWindowModeTransitions() const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); - CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + CEikButtonGroupContainer *buttonGroup = cba(); //Enter widget.showNormal(); @@ -10178,7 +10200,7 @@ void tst_QWidget::minimizedWindowModeTransitions() const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); - CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + CEikButtonGroupContainer *buttonGroup = cba(); //Enter widget.showNormal(); @@ -10234,7 +10256,7 @@ void tst_QWidget::normalWindowModeTransitions() const QRect fullScreenGeometry = qApp->desktop()->screenGeometry(&widget); const QRect maximumScreenGeometry = qApp->desktop()->availableGeometry(&widget); CEikStatusPane *statusPane = CEikonEnv::Static()->AppUiFactory()->StatusPane(); - CEikButtonGroupContainer *buttonGroup = CEikonEnv::Static()->AppUiFactory()->Cba(); + CEikButtonGroupContainer *buttonGroup = cba(); //Enter widget.showMaximized(); |