VirtualBox

Changeset 99202 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 28, 2023 3:55:12 PM (22 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6669: VirtualBox Manager: Move Export Appliance wizard onto non-modal rails.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

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

    r99201 r99202  
    471471    , m_iGeometrySaveTimerId(-1)
    472472    , m_fImportFromOCI(false)
     473    , m_fExportToOCI(false)
    473474{
    474475    s_pInstance = this;
     
    927928void UIVirtualBoxManager::sltOpenExportApplianceWizard()
    928929{
    929     /* Get selected items: */
    930     QList<UIVirtualMachineItem*> items = currentItems();
    931 
    932     /* Populate the list of VM names: */
    933     QStringList names;
    934     for (int i = 0; i < items.size(); ++i)
    935         names << items.at(i)->name();
    936 
    937     /* Lock the actions preventing cascade calls: */
    938     UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_File_S_ExportAppliance)
    939                                                          << actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI),
    940                                        "opened", true);
    941     connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed,
    942             this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest);
    943     updateActionsAppearance();
    944 
    945930    /* Check what was the action invoked us: */
    946931    UIAction *pAction = qobject_cast<UIAction*>(sender());
    947932
    948     /* Use the "safe way" to open stack of Mac OS X Sheets: */
    949     QWidget *pWizardParent = windowManager().realParentWindow(this);
    950     UINativeWizardPointer pWizard = new UIWizardExportApp(pWizardParent,
    951                                                           names,
    952                                                           pAction &&
    953                                                           pAction == actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI));
    954     windowManager().registerNewParent(pWizard, pWizardParent);
    955     pWizard->exec();
    956     delete pWizard;
     933    /* Export to OCI action invokes wizard directly in OCI mode: */
     934    m_fExportToOCI =    pAction
     935                     && pAction == actionPool()->action(UIActionIndexMN_M_Machine_S_ExportToOCI);
     936    /* Populate the list of VM names: */
     937    m_names.clear();
     938    foreach (UIVirtualMachineItem *pItem, currentItems())
     939        m_names << pItem->name();
     940
     941    /* Open Export Appliance Wizard: */
     942    sltOpenWizard(WizardType_ExportAppliance);
    957943}
    958944
     
    1001987        switch (enmType)
    1002988        {
     989            case WizardType_ExportAppliance:
     990                m_wizards[enmType] = new UIWizardExportApp(this, m_names, m_fExportToOCI);
     991                break;
    1003992            case WizardType_ImportAppliance:
    1004993                m_wizards[enmType] = new UIWizardImportApp(this, m_fImportFromOCI, m_strFileName);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r99201 r99202  
    520520
    521521    /** Holds the geometry save timer ID. */
    522     int      m_iGeometrySaveTimerId;
     522    int  m_iGeometrySaveTimerId;
     523
    523524    /** Holds whether OCI importing should be started by default. */
    524525    bool     m_fImportFromOCI;
    525526    /** Holds the file-name used by import wizard. */
    526527    QString  m_strFileName;
     528
     529    /** Holds whether OCI exporting should be started by default. */
     530    bool         m_fExportToOCI;
     531    /** Holds the list of VMs used by export wizard. */
     532    QStringList  m_names;
    527533};
    528534
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