VirtualBox

Changeset 52999 in vbox for trunk


Ignore:
Timestamp:
Oct 8, 2014 4:24:26 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI rework/cleanup for 7115 (part #8): UISession prepare/cleanup stuff maintenance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r52998 r52999  
    10271027    /* Create action-pool: */
    10281028    m_pActionPool = UIActionPool::create(UIActionPoolType_Runtime);
    1029     m_pActionPool->toRuntime()->setSession(this);
     1029    AssertPtrReturnVoid(actionPool());
     1030    {
     1031        /* Configure action-pool: */
     1032        actionPool()->toRuntime()->setSession(this);
    10301033
    10311034        /* Get host/machine: */
     
    11091112        }
    11101113#endif /* Q_WS_MAC */
     1114    }
    11111115}
    11121116
     
    12581262
    12591263        /* Remember if guest should autoresize: */
    1260         gEDataManager->setGuestScreenAutoResizeEnabled(actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());
     1264        if (actionPool())
     1265        {
     1266            const QAction *pGuestAutoresizeSwitch = actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize);
     1267            gEDataManager->setGuestScreenAutoResizeEnabled(pGuestAutoresizeSwitch->isChecked(), vboxGlobal().managedVMUuid());
     1268        }
    12611269
    12621270#ifndef Q_WS_MAC
     
    12731281    for (int i = m_frameBufferVector.size() - 1; i >= 0; --i)
    12741282    {
    1275         UIFrameBuffer *pFb = m_frameBufferVector[i];
    1276         if (pFb)
     1283        UIFrameBuffer *pFrameBuffer = m_frameBufferVector[i];
     1284        if (pFrameBuffer)
    12771285        {
    12781286            /* Mark framebuffer as unused: */
    1279             pFb->setMarkAsUnused(true);
     1287            pFrameBuffer->setMarkAsUnused(true);
    12801288            /* Detach framebuffer from Display: */
    12811289            CDisplay display = session().GetConsole().GetDisplay();
     
    12911299void UISession::cleanupConsoleEventHandlers()
    12921300{
    1293     /* Destroy console event-handler: */
     1301    /* Destroy console event-handler if necessary: */
     1302    if (gConsoleEvents)
    12941303        UIConsoleEventHandler::destroy();
    12951304}
     
    13061315{
    13071316#ifdef Q_WS_MAC
     1317    /* Destroy Mac OS X menu-bar: */
    13081318    delete m_pMenuBar;
    13091319    m_pMenuBar = 0;
    13101320#endif /* Q_WS_MAC */
    13111321
    1312     /* Destroy action-pool: */
    1313     UIActionPool::destroy(m_pActionPool);
     1322    /* Destroy action-pool if necessary: */
     1323    if (actionPool())
     1324        UIActionPool::destroy(actionPool());
    13141325}
    13151326
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette