summaryrefslogtreecommitdiffstats
path: root/tests/auto/qwidget
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2010-12-15 00:00:10 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2010-12-15 00:00:10 (GMT)
commitd8df35d7949a619cb9ca86bf111fd892d06f674a (patch)
tree0eab085b5e4e03b36d06f64e0f9908955187c975 /tests/auto/qwidget
parenta8759624f80cbad50a94aacb955c75fbad3613e4 (diff)
parentd6dace9bebd8a8ad8caaecb69dd24dd1ddf96f4a (diff)
downloadQt-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.cpp32
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();