VirtualBox

Changeset 83857 in vbox for trunk/src


Ignore:
Timestamp:
Apr 20, 2020 1:54:44 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: When adding cloud VM make sure actual provider/profile names are used.

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

Legend:

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

    r83710 r83857  
    939939        return;
    940940
    941     /* Select the parent: */
    942     UIChooserNode *pGroup = 0;
    943     if (isSingleGroupSelected())
    944         pGroup = firstSelectedItem()->node();
    945     else if (!selectedItems().isEmpty())
    946         pGroup = firstSelectedItem()->parentItem()->node();
    947     QString strGroupName;
    948     if (pGroup)
    949         strGroupName = pGroup->fullName();
    950 
    951941    /* Lock the action preventing cascade calls: */
    952942    actionPool()->action(UIActionIndexST_M_Welcome_S_New)->setEnabled(false);
     
    958948        ||firstSelectedMachineItem()->itemType() == UIVirtualMachineItem::ItemType_Local)
    959949    {
     950        /* Select the parent: */
     951        UIChooserNode *pGroup = 0;
     952        if (isSingleGroupSelected())
     953            pGroup = firstSelectedItem()->node();
     954        else if (!selectedItems().isEmpty())
     955            pGroup = firstSelectedItem()->parentItem()->node();
     956        QString strGroupName;
     957        if (pGroup)
     958            strGroupName = pGroup->fullName();
     959
    960960        /* Use the "safe way" to open stack of Mac OS X Sheets: */
    961961        QWidget *pWizardParent = windowManager().realParentWindow(chooser()->managerWidget());
     
    983983        // ourselves cause there is no corresponding event yet. So we are calling actual handler to do that.
    984984        foreach (const CCloudMachine &comMachine, pWizard->machines())
    985             sltCloudMachineRegistered(pGroup->parentNode()->name() /* provider name */,
    986                                       pGroup->name() /* profile name */,
     985            sltCloudMachineRegistered(pWizard->source() /* provider name */,
     986                                      pWizard->profileName() /* profile name */,
    987987                                      comMachine.GetId() /* machine ID */,
    988988                                      true /* registered? */);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.cpp

    r83676 r83857  
    6666}
    6767
     68QString UIWizardAddCloudVM::source() const
     69{
     70    return field("source").toString();
     71}
     72
     73QString UIWizardAddCloudVM::profileName() const
     74{
     75    return field("profileName").toString();
     76}
     77
    6878bool UIWizardAddCloudVM::addCloudVMs()
    6979{
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.h

    r83676 r83857  
    6666    QList<CCloudMachine> machines() const { return m_machines; }
    6767
     68    /** Returns source. */
     69    QString source() const;
     70    /** Returns profile name. */
     71    QString profileName() const;
     72
    6873    /** Adds cloud VMs. */
    6974    bool addCloudVMs();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp

    r83653 r83857  
    601601
    602602    /* Register fields: */
     603    registerField("source", this, "source");
     604    registerField("profileName", this, "profileName");
    603605    registerField("instanceIds", this, "instanceIds");
    604606}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h

    r83653 r83857  
    133133{
    134134    Q_OBJECT;
     135    Q_PROPERTY(QString source READ source);
     136    Q_PROPERTY(QString profileName READ profileName);
    135137    Q_PROPERTY(QStringList instanceIds READ instanceIds);
    136138
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp

    r83653 r83857  
    154154
    155155    /* Register fields: */
     156    registerField("source", this, "source");
     157    registerField("profileName", this, "profileName");
    156158    registerField("instanceIds", this, "instanceIds");
    157159}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h

    r83653 r83857  
    3333{
    3434    Q_OBJECT;
     35    Q_PROPERTY(QString source READ source);
     36    Q_PROPERTY(QString profileName READ profileName);
    3537    Q_PROPERTY(QStringList instanceIds READ instanceIds);
    3638
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