VirtualBox

Changeset 90072 in vbox for trunk/src


Ignore:
Timestamp:
Jul 6, 2021 4:47:36 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145567
Message:

FE/Qt: bugref:9996: Skipping unattended page in some cases.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r90070 r90072  
    6666    , m_iCPUCount(1)
    6767    , m_iMemorySize(0)
    68 
     68    , m_iUnattendedInstallPageIndex(-1)
    6969{
    7070#ifndef VBOX_WS_MAC
     
    8888        {
    8989            addPage(new UIWizardNewVMNameOSTypePageBasic);
    90             addPage(new UIWizardNewVMUnattendedPageBasic);
     90            m_iUnattendedInstallPageIndex = addPage(new UIWizardNewVMUnattendedPageBasic);
     91            setUnattendedPageVisible(false);
    9192            addPage(new UIWizardNewVMHardwarePageBasic);
    9293            addPage(new UIWizardNewVMDiskPageBasic);
     
    699700{
    700701    m_fSkipUnattendedInstall = fSkipUnattendedInstall;
     702    /* We hide/show unattended install page depending on the value of isUnattendedEnabled: */
     703    setUnattendedPageVisible(isUnattendedEnabled());
    701704}
    702705
     
    709712{
    710713    m_strISOFilePath = strISOFilePath;
     714    /* We hide/show unattended install page depending on the value of isUnattendedEnabled: */
     715    setUnattendedPageVisible(isUnattendedEnabled());
    711716}
    712717
     
    817822    return m_strGuestOSFamilyId.contains("windows", Qt::CaseInsensitive);
    818823}
     824
     825void UIWizardNewVM::setUnattendedPageVisible(bool fVisible)
     826{
     827    if (m_iUnattendedInstallPageIndex != -1)
     828        setPageVisible(m_iUnattendedInstallPageIndex, fVisible);
     829}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h

    r90070 r90072  
    8787    const UIUnattendedInstallData &unattendedInstallData() const;
    8888    bool isGuestOSTypeWindows() const;
     89
    8990    CMedium &virtualDisk();
    9091    void setVirtualDisk(const CMedium &medium);
     
    165166    QString getNextControllerName(KStorageBus type);
    166167    void setFieldsFromDefaultUnttendedInstallData();
     168    void setUnattendedPageVisible(bool fVisible);
    167169
    168170    /** @name Variables
     
    213215    int m_iCPUCount;
    214216    int m_iMemorySize;
     217    int m_iUnattendedInstallPageIndex;
    215218};
    216219
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp

    r90070 r90072  
    321321}
    322322
    323 // bool UIWizardNewVMNameOSTypePage::skipUnattendedInstall() const
    324 // {
    325 //     return m_pSkipUnattendedCheckBox && m_pSkipUnattendedCheckBox->isChecked();
    326 // }
    327 
    328323bool UIWizardNewVMNameOSTypePage::checkISOFile(UINameAndSystemEditor *pNameAndSystemEditor)
    329324{
     
    387382        connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOSFamilyChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltGuestOSFamilyChanged);
    388383    }
     384    if (m_pSkipUnattendedCheckBox)
     385        connect(m_pSkipUnattendedCheckBox, &QCheckBox::toggled, this, &UIWizardNewVMNameOSTypePageBasic::sltSkipUnattendedInstallChanged);
    389386}
    390387
     
    486483{
    487484    newVMWizardPropertySet(GuestOSFamilyId, strGuestOSFamilyId);
     485}
     486
     487void UIWizardNewVMNameOSTypePageBasic::sltSkipUnattendedInstallChanged(bool fSkip)
     488{
     489    newVMWizardPropertySet(SkipUnattendedInstall, fSkip);
    488490}
    489491
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h

    r90070 r90072  
    5353    /** Return false if ISO path is not empty but points to an missing or unreadable file. */
    5454    bool checkISOFile(UINameAndSystemEditor *pNameAndSystemEditor);
    55 
    56 //         QString guestOSFamiyId() const;
    57 //         const QString &detectedOSTypeId() const;
    58 //         bool skipUnattendedInstall() const;
    5955}
    6056
     
    8480    void sltISOPathChanged(const QString &strPath);
    8581    void sltGuestOSFamilyChanged(const QString &strGuestOSFamilyId);
     82    void sltSkipUnattendedInstallChanged(bool fSkip);
    8683
    8784private:
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