VirtualBox

Changeset 72594 in vbox for trunk


Ignore:
Timestamp:
Jun 18, 2018 12:46:05 PM (7 years ago)
Author:
vboxsync
Message:

FE/Qt bugref:9183 Make sure new vm wizards path fields respects group name

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.cpp

    r72314 r72594  
    4545
    4646
    47 UINameAndSystemEditor::UINameAndSystemEditor(QWidget *pParent, bool fChooseLocation /* = false */)
     47UINameAndSystemEditor::UINameAndSystemEditor(QWidget *pParent, bool fChooseLocation /* = false */, const QString &strGroupName /* = QString() */)
    4848    : QIWithRetranslateUI<QWidget>(pParent)
    4949    , m_fChooseLocation(fChooseLocation)
     
    5959    , m_pComboFamily(0)
    6060    , m_pComboType(0)
     61    , m_strGroupName(strGroupName)
    6162{
    6263    /* Prepare: */
     
    261262                pMainLayout->addWidget(m_pPathSelector, iRow++, 1, 1, 2);
    262263                QString strDefaultMachineFolder = vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     264                /* Add the group name to the default machine path: */
     265                // if (!m_strGroupName.isEmpty() && m_strGroupName != "/")
     266                //     strDefaultMachineFolder += m_strGroupName;
     267
    263268                m_pPathSelector->setPath(strDefaultMachineFolder);
    264269                m_pPathSelector->setDefaultPath(strDefaultMachineFolder);
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UINameAndSystemEditor.h

    r72279 r72594  
    5656
    5757    /** Constructs VM parameters editor passing @a pParent to the base-class.
    58       * @param  fChooseFullPath  Brings whether we should propose to choose location. */
    59     UINameAndSystemEditor(QWidget *pParent, bool fChooseLocation = false);
     58      * @param  fChooseFullPath  Controls whether we should propose to choose location.
     59      * @param  strGroupName  is used while setting the path and defaultPath of the path selection widget. */
     60    UINameAndSystemEditor(QWidget *pParent, bool fChooseLocation = false, const QString &strGroupName = QString());
    6061
    6162    /** Returns the VM name. */
     
    129130    /** Holds the VM OS type combo instance. */
    130131    QComboBox              *m_pComboType;
     132    QString                 m_strGroupName;
    131133};
    132134
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp

    r72314 r72594  
    328328    {
    329329        m_pLabel = new QIRichTextLabel(this);
    330         m_pNameAndSystemEditor = new UINameAndSystemEditor(this, true);
     330        m_pNameAndSystemEditor = new UINameAndSystemEditor(this, true, strGroup);
    331331        pMainLayout->addWidget(m_pLabel);
    332332        pMainLayout->addWidget(m_pNameAndSystemEditor);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp

    r72502 r72594  
    5555            QHBoxLayout *pNameAndSystemCntLayout = new QHBoxLayout(m_pNameAndSystemCnt);
    5656            {
    57                 m_pNameAndSystemEditor = new UINameAndSystemEditor(m_pNameAndSystemCnt, true);
     57                m_pNameAndSystemEditor = new UINameAndSystemEditor(m_pNameAndSystemCnt, true, strGroup);
    5858                pNameAndSystemCntLayout->addWidget(m_pNameAndSystemEditor);
    5959            }
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