VirtualBox

Changeset 84623 in vbox


Ignore:
Timestamp:
May 31, 2020 5:15:24 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Details pane: While switching details from one VM to another, we have to clear details set from stale machine-item, machine and cloud machine information; This has to be done cause details rebuild process is async and takes a while, and previous data can became stale during it.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/details
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsGroup.cpp

    r83921 r84623  
    8989
    9090    /* Cleanup superflous items: */
    91     bool fCleanupPerformed = m_items.size() > m_machineItems.size();
     91    const bool fCleanupPerformed = m_items.size() > m_machineItems.size();
    9292    while (m_items.size() > m_machineItems.size())
    9393        delete m_items.last();
     94    foreach (UIDetailsItem *pItem, m_items)
     95        pItem->toSet()->clearSet();
    9496    if (fCleanupPerformed)
    9597        updateGeometry();
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.cpp

    r84076 r84623  
    6262    /* Remove set from the parent group: */
    6363    parentItem()->removeItem(this);
     64}
     65
     66void UIDetailsSet::clearSet()
     67{
     68    /* Clear passed arguments: */
     69    m_pMachineItem = 0;
     70    m_comMachine = CMachine();
     71    m_comCloudMachine = CCloudMachine();
    6472}
    6573
     
    568576        return;
    569577
     578    /* Make sure VM is set: */
     579    if (m_comMachine.isNull())
     580        return;
     581
    570582    /* Is this our VM changed? */
    571583    if (m_comMachine.GetId() != uId)
     
    582594        return;
    583595
     596    /* Make sure VM is set: */
     597    if (m_comMachine.isNull())
     598        return;
     599
    584600    /* Is this our VM changed? */
    585601    if (m_comMachine.GetId() != uId)
     
    594610    /* For local VMs only: */
    595611    if (!m_fIsLocal)
     612        return;
     613
     614    /* Make sure VM is set: */
     615    if (m_comMachine.isNull())
    596616        return;
    597617
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsSet.h

    r83719 r84623  
    5555    /** @name Item stuff.
    5656      * @{ */
     57        /** Cleanups set, wiping out machine-item and [cloud]machine information for good. */
     58        void clearSet();
    5759        /** Builds set based on passed @a pMachineItem.
    5860          * @param  fFullSet  Brigns whether full set should be built.
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