VirtualBox

Changeset 59887 in vbox


Ignore:
Timestamp:
Mar 1, 2016 2:44:33 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: Medium-enumeration improvements: Do not start medium-enumeration on VBoxGlobal prepare; start it on Selector UI or Runtime UI prepare if necessary.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r59774 r59887  
    17461746}
    17471747
    1748 void VBoxGlobal::startMediumEnumeration(bool fForceStart /* = true*/)
     1748void VBoxGlobal::startMediumEnumeration()
    17491749{
    17501750    /* Make sure VBoxGlobal is already valid: */
     
    17661766     * restoring or the code with have a heart attack. */
    17671767    if (shouldRestoreCurrentSnapshot())
    1768         return;
    1769 
    1770     /* Developer doesn't want any unnecessary media caching! */
    1771     if (!fForceStart && !agressiveCaching())
    17721768        return;
    17731769
     
    43544350    UIConverter::prepare();
    43554351
    4356     /* Cache IMedium data.
    4357      * There could be no used mediums at all,
    4358      * but this method should be run anyway just to enumerate null UIMedium object,
    4359      * used by some VBox smart widgets, like VBoxMediaComboBox: */
     4352    /* Create medium enumerator but don't do any immediate caching. */
    43604353    m_pMediumEnumerator = new UIMediumEnumerator;
    43614354    {
     
    43724365                this, SIGNAL(sigMediumEnumerationFinished()));
    43734366    }
    4374     if (agressiveCaching())
    4375         startMediumEnumeration();
    43764367
    43774368    /* Create shortcut pool: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r59493 r59887  
    350350
    351351    /* API: Medium-enumeration stuff: */
    352     void startMediumEnumeration(bool fForceStart = true);
     352    void startMediumEnumeration();
    353353    bool agressiveCaching() const { return mAgressiveCaching; }
    354354    bool isMediumEnumerationInProgress() const;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r57805 r59887  
    204204    qApp->setQuitOnLastWindowClosed(false);
    205205
    206     /* Cache medium data if necessary: */
    207     vboxGlobal().startMediumEnumeration(false /* force start */);
     206    /* Cache medium data early if necessary: */
     207    if (vboxGlobal().agressiveCaching())
     208        vboxGlobal().startMediumEnumeration();
    208209
    209210    /* Prepare machine-logic: */
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r59094 r59887  
    11431143#endif /* Q_WS_MAC */
    11441144
     1145    /* Cache medium data early if necessary: */
     1146    if (vboxGlobal().agressiveCaching())
     1147        vboxGlobal().startMediumEnumeration();
     1148
    11451149    /* Prepare: */
    11461150    prepareIcon();
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