VirtualBox

Changeset 72435 in vbox for trunk


Ignore:
Timestamp:
Jun 4, 2018 4:56:42 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
122907
Message:

FE/Qt: bugref:9049: Move a bit of Extension Pack Downloading related code from VBoxGlobal to Update Manager.

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

Legend:

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

    r72434 r72435  
    332332    , m_pIconPool(0)
    333333    , m_pMediumEnumerator(0)
    334     , m_fEPInstallationRequested(false)
    335334{
    336335    /* Assign instance: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r72432 r72435  
    555555                                          QWidget *pParent,
    556556                                          QString *pstrExtPackName);
    557 
    558         /** @todo remove */
    559         bool isEPInstallationRequested() const { return m_fEPInstallationRequested; }
    560         /** @todo remove */
    561         void setEPInstallationRequested(bool fRequested) { m_fEPInstallationRequested = fRequested; }
    562557    /** @} */
    563558
     
    865860    /** @} */
    866861
    867     /** @todo remove */
    868     bool m_fEPInstallationRequested;
    869 
    870862#if defined(VBOX_WS_WIN) && defined(VBOX_GUI_WITH_SHARED_LIBRARY)
    871863    /** @name ATL stuff.
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp

    r71528 r72435  
    400400void UIUpdateStepVirtualBoxExtensionPack::sltStartStep()
    401401{
    402     /* Return if Selector UI has a direct request to install EP: */
    403     if (vboxGlobal().isEPInstallationRequested())
     402    /* Return if Selector UI issued a direct request to install EP: */
     403    if (gUpdateManager->isEPInstallationRequested())
    404404    {
    405405        emit sigStepComplete();
     
    490490    /* Warn the user about extension pack was downloaded and saved, propose to install it: */
    491491    if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))
    492         VBoxGlobal::doExtPackInstallation(strTarget, strDigest, windowManager().networkManagerOrMainWindowShown(), NULL);
     492        vboxGlobal().doExtPackInstallation(strTarget, strDigest, windowManager().networkManagerOrMainWindowShown(), NULL);
    493493    /* Propose to delete the downloaded extension pack: */
    494494    if (msgCenter().proposeDeleteExtentionPack(QDir::toNativeSeparators(strTarget)))
     
    526526    , m_fIsRunning(false)
    527527    , m_uTime(1 /* day */ * 24 /* hours */ * 60 /* minutes */ * 60 /* seconds */ * 1000 /* ms */)
     528    , m_fEPInstallationRequested(false)
    528529{
    529530    /* Prepare instance: */
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.h

    r71630 r72435  
    4848    static UIUpdateManager *instance() { return s_pInstance; }
    4949
     50    /** Returns whether the Extension Pack installation is requested. */
     51    bool isEPInstallationRequested() const { return m_fEPInstallationRequested; }
     52    /** Defines whether the Extension Pack installation is @a fRequested. */
     53    void setEPInstallationRequested(bool fRequested) { m_fEPInstallationRequested = fRequested; }
     54
    5055public slots:
    5156
     
    7277    /** Holds the refresh period. */
    7378    quint64        m_uTime;
     79
     80    /** Holds whether the Extension Pack installation is requested. */
     81    bool  m_fEPInstallationRequested;
    7482};
    7583
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp

    r72363 r72435  
    5050# include "UIToolsPaneMachine.h"
    5151# include "UIToolsToolbar.h"
     52# ifdef VBOX_GUI_WITH_NETWORK_MANAGER
     53#  include "UIUpdateManager.h"
     54# endif
    5255# include "UIVirtualBoxEventHandler.h"
    5356# include "UIWizardCloneVM.h"
     
    5760#  include "UINetworkManager.h"
    5861#  include "UINetworkManagerIndicator.h"
    59 # endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
     62# endif
    6063# ifdef VBOX_WS_MAC
    6164#  include "UIImageTools.h"
    6265#  include "UIWindowMenuManager.h"
    6366#  include "VBoxUtils.h"
    64 # endif /* VBOX_WS_MAC */
     67# endif
    6568# ifdef VBOX_WS_X11
    6669#  include "UIDesktopWidgetWatchdog.h"
     
    398401            else if (VBoxGlobal::hasAllowedExtension(strFile, VBoxExtPackFileExts))
    399402            {
     403#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    400404                /* Prevent update manager from proposing us to update EP: */
    401                 vboxGlobal().setEPInstallationRequested(true);
     405                gUpdateManager->setEPInstallationRequested(true);
     406#endif
    402407                /* Propose the user to install EP described by the arguments @a list. */
    403                 VBoxGlobal::doExtPackInstallation(strFile, QString(), this, NULL);
     408                vboxGlobal().doExtPackInstallation(strFile, QString(), this, NULL);
     409#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
    404410                /* Allow update manager to propose us to update EP: */
    405                 vboxGlobal().setEPInstallationRequested(false);
     411                gUpdateManager->setEPInstallationRequested(false);
     412#endif
    406413            }
    407414        }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp

    r71461 r72435  
    307307    {
    308308        QString strExtPackName;
    309         VBoxGlobal::doExtPackInstallation(strFilePath, QString(), this, &strExtPackName);
     309        vboxGlobal().doExtPackInstallation(strFilePath, QString(), this, &strExtPackName);
    310310
    311311        /* Since we might be reinstalling an existing package, we have to
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