VirtualBox

Changeset 87903 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 1, 2021 5:48:20 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9950. warning user about the empty disk

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

Legend:

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

    r87901 r87903  
    309309}
    310310
    311 // bool UIWizardNewVMPageBasic4::validatePage()
    312 // {
    313 //     /* Initial result: */
    314 //     bool fResult = true;
    315 
    316 //     /* Ensure unused virtual-disk is deleted: */
    317 //     if (m_pDiskEmpty->isChecked() || m_pDiskNew->isChecked() || (!m_virtualDisk.isNull() && m_uVirtualDiskId != m_virtualDisk.GetId()))
    318 //         ensureNewVirtualDiskDeleted();
    319 
    320 //     if (m_pDiskEmpty->isChecked())
    321 //     {
    322 //         /* Ask user about disk-less machine unless that's the recommendation: */
    323 //         if (!m_fRecommendedNoDisk)
    324 //             fResult = msgCenter().confirmHardDisklessMachine(thisImp());
    325 //     }
    326 //     else if (m_pDiskNew->isChecked())
    327 //     {
    328 //         /* Show the New Virtual Hard Drive wizard: */
    329 //         fResult = getWithNewVirtualDiskWizard();
    330 //     }
    331 
    332 //     if (fResult)
    333 //     {
    334 //         /* Lock finish button: */
    335 //         startProcessing();
    336 
    337 //         /* Try to create VM: */
    338 //         fResult = qobject_cast<UIWizardNewVM*>(wizard())->createVM();
    339 
    340 //         /* Unlock finish button: */
    341 //         endProcessing();
    342 //     }
    343 
    344 //     /* Return result: */
    345 //     return fResult;
    346 // }
     311bool UIWizardNewVMPageBasic4::validatePage()
     312{
     313    bool fResult = true;
     314    if (selectedDiskSource() == SelectedDiskSource_Empty)
     315    {
     316        /* Ask user about disk-less machine unless that's the recommendation: */
     317        if (!m_fRecommendedNoDisk)
     318            fResult = msgCenter().confirmHardDisklessMachine(thisImp());
     319    }
     320    return fResult;
     321}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.h

    r87899 r87903  
    122122
    123123    bool isComplete() const;
     124    bool validatePage();
    124125
    125126    QIRichTextLabel *m_pLabel;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic8.cpp

    r87901 r87903  
    166166
    167167    startProcessing();
    168 
    169168    SelectedDiskSource enmDiskSource = field("selectedDiskSource").value<SelectedDiskSource>();
    170169    if (enmDiskSource == SelectedDiskSource_New)
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