VirtualBox

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


Ignore:
Timestamp:
Mar 28, 2023 2:22:37 PM (22 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6669: VirtualBox Manager: Move Add Cloud VM wizard onto non-modal rails.

File:
1 edited

Legend:

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

    r99195 r99199  
    10391039                m_wizards[enmType] = new UIWizardNewCloudVM(this, m_pWidget->fullGroupName());
    10401040                break;
     1041            case WizardType_AddCloudVM:
     1042                m_wizards[enmType] = new UIWizardAddCloudVM(this, m_pWidget->fullGroupName());
     1043                break;
    10411044            default:
    10421045                break;
     
    10751078void UIVirtualBoxManager::sltOpenAddMachineDialog()
    10761079{
    1077     /* Lock the actions preventing cascade calls: */
    1078     UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_Add)
    1079                                                          << actionPool()->action(UIActionIndexMN_M_Machine_S_Add)
    1080                                                          << actionPool()->action(UIActionIndexMN_M_Group_S_Add),
    1081                                        "opened", true);
    1082     connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed,
    1083             this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest);
    1084     updateActionsAppearance();
    1085 
    10861080    /* Get first selected item: */
    10871081    UIVirtualMachineItem *pItem = currentItem();
     
    10901084    if (   !pItem
    10911085        || pItem->itemType() == UIVirtualMachineItemType_Local)
    1092     {
    1093         /* Open add machine dialog: */
    10941086        openAddMachineDialog();
    1095     }
    10961087    /* For cloud machine: */
    10971088    else
    1098     {
    1099         /* Use the "safe way" to open stack of Mac OS X Sheets: */
    1100         QWidget *pWizardParent = windowManager().realParentWindow(this);
    1101         UISafePointerWizardAddCloudVM pWizard = new UIWizardAddCloudVM(pWizardParent, m_pWidget->fullGroupName());
    1102         windowManager().registerNewParent(pWizard, pWizardParent);
    1103 
    1104         /* Execute wizard: */
    1105         pWizard->exec();
    1106         delete pWizard;
    1107     }
     1089        sltOpenWizard(WizardType_AddCloudVM);
    11081090}
    11091091
     
    25812563void UIVirtualBoxManager::openAddMachineDialog(const QString &strFileName /* = QString() */)
    25822564{
     2565    /* Lock the actions preventing cascade calls: */
     2566    UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_Add)
     2567                                                         << actionPool()->action(UIActionIndexMN_M_Machine_S_Add)
     2568                                                         << actionPool()->action(UIActionIndexMN_M_Group_S_Add),
     2569                                       "opened", true);
     2570    connect(&guardBlock, &UIQObjectPropertySetter::sigAboutToBeDestroyed,
     2571            this, &UIVirtualBoxManager::sltHandleUpdateActionAppearanceRequest);
     2572    updateActionsAppearance();
     2573
    25832574    /* Initialize variables: */
    25842575#ifdef VBOX_WS_MAC
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