VirtualBox

Changeset 73944 in vbox


Ignore:
Timestamp:
Aug 29, 2018 12:15:37 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
124671
Message:

FE/Qt: bugref:8472. Enumerate only machine media instead of all known media during a vm start

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

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

    r72363 r73944  
    213213    /* Cache medium data early if necessary: */
    214214    if (vboxGlobal().agressiveCaching())
    215         vboxGlobal().startMediumEnumeration();
    216 
     215    {
     216        AssertReturn(!m_pSession, false);
     217        vboxGlobal().startMediumEnumeration(m_pSession->getMachineMedia());
     218    }
    217219    /* Prepare machine-logic: */
    218220    prepareMachineLogic();
     
    316318    sltChangeVisualState(m_initialVisualState);
    317319}
    318 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r72457 r73944  
    21192119}
    21202120
     2121CMediumVector UISession::getMachineMedia() const
     2122{
     2123    CMediumVector media;
     2124    foreach (const CStorageController &controller, m_machine.GetStorageControllers())
     2125    {
     2126        QString strAttData;
     2127        /* Enumerate all the attachments: */
     2128        foreach (const CMediumAttachment &attachment, m_machine.GetMediumAttachmentsOfController(controller.GetName()))
     2129        {
     2130            /* Skip unrelated attachments: */
     2131            if (attachment.GetType() != KDeviceType_HardDisk &&
     2132                attachment.GetType() != KDeviceType_Floppy &&
     2133                attachment.GetType() != KDeviceType_DVD)
     2134                continue;
     2135            if (attachment.GetIsEjected() || attachment.GetMedium().isNull())
     2136                continue;
     2137            media.append(attachment.GetMedium());
     2138        }
     2139    }
     2140    return media;
     2141}
     2142
    21212143void UISession::loadVMSettings()
    21222144{
     
    22702292}
    22712293#endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */
    2272 
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r72330 r73944  
    3939#include "CKeyboard.h"
    4040#include "CMachineDebugger.h"
     41#include "CMedium.h"
    4142
    4243/* Forward declarations: */
     
    279280    /** Returns the list of visible guest windows. */
    280281    QList<int> listOfVisibleWindows() const;
     282
     283    /** Returns a vector of media attached to the machine. */
     284    CMediumVector getMachineMedia() const;
    281285
    282286signals:
     
    559563
    560564#endif /* !___UISession_h___ */
    561 
Note: See TracChangeset for help on using the changeset viewer.

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