Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-15915

CEikonEnv::Static()->AppUiFactory()->Cba() returns NULL pointer for Qt 4.7 application in Symbian

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.7.2
    • 4.7.1
    • None
    • At least beginning from TM 9.2 wk41 ps2
    • c2b13ddde2f4998b03ff9036cc5ab81fd4132e61,d5fe82b2ab939727f573429605abd99c039a99d1,5e0be0aae4aa4011b4dbf7d1d457e4c8b4f6d4dc,44911b0d44f4840e0d7678f8de7227a3a4018d34

    Description

      Auto test application tests\auto\qwidget crashes on Symbian^3 devices and emulator. The crash is happened fro tst_QWidget::cbaVisibility() test.
      Qt Gui module uses following code to create CBA buttons in qwidget_s60.cpp:

            // Create the status pane and CBA here
                  CEikAppUi *ui = static_cast<CEikAppUi *>(S60->appUi());
                  MEikAppUiFactory *factory = CEikonEnv::Static()->AppUiFactory();
      
                  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);
                   )
      

      But SwapButtonGroup method will not change cba buttons and therefore for Qt 4.7 applications
      CEikonEnv::Static()>AppUiFactory()>Cba() returns NULL pointer which causes crashes in the applications to use it.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            e0348803 Miikka Heikkinen
            vasyura Oleh Vasyura
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes