summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-12-14 00:06:42 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-12-14 00:06:42 (GMT)
commit379ea82dafb97db3e863a04e03819cc37ea8aa45 (patch)
tree118ea95d7650043813850004c318989a74a1a7f5
parent72c5658a54bf23f5572f169e604838143db6a352 (diff)
parent44911b0d44f4840e0d7678f8de7227a3a4018d34 (diff)
downloadQt-379ea82dafb97db3e863a04e03819cc37ea8aa45.zip
Qt-379ea82dafb97db3e863a04e03819cc37ea8aa45.tar.gz
Qt-379ea82dafb97db3e863a04e03819cc37ea8aa45.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: Non-hacky fix for qwidget autotest Fix qapplication autotest deployment Minor optimization Fix crash when creating more than one QApplication in single test case
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
-rw-r--r--src/gui/kernel/qwidget_s60.cpp4
-rw-r--r--tests/auto/qapplication/test/test.pro2
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp32
4 files changed, 15 insertions, 30 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 8596563..81fa4e6 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1633,6 +1633,13 @@ void qt_cleanup()
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
+#ifdef Q_WS_S60
+ // Clear CBA
+ CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(0);
+ delete S60->buttonGroupContainer();
+ S60->setButtonGroupContainer(0);
+#endif
+
if (S60->qtOwnsS60Environment) {
// Restore the S60 framework trap handler. See qt_init().
User::SetTrapHandler(S60->s60InstalledTrapHandler);
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 609307c..d6ad3c3 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -504,7 +504,7 @@ void QWidgetPrivate::show_sys()
CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba,
CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
- CEikButtonGroupContainer *oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(cba);
+ CEikButtonGroupContainer *oldCba = factory->SwapButtonGroup(cba);
Q_ASSERT(!oldCba);
S60->setButtonGroupContainer(cba);
@@ -513,7 +513,7 @@ void QWidgetPrivate::show_sys()
menuBar->SetMenuType(CEikMenuBar::EMenuOptions);
S60->appUi()->AddToStackL(menuBar,ECoeStackPriorityMenu,ECoeStackFlagRefusesFocus);
- CEikMenuBar *oldMenu = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(menuBar);
+ CEikMenuBar *oldMenu = factory->SwapMenuBar(menuBar);
Q_ASSERT(!oldMenu);
)
diff --git a/tests/auto/qapplication/test/test.pro b/tests/auto/qapplication/test/test.pro
index 2c54c37..d946e7e 100644
--- a/tests/auto/qapplication/test/test.pro
+++ b/tests/auto/qapplication/test/test.pro
@@ -17,7 +17,7 @@ symbian: {
someTest.sources = test.pro
someTest.path = test
windowIcon.sources = ../heart.svg
- DEPLOYMENT = additional deploy someTest windowIcon
+ DEPLOYMENT += additional deploy someTest windowIcon
LIBS += -lcone -lavkon
}
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 6069383..d611225 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -10029,28 +10029,6 @@ 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
@@ -10083,7 +10061,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 = cba();
+ CEikButtonGroupContainer* buttonGroup = CEikButtonGroupContainer::Current();
QVERIFY(buttonGroup->IsVisible());
}
@@ -10100,7 +10078,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 = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10154,7 +10132,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 = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10210,7 +10188,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 = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showNormal();
@@ -10266,7 +10244,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 = cba();
+ CEikButtonGroupContainer *buttonGroup = CEikButtonGroupContainer::Current();
//Enter
widget.showMaximized();