summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-10 20:15:02 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-10 20:15:02 (GMT)
commiteabde99a0e9e4c5e49a05187530cf643258d5719 (patch)
tree5d57cf2c86910336c402c8384057556377bafb5d /tests/auto
parentc87479a37db0af3016284711c5745e38177af1c4 (diff)
parentc2b13ddde2f4998b03ff9036cc5ab81fd4132e61 (diff)
downloadQt-eabde99a0e9e4c5e49a05187530cf643258d5719.zip
Qt-eabde99a0e9e4c5e49a05187530cf643258d5719.tar.gz
Qt-eabde99a0e9e4c5e49a05187530cf643258d5719.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Fix qwidget test crash
Diffstat (limited to 'tests/auto')
-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 5521873..6069383 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -10029,6 +10029,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
@@ -10061,7 +10083,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());
}
@@ -10078,7 +10100,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();
@@ -10132,7 +10154,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();
@@ -10188,7 +10210,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();
@@ -10244,7 +10266,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();