summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_s60.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-08 05:32:22 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-08 05:32:22 (GMT)
commit6ba29f785710fd894298d945e603439611e7859c (patch)
tree0be89c7cbd3be3b85d59e7b9097391029d0f86fc /src/gui/kernel/qwidget_s60.cpp
parent3c5991eb22f048c2053166ec50ea3ae70697a53f (diff)
parent4c9e2a4376a52891a21f75e2a441848234ed93c2 (diff)
downloadQt-6ba29f785710fd894298d945e603439611e7859c.zip
Qt-6ba29f785710fd894298d945e603439611e7859c.tar.gz
Qt-6ba29f785710fd894298d945e603439611e7859c.tar.bz2
Merge branch 4.7 into qt-master-from-4.7
Diffstat (limited to 'src/gui/kernel/qwidget_s60.cpp')
-rw-r--r--src/gui/kernel/qwidget_s60.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 91e74b5..41ce11e 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -69,6 +69,7 @@ extern bool qt_nograb();
QWidget *QWidgetPrivate::mouseGrabber = 0;
QWidget *QWidgetPrivate::keyboardGrabber = 0;
+CEikButtonGroupContainer *QS60Data::cba = 0;
static bool isEqual(const QList<QAction*>& a, const QList<QAction*>& b)
{
@@ -498,9 +499,27 @@ void QWidgetPrivate::show_sys()
// Create the status pane and CBA here
CEikAppUi *ui = static_cast<CEikAppUi *>(S60->appUi());
MEikAppUiFactory *factory = CEikonEnv::Static()->AppUiFactory();
- TRAP_IGNORE(factory->ReadAppInfoResourceL(0, ui));
- if (S60->buttonGroupContainer())
- S60->buttonGroupContainer()->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
+
+ QT_TRAP_THROWING(
+ factory->CreateResourceIndependentFurnitureL(ui);
+
+ TRect boundingRect = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
+
+ CEikButtonGroupContainer *cba = CEikButtonGroupContainer::NewL(CEikButtonGroupContainer::ECba,
+ CEikButtonGroupContainer::EHorizontal,ui,R_AVKON_SOFTKEYS_EMPTY_WITH_IDS);
+
+ CEikButtonGroupContainer *oldCba = CEikonEnv::Static()->AppUiFactory()->SwapButtonGroup(cba);
+ Q_ASSERT(!oldCba);
+ S60->setButtonGroupContainer(cba);
+
+ CEikMenuBar *menuBar = new(ELeave) CEikMenuBar;
+ menuBar->ConstructL(ui, 0, R_AVKON_MENUPANE_EMPTY);
+ menuBar->SetMenuType(CEikMenuBar::EMenuOptions);
+ S60->appUi()->AddToStackL(menuBar,ECoeStackPriorityMenu,ECoeStackFlagRefusesFocus);
+
+ CEikMenuBar *oldMenu = CEikonEnv::Static()->AppUiFactory()->SwapMenuBar(menuBar);
+ Q_ASSERT(!oldMenu);
+ )
if (S60->statusPane()) {
// Use QDesktopWidget as the status pane observer to proxy for the AppUi.
@@ -1237,7 +1256,8 @@ void QWidget::destroy(bool destroyWindow, bool destroySubWindows)
// At this point the backing store should already be destroyed
// so we flush the command buffer to ensure that the freeing of
// those resources and deleting the window can happen "atomically"
- S60->wsSession().Flush();
+ if (qApp)
+ S60->wsSession().Flush();
}
}